2 # Process this file with autoconf to produce a configure script.
4 # Copyright 2002, 2003, 2004, 2005, 2009, 2010
5 # Free Software Foundation, Inc.
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
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
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.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 ACX_NONCANONICAL_TARGET
29 # Check for the 'make' the user wants to use.
30 AC_CHECK_PROGS(MAKE, make)
32 case "`$MAKE --version 2>&1 | sed 1q`" in
37 AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
40 # Add HP-specific tests when appropriate.
43 AC_CONFIG_SUBDIRS(gdb.hp) ;;
46 # Add Cell/B.E. specific tests when appropriate.
47 # We need support for both PowerPC and SPU targets configured in.
51 for targ in `echo $enable_targets | sed 's/,/ /g'`
54 spu*|all) have_spu_target=yes ;;
57 if test x$have_spu_target = xyes; then
58 AC_CONFIG_SUBDIRS(gdb.cell)
65 [ --with-stabs arrange to use stabs instead of host debug format],,
66 [# We enable stabs tests by default on selected targets.
85 # Add stabs tests when appropriate.
86 if test $with_stabs = yes; then
87 AC_CONFIG_SUBDIRS(gdb.stabs)
92 [ --enable-gtk enable gdbtk graphical user interface (GUI)],,
93 [if test -d $srcdir/gdb.gdbtk; then
98 # We unconditionally disable gdbtk tests on selected platforms.
104 # Add gdbtk tests when appropriate.
105 if test $enable_gdbtk = yes; then
106 AC_CONFIG_SUBDIRS(gdb.gdbtk)
109 # Enable shared libraries.
110 AC_ARG_ENABLE(shared,
111 [ --enable-shared build shared libraries [deault=yes]],,
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.
116 if test $enable_shared = no; then
117 # The variable `RPATH_ENVVAR' itself is not likely to be used on any
119 RPATH_ENVVAR=RPATH_ENVVAR
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.
126 if test $host_cpu != ia64; then
130 RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
132 RPATH_ENVVAR=SHLIB_PATH ;;
135 AC_SUBST(RPATH_ENVVAR)
137 AC_CHECK_HEADERS(pthread.h)
141 AC_OUTPUT([Makefile \
143 gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
144 gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
145 gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
146 gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
147 gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
148 gdb.python/Makefile gdb.reverse/Makefile \
149 gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])