Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: gdb/configure

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/config/xtensa/linux.mh ('k') | gdb/configure.ac » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/configure
diff --git a/gdb/configure b/gdb/configure
index b3d3e2d296a5a35ef8d8af6f128ff1b37fe8b2f8..5300b5ac4550ab355e1c40d898c5ec2acda3114d 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -591,7 +591,12 @@ ac_includes_default="\
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
+GCORE_TRANSFORM_NAME
+GDB_TRANSFORM_NAME
GDB_NM_FILE
+LTLIBBABELTRACE
+LIBBABELTRACE
+HAVE_LIBBABELTRACE
frags
target_subdir
CONFIG_UNINSTALL
@@ -641,6 +646,9 @@ TCL_VERSION
WIN32LDAPP
GUI_CFLAGS_X
LIBGUI
+LTLIBLZMA
+LIBLZMA
+HAVE_LIBLZMA
WIN32LIBS
SER_HARDWIRE
WERROR_CFLAGS
@@ -678,6 +686,7 @@ AWK
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
+HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
GDB_DATADIR
@@ -801,18 +810,23 @@ with_gnu_ld
enable_rpath
with_libexpat_prefix
with_python
+enable_libmcheck
with_included_regex
with_sysroot
with_system_gdbinit
enable_werror
enable_build_warnings
enable_gdb_build_warnings
+with_lzma
+with_liblzma_prefix
with_tcl
with_tk
with_x
enable_sim
enable_multi_ice
enable_gdbserver
+with_babeltrace
+with_libbabeltrace_prefix
'
ac_precious_vars='build_alias
host_alias
@@ -1466,6 +1480,7 @@ Optional Features:
--enable-gdbtk enable gdbtk graphical user interface (GUI)
--enable-profiling enable profiling of GDB
--disable-rpath do not hardcode runtime library paths
+ --enable-libmcheck Try linking with -lmcheck if available
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-gdb-build-warnings
@@ -1519,9 +1534,15 @@ Optional Packages:
--with-sysroot[=DIR] search for usr/lib et al within DIR
--with-system-gdbinit=PATH
automatically load a system-wide gdbinit file
+ --with-lzma support lzma compression (auto/yes/no)
+ --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
+ --without-liblzma-prefix don't search for liblzma in includedir and libdir
--with-tcl directory containing tcl configuration (tclConfig.sh)
--with-tk directory containing tk configuration (tkConfig.sh)
--with-x use the X Window System
+ --with-babeltrace include babeltrace support (auto/yes/no)
+ --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
+ --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
Some influential environment variables:
CC C compiler command
@@ -2683,10 +2704,8 @@ fi
-# Provide more thorough testing by -lmcheck.
-# Set it to 'true' for development snapshots, 'false' for releases or
-# pre-releases.
-development=false
+# Set the 'development' global.
+. $srcdir/development.sh
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5065,6 +5084,7 @@ fi
TARGET_OBS=
all_targets=
+HAVE_NATIVE_GCORE_TARGET=
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
@@ -5099,6 +5119,12 @@ fi
if test x${want64} = xfalse; then
. ${srcdir}/../bfd/config.bfd
fi
+
+ # Check whether this target is native and supports gcore.
+ if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
+ && $gdb_have_gcore; then
+ HAVE_NATIVE_GCORE_TARGET=1
+ fi
fi
done
@@ -5161,6 +5187,7 @@ fi
+
# For other settings, only the main target counts.
gdb_sim=
gdb_osabi=
@@ -6107,8 +6134,10 @@ else
fi
-# Needed for GNU/Hurd.
-if test -n "$ac_tool_prefix"; then
+case $host_os in
+ gnu*)
+ # Needed for GNU Hurd hosts.
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -6200,6 +6229,11 @@ else
MIG="$ac_cv_prog_MIG"
fi
+ if test x"$MIG" = x; then
+ as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
+ fi
+ ;;
+esac
# ---------------------- #
# Checks for libraries. #
@@ -7039,48 +7073,6 @@ fi
-if $development; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
-$as_echo_n "checking for main in -lmcheck... " >&6; }
-if test "${ac_cv_lib_mcheck_main+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmcheck $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-return main ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_mcheck_main=yes
-else
- ac_cv_lib_mcheck_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
-$as_echo "$ac_cv_lib_mcheck_main" >&6; }
-if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBMCHECK 1
-_ACEOF
-
- LIBS="-lmcheck $LIBS"
-
-fi
-
-fi
-
# Generate jit-reader.h
# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
@@ -7970,6 +7962,10 @@ done
fi
fi
+# --------------------- #
+# Check for libpython. #
+# --------------------- #
+
@@ -8512,12 +8508,54 @@ $as_echo "${PYTHON_CFLAGS}" >&6; }
# unilaterally defined, and that in turn causes _SGIAPI to evaluate
# to false. So, we work around this issue by defining siginfo ourself
# though the command-line.
+ #
+ # On x64 Windows, Python's include headers, and pyconfig.h in
+ # particular, rely on MS_WIN64 macro to detect that it's a 64bit
+ # version of Windows. Unfortunately, MS_WIN64 is only defined if
+ # _MSC_VER, a Microsoft-specific macro, is defined. So, when
+ # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
+ # The issue was reported to the Python community, but still isn't
+ # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
+
case "$gdb_host" in
irix*) if test "${GCC}" = yes; then
CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
fi
;;
+ mingw64)
+ if test "${GCC}" = yes; then
+ CPPFLAGS="$CPPFLAGS -DMS_WIN64"
+ fi
+ ;;
esac
+
+ # Note that "python -m threading" cannot be used to check for
+ # threading support due to a bug in Python 2.7.3
+ # (http://bugs.python.org/issue15567).
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
+$as_echo_n "checking whether python supports threads... " >&6; }
+ saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${PYTHON_CPPFLAGS}"
+ # Note that the test is reversed so that python_has_threads=yes on
+ # unexpected failures.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <Python.h>
+#ifdef WITH_THREAD
+# error
+#endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ python_has_threads=no
+else
+ python_has_threads=yes
+fi
+rm -f conftest.err conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
+$as_echo "${python_has_threads}" >&6; }
+ CPPFLAGS="${saved_CPPFLAGS}"
else
# Even if Python support is not compiled in, we need to have these files
# included.
@@ -8529,210 +8567,88 @@ fi
-# ------------------------- #
-# Checks for header files. #
-# ------------------------- #
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <$ac_hdr>
+# --------------------- #
+# Check for libmcheck. #
+# --------------------- #
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_ac_Header=yes"
+# Enable -lmcheck by default (it provides cheap-enough memory mangling),
+# but turn it off if Python is enabled with threads, since -lmcheck is
+# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
+# and for releases.
+if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
+ && $development; then
+ libmcheck_default=yes
else
- eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ libmcheck_default=no
fi
-eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-ac_header_dirent=$ac_hdr; break
+ # Check whether --enable-libmcheck was given.
+if test "${enable_libmcheck+set}" = set; then :
+ enableval=$enable_libmcheck; case "${enableval}" in
+ yes | y) ENABLE_LIBMCHECK="yes" ;;
+ no | n) ENABLE_LIBMCHECK="no" ;;
+ *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
+ esac
fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ if test -z "${ENABLE_LIBMCHECK}"; then
+ ENABLE_LIBMCHECK=${libmcheck_default}
fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_opendir+set}" = set; then :
- break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
- ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+ if test "$ENABLE_LIBMCHECK" = "yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
+$as_echo_n "checking for main in -lmcheck... " >&6; }
+if test "${ac_cv_lib_mcheck_main+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmcheck $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
+
int
main ()
{
-return opendir ();
+return main ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_opendir+set}" = set; then :
- break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_mcheck_main=yes
else
- ac_cv_search_opendir=no
+ ac_cv_lib_mcheck_main=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
+$as_echo "$ac_cv_lib_mcheck_main" >&6; }
+if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMCHECK 1
+_ACEOF
-fi
+ LIBS="-lmcheck $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if test "${ac_cv_header_stat_broken+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if defined S_ISBLK && defined S_IFDIR
-extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
-#endif
-
-#if defined S_ISBLK && defined S_IFCHR
-extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
-#endif
-
-#if defined S_ISLNK && defined S_IFREG
-extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
-#endif
+ fi
-#if defined S_ISSOCK && defined S_IFREG
-extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
-#endif
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stat_broken=no
-else
- ac_cv_header_stat_broken=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test "$ENABLE_LIBMCHECK" = "yes" \
+ -a "${have_libpython}" != "no" \
+ -a "${python_has_threads}" = "yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
+$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
-$as_echo "$ac_cv_header_stat_broken" >&6; }
-if test $ac_cv_header_stat_broken = yes; then
-
-$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
-fi
+# ------------------------- #
+# Checks for header files. #
+# ------------------------- #
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
@@ -8847,17 +8763,15 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
# elf_hp.h is for HP/UX 64-bit shared library support.
-# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
-# unconditionally, so what's the point in checking these?
for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
- thread_db.h signal.h stddef.h \
- stdlib.h string.h memory.h strings.h sys/fault.h \
+ thread_db.h \
+ sys/fault.h \
sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
- sys/types.h sys/wait.h wait.h termios.h termio.h \
- sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
- dlfcn.h sys/socket.h sys/un.h
+ termios.h termio.h \
+ sgtty.h elf_hp.h \
+ dlfcn.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -8871,25 +8785,6 @@ fi
done
-for ac_header in link.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_NLIST_H
-# include <nlist.h>
-#endif
-
-"
-if test "x$ac_cv_header_link_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINK_H 1
-_ACEOF
-
-fi
-
-done
-
for ac_header in sys/proc.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
@@ -8999,36 +8894,6 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_REALLOC $ac_have_decl
_ACEOF
-ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strstr" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getopt" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETOPT $ac_have_decl
-_ACEOF
ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
ac_have_decl=1
@@ -9039,16 +8904,6 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SNPRINTF $ac_have_decl
_ACEOF
-ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF $ac_have_decl
-_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
@@ -10113,9 +9968,10 @@ fi
for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
pipe poll pread pread64 pwrite readlink resize_term \
sbrk setpgid setpgrp setsid \
- sigaction sigprocmask sigsetmask socketpair syscall \
+ sigaction sigprocmask sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise waitpid lstat
+ setrlimit getrlimit posix_madvise waitpid lstat \
+ ptrace64
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -10163,1011 +10019,1034 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
fi
-# Check the return and argument types of ptrace. No canned test for
-# this, so roll our own.
-gdb_ptrace_headers='
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_PTRACE_H
-# include <sys/ptrace.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-'
-# There is no point in checking if we don't have a prototype.
-ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
-"
-if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PTRACE $ac_have_decl
-_ACEOF
-if test $ac_have_decl = 1; then :
-
-else
-
- : ${gdb_cv_func_ptrace_ret='int'}
- : ${gdb_cv_func_ptrace_args='int,int,long,long'}
-
-fi
-
-# Check return type. Varargs (used on GNU/Linux) conflict with the
-# empty argument list, so check for that explicitly.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
-$as_echo_n "checking return type of ptrace... " >&6; }
-if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$gdb_ptrace_headers
-int
-main ()
-{
-extern long ptrace (enum __ptrace_request, ...);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_func_ptrace_ret='long'
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$gdb_ptrace_headers
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
int
main ()
{
-extern int ptrace ();
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_func_ptrace_ret='int'
+ ac_cv_header_stdc=yes
else
- gdb_cv_func_ptrace_ret='long'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
-$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
-_ACEOF
-
-# Check argument types.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
-$as_echo_n "checking types of arguments for ptrace... " >&6; }
-if test "${gdb_cv_func_ptrace_args+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$gdb_ptrace_headers
-int
-main ()
-{
-extern long ptrace (enum __ptrace_request, ...);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_func_ptrace_args='int,int,long,long'
-else
-
-for gdb_arg1 in 'int' 'long'; do
- for gdb_arg2 in 'pid_t' 'int' 'long'; do
- for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
- for gdb_arg4 in 'int' 'long'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$gdb_ptrace_headers
-int
-main ()
-{
-
-extern $gdb_cv_func_ptrace_ret
- ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
- break 4;
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- for gdb_arg5 in 'int *' 'int' 'long'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$gdb_ptrace_headers
-int
-main ()
-{
-
-extern $gdb_cv_func_ptrace_ret
- ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+#include <string.h>
- ;
- return 0;
-}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
-gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
- break 5;
+else
+ ac_cv_header_stdc=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- done
- done
- done
-done
-# Provide a safe default value.
-: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+rm -f conftest*
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
-$as_echo "$gdb_cv_func_ptrace_args" >&6; }
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
-
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_ARG3 $3
-_ACEOF
-if test -n "$5"; then
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_ARG5 $5
_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+else
+ ac_cv_header_stdc=no
fi
+rm -f conftest*
-if test "$cross_compiling" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
-$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
-if test "${ac_cv_func_setpgrp_void+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
- as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
+ :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
-/* If this system has a BSD-style setpgrp which takes arguments,
- setpgrp(1, 1) will fail with ESRCH and return -1, in that case
- exit successfully. */
- return setpgrp (1,1) != -1;
- ;
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_setpgrp_void=no
+
else
- ac_cv_func_setpgrp_void=yes
+ ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
-$as_echo "$ac_cv_func_setpgrp_void" >&6; }
-if test $ac_cv_func_setpgrp_void = yes; then
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
-$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
-$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
-if test "${ac_cv_func_setpgrp_void+set}" = set; then :
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <unistd.h>
-
+#include <alloca.h>
int
main ()
{
-
- if (setpgrp(1,1) == -1)
- exit (0);
- else
- exit (1);
-
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_func_setpgrp_void=no
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
else
- ac_cv_func_setpgrp_void=yes
+ ac_cv_working_alloca_h=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
-$as_echo "$ac_cv_func_setpgrp_void" >&6; }
-if test $ac_cv_func_setpgrp_void = yes; then
- $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
-fi
fi
-# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
-# since sigsetjmp might only be defined as a macro.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
-$as_echo_n "checking for sigsetjmp... " >&6; }
-if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <setjmp.h>
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
int
main ()
{
-sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
+char *p = (char *) alloca (1);
+ if (p) return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_func_sigsetjmp=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
else
- gdb_cv_func_sigsetjmp=no
+ ac_cv_func_alloca_works=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
-$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
-if test $gdb_cv_func_sigsetjmp = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
-$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
+if test $ac_cv_func_alloca_works = yes; then
-fi
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
-# Assume we'll default to using the included libiberty regex.
-gdb_use_included_regex=yes
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
-# However, if the system regex is GNU regex, then default to *not*
-# using the included regex.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
-$as_echo_n "checking for GNU regex... " >&6; }
-if test "${gdb_cv_have_gnu_regex+set}" = set; then :
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <gnu-versions.h>
-int
-main ()
-{
-#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
#endif
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_gnu_regex=yes
-else
- gdb_cv_have_gnu_regex=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
-$as_echo "$gdb_cv_have_gnu_regex" >&6; }
-if test $gdb_cv_have_gnu_regex = yes; then
- gdb_use_included_regex=no
-fi
-
-# Check whether --with-included-regex was given.
-if test "${with_included_regex+set}" = set; then :
- withval=$with_included_regex; gdb_with_regex=$withval
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
else
- gdb_with_regex=$gdb_use_included_regex
+ ac_cv_os_cray=no
fi
-
-if test "$gdb_with_regex" = yes; then
-
-$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
+rm -f conftest*
fi
-
-# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
-ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
-#include <sys/proc.h>
-
-"
-if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_THREAD_TD_PCB 1
+#define CRAY_STACKSEG_END $ac_func
_ACEOF
-
+ break
fi
+ done
+fi
-# See if <sys/lwp.h> defines `struct lwp`.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
-$as_echo_n "checking for struct lwp... " >&6; }
-if test "${gdb_cv_struct_lwp+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/param.h>
-#include <sys/lwp.h>
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
int
main ()
{
-struct lwp l;
- ;
- return 0;
+ return find_stack_direction () < 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_struct_lwp=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
else
- gdb_cv_struct_lwp=no
+ ac_cv_c_stack_direction=-1
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
-$as_echo "$gdb_cv_struct_lwp" >&6; }
-if test $gdb_cv_struct_lwp = yes; then
-$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
fi
-# See if <machine/reg.h> degines `struct reg'.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
-$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
-if test "${gdb_cv_struct_reg+set}" = set; then :
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <machine/reg.h>
+#include <langinfo.h>
int
main ()
{
-struct reg r;
+char* cs = nl_langinfo(CODESET);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_struct_reg=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_langinfo_codeset=yes
else
- gdb_cv_struct_reg=no
+ am_cv_langinfo_codeset=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
-$as_echo "$gdb_cv_struct_reg" >&6; }
-if test $gdb_cv_struct_reg = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
-$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
-fi
+ fi
-# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
-# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
-ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
-"
-if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_REG_R_FS 1
+ for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-
fi
-ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
-"
-if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_REG_R_GS 1
-_ACEOF
+done
+ for ac_func in fdwalk getrlimit pipe pipe2 socketpair
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
-# Older amd64 Linux's don't have the fs_base and gs_base members of
-# `struct user_regs_struct'.
-ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
-"
-if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
+ ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
+#define HAVE_DECL_STRERROR $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strstr" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR $ac_have_decl
_ACEOF
-fi
-ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
+
+# Check the return and argument types of ptrace. No canned test for
+# this, so roll our own.
+gdb_ptrace_headers='
+#include <sys/types.h>
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
"
-if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
+if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
+#define HAVE_DECL_PTRACE $ac_have_decl
_ACEOF
+if test $ac_have_decl = 1; then :
+else
-fi
+ : ${gdb_cv_func_ptrace_ret='int'}
+ : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+fi
-# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
-$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
-if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
+# Check return type. Varargs (used on GNU/Linux) conflict with the
+# empty argument list, so check for that explicitly.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
+$as_echo_n "checking return type of ptrace... " >&6; }
+if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/ptrace.h>
+$gdb_ptrace_headers
int
main ()
{
-PTRACE_GETREGS;
+extern long ptrace (enum __ptrace_request, ...);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_ptrace_getregs=yes
-else
- gdb_cv_have_ptrace_getregs=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
-$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
-if test $gdb_cv_have_ptrace_getregs = yes; then
-
-$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
-
-fi
-
-# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
-$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
-if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
- $as_echo_n "(cached) " >&6
+ gdb_cv_func_ptrace_ret='long'
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/ptrace.h>
+$gdb_ptrace_headers
int
main ()
{
-PTRACE_GETFPXREGS;
+extern int ptrace ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_ptrace_getfpxregs=yes
+ gdb_cv_func_ptrace_ret='int'
else
- gdb_cv_have_ptrace_getfpxregs=no
+ gdb_cv_func_ptrace_ret='long'
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
-$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
-if test $gdb_cv_have_ptrace_getfpxregs = yes; then
-
-$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
+$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
-# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
-$as_echo_n "checking for PT_GETDBREGS... " >&6; }
-if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
+_ACEOF
+
+# Check argument types.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
+$as_echo_n "checking types of arguments for ptrace... " >&6; }
+if test "${gdb_cv_func_ptrace_args+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/ptrace.h>
+$gdb_ptrace_headers
int
main ()
{
-PT_GETDBREGS;
+extern long ptrace (enum __ptrace_request, ...);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_pt_getdbregs=yes
+ gdb_cv_func_ptrace_args='int,int,long,long'
else
- gdb_cv_have_pt_getdbregs=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
-$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
-if test $gdb_cv_have_pt_getdbregs = yes; then
-
-$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
-
-fi
-# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
-$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
-if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+ for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
+ for gdb_arg4 in 'int' 'long' 'void *'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/ptrace.h>
+$gdb_ptrace_headers
int
main ()
{
-PT_GETXMMREGS;
+
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_pt_getxmmregs=yes
-else
- gdb_cv_have_pt_getxmmregs=no
+ gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+ break 4;
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+ for gdb_arg5 in 'int *' 'int' 'long'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$gdb_ptrace_headers
+int
+main ()
+{
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
-$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
-if test $gdb_cv_have_pt_getxmmregs = yes; then
+extern $gdb_cv_func_ptrace_ret
+ ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
-$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+ break 5;
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ done
+ done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
-# Detect which type of /proc is in use, such as for Unixware or Solaris.
-
-if test "${target}" = "${host}"; then
- case "${host}" in
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
+$as_echo "$gdb_cv_func_ptrace_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
-$as_echo "#define NEW_PROC_API 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG3 $3
+_ACEOF
- ;;
- *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
-$as_echo "#define NEW_PROC_API 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG4 $4
+_ACEOF
- ;;
- mips-sgi-irix5*)
- # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
+if test -n "$5"; then
-$as_echo "#define _KMEMUSER 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG5 $5
+_ACEOF
- ;;
- esac
fi
-if test "$ac_cv_header_sys_procfs_h" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
-$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
+if test "$cross_compiling" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
+$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
+if test "${ac_cv_func_setpgrp_void+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+$ac_includes_default
int
main ()
{
-pstatus_t avar
+/* If this system has a BSD-style setpgrp which takes arguments,
+ setpgrp(1, 1) will fail with ESRCH and return -1, in that case
+ exit successfully. */
+ return setpgrp (1,1) != -1;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_pstatus_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_setpgrp_void=no
else
- bfd_cv_have_sys_procfs_type_pstatus_t=no
-
+ ac_cv_func_setpgrp_void=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
+$as_echo "$ac_cv_func_setpgrp_void" >&6; }
+if test $ac_cv_func_setpgrp_void = yes; then
-$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
+$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
-$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
+$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
+if test "${ac_cv_func_setpgrp_void+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <unistd.h>
+
int
main ()
{
-prrun_t avar
+
+ if (setpgrp(1,1) == -1)
+ exit (0);
+ else
+ exit (1);
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prrun_t=yes
+ ac_cv_func_setpgrp_void=no
else
- bfd_cv_have_sys_procfs_type_prrun_t=no
-
+ ac_cv_func_setpgrp_void=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
+$as_echo "$ac_cv_func_setpgrp_void" >&6; }
+if test $ac_cv_func_setpgrp_void = yes; then
+ $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
- if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
-
-$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
+fi
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
+# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
+# since sigsetjmp might only be defined as a macro.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
+$as_echo_n "checking for sigsetjmp... " >&6; }
+if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <setjmp.h>
+
int
main ()
{
-gregset_t avar
+sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_gregset_t=yes
+ gdb_cv_func_sigsetjmp=yes
else
- bfd_cv_have_sys_procfs_type_gregset_t=no
-
+ gdb_cv_func_sigsetjmp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
+$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
+if test $gdb_cv_func_sigsetjmp = yes; then
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
+$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
-$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
+fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
+# Assume we'll default to using the included libiberty regex.
+gdb_use_included_regex=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
+# However, if the system regex is GNU regex, then default to *not*
+# using the included regex.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
+$as_echo_n "checking for GNU regex... " >&6; }
+if test "${gdb_cv_have_gnu_regex+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <gnu-versions.h>
int
main ()
{
-fpregset_t avar
+#define REGEX_INTERFACE_VERSION 1
+#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+# error "Version mismatch"
+#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_fpregset_t=yes
+ gdb_cv_have_gnu_regex=yes
else
- bfd_cv_have_sys_procfs_type_fpregset_t=no
-
+ gdb_cv_have_gnu_regex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
+$as_echo "$gdb_cv_have_gnu_regex" >&6; }
+if test $gdb_cv_have_gnu_regex = yes; then
+ gdb_use_included_regex=no
+fi
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+ withval=$with_included_regex; gdb_with_regex=$withval
+else
+ gdb_with_regex=$gdb_use_included_regex
+fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
+if test "$gdb_with_regex" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
+$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
+
+fi
+
+# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
+ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
+#include <sys/proc.h>
+
+"
+if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_THREAD_TD_PCB 1
+_ACEOF
+
+
+fi
+
+
+# See if <sys/lwp.h> defines `struct lwp`.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
+$as_echo_n "checking for struct lwp... " >&6; }
+if test "${gdb_cv_struct_lwp+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/param.h>
+#include <sys/lwp.h>
int
main ()
{
-prgregset_t avar
+struct lwp l;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset_t=yes
+ gdb_cv_struct_lwp=yes
else
- bfd_cv_have_sys_procfs_type_prgregset_t=no
-
+ gdb_cv_struct_lwp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
+$as_echo "$gdb_cv_struct_lwp" >&6; }
+if test $gdb_cv_struct_lwp = yes; then
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
+$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
+# See if <machine/reg.h> degines `struct reg'.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
+$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
+if test "${gdb_cv_struct_reg+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/types.h>
+#include <machine/reg.h>
int
main ()
{
-prfpregset_t avar
+struct reg r;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+ gdb_cv_struct_reg=yes
else
- bfd_cv_have_sys_procfs_type_prfpregset_t=no
-
+ gdb_cv_struct_reg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
+$as_echo "$gdb_cv_struct_reg" >&6; }
+if test $gdb_cv_struct_reg = yes; then
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
-$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
+fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
+# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
+# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
+ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
+"
+if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_REG_R_FS 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
+"
+if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_REG_R_GS 1
+_ACEOF
+
+
+fi
+
+
+# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
+# Older amd64 Linux's don't have the fs_base and gs_base members of
+# `struct user_regs_struct'.
+ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
+"
+if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
+"
+if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
+_ACEOF
+
+
+fi
+
+
+# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
+$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
+if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/ptrace.h>
int
main ()
{
-prgregset32_t avar
+PTRACE_GETREGS;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset32_t=yes
+ gdb_cv_have_ptrace_getregs=yes
else
- bfd_cv_have_sys_procfs_type_prgregset32_t=no
-
+ gdb_cv_have_ptrace_getregs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
+$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
+if test $gdb_cv_have_ptrace_getregs = yes; then
-$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
+$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
+# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
+$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
+if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/ptrace.h>
int
main ()
{
-prfpregset32_t avar
+PTRACE_GETFPXREGS;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
+ gdb_cv_have_ptrace_getfpxregs=yes
else
- bfd_cv_have_sys_procfs_type_prfpregset32_t=no
-
+ gdb_cv_have_ptrace_getfpxregs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
+$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
+if test $gdb_cv_have_ptrace_getfpxregs = yes; then
-$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
+$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
+# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
+$as_echo_n "checking for PT_GETDBREGS... " >&6; }
+if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
int
main ()
{
-lwpid_t avar
+PT_GETDBREGS;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_lwpid_t=yes
+ gdb_cv_have_pt_getdbregs=yes
else
- bfd_cv_have_sys_procfs_type_lwpid_t=no
-
+ gdb_cv_have_pt_getdbregs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
+$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
+if test $gdb_cv_have_pt_getdbregs = yes; then
-$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
+$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
-$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
+# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
+$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
+if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#define _SYSCALL32
-/* Needed for new procfs interface on sparc-solaris. */
-#define _STRUCTURED_PROC 1
-#include <sys/procfs.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
int
main ()
{
-psaddr_t avar
+PT_GETXMMREGS;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_psaddr_t=yes
+ gdb_cv_have_pt_getxmmregs=yes
else
- bfd_cv_have_sys_procfs_type_psaddr_t=no
-
+ gdb_cv_have_pt_getxmmregs=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
+$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
+if test $gdb_cv_have_pt_getxmmregs = yes; then
-$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
+$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
-$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
+# Detect which type of /proc is in use, such as for Solaris.
+
+if test "${target}" = "${host}"; then
+ case "${host}" in
+ *-*-sysv4.2* | *-*-sysv5* )
+
+$as_echo "#define NEW_PROC_API 1" >>confdefs.h
+
+ ;;
+ *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
+
+$as_echo "#define NEW_PROC_API 1" >>confdefs.h
+
+ ;;
+ mips-sgi-irix5*)
+ # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
+
+$as_echo "#define _KMEMUSER 1" >>confdefs.h
+
+ ;;
+ esac
+fi
+
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
+$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11180,31 +11059,31 @@ else
int
main ()
{
-prsysent_t avar
+gregset_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prsysent_t=yes
+ bfd_cv_have_sys_procfs_type_gregset_t=yes
else
- bfd_cv_have_sys_procfs_type_prsysent_t=no
+ bfd_cv_have_sys_procfs_type_gregset_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
-$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
+$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
-$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
+$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11217,31 +11096,31 @@ else
int
main ()
{
-pr_sigset_t avar
+fpregset_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
+ bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
- bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+ bfd_cv_have_sys_procfs_type_fpregset_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
+$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
-$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
+$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11254,31 +11133,31 @@ else
int
main ()
{
-pr_sigaction64_t avar
+prgregset_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
+ bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
- bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+ bfd_cv_have_sys_procfs_type_prgregset_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
+$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
-$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
- if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
+$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11291,251 +11170,328 @@ else
int
main ()
{
-pr_siginfo64_t avar
+prfpregset_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
+ bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
- bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+ bfd_cv_have_sys_procfs_type_prfpregset_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
+$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
-
-
-
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
-$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
- if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
+$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- gdb_cv_prfpregset_t_broken=yes
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
#include <sys/procfs.h>
- int main ()
- {
- if (sizeof (prfpregset_t) == sizeof (void *))
- return 1;
- return 0;
- }
+int
+main ()
+{
+prgregset32_t avar
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gdb_cv_prfpregset_t_broken=no
+if ac_fn_c_try_compile "$LINENO"; then :
+ bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
- gdb_cv_prfpregset_t_broken=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+ bfd_cv_have_sys_procfs_type_prgregset32_t=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
-$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
- if test $gdb_cv_prfpregset_t_broken = yes; then
-
-$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
+ if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
- fi
- fi
+$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
-$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
- if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
+$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/procfs.h>
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
int
main ()
{
-
- int dummy;;
- dummy = ioctl(0, PIOCSET, &dummy);
-
+lwpid_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_procfs_piocset=yes
+ bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
- gdb_cv_have_procfs_piocset=no
-fi
+ bfd_cv_have_sys_procfs_type_lwpid_t=no
+
+fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
-$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
- if test $gdb_cv_have_procfs_piocset = yes; then
+ if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
-$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
+$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
- fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
+$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
+int
+main ()
+{
+psaddr_t avar
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ bfd_cv_have_sys_procfs_type_psaddr_t=yes
+else
+ bfd_cv_have_sys_procfs_type_psaddr_t=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-if test ${host} = ${target} ; then
+ if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+
+$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
-$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
- if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
+$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <link.h>
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
int
main ()
{
-struct link_map lm; (void) lm.l_addr;
+prsysent_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_struct_link_map_with_l_members=yes
+ bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
- gdb_cv_have_struct_link_map_with_l_members=no
+ bfd_cv_have_sys_procfs_type_prsysent_t=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
-$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
- if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
-
-$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
+ if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
- fi
+$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
-$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
- if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
+$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <link.h>
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
int
main ()
{
-struct link_map lm; (void) lm.lm_addr;
+pr_sigset_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_struct_link_map_with_lm_members=yes
+ bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
- gdb_cv_have_struct_link_map_with_lm_members=no
+ bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
-$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
- if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
-
-$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
+ if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
- fi
+$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
-$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
- if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
+$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#ifdef HAVE_NLIST_H
-#include <nlist.h>
-#endif
-#include <link.h>
+
+#define _SYSCALL32
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
int
main ()
{
-struct so_map lm; (void) lm.som_addr;
+pr_sigaction64_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_struct_so_map_with_som_members=yes
+ bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
- gdb_cv_have_struct_so_map_with_som_members=no
+ bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
-$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
- if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
-
-$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
+ if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
- fi
+$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
-$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
- if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
+$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
+ if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#define _SYSCALL32
-#include <sys/link.h>
+/* Needed for new procfs interface on sparc-solaris. */
+#define _STRUCTURED_PROC 1
+#include <sys/procfs.h>
int
main ()
{
-struct link_map32 l;
+pr_siginfo64_t avar
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_have_struct_link_map32=yes
+ bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
- gdb_cv_have_struct_link_map32=no
+ bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
-$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
- if test $gdb_cv_have_struct_link_map32 = yes; then
+ if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+
+$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
+$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
+
+
+
+
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
+$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
+ if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gdb_cv_prfpregset_t_broken=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/procfs.h>
+ int main ()
+ {
+ if (sizeof (prfpregset_t) == sizeof (void *))
+ return 1;
+ return 0;
+ }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gdb_cv_prfpregset_t_broken=no
+else
+ gdb_cv_prfpregset_t_broken=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
-$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
+$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
+ if test $gdb_cv_prfpregset_t_broken = yes; then
-$as_echo "#define _SYSCALL32 1" >>confdefs.h
+$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
+ fi
fi
fi
@@ -11566,10 +11522,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
$as_echo "$gdb_cv_c_long_long" >&6; }
-if test $gdb_cv_c_long_long = yes; then
-
-$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
-
+if test $gdb_cv_c_long_long != yes; then
+ # libdecnumber requires long long.
+ as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
fi
# Check if the compiler and runtime support printing long longs.
@@ -11853,6 +11808,8 @@ rm -f core conftest.err conftest.$ac_objext \
# Problem does not happen for the recommended libpythonX.Y.so linkage.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+ old_LIBS="$LIBS"
+ LIBS="$LIBS $PYTHON_LIBS"
if test "$cross_compiling" = yes; then :
true
else
@@ -11878,6 +11835,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+ LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS"
fi
LDFLAGS="$old_LDFLAGS"
@@ -12184,10 +12142,15 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
fi
-if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
+ ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
+if test "x$ac_cv_func_syscall" = x""yes; then :
$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
+
+fi
+
fi
ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
@@ -12264,6 +12227,20 @@ $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
fi
+case $host_os in
+ go32* | *djgpp*)
+ gdbinit=gdb.ini
+ ;;
+ *)
+ gdbinit=.gdbinit
+ ;;
+esac
+
+cat >>confdefs.h <<_ACEOF
+#define GDBINIT "$gdbinit"
+_ACEOF
+
+
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
@@ -12382,21 +12359,18 @@ if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
-# The entries after -Wno-pointer-sign are disabled warnings which may
-# be enabled in the future, which can not currently be used to build
-# GDB.
-# NOTE: If you change this list, remember to update
-# gdb/doc/gdbint.texinfo.
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
--Wformat-nonliteral -Wno-pointer-sign \
+-Wpointer-sign \
-Wno-unused -Wunused-value -Wunused-function \
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
--Wdeclaration-after-statement"
+-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
case "${host}" in
*-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
+ *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
esac
# Check whether --enable-build-warnings was given.
@@ -12480,7 +12454,7 @@ lose
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "lose" >/dev/null 2>&1; then :
+ $EGREP "^lose$" >/dev/null 2>&1; then :
gdb_cv_os_cygwin=yes
else
gdb_cv_os_cygwin=no
@@ -12522,21 +12496,77 @@ esac
# Add ELF support to GDB, but only if BFD includes ELF support.
-OLD_CFLAGS=$CFLAGS
-OLD_LDFLAGS=$LDFLAGS
-OLD_LIBS=$LIBS
-# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
-# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
-# always want our bfd.
-CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
-LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
-intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
-if test "$plugins" = "yes"; then
- LIBS="-ldl $LIBS"
+
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_LIBS=$LIBS
+ # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
+ # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
+ # always want our bfd.
+ CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
+ LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+ # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
+ if test "$plugins" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
fi
-LIBS="-lbfd -liberty $intl $LIBS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
+
+ fi
+ LIBS="-lbfd -liberty $intl $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
$as_echo_n "checking for ELF support in BFD... " >&6; }
if test "${gdb_cv_var_elf+set}" = set; then :
$as_echo_n "(cached) " >&6
@@ -12544,13 +12574,13 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
-#include "bfd.h"
-#include "elf-bfd.h"
+ #include "bfd.h"
+ #include "elf-bfd.h"
int
main ()
{
-bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
+return bfd_get_elf_phdr_upper_bound (NULL);
;
return 0;
}
@@ -12565,6 +12595,9 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
$as_echo "$gdb_cv_var_elf" >&6; }
+ CFLAGS=$OLD_CFLAGS
+ LDFLAGS=$OLD_LDFLAGS
+ LIBS=$OLD_LIBS
if test $gdb_cv_var_elf = yes; then
CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
@@ -12572,337 +12605,299 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h
# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
if test "$plugins" = "yes"; then
- OLD_LIBS="-ldl $OLD_LIBS"
- fi
-fi
-CFLAGS=$OLD_CFLAGS
-LDFLAGS=$OLD_LDFLAGS
-LIBS=$OLD_LIBS
-
-# Add any host-specific objects to GDB.
-CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
-
-LIBGUI="../libgui/src/libgui.a"
-GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
-
-
-
-WIN32LDAPP=
-
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-case "${host}" in
-*-*-cygwin* | *-*-mingw* )
- configdir="win"
- ;;
-*)
- configdir="unix"
- ;;
-esac
-
-GDBTKLIBS=
-if test "${enable_gdbtk}" = "yes"; then
-
- # Gdbtk must have an absolute path to srcdir in order to run
- # properly when not installed.
- here=`pwd`
- cd ${srcdir}
- GDBTK_SRC_DIR=`pwd`
- cd $here
-
-
- #
- # Ok, lets find the tcl configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tcl
- #
-
- if test x"${no_tcl}" = x ; then
- # we reset no_tcl in case something fails here
- no_tcl=true
-
-# Check whether --with-tcl was given.
-if test "${with_tcl+set}" = set; then :
- withval=$with_tcl; with_tclconfig=${withval}
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
-$as_echo_n "checking for Tcl configuration... " >&6; }
- if test "${ac_cv_c_tclconfig+set}" = set; then :
- $as_echo_n "(cached) " >&6
else
-
-
- # First check to see if --with-tcl was specified.
- case "${host}" in
- *-*-cygwin*) platDir="win" ;;
- *) platDir="unix" ;;
- esac
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
- fi
- fi
-
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ../tcl \
- `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../tcl \
- `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../../tcl \
- `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/$platDir/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
- break
- fi
- done
- fi
-
- # on Darwin, check in Framework installation locations
- if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
- `ls -d /Library/Frameworks 2>/dev/null` \
- `ls -d /Network/Library/Frameworks 2>/dev/null` \
- `ls -d /System/Library/Frameworks 2>/dev/null` \
- ; do
- if test -f "$i/Tcl.framework/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
- break
- fi
- done
- fi
-
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ${libdir} 2>/dev/null` \
- `ls -d ${exec_prefix}/lib 2>/dev/null` \
- `ls -d ${prefix}/lib 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` \
- `ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null` \
- ; do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
-
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ${srcdir}/../tcl \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/$platDir/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
- break
- fi
- done
- fi
-
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
- if test x"${ac_cv_c_tclconfig}" = x ; then
- TCL_BIN_DIR="# no Tcl configs found"
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
-$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
- else
- no_tcl=
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
-$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
- fi
- fi
+ fi
+fi
+# Add macho support to GDB, but only if BFD includes it.
- # If $no_tk is nonempty, then we can't do Tk, and there is no
- # point to doing Tcl.
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_LIBS=$LIBS
+ # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
+ # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
+ # always want our bfd.
+ CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
+ LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+ # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
+ if test "$plugins" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- #
- # Ok, lets find the tk configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tk
- #
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
- if test x"${no_tk}" = x ; then
- # we reset no_tk in case something fails here
- no_tk=true
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-# Check whether --with-tk was given.
-if test "${with_tk+set}" = set; then :
- withval=$with_tk; with_tkconfig=${withval}
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
-$as_echo_n "checking for Tk configuration... " >&6; }
- if test "${ac_cv_c_tkconfig+set}" = set; then :
+ fi
+ LIBS="-lbfd -liberty $intl $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
+$as_echo_n "checking for Mach-O support in BFD... " >&6; }
+if test "${gdb_cv_var_macho+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include "bfd.h"
+ #include "mach-o.h"
+int
+main ()
+{
+return bfd_mach_o_lookup_command (NULL, 0, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gdb_cv_var_macho=yes
+else
+ gdb_cv_var_macho=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
+$as_echo "$gdb_cv_var_macho" >&6; }
+ CFLAGS=$OLD_CFLAGS
+ LDFLAGS=$OLD_LDFLAGS
+ LIBS=$OLD_LIBS
+if test $gdb_cv_var_macho = yes; then
+ CONFIG_OBS="$CONFIG_OBS machoread.o"
+fi
+
+# Add SOM support to GDB, but only if BFD includes it.
+
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_LIBS=$LIBS
+ # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
+ # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
+ # always want our bfd.
+ CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
+ LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
+ # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
+ if test "$plugins" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- # First check to see if --with-tkconfig was specified.
- if test x"${with_tkconfig}" != x ; then
- if test -f "${with_tkconfig}/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
- else
- as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
- fi
- fi
-
- # then check for a private Tk library
- case "${host}" in
- *-*-cygwin*) platDir="win" ;;
- *) platDir="unix" ;;
- esac
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in \
- ../tk \
- `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
- ../../tk \
- `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
- ../../../tk \
- `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
- `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/$platDir/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
- break
- fi
- done
- fi
-
- # on Darwin, check in Framework installation locations
- if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
- for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
- `ls -d /Library/Frameworks 2>/dev/null` \
- `ls -d /Network/Library/Frameworks 2>/dev/null` \
- `ls -d /System/Library/Frameworks 2>/dev/null` \
- ; do
- if test -f "$i/Tk.framework/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
- break
- fi
- done
- fi
-
- # check in a few common install locations
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in `ls -d ${libdir} 2>/dev/null` \
- `ls -d ${exec_prefix}/lib 2>/dev/null` \
- `ls -d ${prefix}/lib 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` \
- `ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null` \
- ; do
- if test -f "$i/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
- # check in a few other private locations
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in \
- ${srcdir}/../tk \
- `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
- `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
- `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/$platDir/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
- break
- fi
- done
- fi
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
- if test x"${ac_cv_c_tkconfig}" = x ; then
- TK_BIN_DIR="# no Tk configs found"
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
-$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
- else
- no_tk=
- TK_BIN_DIR=${ac_cv_c_tkconfig}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
-$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
- fi
- fi
+ fi
+ LIBS="-lbfd -liberty $intl $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
+$as_echo_n "checking for SOM support in BFD... " >&6; }
+if test "${gdb_cv_var_som+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include "bfd.h"
+ #include "som.h"
+int
+main ()
+{
+return bfd_som_attach_aux_hdr (NULL, 0, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gdb_cv_var_som=yes
+else
+ gdb_cv_var_som=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
+$as_echo "$gdb_cv_var_som" >&6; }
+ CFLAGS=$OLD_CFLAGS
+ LDFLAGS=$OLD_LDFLAGS
+ LIBS=$OLD_LIBS
+if test $gdb_cv_var_som = yes; then
+ CONFIG_OBS="$CONFIG_OBS somread.o"
+fi
- if test -z "${no_tcl}" -a -z "${no_tk}"; then
+# Add any host-specific objects to GDB.
+CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
-$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
+# If building on ELF, look for lzma support for embedded compressed debug info.
+if test $gdb_cv_var_elf = yes; then
- if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
-$as_echo "loading" >&6; }
- . ${TCL_BIN_DIR}/tclConfig.sh
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
- fi
+# Check whether --with-lzma was given.
+if test "${with_lzma+set}" = set; then :
+ withval=$with_lzma;
+else
+ with_lzma=auto
+fi
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
+$as_echo_n "checking whether to use lzma... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
+$as_echo "$with_lzma" >&6; }
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- if test -f "${TCL_BIN_DIR}/Makefile" ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- elif test "`uname -s`" = "Darwin"; then
- # If Tcl was built as a framework, attempt to use the libraries
- # from the framework at the given location so that linking works
- # against Tcl.framework installed in an arbitrary location.
- case ${TCL_DEFS} in
- *TCL_FRAMEWORK*)
- if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
- for i in "`cd ${TCL_BIN_DIR}; pwd`" \
- "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
- if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
- TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
- break
- fi
- done
- fi
- if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
- TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
- TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
- fi
- ;;
- esac
- fi
+ if test "${with_lzma}" != no; then
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
- eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
@@ -12910,29 +12905,821 @@ $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+ use_additional=yes
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+# Check whether --with-liblzma-prefix was given.
+if test "${with_liblzma_prefix+set}" = set; then :
+ withval=$with_liblzma_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
- # Check for in-tree tcl
- here=`pwd`
- cd ${srcdir}/..
- topdir=`pwd`
- cd ${here}
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
- intree="no"
- if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
- intree="yes"
- fi
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
- # Find Tcl private headers
- if test x"${intree}" = xno; then
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
+ LIBLZMA=
+ LTLIBLZMA=
+ INCLZMA=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='lzma '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBLZMA; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBLZMA; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
+ else
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
+ else
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCLZMA; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBLZMA; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBLZMA; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
+ LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
+ LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
+ done
+ fi
+
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCLZMA; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
+$as_echo_n "checking for liblzma... " >&6; }
+if test "${ac_cv_liblzma+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBLZMA"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "lzma.h"
+int
+main ()
+{
+lzma_index_iter iter;
+ lzma_index_iter_init (&iter, 0);
+ lzma_mf_is_supported (LZMA_MF_HC3);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_liblzma=yes
+else
+ ac_cv_liblzma=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
+$as_echo "$ac_cv_liblzma" >&6; }
+ if test "$ac_cv_liblzma" = yes; then
+ HAVE_LIBLZMA=yes
+
+$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
+$as_echo_n "checking how to link with liblzma... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
+$as_echo "$LIBLZMA" >&6; }
+ else
+ HAVE_LIBLZMA=no
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBLZMA=
+ LTLIBLZMA=
+ fi
+
+
+
+
+
+
+ if test "$HAVE_LIBLZMA" != yes; then
+ if test "$with_lzma" = yes; then
+ as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
+ fi
+ fi
+ fi
+fi
+
+LIBGUI="../libgui/src/libgui.a"
+GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
+
+
+
+WIN32LDAPP=
+
+
+
+case "${host}" in
+*-*-cygwin* | *-*-mingw* )
+ configdir="win"
+ ;;
+*)
+ configdir="unix"
+ ;;
+esac
+
+GDBTKLIBS=
+if test "${enable_gdbtk}" = "yes"; then
+
+ # Gdbtk must have an absolute path to srcdir in order to run
+ # properly when not installed.
+ here=`pwd`
+ cd ${srcdir}
+ GDBTK_SRC_DIR=`pwd`
+ cd $here
+
+
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+
+# Check whether --with-tcl was given.
+if test "${with_tcl+set}" = set; then :
+ withval=$with_tcl; with_tclconfig=${withval}
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+ if test "${ac_cv_c_tclconfig+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ # First check to see if --with-tcl was specified.
+ case "${host}" in
+ *-*-cygwin*) platDir="win" ;;
+ *) platDir="unix" ;;
+ esac
+ if test x"${with_tclconfig}" != x ; then
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/$platDir/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/$platDir/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
+$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+ fi
+ fi
+
+
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
+
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
+
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+
+# Check whether --with-tk was given.
+if test "${with_tk+set}" = set; then :
+ withval=$with_tk; with_tkconfig=${withval}
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
+$as_echo_n "checking for Tk configuration... " >&6; }
+ if test "${ac_cv_c_tkconfig+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
+ fi
+ fi
+
+ # then check for a private Tk library
+ case "${host}" in
+ *-*-cygwin*) platDir="win" ;;
+ *) platDir="unix" ;;
+ esac
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/$platDir/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tk.framework/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/$platDir/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
+$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
+$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
+ fi
+ fi
+
+
+ if test -z "${no_tcl}" -a -z "${no_tk}"; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
+
+ if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+ . ${TCL_BIN_DIR}/tclConfig.sh
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tcl.framework installed in an arbitrary location.
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+ for i in "`cd ${TCL_BIN_DIR}; pwd`" \
+ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+ TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+ TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for in-tree tcl
+ here=`pwd`
+ cd ${srcdir}/..
+ topdir=`pwd`
+ cd ${here}
+
+ intree="no"
+ if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
+ intree="yes"
+ fi
+
+ # Find Tcl private headers
+ if test x"${intree}" = xno; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
$as_echo_n "checking for Tcl private headers... " >&6; }
private_dir=""
dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
@@ -12940,521 +13727,1030 @@ $as_echo_n "checking for Tcl private headers... " >&6; }
private_dir=${dir}
fi
- if test x"${private_dir}" = x; then
- as_fn_error "could not find private Tcl headers" "$LINENO" 5
- else
- TCL_PRIVATE_INCLUDE="-I${private_dir}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
-$as_echo "${private_dir}" >&6; }
+ if test x"${private_dir}" = x; then
+ as_fn_error "could not find private Tcl headers" "$LINENO" 5
+ else
+ TCL_PRIVATE_INCLUDE="-I${private_dir}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
+$as_echo "${private_dir}" >&6; }
+ fi
+
+ TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
+ TCL_LIBRARY="${TCL_LIB_SPEC}"
+ TCL_DEPS=""
+ else
+ # If building tcl in the same src tree, private headers
+ # are not needed, but we need to be sure to use the right
+ # headers library
+ TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
+ TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
+ TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
+$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+ . ${TK_BIN_DIR}/tkConfig.sh
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
+$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tk.framework installed in an arbitrary location.
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
+ for i in "`cd ${TK_BIN_DIR}; pwd`" \
+ "`cd ${TK_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+ TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
+ TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
+ TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for in-tree Tk
+ intree="no"
+ if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
+ intree="yes"
+ fi
+
+ # Find Tk private headers
+ if test x"${intree}" = xno; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
+$as_echo_n "checking for Tk private headers... " >&6; }
+ private_dir=""
+ dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
+ if test -f ${dir}/tkInt.h; then
+ private_dir=${dir}
+ fi
+
+ if test x"${private_dir}" = x; then
+ as_fn_error "could not find Tk private headers" "$LINENO" 5
+ else
+ TK_PRIVATE_INCLUDE="-I${private_dir}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
+$as_echo "${private_dir}" >&6; }
+ fi
+
+ TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
+ TK_LIBRARY=${TK_LIB_SPEC}
+ TK_DEPS=""
+ else
+ TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+ TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
+ TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
+ fi
+
+
+
+
+
+ ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+
+ # Include some libraries that Tcl and Tk want.
+ TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
+ # Yes, the ordering seems wrong here. But it isn't.
+ # TK_LIBS is the list of libraries that need to be linked
+ # after Tcl/Tk. Note that this isn't put into LIBS. If it
+ # were in LIBS then any link tests after this point would
+ # try to include things like `$(LIBGUI)', which wouldn't work.
+ GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+
+ CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
+ CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
+ CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
+ CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
+ CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
+ CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
+ CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
+
+ if test x$gdb_cv_os_cygwin = xyes; then
+ WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
+ WIN32LDAPP="-Wl,--subsystem,console"
+ CONFIG_OBS="${CONFIG_OBS} gdbres.o"
+ fi
+
+ subdirs="$subdirs gdbtk"
+
+ fi
+fi
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+ withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ case $x_includes,$x_libraries in #(
+ *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lX11 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+ *) have_x=yes;;
+ esac
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+
+# Unlike the sim directory, whether a simulator is linked is controlled by
+# presence of a gdb_sim definition in the target configure.tgt entry.
+# This code just checks for a few cases where we'd like to ignore those
+# definitions, even when they're present in the '.mt' file. These cases
+# are when --disable-sim is specified, or if the simulator directory is
+# not part of the source tree.
+#
+# Check whether --enable-sim was given.
+if test "${enable_sim+set}" = set; then :
+ enableval=$enable_sim; echo "enable_sim = $enable_sim";
+ echo "enableval = ${enableval}";
+ case "${enableval}" in
+ yes) ignore_sim=false ;;
+ no) ignore_sim=true ;;
+ *) ignore_sim=false ;;
+ esac
+else
+ ignore_sim=false
+fi
+
+
+if test ! -d "${srcdir}/../sim"; then
+ ignore_sim=true
+fi
+
+SIM=
+SIM_OBS=
+if test "${ignore_sim}" = "false"; then
+ if test x"${gdb_sim}" != x ; then
+ SIM="${gdb_sim}"
+ SIM_OBS="remote-sim.o"
+
+$as_echo "#define WITH_SIM 1" >>confdefs.h
+
fi
+fi
- TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
- TCL_LIBRARY="${TCL_LIB_SPEC}"
- TCL_DEPS=""
- else
- # If building tcl in the same src tree, private headers
- # are not needed, but we need to be sure to use the right
- # headers library
- TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
- TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
- TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
-$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
- if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
-$as_echo "loading" >&6; }
- . ${TK_BIN_DIR}/tkConfig.sh
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
-$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
- fi
- # eval is required to do the TK_DBGX substitution
- eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
- eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
- # If the TK_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TK_LIB_SPEC will be set to the value
- # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
- # instead of TK_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- if test -f "${TK_BIN_DIR}/Makefile" ; then
- TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
- TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
- TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
- elif test "`uname -s`" = "Darwin"; then
- # If Tk was built as a framework, attempt to use the libraries
- # from the framework at the given location so that linking works
- # against Tk.framework installed in an arbitrary location.
- case ${TK_DEFS} in
- *TK_FRAMEWORK*)
- if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
- for i in "`cd ${TK_BIN_DIR}; pwd`" \
- "`cd ${TK_BIN_DIR}/../..; pwd`"; do
- if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
- TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
- break
- fi
- done
- fi
- if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
- TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
- TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
- fi
- ;;
- esac
- fi
- # eval is required to do the TK_DBGX substitution
- eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
- eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
- eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
- eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+# List of host floatformats.
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
+_ACEOF
+
+
+# target_subdir is used by the testsuite to find the target libraries.
+target_subdir=
+if test "${host}" != "${target}"; then
+ target_subdir="${target_alias}/"
+fi
+
+
+frags=
+if test "${gdb_native}" = "yes"; then
+ host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
+ if test ! -f ${host_makefile_frag}; then
+ as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
+ fi
+ frags="$frags $host_makefile_frag"
+else
+ host_makefile_frag=/dev/null
+fi
+
+
+
+
+if test "${gdb_native}" = "yes"; then
+# We pick this up from the host configuration file (.mh) because we
+# do not have a native configuration Makefile fragment.
+nativefile=`sed -n '
+s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
+' ${host_makefile_frag}`
+fi
+
+
+if test x"${gdb_osabi}" != x ; then
+
+cat >>confdefs.h <<_ACEOF
+#define GDB_OSABI_DEFAULT $gdb_osabi
+_ACEOF
+
+fi
+
+# Enable multi-ice-gdb-server.
+# Check whether --enable-multi-ice was given.
+if test "${enable_multi_ice+set}" = set; then :
+ enableval=$enable_multi_ice; case $enableval in
+ yes | no)
+ ;;
+ *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
+ esac
+fi
+if test "x$enable_multi_ice" = xyes; then
+ subdirs="$subdirs multi-ice"
+fi
+# Check whether --enable-gdbserver was given.
+if test "${enable_gdbserver+set}" = set; then :
+ enableval=$enable_gdbserver; case "${enableval}" in
+ yes| no|auto) ;;
+ *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
+esac
+else
+ enable_gdbserver=auto
+fi
+# We only build gdbserver automatically in a native configuration, and
+# only if the user did not explicitly disable its build.
+if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
+$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
+ if test "x$build_gdbserver" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ subdirs="$subdirs gdbserver"
+ gdbserver_build_enabled=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+fi
+# If the user explicitly request the gdbserver to be built, verify that
+# we were in fact able to enable it.
+if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
+ as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
+fi
+# Check for babeltrace and babeltrace-ctf
+# Check whether --with-babeltrace was given.
+if test "${with_babeltrace+set}" = set; then :
+ withval=$with_babeltrace;
+else
+ with_babeltrace=auto
+fi
- # Check for in-tree Tk
- intree="no"
- if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
- intree="yes"
- fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
+$as_echo_n "checking whether to use babeltrace... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
+$as_echo "$with_babeltrace" >&6; }
- # Find Tk private headers
- if test x"${intree}" = xno; then
+if test "x$with_babeltrace" = "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
+$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
+else
+ # Append -Werror to CFLAGS so that configure can catch the warning
+ # "assignment from incompatible pointer type", which is related to
+ # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
+ # in GDB, while babeltrace 1.0.3 is broken.
+ # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
+ # safe to save and restore CFLAGS here.
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Werror"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
-$as_echo_n "checking for Tk private headers... " >&6; }
- private_dir=""
- dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
- if test -f ${dir}/tkInt.h; then
- private_dir=${dir}
- fi
- if test x"${private_dir}" = x; then
- as_fn_error "could not find Tk private headers" "$LINENO" 5
- else
- TK_PRIVATE_INCLUDE="-I${private_dir}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
-$as_echo "${private_dir}" >&6; }
- fi
- TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
- TK_LIBRARY=${TK_LIB_SPEC}
- TK_DEPS=""
- else
- TK_INCLUDE="-I${TK_SRC_DIR}/generic"
- TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
- TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
- fi
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+ use_additional=yes
- # Include some libraries that Tcl and Tk want.
- TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
- # Yes, the ordering seems wrong here. But it isn't.
- # TK_LIBS is the list of libraries that need to be linked
- # after Tcl/Tk. Note that this isn't put into LIBS. If it
- # were in LIBS then any link tests after this point would
- # try to include things like `$(LIBGUI)', which wouldn't work.
- GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
- CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
- CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
- CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
- if test x$gdb_cv_os_cygwin = xyes; then
- WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
- WIN32LDAPP="-Wl,--subsystem,console"
- CONFIG_OBS="${CONFIG_OBS} gdbres.o"
- fi
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
- subdirs="$subdirs gdbtk"
+# Check whether --with-libbabeltrace-prefix was given.
+if test "${with_libbabeltrace_prefix+set}" = set; then :
+ withval=$with_libbabeltrace_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
fi
+
fi
+ LIBBABELTRACE=
+ LTLIBBABELTRACE=
+ INCBABELTRACE=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='babeltrace babeltrace-ctf'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBBABELTRACE; do
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBBABELTRACE; do
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
+ else
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
+ else
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCBABELTRACE; do
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBBABELTRACE; do
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
-$as_echo_n "checking for X... " >&6; }
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBBABELTRACE; do
-# Check whether --with-x was given.
-if test "${with_x+set}" = set; then :
- withval=$with_x;
-fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
-else
- case $x_includes,$x_libraries in #(
- *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
- cd conftest.dir
- cat >Imakefile <<'_ACEOF'
-incroot:
- @echo incroot='${INCROOT}'
-usrlibdir:
- @echo usrlibdir='${USRLIBDIR}'
-libdir:
- @echo libdir='${LIBDIR}'
-_ACEOF
- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- for ac_var in incroot usrlibdir libdir; do
- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
- done
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl dylib la dll; do
- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
- test -f "$ac_im_libdir/libX11.$ac_extension"; then
- ac_im_usrlibdir=$ac_im_libdir; break
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
+ LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
+ LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
+ fi
+ fi
fi
done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case $ac_im_incroot in
- /usr/include) ac_x_includes= ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
- esac
- case $ac_im_usrlibdir in
- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
- esac
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
+ done
fi
- cd ..
- rm -f -r conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
+ ac_save_CPPFLAGS="$CPPFLAGS"
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
+ for element in $INCBABELTRACE; do
+ haveit=
+ for x in $CPPFLAGS; do
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
-/usr/openwin/include
-/usr/openwin/share/include'
-if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Xlib.h.
- # First, try using that file with no special directory specified.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # We can compile using X headers with no special include directory.
-ac_x_includes=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
+$as_echo_n "checking for libbabeltrace... " >&6; }
+if test "${ac_cv_libbabeltrace+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Xlib.h"; then
- ac_x_includes=$ac_dir
- break
- fi
-done
-fi
-rm -f conftest.err conftest.$ac_ext
-fi # $ac_x_includes = no
-if test "$ac_x_libraries" = no; then
- # Check for the libraries.
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS=$LIBS
- LIBS="-lX11 $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBBABELTRACE"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <X11/Xlib.h>
+#include <babeltrace/babeltrace.h>
+ #include <babeltrace/ctf/events.h>
+ #include <babeltrace/ctf/iterator.h>
int
main ()
{
-XrmInitialize ()
+struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
+ struct bt_ctf_event *event = NULL;
+ const struct bt_definition *scope;
+
+ scope = bt_ctf_get_top_level_scope (event,
+ BT_STREAM_EVENT_HEADER);
+ bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
+ ac_cv_libbabeltrace=yes
else
- LIBS=$ac_save_LIBS
-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
- # Don't even attempt the hair of trying to link an X program!
- for ac_extension in a so sl dylib la dll; do
- if test -r "$ac_dir/libX11.$ac_extension"; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
-done
+ ac_cv_libbabeltrace=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-case $ac_x_includes,$ac_x_libraries in #(
- no,* | *,no | *\'*)
- # Didn't find X, or a directory has "'" in its name.
- ac_cv_have_x="have_x=no";; #(
- *)
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes\
- ac_x_includes='$ac_x_includes'\
- ac_x_libraries='$ac_x_libraries'"
-esac
-fi
-;; #(
- *) have_x=yes;;
- esac
- eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
-$as_echo "$have_x" >&6; }
- no_x=yes
-else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes\
- ac_x_includes='$x_includes'\
- ac_x_libraries='$x_libraries'"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
-$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
-fi
-
-
-# Unlike the sim directory, whether a simulator is linked is controlled by
-# presence of a gdb_sim definition in the target configure.tgt entry.
-# This code just checks for a few cases where we'd like to ignore those
-# definitions, even when they're present in the '.mt' file. These cases
-# are when --disable-sim is specified, or if the simulator directory is
-# not part of the source tree.
-#
-# Check whether --enable-sim was given.
-if test "${enable_sim+set}" = set; then :
- enableval=$enable_sim; echo "enable_sim = $enable_sim";
- echo "enableval = ${enableval}";
- case "${enableval}" in
- yes) ignore_sim=false ;;
- no) ignore_sim=true ;;
- *) ignore_sim=false ;;
- esac
-else
- ignore_sim=false
-fi
-
-
-if test ! -d "${srcdir}/../sim"; then
- ignore_sim=true
-fi
-
-SIM=
-SIM_OBS=
-if test "${ignore_sim}" = "false"; then
- if test x"${gdb_sim}" != x ; then
- SIM="${gdb_sim}"
- SIM_OBS="remote-sim.o"
-
-$as_echo "#define WITH_SIM 1" >>confdefs.h
-
- fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# List of host floatformats.
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
-_ACEOF
-
+ LIBS="$ac_save_LIBS"
-# target_subdir is used by the testsuite to find the target libraries.
-target_subdir=
-if test "${host}" != "${target}"; then
- target_subdir="${target_alias}/"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
+$as_echo "$ac_cv_libbabeltrace" >&6; }
+ if test "$ac_cv_libbabeltrace" = yes; then
+ HAVE_LIBBABELTRACE=yes
+$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
-frags=
-if test "${gdb_native}" = "yes"; then
- host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
- if test ! -f ${host_makefile_frag}; then
- as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
+$as_echo_n "checking how to link with libbabeltrace... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
+$as_echo "$LIBBABELTRACE" >&6; }
+ else
+ HAVE_LIBBABELTRACE=no
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBBABELTRACE=
+ LTLIBBABELTRACE=
fi
- frags="$frags $host_makefile_frag"
-else
- host_makefile_frag=/dev/null
-fi
-
-
-
-
-if test "${gdb_native}" = "yes"; then
-# We pick this up from the host configuration file (.mh) because we
-# do not have a native configuration Makefile fragment.
-nativefile=`sed -n '
-s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
-' ${host_makefile_frag}`
-fi
-
-
-if test x"${gdb_osabi}" != x ; then
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_OSABI_DEFAULT $gdb_osabi
-_ACEOF
-
-fi
-# Enable multi-ice-gdb-server.
-# Check whether --enable-multi-ice was given.
-if test "${enable_multi_ice+set}" = set; then :
- enableval=$enable_multi_ice; case $enableval in
- yes | no)
- ;;
- *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
- esac
-fi
-if test "x$enable_multi_ice" = xyes; then
- subdirs="$subdirs multi-ice"
-fi
-# Check whether --enable-gdbserver was given.
-if test "${enable_gdbserver+set}" = set; then :
- enableval=$enable_gdbserver; case "${enableval}" in
- yes| no|auto) ;;
- *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
-esac
-else
- enable_gdbserver=auto
-fi
-# We only build gdbserver automatically in a native configuration, and
-# only if the user did not explicitly disable its build.
-if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
-$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
- if test "x$build_gdbserver" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- subdirs="$subdirs gdbserver"
+ CFLAGS=$saved_CFLAGS
- gdbserver_build_enabled=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ if test "$HAVE_LIBBABELTRACE" != yes; then
+ if test "$with_babeltrace" = yes; then
+ as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
+$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
+ fi
fi
fi
-# If the user explicitly request the gdbserver to be built, verify that
-# we were in fact able to enable it.
-if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
- as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
-fi
-
# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
# to an empty version.
@@ -13493,6 +14789,21 @@ ac_config_links="$ac_config_links $ac_config_links_1"
$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
+# Undo the $ec_script escaping suitable for Makefile.
+transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
+GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
+if test "x$GDB_TRANSFORM_NAME" = x; then
+ GDB_TRANSFORM_NAME=gdb
+fi
+
+GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
+if test "x$GCORE_TRANSFORM_NAME" = x; then
+ GCORE_TRANSFORM_NAME=gcore
+fi
+
+ac_config_files="$ac_config_files gcore"
+
+
ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
ac_config_commands="$ac_config_commands default"
@@ -14203,6 +15514,7 @@ do
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
"jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
"$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
+ "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
@@ -14824,6 +16136,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
+ "gcore":F) chmod +x gcore ;;
"default":C)
case x$CONFIG_HEADERS in
xconfig.h:config.in)
« no previous file with comments | « gdb/config/xtensa/linux.mh ('k') | gdb/configure.ac » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698