aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-01-04 00:43:24 +0000
committerMark Kettenis <kettenis@gnu.org>2003-01-04 00:43:24 +0000
commitb39c905ef8addd20526e661bfb14044085243b69 (patch)
tree297203c7d91c29752858325b37ade4aa317c3df1 /gdb/testsuite
parent14abd0fbf038d0e7cd2f76061538c309b5fd8ca9 (diff)
downloadgdb-b39c905ef8addd20526e661bfb14044085243b69.zip
gdb-b39c905ef8addd20526e661bfb14044085243b69.tar.gz
gdb-b39c905ef8addd20526e661bfb14044085243b69.tar.bz2
* configure.in: Rewrite.
* configure: Regenerated.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rwxr-xr-xgdb/testsuite/configure290
-rw-r--r--gdb/testsuite/configure.in187
3 files changed, 234 insertions, 248 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0e53319..061e2f1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-28 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Rewrite.
+ * configure: Regenerated.
+
2003-01-03 David Carlton <carlton@math.stanford.edu>
* gdb.base/psymtab.exp: New file.
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 26d555e..11968a9 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -12,9 +12,11 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared use shared libraries"
+ --with-stabs arrange to use stabs instead of host debug format"
ac_help="$ac_help
- --enable-gdbtk "
+ --enable-gtk enable gdbtk graphical user interface (GUI)"
+ac_help="$ac_help
+ --enable-shared build shared libraries [deault=yes]"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -32,6 +34,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -146,6 +149,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -316,6 +320,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -481,12 +490,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -526,10 +539,8 @@ fi
-CC=${CC-cc}
-
ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -541,33 +552,30 @@ for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:563: checking build system type" >&5
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
esac
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
@@ -575,7 +583,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:579: checking host system type" >&5
+echo "configure:587: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -596,7 +604,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:600: checking target system type" >&5
+echo "configure:608: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -613,137 +621,114 @@ target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:618: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
# Directories to use in all configurations.
-configdirs="gdb.arch \
- gdb.asm \
- gdb.base \
- gdb.c++ \
- gdb.java \
- gdb.disasm \
- gdb.mi \
- gdb.threads \
- gdb.trace"
-
-
-# Directories to use for a configuration which uses stabs.
-stabsdirs="gdb.stabs"
-
- # this section is for targets that use stabs
-# add stabs tests for appropriate targets
-case "${target}" in
- powerpc-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- rs6000-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-bsd*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-go32*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-linux*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-lynxos*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-sun-*) configdirs="${configdirs} ${stabsdirs}" ;;
- hppa*-*-*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-elf*) configdirs="${configdirs} ${stabsdirs}" ;;
- *) if test "x${with_stabs}" = x"yes" ; then
- configdirs="${configdirs} ${stabsdirs}"
- fi ;;
-esac
+subdirs="gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm"
-# Directory with HP specific tests. They will run only with HP's compilers.
-# These tests will not work on other platforms and compilers.
+subdirs="gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm gdb.mi gdb.threads gdb.trace"
-hpdir="gdb.hp"
+configdirs=
-case "${target}" in
- hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
+# Add HP-specific tests when appropriate.
+case $target in
+ hppa*-*-hpux*)
+ configdirs="$configdirs gdb.hp" ;;
esac
-
-# Begin stuff to support --enable-shared
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
+# With stabs.
+# Check whether --with-stabs or --without-stabs was given.
+if test "${with_stabs+set}" = set; then
+ withval="$with_stabs"
+ :
+else
+ # We enable stabs tests by default on selected targets.
+case $target in
+ powerpc-*-aix* \
+ | rs6000-*-aix* \
+ | *-*-bsd* \
+ | *-*-go32* \
+ | *-*-linux* \
+ | *-*-lynxos* \
+ | *-sun-* \
+ | hppa*-*-* \
+ | *-*-elf* \
+ )
+ with_stabs=yes ;;
+ *)
+ with_stabs=no ;;
esac
fi
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- RPATH_ENVVAR=SHLIB_PATH
- ;;
- esac
+
+
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+ configdirs="$configdirs gdb.stabs"
fi
-# End stuff to support --enable-shared
-# Start stuff to support --enable-gdbtk
+# Enable gdbtk.
# Check whether --enable-gdbtk or --disable-gdbtk was given.
if test "${enable_gdbtk+set}" = set; then
enableval="$enable_gdbtk"
- case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- enable_gdbtk=no ;;
- *windows*)
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
-esac
+ :
else
-
-# Default is on for everything but go32 and windows
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- enable_gdbtk=yes ;;
- esac
+ if test -d $srcdir/gdb.gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi
+fi
+
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ enable_gdbtk=no ;;
+esac
+
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+ configdirs="$configdirs gdb.gdbtk"
+fi
+# Enable shared libraries.
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ :
+else
+ enable_shared=yes
fi
-if test "${enable_gdbtk}" = "yes"; then
- configdirs="${configdirs} gdb.gdbtk"
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ hpux*)
+ RPATH_ENVVAR=SHLIB_PATH ;;
+ esac
fi
-# End stuff to support --enable-shared
+
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:742: checking for Cygwin environment" >&5
+echo "configure:727: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 747 "configure"
+#line 732 "configure"
#include "confdefs.h"
int main() {
@@ -754,7 +739,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -771,19 +756,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:775: checking for mingw32 environment" >&5
+echo "configure:760: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 780 "configure"
+#line 765 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -802,7 +787,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:806: checking for executable suffix" >&5
+echo "configure:791: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -812,10 +797,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj) ;;
+ *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -833,9 +818,7 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
-# configure the subdirectories too
-subdirs="$configdirs"
-
+subdirs="gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm gdb.mi gdb.threads gdb.trace $configdirs"
trap '' 1 2 15
cat > confcache <<\EOF
@@ -981,7 +964,11 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
-s%@CC@%$CC%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
@@ -992,14 +979,9 @@ s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
+s%@subdirs@%$subdirs%g
s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
s%@EXEEXT@%$EXEEXT%g
-s%@subdirs@%$subdirs%g
CEOF
EOF
@@ -1132,7 +1114,7 @@ if test "$no_recursion" != yes; then
esac
done
- for ac_config_dir in $configdirs; do
+ for ac_config_dir in gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm gdb.mi gdb.threads gdb.trace $configdirs; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index ab37e6d..7f9932a 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -1,116 +1,115 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.12.1)
+# Copyright (C) 2002
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_PREREQ(2.13)
AC_INIT(gdb.base)
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
# Directories to use in all configurations.
-configdirs="gdb.arch \
- gdb.asm \
- gdb.base \
- gdb.c++ \
- gdb.java \
- gdb.disasm \
- gdb.mi \
- gdb.threads \
- gdb.trace"
-
-
-# Directories to use for a configuration which uses stabs.
-stabsdirs="gdb.stabs"
+AC_CONFIG_SUBDIRS(gdb.arch gdb.asm gdb.base gdb.c++ gdb.java gdb.disasm)
+AC_CONFIG_SUBDIRS(gdb.mi gdb.threads gdb.trace)
+configdirs=
- # this section is for targets that use stabs
-# add stabs tests for appropriate targets
-case "${target}" in
- powerpc-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- rs6000-*-aix*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-bsd*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-go32*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-linux*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-lynxos*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-sun-*) configdirs="${configdirs} ${stabsdirs}" ;;
- hppa*-*-*) configdirs="${configdirs} ${stabsdirs}" ;;
- *-*-elf*) configdirs="${configdirs} ${stabsdirs}" ;;
- *) if test "x${with_stabs}" = x"yes" ; then
- configdirs="${configdirs} ${stabsdirs}"
- fi ;;
+# Add HP-specific tests when appropriate.
+case $target in
+ hppa*-*-hpux*)
+ configdirs="$configdirs gdb.hp" ;;
esac
-# Directory with HP specific tests. They will run only with HP's compilers.
-# These tests will not work on other platforms and compilers.
+# With stabs.
+AC_ARG_WITH(stabs,
+[ --with-stabs arrange to use stabs instead of host debug format],,
+[# We enable stabs tests by default on selected targets.
+case $target in
+ powerpc-*-aix* \
+ | rs6000-*-aix* \
+ | *-*-bsd* \
+ | *-*-go32* \
+ | *-*-linux* \
+ | *-*-lynxos* \
+ | *-sun-* \
+ | hppa*-*-* \
+ | *-*-elf* \
+ )
+ with_stabs=yes ;;
+ *)
+ with_stabs=no ;;
+esac])
-hpdir="gdb.hp"
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+ configdirs="$configdirs gdb.stabs"
+fi
-case "${target}" in
- hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
+# Enable gdbtk.
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
+ [if test -d $srcdir/gdb.gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi])
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ enable_gdbtk=no ;;
esac
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+ configdirs="$configdirs gdb.gdbtk"
+fi
-# Begin stuff to support --enable-shared
+# Enable shared libraries.
AC_ARG_ENABLE(shared,
-[ --enable-shared use shared libraries],
-[case "${enableval}" in
- yes) shared=true ;;
- no) shared=false ;;
- *) shared=true ;;
-esac])dnl
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- RPATH_ENVVAR=SHLIB_PATH
- ;;
+[ --enable-shared build shared libraries [deault=yes]],,
+ enable_shared=yes)
+
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ hpux*)
+ RPATH_ENVVAR=SHLIB_PATH ;;
esac
fi
AC_SUBST(RPATH_ENVVAR)
-# End stuff to support --enable-shared
-# Start stuff to support --enable-gdbtk
-AC_ARG_ENABLE(gdbtk,
-[ --enable-gdbtk ],
-[case "${enableval}" in
- yes)
- case "$host" in
- *go32*)
- enable_gdbtk=no ;;
- *windows*)
- enable_gdbtk=no ;;
- *)
- enable_gdbtk=yes ;;
- esac ;;
- no)
- enable_gdbtk=no ;;
- *)
- AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
-esac],
-[
-# Default is on for everything but go32 and windows
-case "$host" in
- *go32* | *windows*)
- ;;
- *)
- enable_gdbtk=yes ;;
- esac
-])
-if test "${enable_gdbtk}" = "yes"; then
- configdirs="${configdirs} gdb.gdbtk"
-fi
-# End stuff to support --enable-shared
-
-dnl Check for exe extension set on certain hosts (e.g. Win32)
AC_EXEEXT
-# configure the subdirectories too
AC_CONFIG_SUBDIRS($configdirs)
-
-dnl AC_SUBST(gdb_target_cpu)
AC_OUTPUT(Makefile)