Simple testsuite for DTrace USDT probes.
[deliverable/binutils-gdb.git] / gdb / testsuite / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 # Copyright 2002-2015 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
19 AC_PREREQ(2.59)
20 AC_INIT(gdb.base)
21
22 AC_CANONICAL_BUILD
23 AC_CANONICAL_HOST
24 AC_CANONICAL_TARGET
25
26 ACX_NONCANONICAL_TARGET
27
28 # Check for the 'make' the user wants to use.
29 AC_CHECK_PROGS(MAKE, make)
30 MAKE_IS_GNU=
31 case "`$MAKE --version 2>&1 | sed 1q`" in
32 *GNU*)
33 MAKE_IS_GNU=yes
34 ;;
35 esac
36 AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
37 AC_PROG_MAKE_SET
38
39 # Enable gdbtk.
40 AC_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.
48 case $host_os in
49 go32* | windows*)
50 enable_gdbtk=no ;;
51 esac
52
53 # Add gdbtk tests when appropriate.
54 if test $enable_gdbtk = yes; then
55 AC_CONFIG_SUBDIRS(gdb.gdbtk)
56 fi
57
58 # Enable shared libraries.
59 AC_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.
65 if 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
69 else
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 hpux*)
81 RPATH_ENVVAR=SHLIB_PATH ;;
82 esac
83 fi
84 AC_SUBST(RPATH_ENVVAR)
85
86 AC_CHECK_HEADERS(pthread.h)
87
88 AC_EXEEXT
89
90 if test "${build}" = "${host}" -a "${host}" = "${target}"; then
91 case "${host}" in
92 *gnu*)
93 EXTRA_RULES=read1
94 ;;
95 esac
96 fi
97 AC_SUBST(EXTRA_RULES)
98
99 # Transform the name of some programs and generate the lib/pdtrace
100 # test tool.
101 AC_ARG_PROGRAM
102 transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'`
103 STRIP_TRANSFORM_NAME=`echo strip | sed -e "$transform"`
104 if test "x$STRIP_TRANSFORM_NAME" = x; then
105 STRIP_TRANSFORM_NAME=strip
106 fi
107 AC_SUBST(STRIP_TRANSFORM_NAME)
108 READELF_TRANSFORM_NAME=`echo readelf | sed -e "$transform"`
109 if test "x$READELF_TRANSFORM_NAME" = x; then
110 READELF_TRANSFORM_NAME=readelf
111 fi
112 AC_SUBST(READELF_TRANSFORM_NAME)
113 GAS_TRANSFORM_NAME=`echo as | sed -e "$transform"`
114 if test "x$GAS_TRANSFORM_NAME" = x; then
115 GAS_TRANSFORM_NAME=as
116 fi
117 AC_SUBST(GAS_TRANSFORM_NAME)
118 NM_TRANSFORM_NAME=`echo nm | sed -e "$transform"`
119 if test "x$NM_TRANSFORM_NAME" = x; then
120 NM_TRANSFORM_NAME=nm
121 fi
122 AC_SUBST(NM_TRANSFORM_NAME)
123 AC_CONFIG_FILES([lib/pdtrace], [chmod +x lib/pdtrace])
124
125 AC_OUTPUT([Makefile \
126 gdb.ada/Makefile \
127 gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile \
128 gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile \
129 gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile \
130 gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile \
131 gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile \
132 gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
133 gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
134 gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
135 gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
136 gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
137 gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
This page took 0.034487 seconds and 5 git commands to generate.