]> 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 7f9e2090d12863701e8b6508078d0d382c10298e..4b95363488c44f5f114aff71c2b4dc5ff8897659 100644 (file)
-# This file is a shell script fragment that supplies the information
-# necessary to tailor a template configure script into the configure
-# script appropriate for this directory.  For more information, check
-# any existing configure script.
+#                                                       -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
 
-srctrigger="gdb.t00"
-srcname="DejaGnu"
+# 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.
 
-configdirs="gdb.t00 gdb.t01 gdb.t02 gdb.t03 gdb.t04 gdb.t05 gdb.t06 \
-       gdb.t07 gdb.t08 gdb.t09 gdb.t10 gdb.t11 gdb.t12 gdb.t13 gdb.t15 \
-       gdb.t16 gdb.t20 gdb.t21 gdb.t22 gddb.t23 gdb.t30 gdb.t31"
+AC_PREREQ(2.13)
+AC_INIT(gdb.base)
 
-# per-host:
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
-# per-target:
+# Directories that need to be configured in all configurations.
+configdirs=
 
-       # everything defaults to unix for a target
-target_abbrev=unix
-target_makefile_frag=config/mt-unix
+# Add HP-specific tests when appropriate.
+case $target in
+  hppa*-*-hpux*)
+    configdirs="$configdirs gdb.hp" ;;
+esac
+
+# 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])
+
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+  configdirs="$configdirs gdb.stabs"
+fi
 
-       # this section is for all targets
-case "${target}" in
-i386-*-aout)           target_abbrev=aout ; 
-                               target_makefile_frag=config/mt-i386-aout ;;
-m68*-abug-aout)                target_abbrev=abug ; 
-                               target_makefile_frag=config/mt-m68k-abug-aout ;;
-m68*-abug-coff)                target_abbrev=abug ; 
-                               target_makefile_frag=config/mt-m68k-abug-coff ;;
-m68*-*-abug)           target_abbrev=abug ; 
-                               target_makefile_frag=config/mt-m68k-abug-aout ;;
-m68k-*-coff)           target_abbrev=coff ; 
-                               target_makefile_frag=config/mt-m68k-coff ;;
-m68k-*-aout)           target_abbrev=aout ; 
-                               target_makefile_frag=config/mt-m68k-aout ;;
-i960-*-nindy)          target_abbrev=nind ; 
-                               target_makefile_frag=config/mt-i960-nindy ;;
-m68k-*-vxworks)                target_abbrev=vx ; 
-                               target_makefile_frag=config/mt-m68k-vx ;;
-i960-*-vxworks)                target_abbrev=vx ; 
-                               target_makefile_frag=config/mt-i960-vx ;;
-a29k-*-udi)            target_abbrev=udi ; 
-                               target_makefile_frag=config/mt-a29k-udi ;;
-a29k-isstip-*)         target_abbrev=itip ; 
-                               target_makefile_frag=config/mt-a29k-isstip ;;
+# 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
 
-       # link in the lib directory if needed
-if [ ! -d lib ] ; then
-    files="lib"
-    links="lib"
+# 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         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)
 
-       # make list of files and links based on tool name
-tool_list="${tool_list} gdb"
-for i in ${tool_list};
-do
-    if [ -f ${srcdir}/config/${target_abbrev}-$i.exp ] ; then
-    files="$files config/${target_abbrev}-$i.exp"
-    links="$links $i-init.exp"
-    fi
-done
+AC_CHECK_HEADERS(pthread.h)
 
-# post-target:
+AC_EXEEXT
 
-       # make local configuration file, using MAKE if one is specified.
-if [ ! -n "$MAKE" ]; then MAKE=make; fi
+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])