Commit | Line | Data |
---|---|---|
b39c905e MK |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
c906108c | 3 | |
7bedbf27 | 4 | # Copyright 2002, 2003 |
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 | |
9 | # the Free Software Foundation; either version 2, or (at your option) | |
10 | # any later version. | |
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 | |
18 | # along with this program; if not, write to the Free Software | |
19 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
20 | # 02111-1307, USA. | |
21 | ||
22 | AC_PREREQ(2.13) | |
c906108c | 23 | AC_INIT(gdb.base) |
dc62bfc2 | 24 | AC_CONFIG_HEADER(config.h:config.hin) |
c906108c | 25 | |
b39c905e MK |
26 | AC_CANONICAL_BUILD |
27 | AC_CANONICAL_HOST | |
28 | AC_CANONICAL_TARGET | |
c906108c | 29 | |
dc62bfc2 | 30 | # Directories that need to be configured in all configurations. |
b39c905e | 31 | configdirs= |
c906108c | 32 | |
b39c905e MK |
33 | # Add HP-specific tests when appropriate. |
34 | case $target in | |
35 | hppa*-*-hpux*) | |
36 | configdirs="$configdirs gdb.hp" ;; | |
c906108c SS |
37 | esac |
38 | ||
b39c905e MK |
39 | # With stabs. |
40 | AC_ARG_WITH(stabs, | |
41 | [ --with-stabs arrange to use stabs instead of host debug format],, | |
42 | [# We enable stabs tests by default on selected targets. | |
43 | case $target in | |
44 | powerpc-*-aix* \ | |
45 | | rs6000-*-aix* \ | |
46 | | *-*-bsd* \ | |
47 | | *-*-go32* \ | |
48 | | *-*-linux* \ | |
49 | | *-*-lynxos* \ | |
50 | | *-sun-* \ | |
51 | | hppa*-*-* \ | |
52 | | *-*-elf* \ | |
53 | ) | |
54 | with_stabs=yes ;; | |
55 | *) | |
56 | with_stabs=no ;; | |
57 | esac]) | |
c906108c | 58 | |
b39c905e MK |
59 | # Add stabs tests when appropriate. |
60 | if test $with_stabs = yes; then | |
61 | configdirs="$configdirs gdb.stabs" | |
62 | fi | |
c906108c | 63 | |
b39c905e MK |
64 | # Enable gdbtk. |
65 | AC_ARG_ENABLE(gdbtk, | |
66 | [ --enable-gtk enable gdbtk graphical user interface (GUI)],, | |
67 | [if test -d $srcdir/gdb.gdbtk; then | |
68 | enable_gdbtk=yes | |
69 | else | |
70 | enable_gdbtk=no | |
71 | fi]) | |
72 | # We unconditionally disable gdbtk tests on selected platforms. | |
73 | case $host_os in | |
74 | go32* | windows*) | |
75 | enable_gdbtk=no ;; | |
c906108c SS |
76 | esac |
77 | ||
b39c905e MK |
78 | # Add gdbtk tests when appropriate. |
79 | if test $enable_gdbtk = yes; then | |
80 | configdirs="$configdirs gdb.gdbtk" | |
81 | fi | |
c906108c | 82 | |
b39c905e | 83 | # Enable shared libraries. |
c906108c | 84 | AC_ARG_ENABLE(shared, |
b39c905e MK |
85 | [ --enable-shared build shared libraries [deault=yes]],, |
86 | enable_shared=yes) | |
87 | ||
88 | # If we have shared libraries, try to set RPATH_ENVVAR reasonably, | |
89 | # such that we can find the shared libraries in the build tree. | |
90 | if test $enable_shared = no; then | |
91 | # The variable `RPATH_ENVVAR' itself is not likely to be used on any | |
92 | # platform. | |
93 | RPATH_ENVVAR=RPATH_ENVVAR | |
94 | else | |
95 | # The variable `LD_LIBRARY_PATH' is used on most platforms. | |
96 | RPATH_ENVVAR=LD_LIBRARY_PATH | |
97 | # The following exceptions are taken from Libtool 1.4.3. | |
98 | case $host_os in | |
99 | aix*) | |
100 | if test $host_cpu != ia64; then | |
101 | RPATH_ENVVAR=LIBPATH | |
102 | fi ;; | |
103 | darwin* | rhapsody*) | |
104 | RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; | |
105 | hpux*) | |
106 | RPATH_ENVVAR=SHLIB_PATH ;; | |
c906108c SS |
107 | esac |
108 | fi | |
109 | AC_SUBST(RPATH_ENVVAR) | |
3fc11d3e | 110 | |
dc62bfc2 MK |
111 | AC_CHECK_HEADERS(pthread.h) |
112 | ||
93076499 ND |
113 | AC_EXEEXT |
114 | ||
c906108c | 115 | AC_CONFIG_SUBDIRS($configdirs) |
dc62bfc2 MK |
116 | AC_OUTPUT([Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \ |
117 | gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \ | |
118 | gdb.threads/Makefile gdb.trace/Makefile]) |