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