]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/configure.ac
Automatic Copyright Year update after running gdb/copyright.py
[thirdparty/binutils-gdb.git] / gdb / testsuite / configure.ac
CommitLineData
a100a945
SM
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4a94e368 4# Copyright 2002-2022 Free Software Foundation, Inc.
a100a945
SM
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_INIT
20AC_CONFIG_SRCDIR([gdb.base])
21
22AC_CANONICAL_BUILD
23AC_CANONICAL_HOST
24AC_CANONICAL_TARGET
25
26ACX_NONCANONICAL_TARGET
27
28# Enable gdbtk.
29AC_ARG_ENABLE(gdbtk,
30[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
31 [if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then
32 enable_gdbtk=yes
33 else
34 enable_gdbtk=no
35 fi])
36# We unconditionally disable gdbtk tests on selected platforms.
37case $host_os in
38 go32* | windows*)
39 enable_gdbtk=no ;;
40esac
41
42# Add gdbtk tests when appropriate.
43if test $enable_gdbtk = yes; then
44 AC_CONFIG_SUBDIRS(gdb.gdbtk)
45fi
46
47GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
48AC_SUBST(enable_libctf)
49
50# Enable shared libraries.
51AC_ARG_ENABLE(shared,
52[ --enable-shared build shared libraries [deault=yes]],,
53 enable_shared=yes)
54
55# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
56# such that we can find the shared libraries in the build tree.
57if test $enable_shared = no; then
58 # The variable `RPATH_ENVVAR' itself is not likely to be used on any
59 # platform.
60 RPATH_ENVVAR=RPATH_ENVVAR
61else
62 # The variable `LD_LIBRARY_PATH' is used on most platforms.
63 RPATH_ENVVAR=LD_LIBRARY_PATH
64 # The following exceptions are taken from Libtool 1.4.3.
65 case $host_os in
66 aix*)
67 if test $host_cpu != ia64; then
68 RPATH_ENVVAR=LIBPATH
69 fi ;;
70 darwin* | rhapsody*)
71 RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
72 esac
73fi
74AC_SUBST(RPATH_ENVVAR)
75
76AC_CHECK_HEADERS(pthread.h)
77
78AC_EXEEXT
79
80if test "${build}" = "${host}" -a "${host}" = "${target}"; then
81 case "${host}" in
82 *gnu*)
83 EXTRA_RULES=read1
84 ;;
85 esac
86fi
87AC_SUBST(EXTRA_RULES)
88
89# Transform the name of some programs and generate the lib/pdtrace
90# test tool.
91AC_ARG_PROGRAM
92GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
93GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
94GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
95GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
96AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
97AC_CONFIG_FILES([Makefile])
98
99AC_OUTPUT