Commit | Line | Data |
---|---|---|
b39c905e MK |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
c906108c | 3 | |
44944448 | 4 | # Copyright 2002, 2003, 2004, 2005, 2009, 2010, 2011 |
b39c905e MK |
5 | # Free Software Foundation, Inc. |
6 | # | |
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 | |
5a0e3bd0 JB |
9 | # the Free Software Foundation; either version 3 of the License, or |
10 | # (at your option) any later version. | |
b39c905e MK |
11 | # |
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. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
5a0e3bd0 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
b39c905e | 19 | |
bec39cab | 20 | AC_PREREQ(2.59) |
c906108c SS |
21 | AC_INIT(gdb.base) |
22 | ||
b39c905e MK |
23 | AC_CANONICAL_BUILD |
24 | AC_CANONICAL_HOST | |
25 | AC_CANONICAL_TARGET | |
c906108c | 26 | |
be2a5f71 DJ |
27 | ACX_NONCANONICAL_TARGET |
28 | ||
6bc80edc TT |
29 | # Check for the 'make' the user wants to use. |
30 | AC_CHECK_PROGS(MAKE, make) | |
31 | MAKE_IS_GNU= | |
32 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
33 | *GNU*) | |
34 | MAKE_IS_GNU=yes | |
35 | ;; | |
36 | esac | |
37 | AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes) | |
38 | AC_PROG_MAKE_SET | |
39 | ||
b39c905e MK |
40 | # Enable gdbtk. |
41 | AC_ARG_ENABLE(gdbtk, | |
42 | [ --enable-gtk enable gdbtk graphical user interface (GUI)],, | |
30e62689 | 43 | [if test -d $srcdir/../gdbtk && test -d $srcdir/gdb.gdbtk; then |
b39c905e MK |
44 | enable_gdbtk=yes |
45 | else | |
46 | enable_gdbtk=no | |
47 | fi]) | |
48 | # We unconditionally disable gdbtk tests on selected platforms. | |
49 | case $host_os in | |
50 | go32* | windows*) | |
51 | enable_gdbtk=no ;; | |
c906108c SS |
52 | esac |
53 | ||
b39c905e MK |
54 | # Add gdbtk tests when appropriate. |
55 | if test $enable_gdbtk = yes; then | |
3ace7edb | 56 | AC_CONFIG_SUBDIRS(gdb.gdbtk) |
b39c905e | 57 | fi |
c906108c | 58 | |
b39c905e | 59 | # Enable shared libraries. |
c906108c | 60 | AC_ARG_ENABLE(shared, |
b39c905e MK |
61 | [ --enable-shared build shared libraries [deault=yes]],, |
62 | enable_shared=yes) | |
63 | ||
64 | # If we have shared libraries, try to set RPATH_ENVVAR reasonably, | |
65 | # such that we can find the shared libraries in the build tree. | |
66 | if test $enable_shared = no; then | |
67 | # The variable `RPATH_ENVVAR' itself is not likely to be used on any | |
68 | # platform. | |
69 | RPATH_ENVVAR=RPATH_ENVVAR | |
70 | else | |
71 | # The variable `LD_LIBRARY_PATH' is used on most platforms. | |
72 | RPATH_ENVVAR=LD_LIBRARY_PATH | |
73 | # The following exceptions are taken from Libtool 1.4.3. | |
74 | case $host_os in | |
75 | aix*) | |
76 | if test $host_cpu != ia64; then | |
77 | RPATH_ENVVAR=LIBPATH | |
78 | fi ;; | |
79 | darwin* | rhapsody*) | |
80 | RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; | |
81 | hpux*) | |
82 | RPATH_ENVVAR=SHLIB_PATH ;; | |
c906108c SS |
83 | esac |
84 | fi | |
85 | AC_SUBST(RPATH_ENVVAR) | |
3fc11d3e | 86 | |
dc62bfc2 MK |
87 | AC_CHECK_HEADERS(pthread.h) |
88 | ||
93076499 ND |
89 | AC_EXEEXT |
90 | ||
8a12c1f0 | 91 | AC_OUTPUT([Makefile \ |
464dd14d | 92 | gdb.ada/Makefile \ |
f86ef5a3 | 93 | gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \ |
30e62689 | 94 | gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \ |
57bb97a4 | 95 | gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \ |
30e62689 TT |
96 | gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile \ |
97 | gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \ | |
98 | gdb.hp/gdb.defects/Makefile \ | |
57bb97a4 | 99 | gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \ |
f4b8a18d | 100 | gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \ |
30e62689 | 101 | gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ |
5876dc88 | 102 | gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) |