xref: /openbsd-src/gnu/usr.bin/binutils/gdb/testsuite/configure.in (revision 63addd46c1e40ca0f49488ddcdc4ab598023b0c1)
1b725ae77Skettenis#                                                       -*- Autoconf -*-
2b725ae77Skettenis# Process this file with autoconf to produce a configure script.
3e93f7393Sniklas
4*63addd46Skettenis# Copyright 2002, 2003, 2004
5b725ae77Skettenis# Free Software Foundation, Inc.
6b725ae77Skettenis#
7b725ae77Skettenis# This program is free software; you can redistribute it and/or modify
8b725ae77Skettenis# it under the terms of the GNU General Public License as published by
9b725ae77Skettenis# the Free Software Foundation; either version 2, or (at your option)
10b725ae77Skettenis# any later version.
11b725ae77Skettenis#
12b725ae77Skettenis# This program is distributed in the hope that it will be useful,
13b725ae77Skettenis# but WITHOUT ANY WARRANTY; without even the implied warranty of
14b725ae77Skettenis# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15b725ae77Skettenis# GNU General Public License for more details.
16b725ae77Skettenis#
17b725ae77Skettenis# You should have received a copy of the GNU General Public License
18b725ae77Skettenis# along with this program; if not, write to the Free Software
19b725ae77Skettenis# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20b725ae77Skettenis# 02111-1307, USA.
21b725ae77Skettenis
22*63addd46Skettenis# NOTE ON AUTOCONF VERSION:
23*63addd46Skettenis#   AC_PREREQ says 2.13.
24*63addd46Skettenis#   The output file says "Generated automatically using autoconf version 2.13".
25*63addd46Skettenis#   But that is wrong.  This file must be processed with autoconf 000227,
26*63addd46Skettenis#   a special version which identifies itself as autoconf 2.13.
27*63addd46Skettenis
28b725ae77SkettenisAC_PREREQ(2.13)
29e93f7393SniklasAC_INIT(gdb.base)
30e93f7393Sniklas
31b725ae77SkettenisAC_CANONICAL_BUILD
32b725ae77SkettenisAC_CANONICAL_HOST
33b725ae77SkettenisAC_CANONICAL_TARGET
34e93f7393Sniklas
35b725ae77Skettenis# Directories that need to be configured in all configurations.
36b725ae77Skettenisconfigdirs=
37e93f7393Sniklas
38b725ae77Skettenis# Add HP-specific tests when appropriate.
39b725ae77Sketteniscase $target in
40b725ae77Skettenis  hppa*-*-hpux*)
41b725ae77Skettenis    configdirs="$configdirs gdb.hp" ;;
42e93f7393Sniklasesac
43e93f7393Sniklas
44b725ae77Skettenis# With stabs.
45b725ae77SkettenisAC_ARG_WITH(stabs,
46b725ae77Skettenis[  --with-stabs            arrange to use stabs instead of host debug format],,
47b725ae77Skettenis[# We enable stabs tests by default on selected targets.
48b725ae77Sketteniscase $target in
49b725ae77Skettenis   powerpc-*-aix* \
50b725ae77Skettenis | rs6000-*-aix*  \
51b725ae77Skettenis | *-*-*bsd*      \
52b725ae77Skettenis | *-*-go32*      \
53b725ae77Skettenis | *-*-linux*     \
54b725ae77Skettenis | *-*-lynxos*    \
55b725ae77Skettenis | *-sun-*        \
56b725ae77Skettenis | hppa*-*-*      \
57b725ae77Skettenis | *-*-elf*       \
58b725ae77Skettenis )
59b725ae77Skettenis    with_stabs=yes ;;
60b725ae77Skettenis *)
61b725ae77Skettenis    with_stabs=no ;;
62b725ae77Skettenisesac])
63b725ae77Skettenis
64b725ae77Skettenis# Add stabs tests when appropriate.
65b725ae77Skettenisif test $with_stabs = yes; then
66b725ae77Skettenis  configdirs="$configdirs gdb.stabs"
67b725ae77Skettenisfi
68b725ae77Skettenis
69b725ae77Skettenis# Enable gdbtk.
70b725ae77SkettenisAC_ARG_ENABLE(gdbtk,
71b725ae77Skettenis[  --enable-gtk            enable gdbtk graphical user interface (GUI)],,
72b725ae77Skettenis  [if test -d $srcdir/gdb.gdbtk; then
73b725ae77Skettenis    enable_gdbtk=yes
74b725ae77Skettenis  else
75b725ae77Skettenis    enable_gdbtk=no
76b725ae77Skettenis  fi])
77b725ae77Skettenis# We unconditionally disable gdbtk tests on selected platforms.
78b725ae77Sketteniscase $host_os in
79b725ae77Skettenis  go32* | windows*)
80b725ae77Skettenis    enable_gdbtk=no ;;
81b725ae77Skettenisesac
82b725ae77Skettenis
83b725ae77Skettenis# Add gdbtk tests when appropriate.
84b725ae77Skettenisif test $enable_gdbtk = yes; then
85b725ae77Skettenis  configdirs="$configdirs gdb.gdbtk"
86b725ae77Skettenisfi
87b725ae77Skettenis
88b725ae77Skettenis# Enable shared libraries.
89e93f7393SniklasAC_ARG_ENABLE(shared,
90b725ae77Skettenis[  --enable-shared         build shared libraries [deault=yes]],,
91b725ae77Skettenis  enable_shared=yes)
92b725ae77Skettenis
93b725ae77Skettenis# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
94b725ae77Skettenis# such that we can find the shared libraries in the build tree.
95b725ae77Skettenisif test $enable_shared = no; then
96b725ae77Skettenis  # The variable `RPATH_ENVVAR' itself is not likely to be used on any
97b725ae77Skettenis  # platform.
98b725ae77Skettenis  RPATH_ENVVAR=RPATH_ENVVAR
99b725ae77Sketteniselse
100b725ae77Skettenis  # The variable `LD_LIBRARY_PATH' is used on most platforms.
101e93f7393Sniklas  RPATH_ENVVAR=LD_LIBRARY_PATH
102b725ae77Skettenis  # The following exceptions are taken from Libtool 1.4.3.
103b725ae77Skettenis  case $host_os in
104b725ae77Skettenis    aix*)
105b725ae77Skettenis      if test $host_cpu != ia64; then
106b725ae77Skettenis        RPATH_ENVVAR=LIBPATH
107b725ae77Skettenis      fi ;;
108b725ae77Skettenis    darwin* | rhapsody*)
109b725ae77Skettenis      RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
110b725ae77Skettenis    hpux*)
111b725ae77Skettenis      RPATH_ENVVAR=SHLIB_PATH ;;
112e93f7393Sniklas  esac
113e93f7393Sniklasfi
114e93f7393SniklasAC_SUBST(RPATH_ENVVAR)
115e93f7393Sniklas
116b725ae77SkettenisAC_CHECK_HEADERS(pthread.h)
117b725ae77Skettenis
118b725ae77SkettenisAC_EXEEXT
119b725ae77Skettenis
120e93f7393SniklasAC_CONFIG_SUBDIRS($configdirs)
121*63addd46SkettenisAC_OUTPUT([Makefile \
122*63addd46Skettenis  gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
123*63addd46Skettenis  gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
124*63addd46Skettenis  gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
125*63addd46Skettenis  gdb.fortran/Makefile gdb.java/Makefile gdb.mi/Makefile \
126b725ae77Skettenis  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile])
127