PR gdb/2336
[deliverable/binutils-gdb.git] / gdb / configure
index 68a43880d0bafa96491da2486c8c52a2ce9b7da7..4e16b61d245d3588b6819d68da501361354cf33b 100755 (executable)
@@ -313,7 +313,7 @@ ac_includes_default="\
 ac_subdirs_all="$ac_subdirs_all gdbtk"
 ac_subdirs_all="$ac_subdirs_all multi-ice"
 ac_subdirs_all="$ac_subdirs_all gdbserver"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS'
 ac_subst_files='host_makefile_frag target_makefile_frag'
 
 # Initialize some variables set by options.
@@ -877,6 +877,8 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-separate-debug-dir=path   Look for global separate debug info in this path LIBDIR/debug
   --with-libunwind            Use libunwind frame unwinding support
+  --with-system-readline  use installed readline library
+  --with-expat            include expat support (auto/yes/no)
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
@@ -4275,6 +4277,69 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE__ETEXT 1
 _ACEOF
 
+fi
+echo "$as_me:$LINENO: checking for etext" >&5
+echo $ECHO_N "checking for etext... $ECHO_C" >&6
+if test "${ac_cv_var_etext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+extern char etext;
+
+int
+main ()
+{
+free (&etext);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_var_etext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_etext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
+echo "${ECHO_T}$ac_cv_var_etext" >&6
+if test $ac_cv_var_etext = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ETEXT 1
+_ACEOF
+
 fi
 if test "$enable_profiling" = yes ; then
   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
@@ -5718,6 +5783,44 @@ echo "$as_me: error: no termcap library found" >&2;}
 fi
 
 
+# Check whether --with-system-readline or --without-system-readline was given.
+if test "${with_system_readline+set}" = set; then
+  withval="$with_system_readline"
+
+fi;
+
+if test "$with_system_readline" = yes; then
+  READLINE=-lreadline
+  READLINE_DEPS=
+  READLINE_CFLAGS=
+else
+  READLINE='$(READLINE_DIR)/libreadline.a'
+  READLINE_DEPS='$(READLINE)'
+  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
+fi
+
+
+
+
+
+# Check whether --with-expat or --without-expat was given.
+if test "${with_expat+set}" = set; then
+  withval="$with_expat"
+
+else
+  with_expat=auto
+fi;
+echo "$as_me:$LINENO: checking whether to use expat" >&5
+echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $with_expat" >&5
+echo "${ECHO_T}$with_expat" >&6
+
+if test "${with_expat}" = no; then
+  { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
+echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
+  HAVE_LIBEXPAT=no
+else
+
       if test "X$prefix" = "XNONE"; then
     acl_final_prefix="$ac_default_prefix"
   else
@@ -6369,12 +6472,18 @@ echo "${ECHO_T}$LIBEXPAT" >&6
 
 
 
-if test "$HAVE_LIBEXPAT" != yes; then
-  { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be disabled." >&5
-echo "$as_me: WARNING: expat is missing or unusable; some features may be disabled." >&2;}
-else
-  save_LIBS=$LIBS
-  LIBS="$LIBS $LIBEXPAT"
+  if test "$HAVE_LIBEXPAT" != yes; then
+    if test "$with_expat" = yes; then
+      { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
+echo "$as_me: error: expat is missing or unusable" >&2;}
+   { (exit 1); exit 1; }; }
+    else
+      { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
+echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
+    fi
+  else
+    save_LIBS=$LIBS
+    LIBS="$LIBS $LIBEXPAT"
 
 for ac_func in XML_StopParser
 do
@@ -6477,7 +6586,8 @@ _ACEOF
 fi
 done
 
-  LIBS=$save_LIBS
+    LIBS=$save_LIBS
+  fi
 fi
 
 # ------------------------- #
@@ -19277,24 +19387,10 @@ _ACEOF
 
 fi
 
-# If we are configured native on GNU/Linux, work around problems with
-# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware or Solaris.
+# Detect which type of /proc is in use, such as for Unixware or Solaris.
 
 if test "${target}" = "${host}"; then
   case "${host}" in
-  i[3456]86-*-linux*)
-
-cat >>confdefs.h <<\_ACEOF
-#define START_INFERIOR_TRAPS_EXPECTED 2
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define sys_quotactl 1
-_ACEOF
-
-       ;;
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
 
 cat >>confdefs.h <<\_ACEOF
@@ -21594,17 +21690,20 @@ if test "${with_sysroot+set}" = set; then
 
  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
 
+ if test "x$prefix" = xNONE; then
+  test_prefix=/usr/local
+ else
+  test_prefix=$prefix
+ fi
  if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-  if test "x$prefix" = xNONE; then
-   test_prefix=/usr/local
-  else
-   test_prefix=$prefix
-  fi
+  test_exec_prefix=$test_prefix
  else
-  test_prefix=$exec_prefix
+  test_exec_prefix=$exec_prefix
  fi
  case ${TARGET_SYSTEM_ROOT} in
  "${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
  '${exec_prefix}'|'${exec_prefix}/'*)
    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
    TARGET_SYSTEM_ROOT_DEFINE="$t"
@@ -21808,6 +21907,83 @@ _ACEOF
 esac
 
 
