]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/configure.ac
This commit was manufactured by cvs2svn to create branch 'gdb_7_2-branch'.
[thirdparty/binutils-gdb.git] / gdb / testsuite / configure.ac
CommitLineData
b39c905e
MK
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
c906108c 3
abd775ce 4# Copyright 2002, 2003, 2004, 2005, 2009, 2010
b39c905e
MK
5# Free Software Foundation, Inc.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
5a0e3bd0
JB
9# the Free Software Foundation; either version 3 of the License, or
10# (at your option) any later version.
b39c905e
MK
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
5a0e3bd0 18# along with this program. If not, see <http://www.gnu.org/licenses/>.
b39c905e 19
bec39cab 20AC_PREREQ(2.59)
c906108c
SS
21AC_INIT(gdb.base)
22
b39c905e
MK
23AC_CANONICAL_BUILD
24AC_CANONICAL_HOST
25AC_CANONICAL_TARGET
c906108c 26
be2a5f71
DJ
27ACX_NONCANONICAL_TARGET
28
6bc80edc
TT
29# Check for the 'make' the user wants to use.
30AC_CHECK_PROGS(MAKE, make)
31MAKE_IS_GNU=
32case "`$MAKE --version 2>&1 | sed 1q`" in
33 *GNU*)
34 MAKE_IS_GNU=yes
35 ;;
36esac
37AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
38AC_PROG_MAKE_SET
39
b39c905e
MK
40# Add HP-specific tests when appropriate.
41case $target in
42 hppa*-*-hpux*)
3ace7edb 43 AC_CONFIG_SUBDIRS(gdb.hp) ;;
c906108c
SS
44esac
45
1ea34204
UW
46# Add Cell/B.E. specific tests when appropriate.
47# We need support for both PowerPC and SPU targets configured in.
48case $target in
49 powerpc*-*-linux*)
50 have_spu_target=no
51 for targ in `echo $enable_targets | sed 's/,/ /g'`
52 do
53 case "${targ}" in
54 spu*|all) have_spu_target=yes ;;
55 esac
56 done
57 if test x$have_spu_target = xyes; then
58 AC_CONFIG_SUBDIRS(gdb.cell)
59 fi
60 ;;
61esac
62
b39c905e
MK
63# With stabs.
64AC_ARG_WITH(stabs,
65[ --with-stabs arrange to use stabs instead of host debug format],,
66[# We enable stabs tests by default on selected targets.
67case $target in
68 powerpc-*-aix* \
69 | rs6000-*-aix* \
3224a706 70 | *-*-*bsd* \
b39c905e
MK
71 | *-*-go32* \
72 | *-*-linux* \
73 | *-*-lynxos* \
74 | *-sun-* \
75 | hppa*-*-* \
76 | *-*-elf* \
3f213f78
PA
77 | *-*-cygwin* \
78 | *-*-mingw* \
b39c905e
MK
79 )
80 with_stabs=yes ;;
81 *)
82 with_stabs=no ;;
83esac])
c906108c 84
b39c905e
MK
85# Add stabs tests when appropriate.
86if test $with_stabs = yes; then
3ace7edb 87 AC_CONFIG_SUBDIRS(gdb.stabs)
b39c905e 88fi
c906108c 89
b39c905e
MK
90# Enable gdbtk.
91AC_ARG_ENABLE(gdbtk,
92[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
93 [if test -d $srcdir/gdb.gdbtk; then
94 enable_gdbtk=yes
95 else
96 enable_gdbtk=no
97 fi])
98# We unconditionally disable gdbtk tests on selected platforms.
99case $host_os in
100 go32* | windows*)
101 enable_gdbtk=no ;;
c906108c
SS
102esac
103
b39c905e
MK
104# Add gdbtk tests when appropriate.
105if test $enable_gdbtk = yes; then
3ace7edb 106 AC_CONFIG_SUBDIRS(gdb.gdbtk)
b39c905e 107fi
c906108c 108
b39c905e 109# Enable shared libraries.
c906108c 110AC_ARG_ENABLE(shared,
b39c905e
MK
111[ --enable-shared build shared libraries [deault=yes]],,
112 enable_shared=yes)
113
114# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
115# such that we can find the shared libraries in the build tree.
116if test $enable_shared = no; then
117 # The variable `RPATH_ENVVAR' itself is not likely to be used on any
118 # platform.
119 RPATH_ENVVAR=RPATH_ENVVAR
120else
121 # The variable `LD_LIBRARY_PATH' is used on most platforms.
122 RPATH_ENVVAR=LD_LIBRARY_PATH
123 # The following exceptions are taken from Libtool 1.4.3.
124 case $host_os in
125 aix*)
126 if test $host_cpu != ia64; then
127 RPATH_ENVVAR=LIBPATH
128 fi ;;
129 darwin* | rhapsody*)
130 RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
131 hpux*)
132 RPATH_ENVVAR=SHLIB_PATH ;;
c906108c
SS
133 esac
134fi
135AC_SUBST(RPATH_ENVVAR)
3fc11d3e 136
dc62bfc2
MK
137AC_CHECK_HEADERS(pthread.h)
138
93076499
ND
139AC_EXEEXT
140
8a12c1f0 141AC_OUTPUT([Makefile \
464dd14d 142 gdb.ada/Makefile \
f86ef5a3 143 gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
0eb3658b 144 gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
57bb97a4
UW
145 gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
146 gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
5876dc88 147 gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
28d41a99 148 gdb.python/Makefile gdb.reverse/Makefile \
5876dc88 149 gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])