X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfigure;h=5300b5ac4550ab355e1c40d898c5ec2acda3114d;hb=d344e670e7df167ddc6728fd378388d37a0e3c88;hp=f9d9a1745b4d97170d19694426eac1b888c91840;hpb=b292c7831823605b02a564b0a9274f95141c92ee;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure b/gdb/configure index f9d9a1745b..5300b5ac45 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1480,7 +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 building GDB with -lmcheck if available + --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 @@ -2704,10 +2704,8 @@ fi -# Provide more thorough testing by -lmcheck. -# Set it to 'true' for development snapshots, 'false' for releases or -# pre-releases. -development=true +# Set the 'development' global. +. $srcdir/development.sh ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6136,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 @@ -6229,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. # @@ -7957,6 +7962,10 @@ done fi fi +# --------------------- # +# Check for libpython. # +# --------------------- # + @@ -8558,36 +8567,37 @@ fi -# Provide a --enable-libmcheck/--disable-libmcheck set of options -# allowing a user to enable this option even when building releases, -# or to disable it when building a snapshot. -# 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 - +# --------------------- # +# Check for libmcheck. # +# --------------------- # # 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 -z "${ENABLE_LIBMCHECK}" \ - -a \( "${have_libpython}" = "no" \ - -o "${python_has_threads}" = "no" \) \ - && $development; then - ENABLE_LIBMCHECK=yes +if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ + && $development; then + libmcheck_default=yes +else + libmcheck_default=no fi -if test "$ENABLE_LIBMCHECK" = "yes" ; then - if test "${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;} + # 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 + + + if test -z "${ENABLE_LIBMCHECK}"; then + ENABLE_LIBMCHECK=${libmcheck_default} fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 + + 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 @@ -8626,170 +8636,19 @@ _ACEOF fi -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 -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -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 -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" - 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 : - $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 '' 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 : -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" +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 -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; } @@ -8905,14 +8764,14 @@ fi # elf_hp.h is for HP/UX 64-bit shared library support. 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 locale.h \ - dlfcn.h sys/socket.h sys/un.h linux/perf_event.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" @@ -8926,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 -#endif -#if HAVE_NLIST_H -# include -#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 @@ -9054,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 @@ -9093,16 +8903,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 @@ -10168,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" @@ -10218,71 +10019,459 @@ $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 -#endif -#if HAVE_SYS_PTRACE_H -# include -#endif -#if HAVE_UNISTD_H -# include -#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 +#include +#include +#include +#include + 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' + ac_cv_header_stdc=yes else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +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 int ptrace (); - ; - return 0; -} +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +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 + +_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* + +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 : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#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 () +{ + 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 : + +else + 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 +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 STDC_HEADERS 1" >>confdefs.h + +fi + + # 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 +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=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: $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 + +{ $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. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=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: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +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. + +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. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $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 CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $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. */ +$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 () +{ + return find_stack_direction () < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +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_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 + + + + { $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 +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_langinfo_codeset=yes +else + am_cv_langinfo_codeset=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: $am_cv_langinfo_codeset" >&5 +$as_echo "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + + fi + + + 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 + +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 + + + 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 + + + +# Check the return and argument types of ptrace. No canned test for +# this, so roll our own. +gdb_ptrace_headers=' +#include +#if HAVE_SYS_PTRACE_H +# include +#endif +#if HAVE_UNISTD_H +# include +#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_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 +int +main () +{ +extern int ptrace (); + ; + return 0; +} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_ret='int' @@ -10325,7 +10514,7 @@ 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 + for gdb_arg4 in 'int' 'long' 'void *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers @@ -10388,6 +10577,11 @@ cat >>confdefs.h <<_ACEOF #define PTRACE_TYPE_ARG3 $3 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define PTRACE_TYPE_ARG4 $4 +_ACEOF + if test -n "$5"; then cat >>confdefs.h <<_ACEOF @@ -10830,7 +11024,7 @@ fi if test "${target}" = "${host}"; then case "${host}" in - *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) + *-*-sysv4.2* | *-*-sysv5* ) $as_echo "#define NEW_PROC_API 1" >>confdefs.h @@ -10850,80 +11044,6 @@ $as_echo "#define _KMEMUSER 1" >>confdefs.h 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 : - $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 -int -main () -{ -pstatus_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pstatus_t=yes -else - bfd_cv_have_sys_procfs_type_pstatus_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then - -$as_echo "#define HAVE_PSTATUS_T 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; } - - { $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 : - $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 -int -main () -{ -prrun_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prrun_t=yes -else - bfd_cv_have_sys_procfs_type_prrun_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - 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; } - { $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 : @@ -11109,43 +11229,6 @@ $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h { $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 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 : - $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 -int -main () -{ -prfpregset32_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset32_t=yes -else - bfd_cv_have_sys_procfs_type_prfpregset32_t=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 "#define HAVE_PRFPREGSET32_T 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; } - { $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 : @@ -11382,215 +11465,33 @@ else gdb_cv_prfpregset_t_broken=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - 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 - -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 - - fi - fi - - - { $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_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ - - int dummy;; - dummy = ioctl(0, PIOCSET, &dummy); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_procfs_piocset=yes -else - gdb_cv_have_procfs_piocset=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 - -$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h - - fi -fi - -if test ${host} = ${target} ; then - - { $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_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct link_map lm; (void) lm.l_addr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_link_map_with_l_members=yes -else - gdb_cv_have_struct_link_map_with_l_members=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 - - fi - - - { $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_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -struct link_map lm; (void) lm.lm_addr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_link_map_with_lm_members=yes -else - gdb_cv_have_struct_link_map_with_lm_members=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 - - fi - - - { $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_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_NLIST_H -#include -#endif -#include -int -main () -{ -struct so_map lm; (void) lm.som_addr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_so_map_with_som_members=yes -else - gdb_cv_have_struct_so_map_with_som_members=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 - - fi - - - { $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_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _SYSCALL32 -#include -int -main () -{ -struct link_map32 l; - ; - return 0; -} +/* end confdefs.h. */ +#include + int main () + { + if (sizeof (prfpregset_t) == sizeof (void *)) + return 1; + return 0; + } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_link_map32=yes +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_prfpregset_t_broken=no else - gdb_cv_have_struct_link_map32=no + gdb_cv_prfpregset_t_broken=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 - { $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 - -$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 @@ -11968,13 +11869,6 @@ $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h CONFIG_OBS="${CONFIG_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" - # On SPARC CPUs, we also need to build sparc-sol-thread. - case ${host_cpu} in - sparc*) - CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c" - ;; - esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : @@ -12248,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 @@ -12328,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. @@ -12446,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 -Wempty-body" +-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. @@ -12544,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 @@ -12598,7 +12508,62 @@ esac intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` # -ldl is provided by bfd/Makfile.am (LIBDL) . if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" + { $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 + fi LIBS="-lbfd -liberty $intl $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 @@ -12640,7 +12605,62 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h # -ldl is provided by bfd/Makfile.am (LIBDL) . if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" + { $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 + fi fi @@ -12657,7 +12677,62 @@ fi intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` # -ldl is provided by bfd/Makfile.am (LIBDL) . if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" + { $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 + fi LIBS="-lbfd -liberty $intl $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 @@ -12709,7 +12784,62 @@ fi intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` # -ldl is provided by bfd/Makfile.am (LIBDL) . if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" + { $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 + fi LIBS="-lbfd -liberty $intl $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5