2 # Process this file with autoconf to produce a configure script.
4 # Copyright 2002-2020 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 ACX_NONCANONICAL_TARGET
29 [ --enable-gtk enable gdbtk graphical user interface (GUI)],,
30 [if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then
35 # We unconditionally disable gdbtk tests on selected platforms.
41 # Add gdbtk tests when appropriate.
42 if test $enable_gdbtk = yes; then
43 AC_CONFIG_SUBDIRS(gdb.gdbtk)
46 GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
47 AC_SUBST(enable_libctf)
49 # Enable shared libraries.
51 [ --enable-shared build shared libraries [deault=yes]],,
54 # If we have shared libraries, try to set RPATH_ENVVAR reasonably,
55 # such that we can find the shared libraries in the build tree.
56 if test $enable_shared = no; then
57 # The variable `RPATH_ENVVAR' itself is not likely to be used on any
59 RPATH_ENVVAR=RPATH_ENVVAR
61 # The variable `LD_LIBRARY_PATH' is used on most platforms.
62 RPATH_ENVVAR=LD_LIBRARY_PATH
63 # The following exceptions are taken from Libtool 1.4.3.
66 if test $host_cpu != ia64; then
70 RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
73 AC_SUBST(RPATH_ENVVAR)
75 AC_CHECK_HEADERS(pthread.h)
79 if test "${build}" = "${host}" -a "${host}" = "${target}"; then
88 # Transform the name of some programs and generate the lib/pdtrace
91 GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
92 GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
93 GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
94 GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
95 AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
96 AC_CONFIG_FILES([Makefile])