* configure.in: Rewrite.
[deliverable/binutils-gdb.git] / gdb / testsuite / configure.in
CommitLineData
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
22AC_PREREQ(2.13)
c906108c
SS
23AC_INIT(gdb.base)
24
b39c905e
MK
25AC_CANONICAL_BUILD
26AC_CANONICAL_HOST
27AC_CANONICAL_TARGET
c906108c
SS
28
29# Directories to use in all configurations.
b39c905e
MK
30AC_CONFIG_SUBDIRS(gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm)
31AC_CONFIG_SUBDIRS(gdb.mi gdb.threads gdb.trace)
32configdirs=
c906108c 33
b39c905e
MK
34# Add HP-specific tests when appropriate.
35case $target in
36 hppa*-*-hpux*)
37 configdirs="$configdirs gdb.hp" ;;
c906108c
SS
38esac
39
b39c905e
MK
40# With stabs.
41AC_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.
44case $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 ;;
58esac])
c906108c 59
b39c905e
MK
60# Add stabs tests when appropriate.
61if test $with_stabs = yes; then
62 configdirs="$configdirs gdb.stabs"
63fi
c906108c 64
b39c905e
MK
65# Enable gdbtk.
66AC_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.
74case $host_os in
75 go32* | windows*)
76 enable_gdbtk=no ;;
c906108c
SS
77esac
78
b39c905e
MK
79# Add gdbtk tests when appropriate.
80if test $enable_gdbtk = yes; then
81 configdirs="$configdirs gdb.gdbtk"
82fi
c906108c 83
b39c905e 84# Enable shared libraries.
c906108c 85AC_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.
91if 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
95else
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
109fi
110AC_SUBST(RPATH_ENVVAR)
3fc11d3e 111
93076499
ND
112AC_EXEEXT
113
c906108c 114AC_CONFIG_SUBDIRS($configdirs)
c906108c 115AC_OUTPUT(Makefile)
This page took 0.278227 seconds and 4 git commands to generate.