X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfigure;h=f856cc497d930de821b76189585ae8efdbed36b6;hb=ed3ef33944c39d9a3cea72b9a7cef3c20f0e3461;hp=5ee5ce6db49e9f6f22d80d1898fcba31fdd55342;hpb=e637a4f593b43a9acde23545c162e708b52a342f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure b/gdb/configure index 5ee5ce6db4..f856cc497d 100755 --- a/gdb/configure +++ b/gdb/configure @@ -588,18 +588,15 @@ ac_includes_default="\ # include #endif" -gl_header_list= -gl_func_list= enable_option_checking=no -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -gltests_LTLIBOBJS -gltests_LIBOBJS -gl_LTLIBOBJS -gl_LIBOBJS -LTLIBOBJS +ac_subst_vars='LTLIBOBJS LIBOBJS +GCORE_TRANSFORM_NAME +GDB_TRANSFORM_NAME GDB_NM_FILE +LTLIBBABELTRACE +LIBBABELTRACE +HAVE_LIBBABELTRACE frags target_subdir CONFIG_UNINSTALL @@ -649,16 +646,21 @@ TCL_VERSION WIN32LDAPP GUI_CFLAGS_X LIBGUI +LTLIBLZMA +LIBLZMA +HAVE_LIBLZMA WIN32LIBS SER_HARDWIRE WERROR_CFLAGS WARN_CFLAGS SYSTEM_GDBINIT -TARGET_SYSTEM_ROOT_DEFINE TARGET_SYSTEM_ROOT CONFIG_LDFLAGS RDYNAMIC ALLOCA +GUILE_LIBS +GUILE_CPPFLAGS +pkg_config_prog_path PYTHON_LIBS PYTHON_CPPFLAGS PYTHON_CFLAGS @@ -666,6 +668,8 @@ python_prog_path LTLIBEXPAT LIBEXPAT HAVE_LIBEXPAT +JIT_READER_DIR +TARGET_PTR READLINE_TEXI_INCFLAG READLINE_CFLAGS READLINE_DEPS @@ -676,185 +680,25 @@ DLLTOOL AR YFLAGS YACC +RANLIB LN_S +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +AWK REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION +HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs GDB_DATADIR DEBUGDIR -am__fastdepCC_FALSE -am__fastdepCC_TRUE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -am__untar -am__tar -AMTAR -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh +MAKEINFO_EXTRA_FLAGS +MAKEINFOFLAGS MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM PACKAGE GNULIB_STDINT_H -LIBGNU_LTLIBDEPS -LIBGNU_LIBDEPS -gltests_WITNESS -HAVE_WINT_T -HAVE_WCHAR_H -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H -NEXT_WCHAR_H -REPLACE_WCWIDTH -REPLACE_WCSNRTOMBS -REPLACE_WCSRTOMBS -REPLACE_WCRTOMB -REPLACE_MBSNRTOWCS -REPLACE_MBSRTOWCS -REPLACE_MBRLEN -REPLACE_MBRTOWC -REPLACE_MBSINIT -REPLACE_WCTOB -REPLACE_BTOWC -REPLACE_MBSTATE_T -HAVE_DECL_WCWIDTH -HAVE_DECL_WCTOB -HAVE_WCSNRTOMBS -HAVE_WCSRTOMBS -HAVE_WCRTOMB -HAVE_MBSNRTOWCS -HAVE_MBSRTOWCS -HAVE_MBRLEN -HAVE_MBRTOWC -HAVE_MBSINIT -HAVE_BTOWC -GNULIB_WCWIDTH -GNULIB_WCSNRTOMBS -GNULIB_WCSRTOMBS -GNULIB_WCRTOMB -GNULIB_MBSNRTOWCS -GNULIB_MBSRTOWCS -GNULIB_MBRLEN -GNULIB_MBRTOWC -GNULIB_MBSINIT -GNULIB_WCTOB -GNULIB_BTOWC -NEXT_AS_FIRST_DIRECTIVE_STRING_H -NEXT_STRING_H -STDINT_H -WINT_T_SUFFIX -WCHAR_T_SUFFIX -SIG_ATOMIC_T_SUFFIX -SIZE_T_SUFFIX -PTRDIFF_T_SUFFIX -HAVE_SIGNED_WINT_T -HAVE_SIGNED_WCHAR_T -HAVE_SIGNED_SIG_ATOMIC_T -BITSIZEOF_WINT_T -BITSIZEOF_WCHAR_T -BITSIZEOF_SIG_ATOMIC_T -BITSIZEOF_SIZE_T -BITSIZEOF_PTRDIFF_T -HAVE_SYS_BITYPES_H -HAVE_SYS_INTTYPES_H -HAVE_STDINT_H -NEXT_AS_FIRST_DIRECTIVE_STDINT_H -NEXT_STDINT_H -HAVE_SYS_TYPES_H -HAVE_INTTYPES_H -HAVE_UNSIGNED_LONG_LONG_INT -HAVE_LONG_LONG_INT -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H -NEXT_STDDEF_H -PRAGMA_SYSTEM_HEADER -INCLUDE_NEXT_AS_FIRST_DIRECTIVE -INCLUDE_NEXT -STDDEF_H -HAVE_WCHAR_T -REPLACE_NULL -APPLE_UNIVERSAL_BUILD -UNDEFINE_STRTOK_R -REPLACE_STRTOK_R -REPLACE_STRSIGNAL -REPLACE_STRNLEN -REPLACE_STRNDUP -REPLACE_STRNCAT -REPLACE_STRERROR -REPLACE_STRCASESTR -REPLACE_STRSTR -REPLACE_STRDUP -REPLACE_STPNCPY -REPLACE_MEMMEM -REPLACE_MEMCHR -HAVE_STRVERSCMP -HAVE_DECL_STRSIGNAL -HAVE_DECL_STRTOK_R -HAVE_STRCASESTR -HAVE_STRSEP -HAVE_STRPBRK -HAVE_DECL_STRNLEN -HAVE_DECL_STRNDUP -HAVE_DECL_STRDUP -HAVE_STRCHRNUL -HAVE_STPNCPY -HAVE_STPCPY -HAVE_RAWMEMCHR -HAVE_DECL_MEMRCHR -HAVE_MEMPCPY -HAVE_DECL_MEMMEM -HAVE_MEMCHR -HAVE_MBSLEN -GNULIB_STRVERSCMP -GNULIB_STRSIGNAL -GNULIB_STRERROR -GNULIB_MBSTOK_R -GNULIB_MBSSEP -GNULIB_MBSSPN -GNULIB_MBSPBRK -GNULIB_MBSCSPN -GNULIB_MBSCASESTR -GNULIB_MBSPCASECMP -GNULIB_MBSNCASECMP -GNULIB_MBSCASECMP -GNULIB_MBSSTR -GNULIB_MBSRCHR -GNULIB_MBSCHR -GNULIB_MBSNLEN -GNULIB_MBSLEN -GNULIB_STRTOK_R -GNULIB_STRCASESTR -GNULIB_STRSTR -GNULIB_STRSEP -GNULIB_STRPBRK -GNULIB_STRNLEN -GNULIB_STRNDUP -GNULIB_STRNCAT -GNULIB_STRDUP -GNULIB_STRCHRNUL -GNULIB_STPNCPY -GNULIB_STPCPY -GNULIB_RAWMEMCHR -GNULIB_MEMRCHR -GNULIB_MEMPCPY -GNULIB_MEMMEM -GNULIB_MEMCHR -GL_COND_LIBTOOL_FALSE -GL_COND_LIBTOOL_TRUE CATOBJEXT GENCAT INSTOBJEXT @@ -874,14 +718,13 @@ MAKE CCDEPMODE DEPDIR am__leading_dot +INSTALL_STRIP_PROGRAM +STRIP +install_sh target_os target_vendor target_cpu target -RANLIB -EGREP -GREP -CPP host_os host_vendor host_cpu @@ -890,6 +733,9 @@ build_os build_vendor build_cpu build +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -944,41 +790,50 @@ enable_option_checking enable_maintainer_mode enable_plugins enable_largefile -enable_dependency_tracking with_separate_debug_dir with_gdb_datadir with_relocated_sources +with_auto_load_dir +with_auto_load_safe_path enable_targets enable_64_bit_bfd enable_gdbcli enable_gdbmi enable_tui enable_gdbtk -with_libunwind +with_libunwind_ia64 with_curses enable_profiling with_pkgversion with_bugurl with_zlib with_libiconv_prefix +with_iconv_bin with_system_readline +with_jit_reader_dir with_expat with_gnu_ld enable_rpath with_libexpat_prefix with_python +with_guile +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 @@ -989,6 +844,8 @@ LDFLAGS LIBS CPPFLAGS CPP +MAKEINFO +MAKEINFOFLAGS YACC YFLAGS XMKMF' @@ -1621,8 +1478,6 @@ Optional Features: (and sometimes confusing) to the casual installer --enable-plugins Enable support for plugins (defaults no) --disable-largefile omit support for large files - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors --enable-targets=TARGETS alternative target configurations --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) @@ -1632,6 +1487,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 @@ -1652,7 +1508,15 @@ Optional Packages: [DATADIR/gdb] --with-relocated-sources=PATH automatically relocate this path for source files - --with-libunwind use libunwind frame unwinding support + --with-auto-load-dir=PATH + directories from which to load auto-loaded scripts + [$debugdir:$datadir/auto-load] + --with-auto-load-safe-path=PATH + directories safe to hold auto-loaded files + [--with-auto-load-dir] + --without-auto-load-safe-path + do not restrict auto-loaded files locations + --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library --with-pkgversion=PKG Use PKG in the version string in place of "GDB" @@ -1660,13 +1524,18 @@ Optional Packages: --with-zlib include zlib support (auto/yes/no) default=auto --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --with-iconv-bin=PATH specify where to find the iconv program --with-system-readline use installed readline library + --with-jit-reader-dir=PATH + directory to load the JIT readers from --with-expat include expat support (auto/yes/no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib --without-libexpat-prefix don't search for libexpat in includedir and libdir --with-python[=PYTHON] include python support (auto/yes/no/) + --with-guile[=GUILE] include guile support + (auto/yes/no//) --without-included-regex don't use included regex; this is the default on systems with version 2 of the GNU C library (use @@ -1674,9 +1543,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 @@ -1687,6 +1562,9 @@ Some influential environment variables: CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + MAKEINFO Parent configure detects if it is of sufficient version. + MAKEINFOFLAGS + Parameters for MAKEINFO. YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. @@ -2009,164 +1887,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* 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 $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2345,33 +2065,191 @@ rm -f conftest.val } # ac_fn_c_compute_int -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* 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 $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -2738,13 +2616,6 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -gl_header_list="$gl_header_list sys/mman.h" -gl_func_list="$gl_func_list mprotect" -gl_func_list="$gl_func_list memchr" -gl_header_list="$gl_header_list stddef.h" -gl_header_list="$gl_header_list stdint.h" -gl_header_list="$gl_header_list wchar.h" -gl_header_list="$gl_header_list string.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2842,6 +2713,9 @@ fi +# Set the 'development' global. +. $srcdir/development.sh + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3607,100 +3481,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4101,8 +3881,6 @@ done - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes @@ -4123,14 +3901,6 @@ $as_echo "#define _MINIX 1" >>confdefs.h fi - case "$host_os" in - hpux*) - -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h - - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } @@ -4140,8 +3910,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4171,120 +3941,99 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - - - - +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi - # Code from module arg-nonnull: - # Code from module c++defs: - # Code from module extensions: +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - # Code from module include_next: - # Code from module memchr: - # Code from module memmem: - # Code from module memmem-simple: - # Code from module multiarch: - # Code from module stddef: - # Code from module stdint: - # Code from module string: - # Code from module warn-on-use: - # Code from module wchar: { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } @@ -4642,72 +4391,194 @@ case "x$am_cv_prog_cc_stdc" in *) CC="$CC $am_cv_prog_cc_stdc" ;; esac +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` -ac_aux_dir= -for ac_dir in .. "$srcdir"/..; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -# Dependency checking. -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - am__leading_dot=_ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rmdir .tst 2>/dev/null - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depdir" - -depcc="$CC" am_compiler_list= -am_depcomp=$ac_aux_dir/depcomp -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + + +ac_aux_dir= +for ac_dir in .. "$srcdir"/..; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + +# Dependency checking. +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depdir" + + +depcc="$CC" am_compiler_list= + +am_depcomp=$ac_aux_dir/depcomp +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none @@ -4869,6 +4740,107 @@ $as_echo "no" >&6; } fi +# Configure gnulib. We need to build gnulib under some other +# directory not "gnulib", to avoid the problem of both GDB and +# GDBserver wanting to build it in the same directory, when building +# in the source dir. + + in_src="gnulib" + in_build="build-gnulib" + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + --disable-option-checking) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + + ac_popdir=`pwd` + ac_dir=$in_build + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 + as_dir="$ac_dir"; as_fn_mkdir_p + + case $srcdir in + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir/$in_src ;; + *) # Relative name. + ac_srcdir=../$srcdir/$in_src ;; + esac + + cd "$ac_dir" + + ac_sub_configure=$ac_srcdir/configure + + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + + cd "$ac_popdir" + + CONFIG_OBS= CONFIG_DEPS= @@ -4961,2832 +4933,2464 @@ if test x"$USE_NLS" = xyes; then CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" fi +GNULIB=build-gnulib/import +# For Makefile dependencies. +GNULIB_STDINT_H= +if test x"$STDINT_H" != x; then + GNULIB_STDINT_H=$GNULIB/$STDINT_H +fi +PACKAGE=gdb - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ - - - - - - for ac_header in $gl_header_list -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 +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" _ACEOF -fi - -done - +# We never need to detect it in this sub-configure. +# But preserve it for config.status --recheck. +MAKEINFO_EXTRA_FLAGS="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 +$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } +if test "${gdb_cv_have_makeinfo_click+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + echo '@clicksequence{a @click{} b}' >conftest.texinfo + if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then + gdb_cv_have_makeinfo_click=yes + else + gdb_cv_have_makeinfo_click=no + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 +$as_echo "$gdb_cv_have_makeinfo_click" >&6; } +if test x"$gdb_cv_have_makeinfo_click" = xyes; then + MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" +fi - for ac_func in $gl_func_list -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 +# Check whether --with-separate-debug-dir was given. +if test "${with_separate_debug_dir+set}" = set; then : + withval=$with_separate_debug_dir; + DEBUGDIR=$withval +else + DEBUGDIR=${libdir}/debug fi -done - + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $DEBUGDIR` + ac_define_dir=`eval echo $ac_define_dir` +cat >>confdefs.h <<_ACEOF +#define DEBUGDIR "$ac_define_dir" +_ACEOF - GNULIB_MEMCHR=0; - GNULIB_MEMMEM=0; - GNULIB_MEMPCPY=0; - GNULIB_MEMRCHR=0; - GNULIB_RAWMEMCHR=0; - GNULIB_STPCPY=0; - GNULIB_STPNCPY=0; - GNULIB_STRCHRNUL=0; - GNULIB_STRDUP=0; - GNULIB_STRNCAT=0; - GNULIB_STRNDUP=0; - GNULIB_STRNLEN=0; - GNULIB_STRPBRK=0; - GNULIB_STRSEP=0; - GNULIB_STRSTR=0; - GNULIB_STRCASESTR=0; - GNULIB_STRTOK_R=0; - GNULIB_MBSLEN=0; - GNULIB_MBSNLEN=0; - GNULIB_MBSCHR=0; - GNULIB_MBSRCHR=0; - GNULIB_MBSSTR=0; - GNULIB_MBSCASECMP=0; - GNULIB_MBSNCASECMP=0; - GNULIB_MBSPCASECMP=0; - GNULIB_MBSCASESTR=0; - GNULIB_MBSCSPN=0; - GNULIB_MBSPBRK=0; - GNULIB_MBSSPN=0; - GNULIB_MBSSEP=0; - GNULIB_MBSTOK_R=0; - GNULIB_STRERROR=0; - GNULIB_STRSIGNAL=0; - GNULIB_STRVERSCMP=0; - HAVE_MBSLEN=0; - HAVE_MEMCHR=1; - HAVE_DECL_MEMMEM=1; - HAVE_MEMPCPY=1; - HAVE_DECL_MEMRCHR=1; - HAVE_RAWMEMCHR=1; - HAVE_STPCPY=1; - HAVE_STPNCPY=1; - HAVE_STRCHRNUL=1; - HAVE_DECL_STRDUP=1; - HAVE_DECL_STRNDUP=1; - HAVE_DECL_STRNLEN=1; - HAVE_STRPBRK=1; - HAVE_STRSEP=1; - HAVE_STRCASESTR=1; - HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRSIGNAL=1; - HAVE_STRVERSCMP=1; - REPLACE_MEMCHR=0; - REPLACE_MEMMEM=0; - REPLACE_STPNCPY=0; - REPLACE_STRDUP=0; - REPLACE_STRSTR=0; - REPLACE_STRCASESTR=0; - REPLACE_STRERROR=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; - REPLACE_STRSIGNAL=0; - REPLACE_STRTOK_R=0; - UNDEFINE_STRTOK_R=0; - - - - - - - - - - - - - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : - gl_have_mmap=yes -else - gl_have_mmap=no -fi - - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 -$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef MAP_ANONYMOUS - I cant identify this map. -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : - gl_have_mmap_anonymous=yes -fi -rm -f conftest* - - if test $gl_have_mmap_anonymous != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef MAP_ANON - I cant identify this map. -#endif + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${ac_define_dir} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac +cat >>confdefs.h <<_ACEOF +#define DEBUGDIR_RELOCATABLE $value _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : - -$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h - - gl_have_mmap_anonymous=yes -fi -rm -f conftest* - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 -$as_echo "$gl_have_mmap_anonymous" >&6; } - if test $gl_have_mmap_anonymous = yes; then -$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - fi - fi - : +# We can't pass paths as command line arguments. +# Mingw32 tries to be clever and will convert the paths for us. +# For example -DBINDIR="/usr/local/bin" passed on the command line may get +# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". +# This breaks GDB's relocatable path conversions since paths passed in +# config.h would not get so translated, the path prefixes no longer match. + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $bindir` + ac_define_dir=`eval echo $ac_define_dir` +cat >>confdefs.h <<_ACEOF +#define BINDIR "$ac_define_dir" +_ACEOF +# GDB's datadir relocation - : +# Check whether --with-gdb-datadir was given. +if test "${with_gdb_datadir+set}" = set; then : + withval=$with_gdb_datadir; + GDB_DATADIR=$withval +else + GDB_DATADIR=${datadir}/gdb +fi + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $GDB_DATADIR` + ac_define_dir=`eval echo $ac_define_dir` +cat >>confdefs.h <<_ACEOF +#define GDB_DATADIR "$ac_define_dir" +_ACEOF - : + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${ac_define_dir} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac +cat >>confdefs.h <<_ACEOF +#define GDB_DATADIR_RELOCATABLE $value +_ACEOF - if test $ac_cv_func_memchr = yes; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 -$as_echo_n "checking whether memchr works... " >&6; } -if test "${gl_cv_func_memchr_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_memchr_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif -int -main () -{ +# Check whether --with-relocated-sources was given. +if test "${with_relocated_sources+set}" = set; then : + withval=$with_relocated_sources; reloc_srcdir="${withval}" - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - return 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - return 2; - } - return 0; + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $reloc_srcdir` + ac_define_dir=`eval echo $ac_define_dir` - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define RELOC_SRCDIR "$ac_define_dir" _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_memchr_works=yes -else - gl_cv_func_memchr_works=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: $gl_cv_func_memchr_works" >&5 -$as_echo "$gl_cv_func_memchr_works" >&6; } - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - else - HAVE_MEMCHR=0 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 +$as_echo_n "checking for default auto-load directory... " >&6; } +# Check whether --with-auto-load-dir was given. +if test "${with_auto_load_dir+set}" = set; then : + withval=$with_auto_load_dir; +else + with_auto_load_dir='$debugdir:$datadir/auto-load' +fi - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" +escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $escape_dir` + ac_define_dir=`eval echo $ac_define_dir` - for ac_header in bp-sym.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" -if test "x$ac_cv_header_bp_sym_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BP_SYM_H 1 +cat >>confdefs.h <<_ACEOF +#define AUTO_LOAD_DIR "$ac_define_dir" _ACEOF -fi - -done - - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 +$as_echo "$with_auto_load_dir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 +$as_echo_n "checking for default auto-load safe-path... " >&6; } - ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" -if test "x$ac_cv_have_decl_memmem" = x""yes; then : - ac_have_decl=1 +# Check whether --with-auto-load-safe-path was given. +if test "${with_auto_load_safe_path+set}" = set; then : + withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then + with_auto_load_safe_path="/" + fi else - ac_have_decl=0 + with_auto_load_safe_path="$with_auto_load_dir" fi +escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` + + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $escape_dir` + ac_define_dir=`eval echo $ac_define_dir` + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MEMMEM $ac_have_decl +#define AUTO_LOAD_SAFE_PATH "$ac_define_dir" _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 +$as_echo "$with_auto_load_safe_path" >&6; } +subdirs="$subdirs testsuite" +# Check whether to support alternative target configurations +# Check whether --enable-targets was given. +if test "${enable_targets+set}" = set; then : + enableval=$enable_targets; case "${enableval}" in + yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac +fi +# Check whether to enable 64-bit support on 32-bit hosts +# Check whether --enable-64-bit-bfd was given. +if test "${enable_64_bit_bfd+set}" = set; then : + enableval=$enable_64_bit_bfd; case "${enableval}" in + yes) want64=true ;; + no) want64=false ;; + *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; +esac +else + want64=false +fi +# Provide defaults for some variables set by the per-host and per-target +# configuration. +gdb_host_obs=posix-hdep.o +if test "${target}" = "${host}"; then + gdb_native=yes +else + gdb_native=no +fi +. $srcdir/configure.host +# Accumulate some settings from configure.tgt over all enabled targets - for ac_func in memmem -do : - ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" -if test "x$ac_cv_func_memmem" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMMEM 1 -_ACEOF +TARGET_OBS= +all_targets= +HAVE_NATIVE_GCORE_TARGET= -else +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + if test "$targ_alias" = "all"; then + all_targets=true + else + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + . ${srcdir}/configure.tgt + if test -z "${gdb_target_obs}"; then : + as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 fi -done + # Target-specific object files + for i in ${gdb_target_obs}; do + case " $TARGET_OBS " in + *" ${i} "*) ;; + *) + TARGET_OBS="$TARGET_OBS ${i}" + ;; + esac + done + # Check whether this target needs 64-bit CORE_ADDR + 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 +if test x${all_targets} = xtrue; then + # We want all 64-bit targets if we either: + # - run on a 64-bit host or + # - already require 64-bit support for some other target or + # - the --enable-64-bit-bfd option was supplied + # Otherwise we only support all 32-bit targets. + # + # NOTE: This test must be in sync with the corresponding + # tests in BFD! + if test x${want64} = xfalse; then + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +fi - if test $ac_cv_have_decl_memmem = no; then - HAVE_DECL_MEMMEM=0 - fi - : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } - gl_cv_c_multiarch=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done + if test "x${ac_cv_sizeof_long}" = "x8"; then + want64=true + fi + fi + if test x${want64} = xtrue; then + TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' + else + TARGET_OBS='$(ALL_TARGET_OBS)' + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then -$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi +# For other settings, only the main target counts. +gdb_sim= +gdb_osabi= +build_gdbserver= +targ=$target; . ${srcdir}/configure.tgt - REPLACE_NULL=0; - HAVE_WCHAR_T=1; - STDDEF_H=''; +# Fetch the default architecture and default target vector from BFD. +targ=$target; . $srcdir/../bfd/config.bfd +# We only want the first architecture, so strip off the others if +# there is more than one. +targ_archs=`echo $targ_archs | sed 's/ .*//'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ +if test "x$targ_archs" != x; then - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define DEFAULT_BFD_ARCH $targ_archs _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "x$targ_defvec" != x; then + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_BFD_VEC $targ_defvec +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h +# The CLI cannot be disabled yet, but may be in the future. + +# Enable CLI. +# Check whether --enable-gdbcli was given. +if test "${enable_gdbcli+set}" = set; then : + enableval=$enable_gdbcli; case $enableval in + yes) + ;; + no) + as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; + *) + as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; + esac +else + enable_gdbcli=yes +fi +if test x"$enable_gdbcli" = xyes; then + if test -d $srcdir/cli; then + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" + CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" + ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" fi +fi +# Enable MI. +# Check whether --enable-gdbmi was given. +if test "${enable_gdbmi+set}" = set; then : + enableval=$enable_gdbmi; case $enableval in + yes | no) + ;; + *) + as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; + esac +else + enable_gdbmi=yes +fi +if test x"$enable_gdbmi" = xyes; then + if test -d $srcdir/mi; then + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" + CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" + ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" + fi +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if test "${gl_cv_have_include_next+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=yes +# Enable TUI. +# Check whether --enable-tui was given. +if test "${enable_tui+set}" = set; then : + enableval=$enable_tui; case $enableval in + yes | no | auto) + ;; + *) + as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; + esac else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=buggy + enable_tui=auto +fi + + +# Enable gdbtk. +# Check whether --enable-gdbtk was given. +if test "${enable_gdbtk+set}" = set; then : + enableval=$enable_gdbtk; case $enableval in + yes | no) + ;; + *) + as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; + esac else - gl_cv_have_include_next=no + if test -d $srcdir/gdbtk; then + enable_gdbtk=yes + else + enable_gdbtk=no + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# We unconditionally disable gdbtk tests on selected platforms. +case $host_os in + go32* | windows*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 +$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} + enable_gdbtk=no ;; +esac + +# Libunwind support for ia64. + + +# Check whether --with-libunwind-ia64 was given. +if test "${with_libunwind_ia64+set}" = set; then : + withval=$with_libunwind_ia64; +else + with_libunwind_ia64=auto fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -$as_echo "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi + + +# Backward compatibility option. +if test "${with_libunwind+set}" = set; then + if test x"$with_libunwind_ia64" != xauto; then + as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 fi + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 +$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} + with_libunwind_ia64="$with_libunwind" +fi + +case "$with_libunwind_ia64" in + yes | no) + ;; + auto) + for ac_header in libunwind-ia64.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" +if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND_IA64_H 1 +_ACEOF + +fi + +done + with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h + ;; + *) + as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 + ;; +esac +if test x"$with_libunwind_ia64" = xyes; then + for ac_header in libunwind-ia64.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" +if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND_IA64_H 1 +_ACEOF +fi +done + if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then + as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 + fi + CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" + CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" + CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" +fi +opt_curses=no +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then : + withval=$with_curses; opt_curses=$withval +fi +prefer_curses=no +if test "$opt_curses" = "yes"; then + prefer_curses=yes +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : - $as_echo_n "(cached) " >&6 +# Profiling support. +# Check whether --enable-profiling was given. +if test "${enable_profiling+set}" = set; then : + enableval=$enable_profiling; case $enableval in + yes | no) + ;; + *) + as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; + esac else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + enable_profiling=no +fi - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} +for ac_func in monstartup _mcleanup +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 -if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : - ac_cv_type_long_long_int=yes + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 +$as_echo_n "checking for _etext... " >&6; } +if test "${ac_cv_var__etext+set}" = set; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif +#include +extern char _etext; + int main () { -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; +free (&_etext); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes -else - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_var__etext=yes else - ac_cv_type_long_long_int=no + ac_cv_var__etext=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_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 +$as_echo "$ac_cv_var__etext" >&6; } +if test $ac_cv_var__etext = yes; then +$as_echo "#define HAVE__ETEXT 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 +$as_echo_n "checking for etext... " >&6; } +if test "${ac_cv_var_etext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +extern char etext; - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; int main () { -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); +free (&etext); ; return 0; } - _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_type_unsigned_long_long_int=yes + ac_cv_var_etext=yes else - ac_cv_type_unsigned_long_long_int=no + ac_cv_var_etext=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_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 +$as_echo "$ac_cv_var_etext" >&6; } +if test $ac_cv_var_etext = yes; then +$as_echo "#define HAVE_ETEXT 1" >>confdefs.h +fi +if test "$enable_profiling" = yes ; then + if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then + as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 + fi + PROFILE_CFLAGS=-pg + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PROFILE_CFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 +$as_echo_n "checking whether $CC supports -pg... " >&6; } +if test "${ac_cv_cc_supports_pg+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } + int main () { -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) +int x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw + ac_cv_cc_supports_pg=yes +else + ac_cv_cc_supports_pg=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 +$as_echo "$ac_cv_cc_supports_pg" >&6; } + if test $ac_cv_cc_supports_pg = no; then + as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 + fi + CFLAGS="$OLD_CFLAGS" +fi +# Check whether --with-pkgversion was given. +if test "${with_pkgversion+set}" = set; then : + withval=$with_pkgversion; case "$withval" in + yes) as_fn_error "package version not specified" "$LINENO" 5 ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac +else + PKGVERSION="(GDB) " +fi - : +# Check whether --with-bugurl was given. +if test "${with_bugurl+set}" = set; then : + withval=$with_bugurl; case "$withval" in + yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; + no) BUGURL= + ;; + *) BUGURL="$withval" + ;; + esac +else + BUGURL="http://www.gnu.org/software/gdb/bugs/" +fi + case ${BUGURL} in + "") + REPORT_BUGS_TO= + REPORT_BUGS_TEXI= + ;; + *) + REPORT_BUGS_TO="<$BUGURL>" + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} + ;; + esac; - if test $gl_cv_have_include_next = yes; then - gl_cv_next_string_h='<'string.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_string_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_string_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +cat >>confdefs.h <<_ACEOF +#define PKGVERSION "$PKGVERSION" _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/string.h#{ - s#.*"\(.*/string.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_string_h='<'string.h'>' - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 -$as_echo "$gl_cv_next_string_h" >&6; } - fi - NEXT_STRING_H=$gl_cv_next_string_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'string.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_string_h - fi - NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive +cat >>confdefs.h <<_ACEOF +#define REPORT_BUGS_TO "$REPORT_BUGS_TO" +_ACEOF +# --------------------- # +# Checks for programs. # +# --------------------- # - for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. else - eval "$as_gl_Symbol=no" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval as_val=\$$as_gl_Symbol - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - done + test -n "$AWK" && break +done - GNULIB_BTOWC=0; - GNULIB_WCTOB=0; - GNULIB_MBSINIT=0; - GNULIB_MBRTOWC=0; - GNULIB_MBRLEN=0; - GNULIB_MBSRTOWCS=0; - GNULIB_MBSNRTOWCS=0; - GNULIB_WCRTOMB=0; - GNULIB_WCSRTOMBS=0; - GNULIB_WCSNRTOMBS=0; - GNULIB_WCWIDTH=0; - HAVE_BTOWC=1; - HAVE_MBSINIT=1; - HAVE_MBRTOWC=1; - HAVE_MBRLEN=1; - HAVE_MBSRTOWCS=1; - HAVE_MBSNRTOWCS=1; - HAVE_WCRTOMB=1; - HAVE_WCSRTOMBS=1; - HAVE_WCSNRTOMBS=1; - HAVE_DECL_WCTOB=1; - HAVE_DECL_WCWIDTH=1; - REPLACE_MBSTATE_T=0; - REPLACE_BTOWC=0; - REPLACE_WCTOB=0; - REPLACE_MBSINIT=0; - REPLACE_MBRTOWC=0; - REPLACE_MBRLEN=0; - REPLACE_MBSRTOWCS=0; - REPLACE_MBSNRTOWCS=0; - REPLACE_WCRTOMB=0; - REPLACE_WCSRTOMBS=0; - REPLACE_WCSNRTOMBS=0; - REPLACE_WCWIDTH=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 -$as_echo_n "checking whether uses 'inline' correctly... " >&6; } -if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else - gl_cv_header_wchar_h_correct_inline=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define wcstod renamed_wcstod -#include -extern int zero (void); -int main () { return zero(); } + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - mv conftest.$ac_objext conftest1.$ac_objext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + done +IFS=$as_save_IFS - #define wcstod renamed_wcstod -#include -int zero (void) { return 0; } +rm -rf conftest.one conftest.two conftest.dir -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no - fi - fi - fi - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 -$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } - if test $gl_cv_header_wchar_h_correct_inline = no; then - as_fn_error " cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). -This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in -C99 mode. You have four options: - - Add the flag -fgnu89-inline to CC and reconfigure, or - - Fix your include files, using parts of - , or - - Use a gcc version older than 4.3, or - - Don't use the flags -std=c99 or -std=gnu99. -Configuration aborted." "$LINENO" 5 +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - gt_cv_c_wint_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_m4_base='gnulib/m4' - - - - - - - - - - gl_source_base='gnulib' - # Code from module arg-nonnull: - # Code from module c++defs: - # Code from module extensions: - # Code from module include_next: - # Code from module memchr: - - - - - GNULIB_MEMCHR=1 - - -$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h - - - - # Code from module memmem: - - - if test $ac_cv_have_decl_memmem = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 -$as_echo_n "checking whether memmem works in linear time... " >&6; } -if test "${gl_cv_func_memmem_works+set}" = set; then : +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_MAJOR >= 1007 - Lucky user - #endif -#endif + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_memmem_works=yes +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - gl_cv_func_memmem_works="guessing no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest* - + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include /* for signal */ -#include /* for memmem */ -#include /* for malloc */ -#include /* for alarm */ + RANLIB="$ac_cv_prog_RANLIB" +fi -int -main () -{ -size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 1); - char *needle = (char *) malloc (m + 1); - void *result = 0; - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also lack memmem. */ - signal (SIGALRM, SIG_DFL); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - memset (needle, 'A', m); - needle[m] = 'B'; - result = memmem (haystack, 2 * m + 1, needle, m + 1); - } - /* Check for empty needle behavior. */ - return !result || !memmem ("a", 1, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_memmem_works=yes +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - gl_cv_func_memmem_works=no + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 -$as_echo "$gl_cv_func_memmem_works" >&6; } - if test "$gl_cv_func_memmem_works" != yes; then - REPLACE_MEMMEM=1 - - - - - + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" - gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" - fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - # Code from module memmem-simple: - - - - - - - - - - - - - for ac_func in memmem -do : - ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" -if test "x$ac_cv_func_memmem" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMMEM 1 -_ACEOF - +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - - : - - - - - - if test $ac_cv_have_decl_memmem = no; then - HAVE_DECL_MEMMEM=0 + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR fi - : - - - - - GNULIB_MEMMEM=1 - - - -$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h - - - - # Code from module multiarch: - - # Code from module stddef: - - +else + AR="$ac_cv_prog_AR" +fi - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - if test -n "$STDDEF_H"; then - - - - - : - - - - - - +done + done +IFS=$as_save_IFS - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - - if test $ac_cv_header_stddef_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stddef_h='<'stddef.h'>' - fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS - # Code from module stdint: - - +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="" else - HAVE_LONG_LONG_INT=0 + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi - - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_WINDRES="windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" else - HAVE_SYS_TYPES_H=0 + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi - - - - - : - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; 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 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MIG+set}" = set; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_stdint_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi + if test -n "$MIG"; then + ac_cv_prog_MIG="$MIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MIG="${ac_tool_prefix}mig" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h +fi +MIG=$ac_cv_prog_MIG +if test -n "$MIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 +$as_echo "$MIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive +fi +if test -z "$ac_cv_prog_MIG"; then + ac_ct_MIG=$MIG + # Extract the first word of "mig", so it can be a program name with args. +set dummy mig; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MIG"; then + ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MIG="mig" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_MIG=$ac_cv_prog_ac_ct_MIG +if test -n "$ac_ct_MIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 +$as_echo "$ac_ct_MIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 + if test "x$ac_ct_MIG" = x; then + MIG="" else - HAVE_STDINT_H=0 + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MIG=$ac_ct_MIG fi +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. # +# ---------------------- # - if test $ac_cv_header_stdint_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 -$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : +# We might need to link with -lm; most simulators need it. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 +$as_echo_n "checking for main in -lm... " >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then : $as_echo_n "(cached) " >&6 else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - int main () { - +return main (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_main=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_cv_lib_m_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_m_main" >&5 +$as_echo "$ac_cv_lib_m_main" >&6; } +if test "x$ac_cv_lib_m_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + LIBS="-lm $LIBS" -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include +fi - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +# We need to link with -lw to get `wctype' on Solaris before Solaris +# 2.6. Solaris 2.6 and beyond have this function in libc, and have a +# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 +# is known to have this problem). Therefore we avoid libw if we can. +ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" +if test "x$ac_cv_func_wctype" = x""yes; then : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 +$as_echo_n "checking for wctype in -lw... " >&6; } +if test "${ac_cv_lib_w_wctype+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), +/* 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 - NULL - }; - +char wctype (); int main () { - - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return 1; - } - return 0; - +return wctype (); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_w_wctype=yes +else + ac_cv_lib_w_wctype=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 +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - for ac_header in sys/inttypes.h sys/bitypes.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 : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 +$as_echo "$ac_cv_lib_w_wctype" >&6; } +if test "x$ac_cv_lib_w_wctype" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIBW 1 _ACEOF -fi - -done - - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - - - - : - - - - - - + LIBS="-lw $LIBS" +fi - if test $APPLE_UNIVERSAL_BUILD = 0; then +fi - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : +# Some systems (e.g. Solaris) have `gethostbyname' in libnsl. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if test "${ac_cv_search_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : - -else - result=unknown -fi + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - eval gl_cv_bitsizeof_${gltype}=\$result - -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result +/* 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} _ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - - +for ac_lib in '' nsl; 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 - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_gethostbyname+set}" = set; then : + break +fi +done +if test "${ac_cv_search_gethostbyname+set}" = set; then : else - result=unknown + ac_cv_search_gethostbyname=no fi - - eval gl_cv_bitsizeof_${gltype}=\$result - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 -$as_echo_n "checking whether $gltype is signed... " >&6; } -if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : +# Some systems (e.g. Solaris) have `socketpair' in libsocket. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 +$as_echo_n "checking for library containing socketpair... " >&6; } +if test "${ac_cv_search_socketpair+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +/* 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 socketpair (); int main () { - +return socketpair (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes +for ac_lib in '' socket; 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_socketpair=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_socketpair+set}" = set; then : + break +fi +done +if test "${ac_cv_search_socketpair+set}" = set; then : + else - result=no + ac_cv_search_socketpair=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 +$as_echo "$ac_cv_search_socketpair" >&6; } +ac_res=$ac_cv_search_socketpair +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -eval ac_res=\$gl_cv_type_${gltype}_signed - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 -_ACEOF - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done +# Link in zlib if we can. This allows us to read compressed debug sections. + + # See if the user specified whether he wants zlib support or not. - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then : + withval=$with_zlib; +else + with_zlib=auto +fi - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : + if test "$with_zlib" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 +$as_echo_n "checking for library containing zlibVersion... " >&6; } +if test "${ac_cv_search_zlibVersion+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; +/* 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 zlibVersion (); int main () { - +return zlibVersion (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf +for ac_lib in '' z; 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_zlibVersion=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_zlibVersion+set}" = set; then : + break fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result +done +if test "${ac_cv_search_zlibVersion+set}" = set; then : + +else + ac_cv_search_zlibVersion=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 +$as_echo "$ac_cv_search_zlibVersion" >&6; } +ac_res=$ac_cv_search_zlibVersion +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + for ac_header in zlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ZLIB_H 1 _ACEOF - done +fi +done + +fi + if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then + as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 + fi fi - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : +# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 +$as_echo_n "checking for library containing dlgetmodinfo... " >&6; } +if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; +/* 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 dlgetmodinfo (); int main () { - +return dlgetmodinfo (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf +for ac_lib in '' dl xpdl; 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_dlgetmodinfo=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : + break fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF +done +if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : - done +else + ac_cv_search_dlgetmodinfo=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 +$as_echo "$ac_cv_search_dlgetmodinfo" >&6; } +ac_res=$ac_cv_search_dlgetmodinfo +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi - STDINT_H=stdint.h - fi - # Code from module string: +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + for dir in `echo "$withval" | tr : ' '`; do + if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi + if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi + done +fi - # Code from module warn-on-use: - # Code from module wchar: + BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" + BUILD_LIBICONV_INCLUDE="-I../libiconv/include" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + am_cv_use_build_libiconv=no + am_cv_build_libiconv_path= - : - - - - - - - - - - : - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wchar_h='<'wchar.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wchar_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_wchar_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # If libiconv is part of the build tree, then try using it over + # any system iconv. + if test -d ../libiconv; then + for lib_dir in $BUILD_LIBICONV_LIBDIRS; do + am_save_LIBS="$LIBS" + am_save_CPPFLAGS="$CPPFLAGS" + LIBS="$LIBS $lib_dir/libiconv.a" + CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wchar.h#{ - s#.*"\(.*/wchar.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_wchar_h='<'wchar.h'>' - fi - +if ac_fn_c_try_link "$LINENO"; then : + am_cv_use_build_libiconv=yes + am_cv_build_libiconv_path=$lib_dir/libiconv.a + am_cv_lib_iconv=yes + am_cv_func_iconv=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 -$as_echo "$gl_cv_next_wchar_h" >&6; } - fi - NEXT_WCHAR_H=$gl_cv_next_wchar_h +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + CPPFLAGS="$am_save_CPPFLAGS" + if test "$am_cv_use_build_libiconv" = "yes"; then + break + fi + done + fi - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wchar.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wchar_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive + # Next, try to find iconv in libc. + if test "$am_cv_func_iconv" != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + # If iconv was not in libc, try -liconv. In this case, arrange to + # look in the libiconv prefix, if it was specified by the user. + if test "$am_cv_func_iconv" != yes; then + am_save_CPPFLAGS="$CPPFLAGS" + am_save_LIBS="$LIBS" + if test -n "$LIBICONV_INCLUDE"; then + CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" + LIBS="$LIBS $LIBICONV_LIBDIR" + fi + LIBS="$LIBS -liconv" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + CPPFLAGS="$am_save_CPPFLAGS" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 + # Set the various flags based on the cache variables. We can't rely + # on the flags to remain set from the above code, due to caching. + LIBICONV= + if test "$am_cv_lib_iconv" = yes; then + LIBICONV="-liconv" else - HAVE_WCHAR_H=0 + LIBICONV_LIBDIR= + LIBICONV_INCLUDE= fi - - - - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 + if test "$am_cv_use_build_libiconv" = yes; then + LIBICONV="$am_cv_build_libiconv_path" + LIBICONV_LIBDIR="" + LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" fi + CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" + LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" + if test "$am_cv_func_iconv" = yes; then +$as_echo "#define HAVE_ICONV 1" >>confdefs.h - for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if test "${am_cv_proto_iconv+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Some systems require additional headers. */ -#ifndef __GLIBC__ -# include -# include -# include +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); #endif -#include int main () { -#undef $gl_func - (void) $gl_func; + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" + am_cv_proto_iconv_arg1="" else - eval "$as_gl_Symbol=no" + am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval as_val=\$$as_gl_Symbol - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - # Code from module dummy: - # End of code from modules - - - - + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +$as_echo "${ac_t:- + }$am_cv_proto_iconv" >&6; } +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + fi - gltests_libdeps= - gltests_ltlibdeps= - - - - - - - - - - gl_source_base='tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS - - gl_module_indicator_condition=$gltests_WITNESS - - - - +# GDB may fork/exec the iconv program to get the list of supported character +# sets. Allow the user to specify where to find it. +# There are several factors affecting the choice of option name: +# - There is already --with-libiconv-prefix but we can't use it, it specifies +# the build-time location of libiconv files. +# - The program we need to find is iconv, which comes with glibc. The user +# doesn't necessarily have libiconv installed. Therefore naming this +# --with-libiconv-foo feels wrong. +# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is +# defined to work on directories not files (though it really doesn't know +# the difference). +# - Calling this --with-iconv-prefix is perceived to cause too much confusion +# with --with-libiconv-prefix. +# Putting these together is why the option name is --with-iconv-bin. +# Check whether --with-iconv-bin was given. +if test "${with_iconv_bin+set}" = set; then : + withval=$with_iconv_bin; iconv_bin="${withval}" +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN "${iconv_bin}" +_ACEOF - LIBGNU_LIBDEPS="$gl_libdeps" + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${iconv_bin} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac - LIBGNU_LTLIBDEPS="$gl_ltlibdeps" +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN_RELOCATABLE $value +_ACEOF -# For Makefile dependencies. -GNULIB_STDINT_H= -if test x"$STDINT_H" != x; then - GNULIB_STDINT_H=gnulib/$STDINT_H fi -PACKAGE=gdb - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - +# On alpha-osf, it appears that libtermcap and libcurses are not compatible. +# There is a very specific comment in /usr/include/curses.h explaining that +# termcap routines built into libcurses must not be used. +# +# The symptoms we observed so far is GDB unexpectedly changing +# the terminal settings when tgetent is called - this is particularly +# visible as the output is missing carriage returns, and so rapidly +# becomes very hard to read. +# +# The readline configure script has already decided that libtermcap +# was enough for its purposes, and so decided to build readline using +# libtermcap. Since the TUI mode requires curses, building GDB with +# TUI enabled results in both libraries to be used at the same time, +# which is not allowed. This basically means that GDB with TUI is +# broken on alpha-osf. +case $host_os in + osf* ) + if test x"$enable_tui" = xyes; then + as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 + fi + if test x"$enable_tui" = xauto; then + enable_tui=no + fi + ;; +esac -# GDB does not use automake, but gnulib does. This line lets us -# generate its Makefile.in. -am__api_version='1.11' +# For the TUI, we need enhanced curses functionality. +if test x"$enable_tui" != xno; then + prefer_curses=yes +fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +curses_found=no +if test x"$prefer_curses" = xyes; then + # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied + # curses library because the latter might not provide all the + # functionality we need. However, this leads to problems on systems + # where the linker searches /usr/local/lib, but the compiler doesn't + # search /usr/local/include, if ncurses is installed in /usr/local. A + # default installation of ncurses on alpha*-dec-osf* will lead to such + # a situation. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 +$as_echo_n "checking for library containing waddstr... " >&6; } +if test "${ac_cv_search_waddstr+set}" = set; then : $as_echo_n "(cached) " >&6 else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - done -IFS=$as_save_IFS +/* 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 waddstr (); +int +main () +{ +return waddstr (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ncurses cursesX curses; 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_waddstr=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_waddstr+set}" = set; then : + break +fi +done +if test "${ac_cv_search_waddstr+set}" = set; then : -rm -rf conftest.one conftest.two conftest.dir +else + ac_cv_search_waddstr=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 +$as_echo "$ac_cv_search_waddstr" >&6; } +ac_res=$ac_cv_search_waddstr +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh + + + if test "$ac_cv_search_waddstr" != no; then + curses_found=yes fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +# Check whether we should enable the TUI, but only do so if we really +# can. +if test x"$enable_tui" != xno; then + if test -d $srcdir/tui; then + if test "$curses_found" != no; then + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" + CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" + ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" + else + if test x"$enable_tui" = xyes; then + as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 +$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} + fi + fi + fi +fi -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# Since GDB uses Readline, we need termcap functionality. In many +# cases this will be provided by the curses library, but some systems +# have a seperate termcap library, or no curses library at all. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +case $host_os in + cygwin*) + if test -d $srcdir/libtermcap; then + LIBS="../libtermcap/libtermcap.a $LIBS" + ac_cv_search_tgetent="../libtermcap/libtermcap.a" + fi ;; + go32* | *djgpp*) + ac_cv_search_tgetent="none required" + ;; + *mingw32*) + ac_cv_search_tgetent="none required" + CONFIG_OBS="$CONFIG_OBS windows-termcap.o" + ;; esac -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : +# These are the libraries checked by Readline. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 +$as_echo_n "checking for library containing tgetent... " >&6; } +if test "${ac_cv_search_tgetent+set}" = set; then : + $as_echo_n "(cached) " >&6 else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac +/* 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 tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' termcap tinfo curses ncurses; 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_tgetent=$ac_res fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tgetent+set}" = set; then : + break fi +done +if test "${ac_cv_search_tgetent+set}" = set; then : -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - +else + ac_cv_search_tgetent=no fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 +$as_echo "$ac_cv_search_tgetent" >&6; } +ac_res=$ac_cv_search_tgetent +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + fi +if test "$ac_cv_search_tgetent" = no; then + as_fn_error "no termcap library found" "$LINENO" 5 fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +# Check whether --with-system-readline was given. +if test "${with_system_readline+set}" = set; then : + withval=$with_system_readline; fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi + +if test "$with_system_readline" = yes; then + READLINE=-lreadline + READLINE_DEPS= + READLINE_CFLAGS= + READLINE_TEXI_INCFLAG= else - STRIP="$ac_cv_prog_STRIP" + READLINE='$(READLINE_DIR)/libreadline.a' + READLINE_DEPS='$(READLINE)' + READLINE_CFLAGS='-I$(READLINE_SRC)/..' + READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' fi -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS -fi - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +# Generate jit-reader.h -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac +# This is typedeffed to GDB_CORE_ADDR in jit-reader.h +TARGET_PTR= -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 +$as_echo_n "checking size of unsigned long long... " >&6; } +if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + if test "$ac_cv_type_unsigned_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (unsigned long long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_unsigned_long_long=0 + fi fi - - test -n "$AWK" && break -done - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long +_ACEOF -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 +$as_echo_n "checking size of unsigned long... " >&6; } +if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi +else + if test "$ac_cv_type_unsigned_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (unsigned long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi fi -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } -# Define the identity of the package. - PACKAGE=gdb - VERSION=UNUSED-VERSION - - -# Some tools Automake needs. -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 +$as_echo_n "checking size of unsigned __int128... " >&6; } +if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : +else + if test "$ac_cv_type_unsigned___int128" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (unsigned __int128) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_unsigned___int128=0 + fi +fi -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 +$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 +_ACEOF -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then + TARGET_PTR="unsigned long" +elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then + TARGET_PTR="unsigned long long" +elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then + TARGET_PTR="unsigned __int128" +else + TARGET_PTR="unsigned long" +fi +ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" -depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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 - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none +/* 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +done +if test "${ac_cv_search_dlopen+set}" = set; then : - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= + 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 - -# Check whether --with-separate-debug-dir was given. -if test "${with_separate_debug_dir+set}" = set; then : - withval=$with_separate_debug_dir; - DEBUGDIR=$withval +# Check whether --with-jit-reader-dir was given. +if test "${with_jit_reader_dir+set}" = set; then : + withval=$with_jit_reader_dir; + JIT_READER_DIR=$withval else - DEBUGDIR=${libdir}/debug + JIT_READER_DIR=${libdir}/gdb fi test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - ac_define_dir=`eval echo $DEBUGDIR` + ac_define_dir=`eval echo $JIT_READER_DIR` ac_define_dir=`eval echo $ac_define_dir` cat >>confdefs.h <<_ACEOF -#define DEBUGDIR "$ac_define_dir" +#define JIT_READER_DIR "$ac_define_dir" _ACEOF @@ -7810,2263 +7414,292 @@ _ACEOF esac cat >>confdefs.h <<_ACEOF -#define DEBUGDIR_RELOCATABLE $value +#define JIT_READER_DIR_RELOCATABLE $value _ACEOF -# GDB's datadir relocation - - -# Check whether --with-gdb-datadir was given. -if test "${with_gdb_datadir+set}" = set; then : - withval=$with_gdb_datadir; - GDB_DATADIR=$withval +# Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; else - GDB_DATADIR=${datadir}/gdb + with_expat=auto fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 +$as_echo_n "checking whether to use expat... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 +$as_echo "$with_expat" >&6; } - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - ac_define_dir=`eval echo $GDB_DATADIR` - ac_define_dir=`eval echo $ac_define_dir` - -cat >>confdefs.h <<_ACEOF -#define GDB_DATADIR "$ac_define_dir" -_ACEOF +if test "${with_expat}" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 +$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} + HAVE_LIBEXPAT=no +else + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi - if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' else - test_prefix=$exec_prefix + PATH_SEPARATOR=: fi - value=0 - case ${ac_define_dir} in - "${test_prefix}"|"${test_prefix}/"*|\ - '${exec_prefix}'|'${exec_prefix}/'*) - value=1 - ;; + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi -cat >>confdefs.h <<_ACEOF -#define GDB_DATADIR_RELOCATABLE $value -_ACEOF +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done -# Check whether --with-relocated-sources was given. -if test "${with_relocated_sources+set}" = set; then : - withval=$with_relocated_sources; reloc_srcdir="${withval}" - - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - ac_define_dir=`eval echo $reloc_srcdir` - ac_define_dir=`eval echo $ac_define_dir` - -cat >>confdefs.h <<_ACEOF -#define RELOC_SRCDIR "$ac_define_dir" -_ACEOF - - - -fi - - - - -subdirs="$subdirs testsuite" - - -# Check whether to support alternative target configurations -# Check whether --enable-targets was given. -if test "${enable_targets+set}" = set; then : - enableval=$enable_targets; case "${enableval}" in - yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac fi - - -# Check whether to enable 64-bit support on 32-bit hosts -# Check whether --enable-64-bit-bfd was given. -if test "${enable_64_bit_bfd+set}" = set; then : - enableval=$enable_64_bit_bfd; case "${enableval}" in - yes) want64=true ;; - no) want64=false ;; - *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : else - want64=false + enable_rpath=yes fi -# Provide defaults for some variables set by the per-host and per-target -# configuration. -gdb_host_obs=posix-hdep.o - -if test "${target}" = "${host}"; then - gdb_native=yes -else - gdb_native=no -fi -. $srcdir/configure.host -# Accumulate some settings from configure.tgt over all enabled targets -TARGET_OBS= -all_targets= -for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` -do - if test "$targ_alias" = "all"; then - all_targets=true - else - # Canonicalize the secondary target names. - result=`$ac_config_sub $targ_alias 2>/dev/null` - if test -n "$result"; then - targ=$result - else - targ=$targ_alias - fi - . ${srcdir}/configure.tgt - if test -z "${gdb_target_obs}"; then : - as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 -fi - # Target-specific object files - for i in ${gdb_target_obs}; do - case " $TARGET_OBS " in - *" ${i} "*) ;; - *) - TARGET_OBS="$TARGET_OBS ${i}" - ;; - esac - done - # Check whether this target needs 64-bit CORE_ADDR - if test x${want64} = xfalse; then - . ${srcdir}/../bfd/config.bfd - fi - fi -done -if test x${all_targets} = xtrue; then + use_additional=yes - # We want all 64-bit targets if we either: - # - run on a 64-bit host or - # - already require 64-bit support for some other target or - # - the --enable-64-bit-bfd option was supplied - # Otherwise we only support all 32-bit targets. - # - # NOTE: This test must be in sync with the corresponding - # tests in BFD! + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" - if test x${want64} = xfalse; then - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_long=0 - fi -fi + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +# Check whether --with-libexpat-prefix was given. +if test "${with_libexpat_prefix+set}" = set; then : + withval=$with_libexpat_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" -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - if test "x${ac_cv_sizeof_long}" = "x8"; then - want64=true + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi fi - fi - if test x${want64} = xtrue; then - TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' - else - TARGET_OBS='$(ALL_TARGET_OBS)' - fi -fi - - - -# For other settings, only the main target counts. -gdb_sim= -gdb_osabi= -build_gdbserver= -targ=$target; . ${srcdir}/configure.tgt - -# Fetch the default architecture and default target vector from BFD. -targ=$target; . $srcdir/../bfd/config.bfd - -# We only want the first architecture, so strip off the others if -# there is more than one. -targ_archs=`echo $targ_archs | sed 's/ .*//'` - -if test "x$targ_archs" != x; then - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_BFD_ARCH $targ_archs -_ACEOF fi -if test "x$targ_defvec" != x; then - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_BFD_VEC $targ_defvec -_ACEOF -fi - -# The CLI cannot be disabled yet, but may be in the future. - -# Enable CLI. -# Check whether --enable-gdbcli was given. -if test "${enable_gdbcli+set}" = set; then : - enableval=$enable_gdbcli; case $enableval in - yes) - ;; - no) - as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; - *) - as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; - esac -else - enable_gdbcli=yes -fi - -if test x"$enable_gdbcli" = xyes; then - if test -d $srcdir/cli; then - CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" - CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" - CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" - ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" - fi -fi - -# Enable MI. -# Check whether --enable-gdbmi was given. -if test "${enable_gdbmi+set}" = set; then : - enableval=$enable_gdbmi; case $enableval in - yes | no) - ;; - *) - as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; - esac -else - enable_gdbmi=yes -fi - -if test x"$enable_gdbmi" = xyes; then - if test -d $srcdir/mi; then - CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" - CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" - CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" - ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" - fi -fi - -# Enable TUI. -# Check whether --enable-tui was given. -if test "${enable_tui+set}" = set; then : - enableval=$enable_tui; case $enableval in - yes | no | auto) - ;; - *) - as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; - esac -else - enable_tui=auto -fi - - -# Enable gdbtk. -# Check whether --enable-gdbtk was given. -if test "${enable_gdbtk+set}" = set; then : - enableval=$enable_gdbtk; case $enableval in - yes | no) - ;; - *) - as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; - esac -else - if test -d $srcdir/gdbtk; then - enable_gdbtk=yes - else - enable_gdbtk=no - fi -fi - -# We unconditionally disable gdbtk tests on selected platforms. -case $host_os in - go32* | windows*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 -$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} - enable_gdbtk=no ;; -esac - -# Libunwind support. - -# Check whether --with-libunwind was given. -if test "${with_libunwind+set}" = set; then : - withval=$with_libunwind; case "${withval}" in - yes) enable_libunwind=yes ;; - no) enable_libunwind=no ;; - *) as_fn_error "bad value ${withval} for GDB with-libunwind option" "$LINENO" 5 ;; -esac -else - - for ac_header in libunwind.h libunwind-ia64.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 - - if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then - enable_libunwind=yes; - fi - -fi - - -if test x"$enable_libunwind" = xyes; then - for ac_header in libunwind.h libunwind-ia64.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 - - -$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h - - CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" - CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" - CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" -fi - -opt_curses=no - -# Check whether --with-curses was given. -if test "${with_curses+set}" = set; then : - withval=$with_curses; opt_curses=$withval -fi - - -prefer_curses=no -if test "$opt_curses" = "yes"; then - prefer_curses=yes -fi - -# Profiling support. -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; case $enableval in - yes | no) - ;; - *) - as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; - esac -else - enable_profiling=no -fi - - -for ac_func in monstartup _mcleanup -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 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 -$as_echo_n "checking for _etext... " >&6; } -if test "${ac_cv_var__etext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -extern char _etext; - -int -main () -{ -free (&_etext); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var__etext=yes -else - ac_cv_var__etext=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_var__etext" >&5 -$as_echo "$ac_cv_var__etext" >&6; } -if test $ac_cv_var__etext = yes; then - -$as_echo "#define HAVE__ETEXT 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 -$as_echo_n "checking for etext... " >&6; } -if test "${ac_cv_var_etext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -extern char etext; - -int -main () -{ -free (&etext); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_etext=yes -else - ac_cv_var_etext=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_var_etext" >&5 -$as_echo "$ac_cv_var_etext" >&6; } -if test $ac_cv_var_etext = yes; then - -$as_echo "#define HAVE_ETEXT 1" >>confdefs.h - -fi -if test "$enable_profiling" = yes ; then - if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then - as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 - fi - PROFILE_CFLAGS=-pg - OLD_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PROFILE_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 -$as_echo_n "checking whether $CC supports -pg... " >&6; } -if test "${ac_cv_cc_supports_pg+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_cc_supports_pg=yes -else - ac_cv_cc_supports_pg=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 -$as_echo "$ac_cv_cc_supports_pg" >&6; } - - if test $ac_cv_cc_supports_pg = no; then - as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 - fi - - CFLAGS="$OLD_CFLAGS" -fi - - - -# Check whether --with-pkgversion was given. -if test "${with_pkgversion+set}" = set; then : - withval=$with_pkgversion; case "$withval" in - yes) as_fn_error "package version not specified" "$LINENO" 5 ;; - no) PKGVERSION= ;; - *) PKGVERSION="($withval) " ;; - esac -else - PKGVERSION="(GDB) " - -fi - - - - - -# Check whether --with-bugurl was given. -if test "${with_bugurl+set}" = set; then : - withval=$with_bugurl; case "$withval" in - yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; - no) BUGURL= - ;; - *) BUGURL="$withval" - ;; - esac -else - BUGURL="http://www.gnu.org/software/gdb/bugs/" - -fi - - case ${BUGURL} in - "") - REPORT_BUGS_TO= - REPORT_BUGS_TEXI= - ;; - *) - REPORT_BUGS_TO="<$BUGURL>" - REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} - ;; - esac; - - - - -cat >>confdefs.h <<_ACEOF -#define PKGVERSION "$PKGVERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define REPORT_BUGS_TO "$REPORT_BUGS_TO" -_ACEOF - - -# --------------------- # -# Checks for programs. # -# --------------------- # - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. -set dummy ${ac_tool_prefix}windres; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_WINDRES+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$WINDRES"; then - ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_WINDRES="${ac_tool_prefix}windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -WINDRES=$ac_cv_prog_WINDRES -if test -n "$WINDRES"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 -$as_echo "$WINDRES" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_WINDRES"; then - ac_ct_WINDRES=$WINDRES - # Extract the first word of "windres", so it can be a program name with args. -set dummy windres; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_WINDRES"; then - ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_WINDRES="windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES -if test -n "$ac_ct_WINDRES"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 -$as_echo "$ac_ct_WINDRES" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_WINDRES" = x; then - WINDRES="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - WINDRES=$ac_ct_WINDRES - fi -else - WINDRES="$ac_cv_prog_WINDRES" -fi - - -# Needed for GNU/Hurd. -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 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MIG"; then - ac_cv_prog_MIG="$MIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MIG="${ac_tool_prefix}mig" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MIG=$ac_cv_prog_MIG -if test -n "$MIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 -$as_echo "$MIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MIG"; then - ac_ct_MIG=$MIG - # Extract the first word of "mig", so it can be a program name with args. -set dummy mig; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MIG"; then - ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_MIG="mig" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MIG=$ac_cv_prog_ac_ct_MIG -if test -n "$ac_ct_MIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 -$as_echo "$ac_ct_MIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MIG" = x; then - MIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MIG=$ac_ct_MIG - fi -else - MIG="$ac_cv_prog_MIG" -fi - - -# ---------------------- # -# Checks for libraries. # -# ---------------------- # - -# We might need to link with -lm; most simulators need it. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 -$as_echo_n "checking for main in -lm... " >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $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_m_main=yes -else - ac_cv_lib_m_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_m_main" >&5 -$as_echo "$ac_cv_lib_m_main" >&6; } -if test "x$ac_cv_lib_m_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -# We need to link with -lw to get `wctype' on Solaris before Solaris -# 2.6. Solaris 2.6 and beyond have this function in libc, and have a -# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 -# is known to have this problem). Therefore we avoid libw if we can. -ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" -if test "x$ac_cv_func_wctype" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 -$as_echo_n "checking for wctype in -lw... " >&6; } -if test "${ac_cv_lib_w_wctype+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lw $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 wctype (); -int -main () -{ -return wctype (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_w_wctype=yes -else - ac_cv_lib_w_wctype=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_w_wctype" >&5 -$as_echo "$ac_cv_lib_w_wctype" >&6; } -if test "x$ac_cv_lib_w_wctype" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBW 1 -_ACEOF - - LIBS="-lw $LIBS" - -fi - -fi - - -# Some systems (e.g. Solaris) have `gethostbyname' in libnsl. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+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 gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; 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_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : - break -fi -done -if test "${ac_cv_search_gethostbyname+set}" = set; then : - -else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -# Some systems (e.g. Solaris) have `socketpair' in libsocket. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 -$as_echo_n "checking for library containing socketpair... " >&6; } -if test "${ac_cv_search_socketpair+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 socketpair (); -int -main () -{ -return socketpair (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket; 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_socketpair=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_socketpair+set}" = set; then : - break -fi -done -if test "${ac_cv_search_socketpair+set}" = set; then : - -else - ac_cv_search_socketpair=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 -$as_echo "$ac_cv_search_socketpair" >&6; } -ac_res=$ac_cv_search_socketpair -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -# Link in zlib if we can. This allows us to read compressed debug sections. - - # See if the user specified whether he wants zlib support or not. - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - with_zlib=auto -fi - - - if test "$with_zlib" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 -$as_echo_n "checking for library containing zlibVersion... " >&6; } -if test "${ac_cv_search_zlibVersion+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 zlibVersion (); -int -main () -{ -return zlibVersion (); - ; - return 0; -} -_ACEOF -for ac_lib in '' z; 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_zlibVersion=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_zlibVersion+set}" = set; then : - break -fi -done -if test "${ac_cv_search_zlibVersion+set}" = set; then : - -else - ac_cv_search_zlibVersion=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 -$as_echo "$ac_cv_search_zlibVersion" >&6; } -ac_res=$ac_cv_search_zlibVersion -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF - -fi - -done - -fi - - if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then - as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 - fi - fi - - -# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 -$as_echo_n "checking for library containing dlgetmodinfo... " >&6; } -if test "${ac_cv_search_dlgetmodinfo+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 dlgetmodinfo (); -int -main () -{ -return dlgetmodinfo (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl xpdl; 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_dlgetmodinfo=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : - break -fi -done -if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : - -else - ac_cv_search_dlgetmodinfo=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 -$as_echo "$ac_cv_search_dlgetmodinfo" >&6; } -ac_res=$ac_cv_search_dlgetmodinfo -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - - - - -# Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then : - withval=$with_libiconv_prefix; - for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi - if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi - done - -fi - - - BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" - BUILD_LIBICONV_INCLUDE="-I../libiconv/include" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - am_cv_use_build_libiconv=no - am_cv_build_libiconv_path= - - # If libiconv is part of the build tree, then try using it over - # any system iconv. - if test -d ../libiconv; then - for lib_dir in $BUILD_LIBICONV_LIBDIRS; do - am_save_LIBS="$LIBS" - am_save_CPPFLAGS="$CPPFLAGS" - LIBS="$LIBS $lib_dir/libiconv.a" - CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_use_build_libiconv=yes - am_cv_build_libiconv_path=$lib_dir/libiconv.a - am_cv_lib_iconv=yes - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - CPPFLAGS="$am_save_CPPFLAGS" - if test "$am_cv_use_build_libiconv" = "yes"; then - break - fi - done - fi - - # Next, try to find iconv in libc. - if test "$am_cv_func_iconv" != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - - # If iconv was not in libc, try -liconv. In this case, arrange to - # look in the libiconv prefix, if it was specified by the user. - if test "$am_cv_func_iconv" != yes; then - am_save_CPPFLAGS="$CPPFLAGS" - am_save_LIBS="$LIBS" - if test -n "$LIBICONV_INCLUDE"; then - CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" - LIBS="$LIBS $LIBICONV_LIBDIR" - fi - LIBS="$LIBS -liconv" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_lib_iconv=yes - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - CPPFLAGS="$am_save_CPPFLAGS" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } - - # Set the various flags based on the cache variables. We can't rely - # on the flags to remain set from the above code, due to caching. - LIBICONV= - if test "$am_cv_lib_iconv" = yes; then - LIBICONV="-liconv" - else - LIBICONV_LIBDIR= - LIBICONV_INCLUDE= - fi - if test "$am_cv_use_build_libiconv" = yes; then - LIBICONV="$am_cv_build_libiconv_path" - LIBICONV_LIBDIR="" - LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" - fi - CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" - LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" - - if test "$am_cv_func_iconv" = yes; then - -$as_echo "#define HAVE_ICONV 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 -$as_echo_n "checking for iconv declaration... " >&6; } - if test "${am_cv_proto_iconv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - am_cv_proto_iconv_arg1="" -else - am_cv_proto_iconv_arg1="const" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" -fi - - am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- - }$am_cv_proto_iconv" >&5 -$as_echo "${ac_t:- - }$am_cv_proto_iconv" >&6; } - -cat >>confdefs.h <<_ACEOF -#define ICONV_CONST $am_cv_proto_iconv_arg1 -_ACEOF - - fi - - -# On alpha-osf, it appears that libtermcap and libcurses are not compatible. -# There is a very specific comment in /usr/include/curses.h explaining that -# termcap routines built into libcurses must not be used. -# -# The symptoms we observed so far is GDB unexpectedly changing -# the terminal settings when tgetent is called - this is particularly -# visible as the output is missing carriage returns, and so rapidly -# becomes very hard to read. -# -# The readline configure script has already decided that libtermcap -# was enough for its purposes, and so decided to build readline using -# libtermcap. Since the TUI mode requires curses, building GDB with -# TUI enabled results in both libraries to be used at the same time, -# which is not allowed. This basically means that GDB with TUI is -# broken on alpha-osf. - -case $host_os in - osf* ) - if test x"$enable_tui" = xyes; then - as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 - fi - if test x"$enable_tui" = xauto; then - enable_tui=no - fi - ;; -esac - -# For the TUI, we need enhanced curses functionality. -if test x"$enable_tui" != xno; then - prefer_curses=yes -fi - -curses_found=no -if test x"$prefer_curses" = xyes; then - # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied - # curses library because the latter might not provide all the - # functionality we need. However, this leads to problems on systems - # where the linker searches /usr/local/lib, but the compiler doesn't - # search /usr/local/include, if ncurses is installed in /usr/local. A - # default installation of ncurses on alpha*-dec-osf* will lead to such - # a situation. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 -$as_echo_n "checking for library containing waddstr... " >&6; } -if test "${ac_cv_search_waddstr+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 waddstr (); -int -main () -{ -return waddstr (); - ; - return 0; -} -_ACEOF -for ac_lib in '' ncurses cursesX curses; 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_waddstr=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_waddstr+set}" = set; then : - break -fi -done -if test "${ac_cv_search_waddstr+set}" = set; then : - -else - ac_cv_search_waddstr=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 -$as_echo "$ac_cv_search_waddstr" >&6; } -ac_res=$ac_cv_search_waddstr -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - - if test "$ac_cv_search_waddstr" != no; then - curses_found=yes - fi -fi - -# Check whether we should enable the TUI, but only do so if we really -# can. -if test x"$enable_tui" != xno; then - if test -d $srcdir/tui; then - if test "$curses_found" != no; then - CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" - CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" - CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" - ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" - CONFIG_ALL="${CONFIG_ALL} all-tui" - CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" - CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" - CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" - else - if test x"$enable_tui" = xyes; then - as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 -$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} - fi - fi - fi -fi - -# Since GDB uses Readline, we need termcap functionality. In many -# cases this will be provided by the curses library, but some systems -# have a seperate termcap library, or no curses library at all. - -case $host_os in - cygwin*) - if test -d $srcdir/libtermcap; then - LIBS="../libtermcap/libtermcap.a $LIBS" - ac_cv_search_tgetent="../libtermcap/libtermcap.a" - fi ;; - go32* | *djgpp*) - ac_cv_search_tgetent="none required" - ;; - *mingw32*) - ac_cv_search_tgetent="none required" - CONFIG_OBS="$CONFIG_OBS windows-termcap.o" - ;; -esac - -# These are the libraries checked by Readline. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 -$as_echo_n "checking for library containing tgetent... " >&6; } -if test "${ac_cv_search_tgetent+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 tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -for ac_lib in '' termcap tinfo curses ncurses; 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_tgetent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_tgetent+set}" = set; then : - break -fi -done -if test "${ac_cv_search_tgetent+set}" = set; then : - -else - ac_cv_search_tgetent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 -$as_echo "$ac_cv_search_tgetent" >&6; } -ac_res=$ac_cv_search_tgetent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -if test "$ac_cv_search_tgetent" = no; then - as_fn_error "no termcap library found" "$LINENO" 5 -fi - - -# Check whether --with-system-readline was given. -if test "${with_system_readline+set}" = set; then : - withval=$with_system_readline; -fi - - -if test "$with_system_readline" = yes; then - READLINE=-lreadline - READLINE_DEPS= - READLINE_CFLAGS= - READLINE_TEXI_INCFLAG= - - # readline-6.0 started to use the name `_rl_echoing_p'. - # `$(READLINE_DIR)/' of bundled readline would not resolve in configure. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5 -$as_echo_n "checking for readline_echoing_p... " >&6; } - save_LIBS=$LIBS - LIBS="$LIBS $READLINE" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -extern int readline_echoing_p; - return readline_echoing_p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - READLINE_ECHOING_P=yes -else - READLINE_ECHOING_P=no - -$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5 -$as_echo "$READLINE_ECHOING_P" >&6; } -else - READLINE='$(READLINE_DIR)/libreadline.a' - READLINE_DEPS='$(READLINE)' - READLINE_CFLAGS='-I$(READLINE_SRC)/..' - READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' -fi - - - - - - -# Check whether --with-expat was given. -if test "${with_expat+set}" = set; then : - withval=$with_expat; -else - with_expat=auto -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 -$as_echo_n "checking whether to use expat... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 -$as_echo "$with_expat" >&6; } - -if test "${with_expat}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 -$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} - HAVE_LIBEXPAT=no -else - - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${acl_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$acl_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - acl_cv_prog_gnu_ld=yes -else - acl_cv_prog_gnu_ld=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; : -else - enable_rpath=yes -fi - - - - - - - - - - - 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-libexpat-prefix was given. -if test "${with_libexpat_prefix+set}" = set; then : - withval=$with_libexpat_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 - - LIBEXPAT= - LTLIBEXPAT= - INCEXPAT= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='expat ' - 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" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$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 $LTLIBEXPAT; do + LIBEXPAT= + LTLIBEXPAT= + INCEXPAT= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='expat ' + 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" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$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 $LTLIBEXPAT; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -10450,6 +8083,10 @@ done fi fi +# --------------------- # +# Check for libpython. # +# --------------------- # + @@ -10473,7 +8110,7 @@ $as_echo "$as_me: WARNING: python support disabled; some features may be unavail have_libpython=no else case "${with_python}" in - /*) + [\\/]* | ?:[\\/]*) if test -d ${with_python}; then # Assume the python binary is ${with_python}/bin/python. python_prog="${with_python}/bin/python" @@ -10992,228 +8629,555 @@ $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 +#ifdef WITH_THREAD +# error +#endif + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + python_has_threads=no else - # Even if Python support is not compiled in, we need to have these files - # included. - CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" - CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ - python/py-prettyprint.c python/py-auto-load.c" + 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 this file + # included so that the "python" command, et.al., still exists. + CONFIG_OBS="$CONFIG_OBS python.o" + CONFIG_SRCS="$CONFIG_SRCS python/python.c" +fi + + + + +# -------------------- # +# Check for libguile. # +# -------------------- # + + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $pkg_config_prog_path in + [\\/]* | ?:[\\/]*) + ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" + ;; +esac +fi +pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path +if test -n "$pkg_config_prog_path"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 +$as_echo "$pkg_config_prog_path" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + + + + +# Check whether --with-guile was given. +if test "${with_guile+set}" = set; then : + withval=$with_guile; +else + with_guile=auto fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 +$as_echo_n "checking whether to use guile... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 +$as_echo "$with_guile" >&6; } +try_guile_versions="guile-2.0" +have_libguile=no +case "${with_guile}" in +no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 +$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} + ;; +auto) + + pkg_config=${pkg_config_prog_path} + guile_version_list=${try_guile_versions} + flag_errors=no + + if test "${pkg_config}" = "missing"; then + as_fn_error "pkg-config program not found" "$LINENO" 5 + fi + if test ! -f "${pkg_config}"; then + as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5 + fi + found_usable_guile=checking + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 +$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } + for guile_version in ${guile_version_list}; do + ${pkg_config} --exists ${guile_version} 2>/dev/null + if test $? != 0; then + continue + fi + new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + fi + new_LIBS=`${pkg_config} --libs ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 + fi + found_usable_guile=${guile_version} + break + done + if test "${found_usable_guile}" = "checking"; then + if test "${flag_errors}" = "yes"; then + as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 + else + found_usable_guile=no + fi + fi + if test "${found_usable_guile}" != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" + LIBS="$LIBS $new_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "libguile.h" +int +main () +{ +scm_init_guile (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_libguile=yes + GUILE_CPPFLAGS=$new_CPPFLAGS + GUILE_LIBS=$new_LIBS +else + found_usable_guile=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + if test "${found_usable_guile}" = no; then + if test "${flag_errors}" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "linking guile version ${guile_version} test program failed +See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 +$as_echo "${found_usable_guile}" >&6; } + ;; +yes) -# ------------------------- # -# Checks for header files. # -# ------------------------- # + pkg_config=${pkg_config_prog_path} + guile_version_list=${try_guile_versions} + flag_errors=yes -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 + if test "${pkg_config}" = "missing"; then + as_fn_error "pkg-config program not found" "$LINENO" 5 + fi + if test ! -f "${pkg_config}"; then + as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5 + fi + found_usable_guile=checking + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 +$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } + for guile_version in ${guile_version_list}; do + ${pkg_config} --exists ${guile_version} 2>/dev/null + if test $? != 0; then + continue + fi + new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + fi + new_LIBS=`${pkg_config} --libs ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 + fi + found_usable_guile=${guile_version} + break + done + if test "${found_usable_guile}" = "checking"; then + if test "${flag_errors}" = "yes"; then + as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 + else + found_usable_guile=no + fi + fi + if test "${found_usable_guile}" != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" + LIBS="$LIBS $new_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include <$ac_hdr> - +#include "libguile.h" int main () { -if ((DIR *) 0) -return 0; +scm_init_guile (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" +if ac_fn_c_try_link "$LINENO"; then : + have_libguile=yes + GUILE_CPPFLAGS=$new_CPPFLAGS + GUILE_LIBS=$new_LIBS else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + found_usable_guile=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 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + if test "${found_usable_guile}" = no; then + if test "${flag_errors}" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "linking guile version ${guile_version} test program failed +See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 +$as_echo "${found_usable_guile}" >&6; } -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. */ + pkg_config=${with_guile} + guile_version_list=${try_guile_versions} + flag_errors=yes -/* 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 (); + if test "${pkg_config}" = "missing"; then + as_fn_error "pkg-config program not found" "$LINENO" 5 + fi + if test ! -f "${pkg_config}"; then + as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5 + fi + found_usable_guile=checking + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 +$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } + for guile_version in ${guile_version_list}; do + ${pkg_config} --exists ${guile_version} 2>/dev/null + if test $? != 0; then + continue + fi + new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + fi + new_LIBS=`${pkg_config} --libs ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 + fi + found_usable_guile=${guile_version} + break + done + if test "${found_usable_guile}" = "checking"; then + if test "${flag_errors}" = "yes"; then + as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 + else + found_usable_guile=no + fi + fi + if test "${found_usable_guile}" != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" + LIBS="$LIBS $new_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "libguile.h" int main () { -return opendir (); +scm_init_guile (); ; 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 +if ac_fn_c_try_link "$LINENO"; then : + have_libguile=yes + GUILE_CPPFLAGS=$new_CPPFLAGS + GUILE_LIBS=$new_LIBS +else + found_usable_guile=no 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 : + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + if test "${found_usable_guile}" = no; then + if test "${flag_errors}" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "linking guile version ${guile_version} test program failed +See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 +$as_echo "${found_usable_guile}" >&6; } -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" + ;; +"" | */*) + # Disallow --with=guile="" and --with-guile=foo/bar. + as_fn_error "invalid value for --with-guile" "$LINENO" 5 + ;; +*) + # A space separate list of guile versions to try, in order. -fi + pkg_config=${pkg_config_prog_path} + guile_version_list=${with_guile} + flag_errors=yes -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 + if test "${pkg_config}" = "missing"; then + as_fn_error "pkg-config program not found" "$LINENO" 5 + fi + if test ! -f "${pkg_config}"; then + as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5 + fi + found_usable_guile=checking + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 +$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } + for guile_version in ${guile_version_list}; do + ${pkg_config} --exists ${guile_version} 2>/dev/null + if test $? != 0; then + continue + fi + new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + fi + new_LIBS=`${pkg_config} --libs ${guile_version}` + if test $? != 0; then + as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 + fi + found_usable_guile=${guile_version} + break + done + if test "${found_usable_guile}" = "checking"; then + if test "${flag_errors}" = "yes"; then + as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 + else + found_usable_guile=no + fi + fi + if test "${found_usable_guile}" != no; then + save_CPPFLAGS=$CPPFLAGS + save_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" + LIBS="$LIBS $new_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 (); +#include "libguile.h" int main () { -return opendir (); +scm_init_guile (); ; 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 +if ac_fn_c_try_link "$LINENO"; then : + have_libguile=yes + GUILE_CPPFLAGS=$new_CPPFLAGS + GUILE_LIBS=$new_LIBS +else + found_usable_guile=no 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 : + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS=$save_CPPFLAGS + LIBS=$save_LIBS + if test "${found_usable_guile}" = no; then + if test "${flag_errors}" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "linking guile version ${guile_version} test program failed +See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 +$as_echo "${found_usable_guile}" >&6; } + + ;; +esac + +if test "${have_libguile}" != no; then +$as_echo "#define HAVE_GUILE 1" >>confdefs.h + + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" + CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" + CONFIG_INSTALL="$CONFIG_INSTALL install-guile" + ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + # Even if Guile support is not compiled in, we need to have these files + # included. + CONFIG_OBS="$CONFIG_OBS guile.o" + CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" 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" + + +# --------------------- # +# 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 \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ + && $development; then + libmcheck_default=yes +else + libmcheck_default=no fi + # 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 -{ $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 : + + if test -z "${ENABLE_LIBMCHECK}"; then + ENABLE_LIBMCHECK=${libmcheck_default} + fi + + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmcheck $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include - -#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 - -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif +int +main () +{ +return main (); + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mcheck_main=yes else - ac_cv_header_stat_broken=yes + ac_cv_lib_mcheck_main=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 +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 -{ $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 + +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 +# ------------------------- # +# 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; } if test "${ac_cv_header_stdc+set}" = set; then : @@ -11327,16 +9291,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 gnu/libc-version.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 + 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" @@ -11350,25 +9313,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 @@ -11444,69 +9388,39 @@ fi done -# ------------------------- # -# Checks for declarations. # -# ------------------------- # - -ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" -if test "x$ac_cv_have_decl_free" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FREE $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" -if test "x$ac_cv_have_decl_malloc" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MALLOC $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" -if test "x$ac_cv_have_decl_realloc" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +# ------------------------- # +# Checks for declarations. # +# ------------------------- # -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_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" +if test "x$ac_cv_have_decl_free" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR $ac_have_decl +#define HAVE_DECL_FREE $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_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" +if test "x$ac_cv_have_decl_malloc" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRSTR $ac_have_decl +#define HAVE_DECL_MALLOC $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_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" +if test "x$ac_cv_have_decl_realloc" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETOPT $ac_have_decl +#define HAVE_DECL_REALLOC $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 : @@ -11517,16 +9431,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 @@ -12295,99 +10199,307 @@ main () int i, pagesize; int fd; - pagesize = getpagesize (); + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 1; + if (write (fd, data, pagesize) != pagesize) + return 1; + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 1; + data2 = (char *) malloc (2 * pagesize); + if (!data2) + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 1; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 1; + if (read (fd, data3, pagesize) != pagesize) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 1; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=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_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + +fi + +done + +for ac_func in fork vfork +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 + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes +else + ac_cv_func_fork_works=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_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 1; - if (write (fd, data, pagesize) != pagesize) - return 1; - close (fd); + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 1; - data2 = (char *) malloc (2 * pagesize); - if (!data2) - return 1; - data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 1; + /* Did the child fail? (This shouldn't happen.) */ + || status - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 1; - if (read (fd, data3, pagesize) != pagesize) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 1; - close (fd); - return 0; + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes + ac_cv_func_vfork_works=yes else - ac_cv_func_mmap_fixed_mapped=no + ac_cv_func_vfork_works=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_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -$as_echo "#define HAVE_MMAP 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi -rm -f conftest.mmap -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF +$as_echo "#define vfork fork" >>confdefs.h fi +if test "x$ac_cv_func_fork_works" = xyes; then -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi -done - -for ac_func in fork vfork +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 \ + ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ + 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" @@ -12400,211 +10512,343 @@ _ACEOF fi done -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+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 +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 + + + { $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. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + 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. */ +#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 - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes else - ac_cv_func_fork_works=no + ac_cv_working_alloca_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+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 - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca # else -sparc_address_test (arg) int arg; +# 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 -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} int main () { - pid_t parent = getpid (); - pid_t child; +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; } - sparc_address_test (0); +if test $ac_cv_func_alloca_works = yes; then - child = vfork (); +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); +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. - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 +$as_echo "#define C_ALLOCA 1" >>confdefs.h - /* Did the child fail? (This shouldn't happen.) */ - || status - /* Did the vfork/compiler bug occur? */ - || parent != getpid() +{ $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 - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_os_cray=no fi +rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } +{ $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 : -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break fi -if test "x$ac_cv_func_vfork_works" = xyes; then + done +fi -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h +{ $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 - -$as_echo "#define vfork fork" >>confdefs.h - + ac_cv_c_stack_direction=-1 fi -if test "x$ac_cv_func_fork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -for ac_func in canonicalize_file_name realpath getrusage getuid \ - getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \ - sigaction sigprocmask sigsetmask socketpair syscall \ - ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ - setrlimit getrlimit posix_madvise waitpid -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 +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 -done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 @@ -12641,12 +10885,62 @@ $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=' -#if HAVE_SYS_TYPES_H -# include -#endif +#include #if HAVE_SYS_PTRACE_H # include #endif @@ -12748,7 +11042,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 @@ -12811,6 +11105,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 @@ -13090,6 +11389,31 @@ _ACEOF fi +# See if 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 +" +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 +" +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 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; } @@ -13224,11 +11548,11 @@ $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h fi -# Detect which type of /proc is in use, such as for Unixware or Solaris. +# Detect which type of /proc is in use, such as for Solaris. if test "${target}" = "${host}"; then case "${host}" in - *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) + *-*-sysv4.2* | *-*-sysv5* ) $as_echo "#define NEW_PROC_API 1" >>confdefs.h @@ -13248,9 +11572,9 @@ $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 "$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 @@ -13263,31 +11587,31 @@ else int main () { -pstatus_t avar +gregset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pstatus_t=yes + bfd_cv_have_sys_procfs_type_gregset_t=yes else - bfd_cv_have_sys_procfs_type_pstatus_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_pstatus_t = yes; then + if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then -$as_echo "#define HAVE_PSTATUS_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_pstatus_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_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 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 "$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 @@ -13300,31 +11624,31 @@ else int main () { -prrun_t avar +fpregset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prrun_t=yes + bfd_cv_have_sys_procfs_type_fpregset_t=yes else - bfd_cv_have_sys_procfs_type_prrun_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_prrun_t = yes; then + if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then -$as_echo "#define HAVE_PRRUN_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_prrun_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prrun_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 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 "$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 @@ -13337,31 +11661,142 @@ else int main () { -gregset_t avar +prgregset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_gregset_t=yes + bfd_cv_have_sys_procfs_type_prgregset_t=yes else - bfd_cv_have_sys_procfs_type_gregset_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_gregset_t = yes; then + if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then -$as_echo "#define HAVE_GREGSET_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_gregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_gregset_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 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 "$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 +/* end confdefs.h. */ + +#define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 +#include +int +main () +{ +prfpregset_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_prfpregset_t=yes +else + 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_prfpregset_t = yes; then + +$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h + + 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; } + + { $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 + 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 () +{ +prgregset32_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_prgregset32_t=yes +else + bfd_cv_have_sys_procfs_type_prgregset32_t=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 "#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 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. */ + +#define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 +#include +int +main () +{ +lwpid_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_lwpid_t=yes +else + bfd_cv_have_sys_procfs_type_lwpid_t=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 "#define HAVE_LWPID_T 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; } + + { $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 @@ -13374,31 +11809,31 @@ else int main () { -fpregset_t avar +psaddr_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_fpregset_t=yes + bfd_cv_have_sys_procfs_type_psaddr_t=yes else - bfd_cv_have_sys_procfs_type_fpregset_t=no + bfd_cv_have_sys_procfs_type_psaddr_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then + if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then -$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h +$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h 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; } + { $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 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 "$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 @@ -13411,31 +11846,31 @@ else int main () { -prgregset_t avar +prsysent_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset_t=yes + bfd_cv_have_sys_procfs_type_prsysent_t=yes else - bfd_cv_have_sys_procfs_type_prgregset_t=no + bfd_cv_have_sys_procfs_type_prsysent_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then + if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then -$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h +$as_echo "#define HAVE_PRSYSENT_T 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; } + { $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 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 "$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 @@ -13448,31 +11883,31 @@ else int main () { -prfpregset_t avar +pr_sigset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset_t=yes + bfd_cv_have_sys_procfs_type_pr_sigset_t=yes else - bfd_cv_have_sys_procfs_type_prfpregset_t=no + bfd_cv_have_sys_procfs_type_pr_sigset_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then + if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then -$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h +$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_prfpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } + { $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 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 "$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 @@ -13485,31 +11920,31 @@ else int main () { -prgregset32_t avar +pr_sigaction64_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset32_t=yes + bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes else - bfd_cv_have_sys_procfs_type_prgregset32_t=no + bfd_cv_have_sys_procfs_type_pr_sigaction64_t=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 + if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then -$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h +$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_prgregset32_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } + { $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 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 "$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 @@ -13522,768 +11957,994 @@ else int main () { -prfpregset32_t avar +pr_siginfo64_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset32_t=yes + bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes else - bfd_cv_have_sys_procfs_type_prfpregset32_t=no + bfd_cv_have_sys_procfs_type_pr_siginfo64_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 + if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then -$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h +$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_prfpregset32_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } + { $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}: 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 : + + + + + 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. */ - -#define _SYSCALL32 -/* Needed for new procfs interface on sparc-solaris. */ -#define _STRUCTURED_PROC 1 #include -int -main () -{ -lwpid_t avar - ; - return 0; -} + int main () + { + if (sizeof (prfpregset_t) == sizeof (void *)) + return 1; + return 0; + } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_lwpid_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_prfpregset_t_broken=no else - bfd_cv_have_sys_procfs_type_lwpid_t=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 - if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then +fi -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h + { $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 - 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 "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h - { $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 : + fi + fi +fi + +# Check if the compiler supports the `long long' type. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 +$as_echo_n "checking for long long support in compiler... " >&6; } +if test "${gdb_cv_c_long_long+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 +extern long long foo; int main () { -psaddr_t avar +switch (foo & 2) { case 0: return 1; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_psaddr_t=yes + gdb_cv_c_long_long=yes else - bfd_cv_have_sys_procfs_type_psaddr_t=no - + gdb_cv_c_long_long=no fi 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 + # libdecnumber requires long long. + as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 +fi - 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; } +# Check if the compiler and runtime support printing long longs. - { $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 "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 +$as_echo_n "checking for long long support in printf... " >&6; } +if test "${gdb_cv_printf_has_long_long+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gdb_cv_printf_has_long_long=no 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 +$ac_includes_default int main () { -prsysent_t avar +char buf[32]; + long long l = 0; + l = (l << 16) + 0x0123; + l = (l << 16) + 0x4567; + l = (l << 16) + 0x89ab; + l = (l << 16) + 0xcdef; + sprintf (buf, "0x%016llx", l); + return (strcmp ("0x0123456789abcdef", buf)); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prsysent_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_printf_has_long_long=yes else - bfd_cv_have_sys_procfs_type_prsysent_t=no - + gdb_cv_printf_has_long_long=no 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_prsysent_t = yes; then +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 +$as_echo "$gdb_cv_printf_has_long_long" >&6; } +if test $gdb_cv_printf_has_long_long = yes; then -$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h +$as_echo "#define PRINTF_HAS_LONG_LONG 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; } +fi - { $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 : +# Check if the compiler and runtime support printing decfloats. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 +$as_echo_n "checking for decfloat support in printf... " >&6; } +if test "${gdb_cv_printf_has_decfloat+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gdb_cv_printf_has_decfloat=no 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 +$ac_includes_default int main () { -pr_sigset_t avar +char buf[64]; + _Decimal32 d32 = 1.2345df; + _Decimal64 d64 = 1.2345dd; + _Decimal128 d128 = 1.2345dl; + sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); + return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_sigset_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_printf_has_decfloat=yes else - bfd_cv_have_sys_procfs_type_pr_sigset_t=no - + gdb_cv_printf_has_decfloat=no 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_pr_sigset_t = yes; then +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 +$as_echo "$gdb_cv_printf_has_decfloat" >&6; } +if test $gdb_cv_printf_has_decfloat = yes; then + +$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h -$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h +fi - 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; } +# Check if the compiler supports the `long double' type. We can't use +# AC_C_LONG_DOUBLE because that one does additional checks on the +# constants defined in that fail on some systems, +# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.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 long double support in compiler" >&5 +$as_echo_n "checking for long double support in compiler... " >&6; } +if test "${gdb_cv_c_long_double+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 () -{ -pr_sigaction64_t avar - ; - return 0; -} +long double foo; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes + gdb_cv_c_long_double=yes else - bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no - + gdb_cv_c_long_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 +$as_echo "$gdb_cv_c_long_double" >&6; } +if test $gdb_cv_c_long_double = yes; then - if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then +$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h -$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h +fi - 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; } +# Check if the compiler and runtime support printing long doubles. - { $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 long double support in printf" >&5 +$as_echo_n "checking for long double support in printf... " >&6; } +if test "${gdb_cv_printf_has_long_double+set}" = set; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gdb_cv_printf_has_long_double=no 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 +$ac_includes_default int main () { -pr_siginfo64_t avar +char buf[16]; + long double f = 3.141592653; + sprintf (buf, "%Lg", f); + return (strncmp ("3.14159", buf, 7)); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_printf_has_long_double=yes else - bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no - + gdb_cv_printf_has_long_double=no 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_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; } - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 +$as_echo "$gdb_cv_printf_has_long_double" >&6; } +if test $gdb_cv_printf_has_long_double = yes; then +$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h +fi +# Check if the compiler and runtime support scanning long doubles. - 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 long double support in scanf" >&5 +$as_echo_n "checking for long double support in scanf... " >&6; } +if test "${gdb_cv_scanf_has_long_double+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gdb_cv_prfpregset_t_broken=yes + gdb_cv_scanf_has_long_double=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int main () - { - if (sizeof (prfpregset_t) == sizeof (void *)) - return 1; - return 0; - } +#include +int +main () +{ +char *buf = "3.141592653"; + long double f = 0; + sscanf (buf, "%Lg", &f); + return !(f > 3.14159 && f < 3.14160); + ; + return 0; +} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_prfpregset_t_broken=no + gdb_cv_scanf_has_long_double=yes else - gdb_cv_prfpregset_t_broken=yes + gdb_cv_scanf_has_long_double=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: $gdb_cv_scanf_has_long_double" >&5 +$as_echo "$gdb_cv_scanf_has_long_double" >&6; } +if test $gdb_cv_scanf_has_long_double = yes; then - { $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 "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h +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 : +case ${host_os} in +aix*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 +$as_echo_n "checking for -bbigtoc option... " >&6; } +if test "${gdb_cv_bigtoc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + SAVE_LDFLAGS=$LDFLAGS + + case $GCC in + yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; + *) gdb_cv_bigtoc=-bbigtoc ;; + esac + + LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include int main () { +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gdb_cv_bigtoc= +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="${SAVE_LDFLAGS}" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 +$as_echo "$gdb_cv_bigtoc" >&6; } + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 +$as_echo_n "checking for the dynamic export flag... " >&6; } +dynamic_list=false +if test "${gdb_native}" = yes; then + # The dynamically loaded libthread_db needs access to symbols in the gdb + # executable. Older GNU ld supports --export-dynamic but --dynamic-list + # may not be supported there. + old_LDFLAGS="$LDFLAGS" + # Older GNU ld supports --export-dynamic but --dynamic-list it does not. + RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" + LDFLAGS="$LDFLAGS $RDYNAMIC" + if test "${have_libpython}" = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - int dummy;; - dummy = ioctl(0, PIOCSET, &dummy); +int +main () +{ ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_procfs_piocset=yes +if ac_fn_c_try_link "$LINENO"; then : + dynamic_list=true +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + # Workaround http://bugs.python.org/issue4434 where static + # libpythonX.Y.a would get its symbols required for + # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. + # 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 - gdb_cv_have_procfs_piocset=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "${have_libpython}/Python.h" +int +main () +{ +int err; + Py_Initialize (); + err = PyRun_SimpleString ("import itertools\n"); + Py_Finalize (); + return err == 0 ? 0 : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + dynamic_list=true 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 + + LIBS="$old_LIBS" + CFLAGS="$old_CFLAGS" + fi + LDFLAGS="$old_LDFLAGS" +fi +if $dynamic_list; then + found="-Wl,--dynamic-list" + RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' +else + found="-rdynamic" + RDYNAMIC="-rdynamic" 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 "$as_me:${as_lineno-$LINENO}: result: $found" >&5 +$as_echo "$found" >&6; } -$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h - fi -fi +if test ${build} = ${host} -a ${host} = ${target} ; then + case ${host_os} in + solaris*) + # See if thread_db library is around for Solaris thread debugging. + # Note that we must explicitly test for version 1 of the library + # because version 0 (present on Solaris 2.4 or earlier) doesn't have + # the same API. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 +$as_echo_n "checking for Solaris thread debugging library... " >&6; } + if test -f /usr/lib/libthread_db.so.1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -if test ${host} = ${target} ; then +$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h - { $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 : + CONFIG_OBS="${CONFIG_OBS} sol-thread.o" + CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" + { $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 : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* 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 () { -struct link_map lm; (void) lm.l_addr; +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_link_map_with_l_members=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - gdb_cv_have_struct_link_map_with_l_members=no + ac_cv_lib_dl_dlopen=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 +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF - { $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 + LIBS="-ldl $LIBS" +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 : + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" + # Sun randomly tweaked the prototypes in + # at one point. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if is old" >&5 +$as_echo_n "checking if is old... " >&6; } + if test "${gdb_cv_proc_service_is_old+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + + #include + ps_err_e ps_pdwrite + (struct ps_prochandle*, psaddr_t, const void*, size_t); + 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 + gdb_cv_proc_service_is_old=no else - gdb_cv_have_struct_link_map_with_lm_members=no + gdb_cv_proc_service_is_old=yes 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 - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 +$as_echo "$gdb_cv_proc_service_is_old" >&6; } + if test $gdb_cv_proc_service_is_old = yes; then +$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h - { $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 : + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + aix*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 +$as_echo_n "checking for AiX thread debugging library... " >&6; } + if test "${gdb_cv_have_aix_thread_debug+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 +#include int main () { -struct so_map lm; (void) lm.som_addr; +#ifndef PTHDB_VERSION_3 + #error + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_so_map_with_som_members=yes + gdb_cv_have_aix_thread_debug=yes else - gdb_cv_have_struct_so_map_with_som_members=no + gdb_cv_have_aix_thread_debug=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 "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 +$as_echo "$gdb_cv_have_aix_thread_debug" >&6; } + if test $gdb_cv_have_aix_thread_debug = yes; then + CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" + CONFIG_OBS="${CONFIG_OBS} aix-thread.o" + LIBS="$LIBS -lpthdebug" + + # Older versions of AIX do not provide the declaration for + # the getthrds function (it appears that it was introduced + # with AIX 6.x). + ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include +" +if test "x$ac_cv_have_decl_getthrds" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi -$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETTHRDS $ac_have_decl +_ACEOF - fi + fi + ;; + esac +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 : +if test "x$ac_cv_header_thread_db_h" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTALLOC" >&5 +$as_echo_n "checking whether has TD_NOTALLOC... " >&6; } +if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _SYSCALL32 -#include +#include int main () { -struct link_map32 l; +int i = TD_NOTALLOC; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_struct_link_map32=yes + gdb_cv_thread_db_h_has_td_notalloc=yes else - gdb_cv_have_struct_link_map32=no + gdb_cv_thread_db_h_has_td_notalloc=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 -$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h - - -$as_echo "#define _SYSCALL32 1" >>confdefs.h - - fi fi - -# Check if the compiler supports the `long long' type. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 -$as_echo_n "checking for long long support in compiler... " >&6; } -if test "${gdb_cv_c_long_long+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 +$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_VERSION" >&5 +$as_echo_n "checking whether has TD_VERSION... " >&6; } +if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -extern long long foo; +#include int main () { -switch (foo & 2) { case 0: return 1; } +int i = TD_VERSION; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_c_long_long=yes + gdb_cv_thread_db_h_has_td_version=yes else - gdb_cv_c_long_long=no + gdb_cv_thread_db_h_has_td_version=no + fi 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 fi - -# Check if the compiler and runtime support printing long longs. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 -$as_echo_n "checking for long long support in printf... " >&6; } -if test "${gdb_cv_printf_has_long_long+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 +$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTLS" >&5 +$as_echo_n "checking whether has TD_NOTLS... " >&6; } +if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gdb_cv_printf_has_long_long=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { -char buf[32]; - long long l = 0; - l = (l << 16) + 0x0123; - l = (l << 16) + 0x4567; - l = (l << 16) + 0x89ab; - l = (l << 16) + 0xcdef; - sprintf (buf, "0x%016llx", l); - return (strcmp ("0x0123456789abcdef", buf)); +int i = TD_NOTLS; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_printf_has_long_long=yes +if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_thread_db_h_has_td_notls=yes else - gdb_cv_printf_has_long_long=no + gdb_cv_thread_db_h_has_td_notls=no + fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 +$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } +fi +if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then + +$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 -$as_echo "$gdb_cv_printf_has_long_long" >&6; } -if test $gdb_cv_printf_has_long_long = yes; then +if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then -$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h +$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h fi +if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then -# Check if the compiler and runtime support printing decfloats. +$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 -$as_echo_n "checking for decfloat support in printf... " >&6; } -if test "${gdb_cv_printf_has_decfloat+set}" = set; then : +fi + +if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has __NR_tkill" >&5 +$as_echo_n "checking whether has __NR_tkill... " >&6; } +if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gdb_cv_printf_has_decfloat=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { -char buf[64]; - _Decimal32 d32 = 1.2345df; - _Decimal64 d64 = 1.2345dd; - _Decimal128 d128 = 1.2345dl; - sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); - return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); +int i = __NR_tkill; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_printf_has_decfloat=yes +if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_sys_syscall_h_has_tkill=yes else - gdb_cv_printf_has_decfloat=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gdb_cv_sys_syscall_h_has_tkill=no + fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 -$as_echo "$gdb_cv_printf_has_decfloat" >&6; } -if test $gdb_cv_printf_has_decfloat = yes; then +{ $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"; 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 -$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h fi -# Check if the compiler supports the `long double' type. We can't use -# AC_C_LONG_DOUBLE because that one does additional checks on the -# constants defined in that fail on some systems, -# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 -$as_echo_n "checking for long double support in compiler... " >&6; } -if test "${gdb_cv_c_long_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -long double foo; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_c_long_double=yes +ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include +" +if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : + ac_have_decl=1 else - gdb_cv_c_long_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 -$as_echo "$gdb_cv_c_long_double" >&6; } -if test $gdb_cv_c_long_double = yes; then - -$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h -fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl +_ACEOF -# Check if the compiler and runtime support printing long doubles. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 -$as_echo_n "checking for long double support in printf... " >&6; } -if test "${gdb_cv_printf_has_long_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gdb_cv_printf_has_long_double=no -else +if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { -char buf[16]; - long double f = 3.141592653; - sprintf (buf, "%Lg", f); - return (strncmp ("3.14159", buf, 7)); + +# if !HAVE_DECL_ADDR_NO_RANDOMIZE +# define ADDR_NO_RANDOMIZE 0x0040000 +# endif + /* Test the flag could be set and stays set. */ + personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); + if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) + return 1 ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_printf_has_long_double=yes +if ac_fn_c_try_link "$LINENO"; then : + have_personality=true else - gdb_cv_printf_has_long_double=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: $gdb_cv_printf_has_long_double" >&5 -$as_echo "$gdb_cv_printf_has_long_double" >&6; } -if test $gdb_cv_printf_has_long_double = yes; then - -$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h - + have_personality=false fi - -# Check if the compiler and runtime support scanning long doubles. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 -$as_echo_n "checking for long double support in scanf... " >&6; } -if test "${gdb_cv_scanf_has_long_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gdb_cv_scanf_has_long_double=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -char *buf = "3.141592653"; - long double f = 0; - sscanf (buf, "%Lg", &f); - return !(f > 3.14159 && f < 3.14160); + +# if !HAVE_DECL_ADDR_NO_RANDOMIZE +# define ADDR_NO_RANDOMIZE 0x0040000 +# endif + /* Test the flag could be set and stays set. */ + personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); + if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) + return 1 ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_scanf_has_long_double=yes + have_personality=true else - gdb_cv_scanf_has_long_double=no + have_personality=false fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +if $have_personality +then + +$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 -$as_echo "$gdb_cv_scanf_has_long_double" >&6; } -if test $gdb_cv_scanf_has_long_double = yes; then -$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h +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. +# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. +if test "x$with_sysroot" = xyes; then + with_sysroot="${exec_prefix}/${target_alias}/sys-root" fi -case ${host_os} in -aix*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 -$as_echo_n "checking for -bbigtoc option... " >&6; } -if test "${gdb_cv_bigtoc+set}" = set; then : - $as_echo_n "(cached) " >&6 +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval else + TARGET_SYSTEM_ROOT= +fi - SAVE_LDFLAGS=$LDFLAGS - case $GCC in - yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; - *) gdb_cv_bigtoc=-bbigtoc ;; - esac + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` + ac_define_dir=`eval echo $ac_define_dir` - LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define TARGET_SYSTEM_ROOT "$ac_define_dir" +_ACEOF -int -main () -{ -int i; - ; - return 0; -} + + + + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${ac_define_dir} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac + +cat >>confdefs.h <<_ACEOF +#define TARGET_SYSTEM_ROOT_RELOCATABLE $value _ACEOF -if ac_fn_c_try_link "$LINENO"; then : + + + + +# Check whether --with-system-gdbinit was given. +if test "${with_system_gdbinit+set}" = set; then : + withval=$with_system_gdbinit; + SYSTEM_GDBINIT=$withval else - gdb_cv_bigtoc= + SYSTEM_GDBINIT= fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="${SAVE_LDFLAGS}" + + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $SYSTEM_GDBINIT` + ac_define_dir=`eval echo $ac_define_dir` + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_GDBINIT "$ac_define_dir" +_ACEOF + + + + + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${ac_define_dir} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_GDBINIT_RELOCATABLE $value +_ACEOF + + + + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; case "${enableval}" in + yes | y) ERROR_ON_WARNING="yes" ;; + no | n) ERROR_ON_WARNING="no" ;; + *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; + esac +fi + + +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then + ERROR_ON_WARNING=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 -$as_echo "$gdb_cv_bigtoc" >&6; } - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" - ;; + +WERROR_CFLAGS="" +if test "${ERROR_ON_WARNING}" = yes ; then + WERROR_CFLAGS="-Werror" +fi + +build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ +-Wpointer-sign \ +-Wno-unused -Wunused-value -Wunused-function \ +-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ +-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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 -$as_echo_n "checking for the dynamic export flag... " >&6; } -dynamic_list=false -if test "${gdb_native}" = yes; then - # The dynamically loaded libthread_db needs access to symbols in the gdb - # executable. Older GNU ld supports --export-dynamic but --dynamic-list - # may not be supported there. - old_LDFLAGS="$LDFLAGS" - # Older GNU ld supports --export-dynamic but --dynamic-list it does not. - RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" - LDFLAGS="$LDFLAGS $RDYNAMIC" - if test "${have_libpython}" = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Check whether --enable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then : + enableval=$enable_build_warnings; case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting compiler warning flags = $build_warnings" 6>&1 +fi +fi +# Check whether --enable-gdb-build-warnings was given. +if test "${enable_gdb_build_warnings+set}" = set; then : + enableval=$enable_gdb_build_warnings; case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 +$as_echo_n "checking compiler warning flags... " >&6; } + # Separate out the -Werror flag as some files just cannot be + # compiled with it enabled. + for w in ${build_warnings}; do + case $w in + -Werr*) WERROR_CFLAGS=-Werror ;; + *) # Check that GCC accepts it + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14294,83 +12955,93 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - dynamic_list=true +if ac_fn_c_try_compile "$LINENO"; then : + WARN_CFLAGS="${WARN_CFLAGS} $w" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - # Workaround http://bugs.python.org/issue4434 where static - # libpythonX.Y.a would get its symbols required for - # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. - # Problem does not happen for the recommended libpythonX.Y.so linkage. - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PYTHON_CFLAGS" - if test "$cross_compiling" = yes; then : - true +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$saved_CFLAGS" + esac + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 +$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } +fi + + + +# In the Cygwin environment, we need some additional flags. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 +$as_echo_n "checking for cygwin... " >&6; } +if test "${gdb_cv_os_cygwin+set}" = set; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include "${have_libpython}/Python.h" -int -main () -{ -int err; - Py_Initialize (); - err = PyRun_SimpleString ("import itertools\n"); - Py_Finalize (); - return err == 0 ? 0 : 1; - ; - return 0; -} + +#if defined (__CYGWIN__) || defined (__CYGWIN32__) +lose +#endif _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - dynamic_list=true -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "^lose$" >/dev/null 2>&1; then : + gdb_cv_os_cygwin=yes +else + gdb_cv_os_cygwin=no fi +rm -f conftest* - CFLAGS="$old_CFLAGS" - fi - LDFLAGS="$old_LDFLAGS" fi -if $dynamic_list; then - found="-Wl,--dynamic-list" - RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' -else - found="-rdynamic" - RDYNAMIC="-rdynamic" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 +$as_echo "$gdb_cv_os_cygwin" >&6; } + + +SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" +case ${host} in + *go32* ) SER_HARDWIRE=ser-go32.o ;; + *djgpp* ) SER_HARDWIRE=ser-go32.o ;; + *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; +esac + + +# libreadline needs libuser32.a in a cygwin environment +WIN32LIBS= +if test x$gdb_cv_os_cygwin = xyes; then + WIN32LIBS="-luser32" + case "${target}" in + *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" + ;; + esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 -$as_echo "$found" >&6; } +# The ser-tcp.c module requires sockets. +case ${host} in + *mingw32*) +$as_echo "#define USE_WIN32API 1" >>confdefs.h -if test ${build} = ${host} -a ${host} = ${target} ; then - case ${host_os} in - solaris*) - # See if thread_db library is around for Solaris thread debugging. - # Note that we must explicitly test for version 1 of the library - # because version 0 (present on Solaris 2.4 or earlier) doesn't have - # the same API. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 -$as_echo_n "checking for Solaris thread debugging library... " >&6; } - if test -f /usr/lib/libthread_db.so.1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + WIN32LIBS="$WIN32LIBS -lws2_32" + ;; +esac -$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h - CONFIG_OBS="${CONFIG_OBS} sol-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" - { $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 : +# 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) . + 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_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14389,623 +13060,842 @@ return dlopen (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no +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 conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF - - LIBS="-ldl $LIBS" - -fi - - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" - # Sun randomly tweaked the prototypes in - # at one point. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if is old" >&5 -$as_echo_n "checking if is old... " >&6; } - if test "${gdb_cv_proc_service_is_old+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - ps_err_e ps_pdwrite - (struct ps_prochandle*, psaddr_t, const void*, size_t); - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_proc_service_is_old=no -else - gdb_cv_proc_service_is_old=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + 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}: result: $gdb_cv_proc_service_is_old" >&5 -$as_echo "$gdb_cv_proc_service_is_old" >&6; } - if test $gdb_cv_proc_service_is_old = yes; then - -$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h - - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - aix*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 -$as_echo_n "checking for AiX thread debugging library... " >&6; } - if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#ifndef PTHDB_VERSION_3 - #error - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_aix_thread_debug=yes else - gdb_cv_have_aix_thread_debug=no + ac_cv_search_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 -$as_echo "$gdb_cv_have_aix_thread_debug" >&6; } - if test $gdb_cv_have_aix_thread_debug = yes; then - CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" - CONFIG_OBS="${CONFIG_OBS} aix-thread.o" - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" - fi - ;; - esac +{ $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_header_thread_db_h" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTALLOC" >&5 -$as_echo_n "checking whether has TD_NOTALLOC... " >&6; } -if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : + 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 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include "bfd.h" + #include "elf-bfd.h" + int main () { -int i = TD_NOTALLOC; +return bfd_get_elf_phdr_upper_bound (NULL); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_thread_db_h_has_td_notalloc=yes +if ac_fn_c_try_link "$LINENO"; then : + gdb_cv_var_elf=yes else - gdb_cv_thread_db_h_has_td_notalloc=no - + gdb_cv_var_elf=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_thread_db_h_has_td_notalloc" >&5 -$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_VERSION" >&5 -$as_echo_n "checking whether has TD_VERSION... " >&6; } -if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int i = TD_VERSION; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_thread_db_h_has_td_version=yes -else - gdb_cv_thread_db_h_has_td_version=no +{ $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" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +$as_echo "#define HAVE_ELF 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 -$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTLS" >&5 -$as_echo_n "checking whether has TD_NOTLS... " >&6; } -if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : + # -ldl is provided by bfd/Makfile.am (LIBDL) . + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* 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 () { -int i = TD_NOTLS; +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_thread_db_h_has_td_notls=yes -else - gdb_cv_thread_db_h_has_td_notls=no - +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_ext +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 -$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then - -$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h +{ $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$gdb_cv_thread_db_h_has_td_version" = "xyes"; then - -$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h + fi fi -if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then - -$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h -fi +# Add macho support to GDB, but only if BFD includes it. -if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has __NR_tkill" >&5 -$as_echo_n "checking whether has __NR_tkill... " >&6; } -if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : + 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) . + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* 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 () { -int i = __NR_tkill; +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_sys_syscall_h_has_tkill=yes -else - gdb_cv_sys_syscall_h_has_tkill=no - +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_ext +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 -{ $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; } +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then - -$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h +{ $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 -ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include -" -if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : - ac_have_decl=1 + 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 - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl -_ACEOF - - -if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include "bfd.h" + #include "mach-o.h" + int main () { - -# if !HAVE_DECL_ADDR_NO_RANDOMIZE -# define ADDR_NO_RANDOMIZE 0x0040000 -# endif - /* Test the flag could be set and stays set. */ - personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); - if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) - return 1 +return bfd_mach_o_lookup_command (NULL, 0, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - have_personality=true + gdb_cv_var_macho=yes else - have_personality=false + 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) . + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* 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 () { - -# if !HAVE_DECL_ADDR_NO_RANDOMIZE -# define ADDR_NO_RANDOMIZE 0x0040000 -# endif - /* Test the flag could be set and stays set. */ - personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); - if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) - return 1 +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - have_personality=true -else - have_personality=false +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 *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +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 $have_personality -then - -$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h - +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 -target_sysroot_reloc=0 + 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 + #include "bfd.h" + #include "som.h" -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; - case ${with_sysroot} in - yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; - *) TARGET_SYSTEM_ROOT=$with_sysroot ;; - esac +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 - TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' +# Add any host-specific objects to GDB. +CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then - test_exec_prefix=$test_prefix - else - test_exec_prefix=$exec_prefix - fi - case ${TARGET_SYSTEM_ROOT} in - "${test_prefix}"|"${test_prefix}/"*|\ - "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ - '${prefix}'|'${prefix}/'*|\ - '${exec_prefix}'|'${exec_prefix}/'*) - target_sysroot_reloc=1 - ;; - esac +# If building on ELF, look for lzma support for embedded compressed debug info. +if test $gdb_cv_var_elf = yes; then +# Check whether --with-lzma was given. +if test "${with_lzma+set}" = set; then : + withval=$with_lzma; else - - TARGET_SYSTEM_ROOT= - TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' - + with_lzma=auto fi -TARGET_SYSTEM_ROOT_DEFINE="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE=$target_sysroot_reloc" - + { $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 test "${with_lzma}" != no; then -# Check whether --with-system-gdbinit was given. -if test "${with_system_gdbinit+set}" = set; then : - withval=$with_system_gdbinit; - SYSTEM_GDBINIT=$withval -else - SYSTEM_GDBINIT= -fi - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - ac_define_dir=`eval echo $SYSTEM_GDBINIT` - ac_define_dir=`eval echo $ac_define_dir` -cat >>confdefs.h <<_ACEOF -#define SYSTEM_GDBINIT "$ac_define_dir" -_ACEOF + use_additional=yes + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" - if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - else - test_prefix=$exec_prefix - fi - value=0 - case ${ac_define_dir} in - "${test_prefix}"|"${test_prefix}/"*|\ - '${exec_prefix}'|'${exec_prefix}/'*) - value=1 - ;; - esac + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -cat >>confdefs.h <<_ACEOF -#define SYSTEM_GDBINIT_RELOCATABLE $value -_ACEOF + 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" -# Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; - esac -fi + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - ERROR_ON_WARNING=yes -fi + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi -WERROR_CFLAGS="" -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 \ --Wno-unused -Wunused-value -Wunused-function \ --Wno-switch -Wno-char-subscripts" - -# 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" ;; -esac - -# Check whether --enable-build-warnings was given. -if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting compiler warning flags = $build_warnings" 6>&1 -fi -fi -# Check whether --enable-gdb-build-warnings was given. -if test "${enable_gdb_build_warnings+set}" = set; then : - enableval=$enable_gdb_build_warnings; case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 -fi -fi -WARN_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes -then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 -$as_echo_n "checking compiler warning flags... " >&6; } - # Separate out the -Werror flag as some files just cannot be - # compiled with it enabled. - for w in ${build_warnings}; do - case $w in - -Werr*) WERROR_CFLAGS=-Werror ;; - *) # Check that GCC accepts it - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $w" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 -int -main () -{ + 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" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - WARN_CFLAGS="${WARN_CFLAGS} $w" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$saved_CFLAGS" - esac - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 -$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } -fi + 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 -# In the Cygwin environment, we need some additional flags. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 -$as_echo_n "checking for cygwin... " >&6; } -if test "${gdb_cv_os_cygwin+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 defined (__CYGWIN__) || defined (__CYGWIN32__) -lose -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "lose" >/dev/null 2>&1; then : - gdb_cv_os_cygwin=yes -else - gdb_cv_os_cygwin=no -fi -rm -f conftest* + 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 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 -$as_echo "$gdb_cv_os_cygwin" >&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 + 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" -SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" -case ${host} in - *go32* ) SER_HARDWIRE=ser-go32.o ;; - *djgpp* ) SER_HARDWIRE=ser-go32.o ;; - *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; -esac + 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 -# libreadline needs libuser32.a in a cygwin environment -WIN32LIBS= -if test x$gdb_cv_os_cygwin = xyes; then - WIN32LIBS="-luser32" - case "${target}" in - *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" - ;; - esac -fi + ac_save_CPPFLAGS="$CPPFLAGS" -# The ser-tcp.c module requires sockets. -case ${host} in - *mingw32*) + for element in $INCLZMA; do + haveit= + for x in $CPPFLAGS; do -$as_echo "#define USE_WIN32API 1" >>confdefs.h + 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" - WIN32LIBS="$WIN32LIBS -lws2_32" - ;; -esac + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done -# Add ELF support to GDB, but only if BFD includes ELF support. -OLD_CFLAGS=$CFLAGS -OLD_LDFLAGS=$LDFLAGS -OLD_LIBS=$LIBS -CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" -LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" -intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` -# -ldl is provided by bfd/Makfile.am (LIBDL) . -if test "$plugins" = "yes"; then - LIBS="-ldl $LIBS" -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 "$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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include "bfd.h" -#include "elf-bfd.h" + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIBLZMA" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "lzma.h" int main () { -bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); +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 : - gdb_cv_var_elf=yes + ac_cv_liblzma=yes else - gdb_cv_var_elf=no + 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: $gdb_cv_var_elf" >&5 -$as_echo "$gdb_cv_var_elf" >&6; } -if test $gdb_cv_var_elf = yes; then - CONFIG_OBS="$CONFIG_OBS elfread.o" +{ $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_ELF 1" >>confdefs.h +$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h - # -ldl is provided by bfd/Makfile.am (LIBDL) . - if test "$plugins" = "yes"; then - OLD_LIBS="-ldl $OLD_LIBS" + { $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 -fi -CFLAGS=$OLD_CFLAGS -LDFLAGS=$OLD_LDFLAGS -LIBS=$OLD_LIBS -# Add any host-specific objects to GDB. -CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" + + + + + + 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" @@ -15256,630 +14146,1139 @@ else done fi -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//` + if test -f ${dir}/tclInt.h ; then + 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; } + 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 - 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; } + + + + 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 - 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 arbitary 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}\"" +{ $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 +_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 +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 - # Check for in-tree tcl - here=`pwd` - cd ${srcdir}/.. - topdir=`pwd` - cd ${here} +if test ! -d "${srcdir}/../sim"; then + ignore_sim=true +fi - intree="no" - if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then - intree="yes" - 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" - # Find Tcl private headers - if test x"${intree}" = xno; then +$as_echo "#define WITH_SIM 1" >>confdefs.h - { $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//` - if test -f ${dir}/tclInt.h ; then - private_dir=${dir} fi +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; } - 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 arbitary 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 - # 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 "${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"${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 +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" - ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" +fi - # 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}" +# 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 - 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 +# 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" - subdirs="$subdirs gdbtk" + gdbserver_build_enabled=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + 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 +# 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 +{ $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; } +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 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 + use_additional=yes -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -/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 +# 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 -/usr/openwin/include -/usr/openwin/share/include' + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" -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 -_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 + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -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 -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 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi 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 + 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" -# 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 "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 ! -d "${srcdir}/../sim"; then - ignore_sim=true -fi + 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 -SIM= -SIM_OBS= -if test "${ignore_sim}" = "false"; then - if test x"${gdb_sim}" != x ; then - SIM="${gdb_sim}" - SIM_OBS="remote-sim.o" + 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" -$as_echo "#define WITH_SIM 1" >>confdefs.h + 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 + + 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 + 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 + 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 -fi - - - - - - - - - + ac_save_CPPFLAGS="$CPPFLAGS" + for element in $INCBABELTRACE; 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" -# List of host floatformats. + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done -cat >>confdefs.h <<_ACEOF -#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format -_ACEOF + { $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 -cat >>confdefs.h <<_ACEOF -#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format -_ACEOF + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIBBABELTRACE" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include +int +main () +{ +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")); -cat >>confdefs.h <<_ACEOF -#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format + ; + return 0; +} _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" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_libbabeltrace=yes else - host_makefile_frag=/dev/null + ac_cv_libbabeltrace=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" - - - -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 +{ $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 -if test x"${gdb_osabi}" != x ; then - -cat >>confdefs.h <<_ACEOF -#define GDB_OSABI_DEFAULT $gdb_osabi -_ACEOF - -fi + { $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 -# 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. @@ -15918,7 +15317,22 @@ ac_config_links="$ac_config_links $ac_config_links_1" $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h -ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in doc/Makefile gnulib/Makefile data-directory/Makefile" +# 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" @@ -16027,58 +15441,6 @@ if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then as_fn_error "conditional \"GMAKE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then - as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - gl_libobjs= - gl_ltlibobjs= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - gl_LIBOBJS=$gl_libobjs - - gl_LTLIBOBJS=$gl_ltlibobjs - - - - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - gltests_LIBOBJS=$gltests_libobjs - - gltests_LTLIBOBJS=$gltests_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - : ${CONFIG_STATUS=./config.status} @@ -16567,7 +15929,6 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -16668,7 +16029,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # INIT-COMMANDS # ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF @@ -16680,12 +16040,12 @@ do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "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" ;; - ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; + "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -17161,11 +16521,6 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -17220,7 +16575,6 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | @@ -17269,40 +16623,6 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # @@ -17344,101 +16664,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; + "gcore":F) chmod +x gcore ;; "default":C) case x$CONFIG_HEADERS in xconfig.h:config.in)