]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/configure.in
This commit was manufactured by cvs2svn to create branch 'gdb_6_2-branch'.
[thirdparty/binutils-gdb.git] / gdb / testsuite / configure.in
index 484526341833aaee88576407d4c670c47e542687..4b95363488c44f5f114aff71c2b4dc5ff8897659 100644 (file)
-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.5)
+# Copyright 2002, 2003
+# 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 that need to be configured in all configurations.
+configdirs=
 
-# Directories to use in all configurations.
-configdirs="gdb.asm gdb.base gdb.c++ gdb.disasm gdb.chill gdb.threads"
+# Add HP-specific tests when appropriate.
+case $target in
+  hppa*-*-hpux*)
+    configdirs="$configdirs gdb.hp" ;;
+esac
 
-# Directories to use for a configuration which uses stabs.
-stabsdirs="gdb.stabs"
+# 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])
 
-       # 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 stabs tests when appropriate.
+if test $with_stabs = yes; then
+  configdirs="$configdirs gdb.stabs"
+fi
+
+# 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
 
-# Begin stuff to support --enable-shared
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+  configdirs="$configdirs gdb.gdbtk"
+fi
+
+# 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
-# start-sanitize-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
-# end-sanitize-gdbtk
+AC_CHECK_HEADERS(pthread.h)
 
-# configure the subdirectories too
-AC_CONFIG_SUBDIRS($configdirs)
+AC_EXEEXT
 
-dnl AC_SUBST(gdb_target_cpu)
-AC_OUTPUT(Makefile)
+AC_CONFIG_SUBDIRS($configdirs)
+AC_OUTPUT([Makefile gdb.ada/Makefile gdb.ada/gnat_ada.gpr \
+  gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+  gdb.cp/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
+  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile])