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