+# Add ELF support to GDB, but only if BFD includes ELF support.
+OLD_CFLAGS=$CFLAGS
+OLD_LDFLAGS=$LDFLAGS
+OLD_LIBS=$LIBS
+CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
+LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
+intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+LIBS="$LIBS -lbfd -liberty $intl"
+echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
+echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
+if test "${gdb_cv_var_elf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include "bfd.h"
+#include "elf-bfd.h"
+
+int
+main ()
+{
+bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gdb_cv_var_elf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gdb_cv_var_elf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
+echo "${ECHO_T}$gdb_cv_var_elf" >&6
+if test $gdb_cv_var_elf = yes; then
+  CONFIG_OBS="$CONFIG_OBS elfread.o"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELF 1
+_ACEOF
+
+fi
+CFLAGS=$OLD_CFLAGS
+LDFLAGS=$OLD_LDFLAGS
+LIBS=$OLD_LIBS
+
 # Add any host-specific objects to GDB.
 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
 
@@ -24312,6 +24488,9 @@ s,@WINDRES@,$WINDRES,;t t
 s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
 s,@MIG@,$MIG,;t t
 s,@ac_ct_MIG@,$ac_ct_MIG,;t t
+s,@READLINE@,$READLINE,;t t
+s,@READLINE_DEPS@,$READLINE_DEPS,;t t
+s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
 s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
 s,@LIBEXPAT@,$LIBEXPAT,;t t
 s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
@@ -25154,33 +25333,51 @@ if test "$acx_cv_header_stdint" = stddef.h; then
 
     #ifndef _UINT8_T
     #define _UINT8_T
+    #ifndef __uint8_t_defined
+    #define __uint8_t_defined
     typedef unsigned $acx_cv_type_int8_t uint8_t;
     #endif
+    #endif
 
     #ifndef _UINT16_T
     #define _UINT16_T
+    #ifndef __uint16_t_defined
+    #define __uint16_t_defined
     typedef unsigned $acx_cv_type_int16_t uint16_t;
     #endif
+    #endif
 
     #ifndef _UINT32_T
     #define _UINT32_T
+    #ifndef __uint32_t_defined
+    #define __uint32_t_defined
     typedef unsigned $acx_cv_type_int32_t uint32_t;
     #endif
+    #endif
 
     #ifndef _INT8_T
     #define _INT8_T
+    #ifndef __int8_t_defined
+    #define __int8_t_defined
     typedef $acx_cv_type_int8_t int8_t;
     #endif
+    #endif
 
     #ifndef _INT16_T
     #define _INT16_T
+    #ifndef __int16_t_defined
+    #define __int16_t_defined
     typedef $acx_cv_type_int16_t int16_t;
     #endif
+    #endif
 
     #ifndef _INT32_T
     #define _INT32_T
+    #ifndef __int32_t_defined
+    #define __int32_t_defined
     typedef $acx_cv_type_int32_t int32_t;
     #endif
+    #endif
 EOF
 elif test "$ac_cv_type_u_int32_t" = yes; then
   sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -25198,18 +25395,27 @@ elif test "$ac_cv_type_u_int32_t" = yes; then
 
     #ifndef _UINT8_T
     #define _UINT8_T
+    #ifndef __uint8_t_defined
+    #define __uint8_t_defined
     typedef u_int8_t uint8_t;
     #endif
+    #endif
 
     #ifndef _UINT16_T
     #define _UINT16_T
+    #ifndef __uint16_t_defined
+    #define __uint16_t_defined
     typedef u_int16_t uint16_t;
     #endif
+    #endif
 
     #ifndef _UINT32_T
     #define _UINT32_T
+    #ifndef __uint32_t_defined
+    #define __uint32_t_defined
     typedef u_int32_t uint32_t;
     #endif
+    #endif
 EOF
 else
   sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -25257,8 +25463,11 @@ elif test "$ac_cv_type_u_int64_t" = yes; then
     #endif
     #ifndef _UINT64_T
     #define _UINT64_T
+    #ifndef __uint64_t_defined
+    #define __uint64_t_defined
     typedef u_int64_t uint64_t;
     #endif
+    #endif
 EOF
 elif test -n "$acx_cv_type_int64_t"; then
   sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -25270,8 +25479,11 @@ elif test -n "$acx_cv_type_int64_t"; then
     #endif
     #ifndef _UINT64_T
     #define _UINT64_T
+    #ifndef __uint64_t_defined
+    #define __uint64_t_defined
     typedef unsigned $acx_cv_type_int64_t uint64_t;
     #endif
+    #endif
 EOF
 else
   sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -25280,8 +25492,10 @@ else
     #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
     #ifndef _INT64_T
     #define _INT64_T
+    #ifndef __int64_t_defined
     typedef long long int64_t;
     #endif
+    #endif
     #ifndef _UINT64_T
     #define _UINT64_T
     typedef unsigned long long uint64_t;
@@ -25326,8 +25540,12 @@ if test "$ac_cv_type_uintptr_t" != yes; then
   sed 's/^ *//' >> tmp-stdint.h <<EOF
 
     /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+    #ifndef __uintptr_t_defined
     typedef u$acx_cv_type_intptr_t uintptr_t;
+    #endif
+    #ifndef __intptr_t_defined
     typedef $acx_cv_type_intptr_t  intptr_t;
+    #endif
 EOF
 fi
 
This page took 0.034258 seconds and 4 git commands to generate.