* solib-sunos.c [HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS] (link_map)
[deliverable/binutils-gdb.git] / gdb / testsuite / configure
index eaa227c7921b135ef7c5b30f8f4cc43b022a8841..271e11d1281fce1ae6cc79e066af15d33df11de7 100755 (executable)
@@ -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
@@ -537,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"
@@ -552,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 :
@@ -586,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:590: checking host system type" >&5
+echo "configure:587: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -607,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:611: checking target system type" >&5
+echo "configure:608: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -624,133 +621,321 @@ 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:629: 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
+# Directories that need to be configured in all configurations.
+configdirs=
 
-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
+# Add HP-specific tests when appropriate.
+case $target in
+  hppa*-*-hpux*)
+    configdirs="$configdirs gdb.hp" ;;
+esac
 
-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.asm \
-            gdb.base \
-            gdb.c++ \
-            gdb.java \
-            gdb.disasm \
-            gdb.chill \
-            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 ;;
+# 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
 
-# Directory with HP specific tests. They will run only with HP's compilers. 
-# These tests will not work on other platforms and compilers.
 
-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.
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+  enableval="$enable_gdbtk"
+  :
+else
+  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
 
-# Begin stuff to support --enable-shared
+# Enable shared libraries.
 # 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 ;;
-esac
+  :
+else
+  enable_shared=yes
 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
-    ;;
+
+
+# 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
-# Start stuff to support --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
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:723: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-# Default is on for everything but go32 and windows
-case "$host" in
-    *go32* | *windows*)
-        ;;
-    *)
-        enable_gdbtk=yes ;;
-    esac
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 738 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 755 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 772 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
 
+for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:806: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 811 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
+done
+
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:844: 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 849 "configure"
+#include "confdefs.h"
 
+int main() {
 
-if test "${enable_gdbtk}" = "yes"; then
-    configdirs="${configdirs} gdb.gdbtk"
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
 fi
-# End stuff to support --enable-shared
 
-# configure the subdirectories too
-subdirs="$configdirs"
+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:877: 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 882 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:908: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
 
+subdirs="$configdirs"
 
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -864,7 +1049,12 @@ done
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile \
+  gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
+  gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+  gdb.cp/Makefile gdb.disasm/Makefile gdb.fortran/Makefile \
+  gdb.java/Makefile gdb.mi/Makefile \
+  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -896,7 +1086,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
@@ -907,12 +1101,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%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
+s%@CPP@%$CPP%g
+s%@EXEEXT@%$EXEEXT%g
 s%@subdirs@%$subdirs%g
 
 CEOF
@@ -955,7 +1146,12 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
+  gdb.ada/Makefile gdb.ada/gnat_ada.gpr:gdb.ada/gnat_ada.gin \
+  gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
+  gdb.cp/Makefile gdb.disasm/Makefile gdb.fortran/Makefile \
+  gdb.java/Makefile gdb.mi/Makefile \
+  gdb.objc/Makefile gdb.threads/Makefile gdb.trace/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
This page took 0.029806 seconds and 4 git commands to generate.