xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/configure.ac (revision 16dce51364ebe8aeafbae46bc5aa167b8115bc45)
1#                                                       -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4# Copyright 2002-2016 Free Software Foundation, Inc.
5#
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.
10#
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.
15#
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/>.
18
19AC_PREREQ(2.59)
20AC_INIT(gdb.base)
21
22AC_CANONICAL_BUILD
23AC_CANONICAL_HOST
24AC_CANONICAL_TARGET
25
26ACX_NONCANONICAL_TARGET
27
28# Check for the 'make' the user wants to use.
29AC_CHECK_PROGS(MAKE, make)
30MAKE_IS_GNU=
31case "`$MAKE --version 2>&1 | sed 1q`" in
32  *GNU*)
33    MAKE_IS_GNU=yes
34    ;;
35esac
36AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
37AC_PROG_MAKE_SET
38
39# Enable gdbtk.
40AC_ARG_ENABLE(gdbtk,
41[  --enable-gtk            enable gdbtk graphical user interface (GUI)],,
42  [if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then
43    enable_gdbtk=yes
44  else
45    enable_gdbtk=no
46  fi])
47# We unconditionally disable gdbtk tests on selected platforms.
48case $host_os in
49  go32* | windows*)
50    enable_gdbtk=no ;;
51esac
52
53# Add gdbtk tests when appropriate.
54if test $enable_gdbtk = yes; then
55   AC_CONFIG_SUBDIRS(gdb.gdbtk)
56fi
57
58# Enable shared libraries.
59AC_ARG_ENABLE(shared,
60[  --enable-shared         build shared libraries [deault=yes]],,
61  enable_shared=yes)
62
63# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
64# such that we can find the shared libraries in the build tree.
65if test $enable_shared = no; then
66  # The variable `RPATH_ENVVAR' itself is not likely to be used on any
67  # platform.
68  RPATH_ENVVAR=RPATH_ENVVAR
69else
70  # The variable `LD_LIBRARY_PATH' is used on most platforms.
71  RPATH_ENVVAR=LD_LIBRARY_PATH
72  # The following exceptions are taken from Libtool 1.4.3.
73  case $host_os in
74    aix*)
75      if test $host_cpu != ia64; then
76        RPATH_ENVVAR=LIBPATH
77      fi ;;
78    darwin* | rhapsody*)
79      RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
80  esac
81fi
82AC_SUBST(RPATH_ENVVAR)
83
84AC_CHECK_HEADERS(pthread.h)
85
86AC_EXEEXT
87
88if test "${build}" = "${host}" -a "${host}" = "${target}"; then
89   case "${host}" in
90     *gnu*)
91       EXTRA_RULES=read1
92       ;;
93   esac
94fi
95AC_SUBST(EXTRA_RULES)
96
97# Transform the name of some programs and generate the lib/pdtrace
98# test tool.
99AC_ARG_PROGRAM
100GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
101GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
102GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
103GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
104AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
105AC_CONFIG_FILES([Makefile])
106
107AC_OUTPUT
108