X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fconfigure;h=324eb509440881d59fba79d9effe2ef74893d17e;hb=8493b6651af3d2130d5f5f050905cd3d6e8a9c27;hp=3c64bb151e99d08ef9b4568bbf7ae218b4698722;hpb=8fd8d003de32661ed703ae9fd7e1a856f1b58f81;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure b/gdb/configure index 3c64bb151e..324eb50944 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1,10 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64. +# Generated by GNU Autoconf 2.69. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -87,6 +87,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -131,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -164,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -209,14 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -314,10 +352,18 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -354,19 +400,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -439,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -473,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -494,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -524,10 +554,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -589,12 +620,17 @@ ac_includes_default="\ #endif" enable_option_checking=no +ac_header_list= ac_subst_vars='LTLIBOBJS LIBOBJS GCORE_TRANSFORM_NAME GDB_TRANSFORM_NAME XSLTPROC +NM_H GDB_NM_FILE +LTLIBXXHASH +LIBXXHASH +HAVE_LIBXXHASH LTLIBBABELTRACE LIBBABELTRACE HAVE_LIBBABELTRACE @@ -661,14 +697,22 @@ WIN32LIBS SER_HARDWIRE WERROR_CFLAGS WARN_CFLAGS +SYSTEM_GDBINIT_DIR SYSTEM_GDBINIT TARGET_SYSTEM_ROOT CONFIG_LDFLAGS RDYNAMIC +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +SED ALLOCA LTLIBIPT LIBIPT HAVE_LIBIPT +SRCHIGH_CFLAGS +SRCHIGH_LIBS HAVE_GUILE_FALSE HAVE_GUILE_TRUE GUILE_LIBS @@ -713,6 +757,7 @@ AWK REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION +CODESIGN_CERT HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs @@ -722,7 +767,6 @@ MAKEINFO_EXTRA_FLAGS MAKEINFOFLAGS MAKEINFO PACKAGE -GNULIB_STDINT_H CATOBJEXT GENCAT INSTOBJEXT @@ -822,13 +866,13 @@ 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_ia64 with_curses enable_profiling +enable_codesign with_pkgversion with_bugurl with_system_zlib @@ -844,25 +888,29 @@ with_mpfr with_libmpfr_prefix with_python with_guile -enable_libmcheck +enable_source_highlight with_intel_pt with_libipt_prefix with_included_regex with_sysroot with_system_gdbinit +with_system_gdbinit_dir enable_werror enable_build_warnings enable_gdb_build_warnings +enable_ubsan with_lzma with_liblzma_prefix with_tcl with_tk with_x enable_sim -enable_multi_ice enable_gdbserver with_babeltrace with_libbabeltrace_prefix +with_xxhash +with_libxxhash_prefix +enable_unit_tests ' ac_precious_vars='build_alias host_alias @@ -883,7 +931,6 @@ YFLAGS XMKMF' ac_subdirs_all='testsuite gdbtk -multi-ice gdbserver' # Initialize some variables set by options. @@ -946,8 +993,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -992,7 +1040,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1018,7 +1066,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1222,7 +1270,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1238,7 +1286,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1268,8 +1316,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1277,7 +1325,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1287,7 +1335,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1295,13 +1343,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1324,7 +1372,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1338,8 +1386,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1354,9 +1400,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1395,11 +1441,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1439,7 +1485,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1506,29 +1552,33 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-plugins Enable support for plugins --disable-largefile omit support for large files --enable-targets=TARGETS alternative target configurations --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) - --disable-gdbcli disable command-line interface (CLI) --disable-gdbmi disable machine-interface (MI) --enable-tui enable full-screen terminal user interface (TUI) --enable-gdbtk enable gdbtk graphical user interface (GUI) --enable-profiling enable profiling of GDB + --enable-codesign=CERT sign gdb with 'codesign -s CERT' --disable-rpath do not hardcode runtime library paths - --enable-libmcheck Try linking with -lmcheck if available + --enable-source-highlight + enable source-highlight for source listings --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-gdb-build-warnings enable GDB specific build-time compiler warnings if gcc is used + --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) --enable-sim link gdb with simulator - --enable-multi-ice build the multi-ice-gdb-server --enable-gdbserver automatically build gdbserver (yes/no/auto, default is auto) + --enable-unit-tests Enable the inclusion of unit tests when compiling + GDB Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1581,6 +1631,9 @@ 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-system-gdbinit-dir=PATH + automatically load system-wide gdbinit files from + this directory --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 @@ -1590,6 +1643,9 @@ Optional Packages: --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 + --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) + --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib + --without-libxxhash-prefix don't search for libxxhash in includedir and libdir Some influential environment variables: CC C compiler command @@ -1597,7 +1653,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1605,8 +1661,9 @@ Some influential environment variables: 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'. + YACC The `Yet Another Compiler 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. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1679,9 +1736,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.64 +generated by GNU Autoconf 2.69 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1725,8 +1782,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1763,8 +1820,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1789,7 +1846,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1800,8 +1857,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1813,10 +1870,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1852,7 +1909,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1879,7 +1936,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1888,7 +1945,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1929,8 +1986,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi 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 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1943,7 +2000,7 @@ ac_fn_c_check_header_compile () 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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1961,7 +2018,7 @@ 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;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1992,7 +2049,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2006,8 +2063,8 @@ fi # 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 + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2028,7 +2085,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2044,7 +2102,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2070,7 +2129,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2086,7 +2146,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2120,7 +2181,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2184,8 +2246,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2197,7 +2259,7 @@ 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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2252,7 +2314,7 @@ 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;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2265,7 +2327,7 @@ 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 : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2309,7 +2371,7 @@ fi eval ac_res=\$$4 { $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;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2322,7 +2384,7 @@ ac_fn_c_check_type () 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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2363,13 +2425,14 @@ 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;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -2377,7 +2440,7 @@ ac_fn_c_check_decl () 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 : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2408,15 +2471,128 @@ 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;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_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_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + 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; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_cxx_check_func LINENO FUNC VAR +# ------------------------------------ +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_cxx_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 eval \${$3+:} false; 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_cxx_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; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2526,11 +2702,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2564,11 +2738,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2581,11 +2753,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2599,11 +2769,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2658,7 +2826,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2669,18 +2842,22 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2694,6 +2871,9 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2749,7 +2929,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2804,7 +2984,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2816,7 +2996,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2844,7 +3024,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; 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_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2856,7 +3036,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2897,7 +3077,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2909,7 +3089,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2937,7 +3117,7 @@ if test -z "$CC"; then set dummy cc; 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_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2950,7 +3130,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2996,7 +3176,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$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_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3008,7 +3188,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3040,7 +3220,7 @@ do 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_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3052,7 +3232,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3094,8 +3274,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3116,8 +3296,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3134,12 +3314,12 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3201,62 +3381,28 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $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 "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { 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_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3286,19 +3432,78 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { 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>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { 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_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3338,8 +3543,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3349,7 +3554,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3386,7 +3591,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3464,7 +3669,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3473,8 +3678,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3575,7 +3779,7 @@ if test -z "$CXX"; then set dummy $ac_tool_prefix$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_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3587,7 +3791,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3619,7 +3823,7 @@ do 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_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3631,7 +3835,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3689,15 +3893,15 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3734,7 +3938,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -3830,7 +4034,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3860,7 +4064,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3876,11 +4080,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -3919,7 +4123,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3935,18 +4139,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3958,7 +4162,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3972,7 +4176,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4007,7 +4211,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4021,7 +4225,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4038,7 +4242,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4073,7 +4277,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4088,7 +4292,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $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 : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4205,8 +4409,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4218,7 +4421,7 @@ 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 : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4240,14 +4443,14 @@ $as_echo "#define _MINIX 1" >>confdefs.h { $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; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 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 () { @@ -4279,16 +4482,22 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&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 + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi 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 + 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, @@ -4302,27 +4511,27 @@ 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_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 : +if ${ac_cv_build+:} false; 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 + 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 + 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;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4340,14 +4549,14 @@ 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 : +if ${ac_cv_host+:} false; 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 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4355,7 +4564,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4373,14 +4582,14 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi @@ -4388,7 +4597,7 @@ fi $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -4425,7 +4634,7 @@ test -n "$target_alias" && do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -4438,7 +4647,7 @@ done do : ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default " -if test "x$ac_cv_header_windows_h" = x""yes; then : +if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF @@ -4454,7 +4663,7 @@ if test "${enable_plugins+set}" = set; then : no) plugins=no ;; *) plugins=yes if test "$maybe_plugins" != "yes" ; then - as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 + as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 fi ;; esac else @@ -4463,9 +4672,9 @@ else fi 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 "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 +$as_echo_n "checking for library containing dlsym... " >&6; } +if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -4478,11 +4687,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char dlopen (); +char dlsym (); int main () { -return dlopen (); +return dlsym (); ; return 0; } @@ -4495,25 +4704,25 @@ for ac_lib in '' dl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dlopen=$ac_res + ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : + if ${ac_cv_search_dlsym+:} false; then : break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlsym+:} false; then : else - ac_cv_search_dlopen=no + ac_cv_search_dlsym=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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 +$as_echo "$ac_cv_search_dlsym" >&6; } +ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -4544,7 +4753,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -4595,7 +4804,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -4664,7 +4873,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -4731,6 +4940,8 @@ _ACEOF esac rm -rf conftest* fi + + fi @@ -4739,7 +4950,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } -if test "${am_cv_prog_cc_stdc+set}" = set; then : +if ${am_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_cc_stdc=no @@ -4816,10 +5027,10 @@ 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` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4828,17 +5039,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# 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. +# 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 : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -4850,7 +5061,7 @@ 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 + if as_fn_executable_p "$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 @@ -4878,7 +5089,7 @@ if test -z "$ac_cv_prog_STRIP"; then 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 : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -4890,7 +5101,7 @@ 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 + if as_fn_executable_p "$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 @@ -4931,16 +5142,22 @@ 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 + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -4967,7 +5184,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # We require a C++11 compiler. Check if one is available, and if # necessary, set CXX_DIALECT to some -std=xxx switch. - ax_cxx_compile_cxx11_required=true + ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4977,7 +5194,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } -if test "${ax_cv_cxx_compile_cxx11+set}" = set; then : +if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5283,11 +5500,12 @@ $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } fi if test x$ac_success = xno; then - for switch in -std=gnu++11 -std=gnu++0x; do + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } -if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXX="$CXX" @@ -5601,16 +5819,17 @@ $as_echo "$ac_res" >&6; } fi if test x$ac_success = xno; then - for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } -if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5905,14 +6124,18 @@ else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX_DIALECT="$switch" - ac_success=yes + if eval test x\$$cachevar = xyes; then + CXX_DIALECT="$switch" + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then break fi done @@ -5925,7 +6148,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then - as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5 + as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi fi if test x$ac_success = xno; then @@ -5962,7 +6185,7 @@ 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 : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -f "$am_depcomp"; then @@ -6048,125 +6271,12 @@ 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; } if test x${am_cv_CC_dependencies_compiler_type-none} = xnone -then as_fn_error "no usable dependency style found" "$LINENO" 5 +then as_fn_error $? "no usable dependency style found" "$LINENO" 5 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type fi -gnulib_extra_configure_args= -# If large-file support is disabled, make sure gnulib does the same. -if test "$enable_largefile" = no; then -gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile" -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" - in_extra_args="$gnulib_extra_configure_args" - - # 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 - - if test -n "$in_extra_args"; then - # Add the extra args at the end. - ac_sub_configure_args="$ac_sub_configure_args $in_extra_args" - fi - - { $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= @@ -6259,15 +6369,6 @@ 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 cat >>confdefs.h <<_ACEOF @@ -6284,7 +6385,7 @@ _ACEOF 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 : +if ${gdb_cv_have_makeinfo_click+:} false; then : $as_echo_n "(cached) " >&6 else echo '@clicksequence{a @click{} b}' >conftest.texinfo @@ -6444,7 +6545,7 @@ else with_auto_load_dir='$debugdir:$datadir/auto-load' fi -escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` +escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' @@ -6471,7 +6572,7 @@ else with_auto_load_safe_path="$with_auto_load_dir" fi -escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` +escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' @@ -6495,7 +6596,7 @@ subdirs="$subdirs testsuite" # 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 + yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 ;; no) enable_targets= ;; *) enable_targets=$enableval ;; @@ -6509,7 +6610,7 @@ 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 ;; + *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; esac else want64=false @@ -6527,10 +6628,6 @@ fi . $srcdir/configure.host -# Add in the common host objects. -. $srcdir/common/common.host -gdb_host_obs="$gdb_host_obs $common_host_obs" - # Accumulate some settings from configure.tgt over all enabled targets TARGET_OBS= @@ -6553,7 +6650,7 @@ do . ${srcdir}/configure.tgt if test -z "${gdb_target_obs}"; then : - as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 + as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 fi # Target-specific object files @@ -6597,7 +6694,7 @@ if test x${all_targets} = xtrue; then # 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 : +if ${ac_cv_sizeof_long+:} false; 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 : @@ -6606,9 +6703,8 @@ 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; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi @@ -6667,32 +6763,6 @@ _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 : @@ -6700,7 +6770,7 @@ if test "${enable_gdbmi+set}" = set; then : yes | no) ;; *) - as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; esac else enable_gdbmi=yes @@ -6722,7 +6792,7 @@ if test "${enable_tui+set}" = set; then : yes | no | auto) ;; *) - as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; esac else enable_tui=auto @@ -6736,7 +6806,7 @@ if test "${enable_gdbtk+set}" = set; then : yes | no) ;; *) - as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; esac else if test -d $srcdir/gdbtk; then @@ -6768,7 +6838,7 @@ 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 + 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;} @@ -6782,7 +6852,7 @@ case "$with_libunwind_ia64" in 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 : +if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUNWIND_IA64_H 1 _ACEOF @@ -6794,7 +6864,7 @@ 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 + as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 ;; esac @@ -6802,7 +6872,7 @@ 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 : +if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUNWIND_IA64_H 1 _ACEOF @@ -6812,7 +6882,7 @@ 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 + 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" @@ -6839,7 +6909,7 @@ if test "${enable_profiling+set}" = set; then : yes | no) ;; *) - as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; esac else enable_profiling=no @@ -6850,8 +6920,7 @@ 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 : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6861,7 +6930,7 @@ 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 : +if ${ac_cv_var__etext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6894,7 +6963,7 @@ $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 : +if ${ac_cv_var_etext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6927,7 +6996,7 @@ $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 + as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 fi PROFILE_CFLAGS=-pg OLD_CFLAGS="$CFLAGS" @@ -6935,7 +7004,7 @@ if test "$enable_profiling" = yes ; 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 : +if ${ac_cv_cc_supports_pg+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6960,18 +7029,26 @@ fi $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 + as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 fi CFLAGS="$OLD_CFLAGS" fi +CODESIGN_CERT= +# Check whether --enable-codesign was given. +if test "${enable_codesign+set}" = set; then : + enableval=$enable_codesign; CODESIGN_CERT=$enableval +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 ;; + yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; no) PKGVERSION= ;; *) PKGVERSION="($withval) " ;; esac @@ -6987,7 +7064,7 @@ 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 ;; + yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; no) BUGURL= ;; *) BUGURL="$withval" @@ -7032,7 +7109,7 @@ do 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 : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -7044,7 +7121,7 @@ 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 + if as_fn_executable_p "$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 @@ -7085,7 +7162,7 @@ done { $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 : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7105,7 +7182,7 @@ case $as_dir/ in #(( # 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 as_fn_executable_p "$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. @@ -7177,7 +7254,7 @@ if test -n "$ac_tool_prefix"; then 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 : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -7189,7 +7266,7 @@ 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 + if as_fn_executable_p "$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 @@ -7217,7 +7294,7 @@ if test -z "$ac_cv_prog_RANLIB"; then 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 : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -7229,7 +7306,7 @@ 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 + if as_fn_executable_p "$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 @@ -7270,7 +7347,7 @@ do 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 : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -7282,7 +7359,7 @@ 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 + if as_fn_executable_p "$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 @@ -7313,7 +7390,7 @@ if test -n "$ac_tool_prefix"; then 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 : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -7325,7 +7402,7 @@ 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 + if as_fn_executable_p "$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 @@ -7353,7 +7430,7 @@ if test -z "$ac_cv_prog_AR"; then 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 : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -7365,7 +7442,7 @@ 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 + if as_fn_executable_p "$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 @@ -7405,7 +7482,7 @@ if test -n "$ac_tool_prefix"; then 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 : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -7417,7 +7494,7 @@ 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 + if as_fn_executable_p "$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 @@ -7445,7 +7522,7 @@ if test -z "$ac_cv_prog_DLLTOOL"; then 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 : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -7457,7 +7534,7 @@ 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 + if as_fn_executable_p "$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 @@ -7497,7 +7574,7 @@ if test -n "$ac_tool_prefix"; then 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 : +if ${ac_cv_prog_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$WINDRES"; then @@ -7509,7 +7586,7 @@ 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 + if as_fn_executable_p "$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 @@ -7537,7 +7614,7 @@ if test -z "$ac_cv_prog_WINDRES"; then 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 : +if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_WINDRES"; then @@ -7549,7 +7626,7 @@ 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 + if as_fn_executable_p "$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 @@ -7593,7 +7670,7 @@ case $host_os in 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 : +if ${ac_cv_prog_MIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MIG"; then @@ -7605,7 +7682,7 @@ 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 + if as_fn_executable_p "$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 @@ -7633,7 +7710,7 @@ if test -z "$ac_cv_prog_MIG"; then 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 : +if ${ac_cv_prog_ac_ct_MIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MIG"; then @@ -7645,7 +7722,7 @@ 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 + if as_fn_executable_p "$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 @@ -7681,7 +7758,7 @@ else fi if test x"$MIG" = x; then - as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 + as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 fi ;; esac @@ -7693,7 +7770,7 @@ esac # 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 : +if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7721,7 +7798,7 @@ 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 : +if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -7734,7 +7811,7 @@ 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 : +if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -7768,11 +7845,11 @@ for ac_lib in '' nsl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : + if ${ac_cv_search_gethostbyname+:} false; then : break fi done -if test "${ac_cv_search_gethostbyname+set}" = set; then : +if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no @@ -7792,7 +7869,7 @@ 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 : +if ${ac_cv_search_socketpair+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -7826,11 +7903,11 @@ for ac_lib in '' socket; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_socketpair+set}" = set; then : + if ${ac_cv_search_socketpair+:} false; then : break fi done -if test "${ac_cv_search_socketpair+set}" = set; then : +if ${ac_cv_search_socketpair+:} false; then : else ac_cv_search_socketpair=no @@ -7870,7 +7947,7 @@ fi # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } -if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : +if ${ac_cv_search_kinfo_getvmmap+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -7904,11 +7981,11 @@ for ac_lib in '' util util-freebsd; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : + if ${ac_cv_search_kinfo_getvmmap+:} false; then : break fi done -if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then : +if ${ac_cv_search_kinfo_getvmmap+:} false; then : else ac_cv_search_kinfo_getvmmap=no @@ -7927,6 +8004,66 @@ $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h fi +# fbsd-nat.c can also use kinfo_getfile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 +$as_echo_n "checking for library containing kinfo_getfile... " >&6; } +if ${ac_cv_search_kinfo_getfile+:} false; 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 kinfo_getfile (); +int +main () +{ +return kinfo_getfile (); + ; + return 0; +} +_ACEOF +for ac_lib in '' util util-freebsd; 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_kinfo_getfile=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_kinfo_getfile+:} false; then : + break +fi +done +if ${ac_cv_search_kinfo_getfile+:} false; then : + +else + ac_cv_search_kinfo_getfile=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 +$as_echo "$ac_cv_search_kinfo_getfile" >&6; } +ac_res=$ac_cv_search_kinfo_getfile +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h + +fi + + if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" @@ -8003,7 +8140,7 @@ 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 : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -8036,10 +8173,10 @@ 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 +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 : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -8057,7 +8194,7 @@ 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 : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8475,7 +8612,7 @@ fi { $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 : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8544,7 +8681,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8616,7 +8753,7 @@ $as_echo "$LIBICONV" >&6; } if test "$am_cv_func_iconv" = yes; 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 : + if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8732,7 +8869,7 @@ if test x"$prefer_curses" = xyes; then # 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 : +if ${ac_cv_search_waddstr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -8766,11 +8903,11 @@ for ac_lib in '' ncursesw ncurses cursesX curses; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_waddstr+set}" = set; then : + if ${ac_cv_search_waddstr+:} false; then : break fi done -if test "${ac_cv_search_waddstr+set}" = set; then : +if ${ac_cv_search_waddstr+:} false; then : else ac_cv_search_waddstr=no @@ -8803,7 +8940,7 @@ if test x"$enable_tui" != xno; then 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 + 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;} @@ -8830,7 +8967,7 @@ 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 : +if ${ac_cv_search_tgetent+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -8852,7 +8989,7 @@ return tgetent (); return 0; } _ACEOF -for ac_lib in '' termcap tinfo curses ncursesw ncurses; do +for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do if test -z "$ac_lib"; then ac_res="none required" else @@ -8864,11 +9001,11 @@ for ac_lib in '' termcap tinfo curses ncursesw ncurses; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_tgetent+set}" = set; then : + if ${ac_cv_search_tgetent+:} false; then : break fi done -if test "${ac_cv_search_tgetent+set}" = set; then : +if ${ac_cv_search_tgetent+:} false; then : else ac_cv_search_tgetent=no @@ -8897,6 +9034,38 @@ fi if test "$with_system_readline" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 +$as_echo_n "checking whether system readline is new enough... " >&6; } +if ${gdb_cv_readline_ok+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +#if RL_VERSION_MAJOR < 7 +# error "readline version 7 required" +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_readline_ok=yes +else + gdb_cv_readline_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 +$as_echo "$gdb_cv_readline_ok" >&6; } + if test "$gdb_cv_readline_ok" != yes; then + as_fn_error $? "system readline is not new enough" "$LINENO" 5 + fi + READLINE=-lreadline READLINE_DEPS= READLINE_CFLAGS= @@ -8923,7 +9092,7 @@ TARGET_PTR= # 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 : +if ${ac_cv_sizeof_unsigned_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : @@ -8932,9 +9101,8 @@ else 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; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_long=0 fi @@ -8957,7 +9125,7 @@ _ACEOF # 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 : +if ${ac_cv_sizeof_unsigned_long+:} false; 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 : @@ -8966,9 +9134,8 @@ 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; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -8991,7 +9158,7 @@ _ACEOF # 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 : +if ${ac_cv_sizeof_unsigned___int128+:} false; 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 : @@ -9000,9 +9167,8 @@ 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; }; } +as_fn_error 77 "cannot compute sizeof (unsigned __int128) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned___int128=0 fi @@ -9036,7 +9202,7 @@ ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" { $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 : +if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -9070,11 +9236,11 @@ for ac_lib in '' dl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : + if ${ac_cv_search_dlopen+:} false; then : break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no @@ -9568,7 +9734,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 $as_echo_n "checking for libexpat... " >&6; } -if test "${ac_cv_libexpat+set}" = set; then : +if ${ac_cv_libexpat+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9620,7 +9786,7 @@ $as_echo "$LIBEXPAT" >&6; } if test "$HAVE_LIBEXPAT" != yes; then if test "$with_expat" = yes; then - as_fn_error "expat is missing or unusable" "$LINENO" 5 + as_fn_error $? "expat is missing or unusable" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} @@ -9631,7 +9797,7 @@ $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be un for ac_func in XML_StopParser do : ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" -if test "x$ac_cv_func_XML_StopParser" = x""yes; then : +if test "x$ac_cv_func_XML_StopParser" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XML_STOPPARSER 1 _ACEOF @@ -9716,7 +9882,7 @@ fi rpathdirs= ltrpathdirs= names_already_handled= - names_next_round='mpfr ' + names_next_round='mpfr gmp' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= @@ -10073,7 +10239,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 $as_echo_n "checking for libmpfr... " >&6; } -if test "${ac_cv_libmpfr+set}" = set; then : +if ${ac_cv_libmpfr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -10126,7 +10292,7 @@ $as_echo "$LIBMPFR" >&6; } if test "$HAVE_LIBMPFR" != yes; then if test "$with_mpfr" = yes; then - as_fn_error "MPFR is missing or unusable" "$LINENO" 5 + as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} @@ -10185,12 +10351,12 @@ else python_prog=${with_python} python_prefix= else - as_fn_error "invalid value for --with-python" "$LINENO" 5 + as_fn_error $? "invalid value for --with-python" "$LINENO" 5 fi ;; */*) # Disallow --with-python=foo/bar. - as_fn_error "invalid value for --with-python" "$LINENO" 5 + as_fn_error $? "invalid value for --with-python" "$LINENO" 5 ;; *) # The user has either specified auto, yes, or the name of the python @@ -10203,7 +10369,7 @@ else set dummy python; 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_python_prog_path+set}" = set; then : +if ${ac_cv_path_python_prog_path+:} false; then : $as_echo_n "(cached) " >&6 else case $python_prog_path in @@ -10217,7 +10383,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_python_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 @@ -10260,7 +10426,7 @@ fi set dummy ${python_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_path_python_prog_path+set}" = set; then : +if ${ac_cv_path_python_prog_path+:} false; then : $as_echo_n "(cached) " >&6 else case $python_prog_path in @@ -10274,7 +10440,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_python_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 @@ -10298,7 +10464,7 @@ fi if test "${python_prog_path}" = missing; then - as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 + as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 fi ;; esac @@ -10312,21 +10478,21 @@ fi if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - as_fn_error "failure running python-config --includes" "$LINENO" 5 + as_fn_error $? "failure running python-config --includes" "$LINENO" 5 fi fi python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - as_fn_error "failure running python-config --ldflags" "$LINENO" 5 + as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 fi fi python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` if test $? != 0; then have_python_config=failed if test "${with_python}" != auto; then - as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 + as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 fi fi else @@ -10346,36 +10512,16 @@ fi have_libpython=no if test "${have_python_config}" = yes; then - # Determine the Python version by extracting "-lpython" - # part of the python_libs. is usually X.Y with X and Y - # being decimal numbers, but can also be XY (seen on Windows). - # - # The extraction is performed using sed with a regular expression. - # Initially, the regexp used was using the '?' quantifier to make - # the dot in the version number optional. Unfortunately, this - # does not work with non-GNU versions of sed because, because of - # what looks like a limitation (the '?' quantifier does not work - # with back-references). We work around this limitation by using - # the '*' quantifier instead. It means that, in theory, we might - # match unexpected version strings such as "-lpython2..7", but - # this seems unlikely in practice. And even if that happens, - # an error will be triggered later on, when checking that version - # number. - python_version=`echo " ${python_libs} " \ - | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` - case "${python_version}" in - python*) - - version=${python_version} + new_CPPFLAGS=${python_includes} new_LIBS=${python_libs} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 -$as_echo_n "checking for ${version}... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 +$as_echo_n "checking for python... " >&6; } save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" - LIBS="$LIBS $new_LIBS" + LIBS="$new_LIBS $LIBS" found_usable_python=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10389,7 +10535,7 @@ Py_Initialize (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - have_libpython=${version} + have_libpython=yes found_usable_python=yes PYTHON_CPPFLAGS=$new_CPPFLAGS PYTHON_LIBS=$new_LIBS @@ -10401,24 +10547,18 @@ rm -f core conftest.err conftest.$ac_objext \ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 $as_echo "${found_usable_python}" >&6; } - ;; - *) - as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 - ;; - esac elif test "${have_python_config}" != failed; then if test "${have_libpython}" = no; then - version=python2.7 new_CPPFLAGS=${python_includes} - new_LIBS="${python_libs} -lpython2.7" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 -$as_echo_n "checking for ${version}... " >&6; } + new_LIBS="-lpython2.7 ${python_libs}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 +$as_echo_n "checking for python... " >&6; } save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" - LIBS="$LIBS $new_LIBS" + LIBS="$new_LIBS $LIBS" found_usable_python=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10432,7 +10572,7 @@ Py_Initialize (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - have_libpython=${version} + have_libpython=yes found_usable_python=yes PYTHON_CPPFLAGS=$new_CPPFLAGS PYTHON_LIBS=$new_LIBS @@ -10447,92 +10587,15 @@ $as_echo "${found_usable_python}" >&6; } fi if test "${have_libpython}" = no; then - version=python2.6 - - new_CPPFLAGS=${python_includes} - new_LIBS="${python_libs} -lpython2.6" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 -$as_echo_n "checking for ${version}... " >&6; } - save_CPPFLAGS=$CPPFLAGS - save_LIBS=$LIBS - CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" - LIBS="$LIBS $new_LIBS" - found_usable_python=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "Python.h" -int -main () -{ -Py_Initialize (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_libpython=${version} - found_usable_python=yes - PYTHON_CPPFLAGS=$new_CPPFLAGS - PYTHON_LIBS=$new_LIBS -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS=$save_CPPFLAGS - LIBS=$save_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 -$as_echo "${found_usable_python}" >&6; } - - fi - if test ${have_libpython} = no; then - - version=python2.5 - - new_CPPFLAGS=${python_includes} - new_LIBS="${python_libs} -lpython2.5" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 -$as_echo_n "checking for ${version}... " >&6; } - save_CPPFLAGS=$CPPFLAGS - save_LIBS=$LIBS - CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" - LIBS="$LIBS $new_LIBS" - found_usable_python=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "Python.h" -int -main () -{ -Py_Initialize (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_libpython=${version} - found_usable_python=yes - PYTHON_CPPFLAGS=$new_CPPFLAGS - PYTHON_LIBS=$new_LIBS -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS=$save_CPPFLAGS - LIBS=$save_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 -$as_echo "${found_usable_python}" >&6; } - - fi - if test ${have_libpython} = no; then - - version=python2.4 new_CPPFLAGS=${python_includes} - new_LIBS="${python_libs} -lpython2.4" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 -$as_echo_n "checking for ${version}... " >&6; } + new_LIBS="-lpython2.6 ${python_libs}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 +$as_echo_n "checking for python... " >&6; } save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" - LIBS="$LIBS $new_LIBS" + LIBS="$new_LIBS $LIBS" found_usable_python=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10546,7 +10609,7 @@ Py_Initialize (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - have_libpython=${version} + have_libpython=yes found_usable_python=yes PYTHON_CPPFLAGS=$new_CPPFLAGS PYTHON_LIBS=$new_LIBS @@ -10560,35 +10623,18 @@ $as_echo "${found_usable_python}" >&6; } fi fi - if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then - -$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h - - elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then - -$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h - - elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then - -$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h - - elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then - -$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h - - fi if test "${have_libpython}" = no; then case "${with_python}" in yes) - as_fn_error "python is missing or unusable" "$LINENO" 5 + as_fn_error $? "python is missing or unusable" "$LINENO" 5 ;; auto) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} ;; *) - as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 + as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 ;; esac else @@ -10641,7 +10687,11 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h # would make the python-related objects be compiled differently from the # rest of GDB (e.g., -O2 and -fPIC). if test "${GCC}" = yes; then - tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" + tentative_python_cflags="-fno-strict-aliasing -fwrapv" + # Python headers recommend -DNDEBUG, but it's unclear if that just + # refers to building Python itself. In release mode, though, it + # doesn't hurt for the Python code in gdb to follow. + $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" fi if test "x${tentative_python_cflags}" != x; then @@ -10687,34 +10737,6 @@ $as_echo "${PYTHON_CFLAGS}" >&6; } 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 - 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. @@ -10766,7 +10788,7 @@ $as_echo "$with_guile" >&6; } 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 : +if ${ac_cv_path_pkg_config_prog_path+:} false; then : $as_echo_n "(cached) " >&6 else case $pkg_config_prog_path in @@ -10780,7 +10802,7 @@ 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 + if as_fn_executable_p "$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 @@ -10831,18 +10853,18 @@ $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } fi new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` if test $? != 0; then - as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + 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 + 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 + as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 else found_usable_guile=no fi @@ -10873,7 +10895,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" -if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : +if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h @@ -10886,8 +10908,8 @@ fi 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; } +as_fn_error $? "linking guile version ${guile_version} test program failed +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -10898,7 +10920,7 @@ $as_echo "${found_usable_guile}" >&6; } ;; yes) if test "${pkg_config_prog_path}" = "missing"; then - as_fn_error "pkg-config not found" "$LINENO" 5 + as_fn_error $? "pkg-config not found" "$LINENO" 5 fi pkg_config=${pkg_config_prog_path} @@ -10915,18 +10937,18 @@ $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } fi new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` if test $? != 0; then - as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + 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 + 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 + as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 else found_usable_guile=no fi @@ -10957,7 +10979,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" -if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : +if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h @@ -10970,8 +10992,8 @@ fi 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; } +as_fn_error $? "linking guile version ${guile_version} test program failed +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -10996,18 +11018,18 @@ $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } fi new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` if test $? != 0; then - as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + 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 + 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 + as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 else found_usable_guile=no fi @@ -11038,7 +11060,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" -if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : +if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h @@ -11051,8 +11073,8 @@ fi 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; } +as_fn_error $? "linking guile version ${guile_version} test program failed +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -11060,17 +11082,17 @@ See \`config.log' for more details." "$LINENO" 5; } $as_echo "${found_usable_guile}" >&6; } else - as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5 + as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 fi ;; "" | */*) # Disallow --with=guile="" and --with-guile=foo/bar. - as_fn_error "invalid value for --with-guile" "$LINENO" 5 + as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 ;; *) # A space separate list of guile versions to try, in order. if test "${pkg_config_prog_path}" = "missing"; then - as_fn_error "pkg-config not found" "$LINENO" 5 + as_fn_error $? "pkg-config not found" "$LINENO" 5 fi pkg_config=${pkg_config_prog_path} @@ -11087,18 +11109,18 @@ $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } fi new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` if test $? != 0; then - as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 + 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 + 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 + as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 else found_usable_guile=no fi @@ -11129,7 +11151,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" -if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then : +if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h @@ -11142,8 +11164,8 @@ fi 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; } +as_fn_error $? "linking guile version ${guile_version} test program failed +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -11159,7 +11181,7 @@ if test "${have_libguile}" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } -if test "${ac_cv_guild_program_name+set}" = set; then : +if ${ac_cv_guild_program_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" @@ -11178,7 +11200,7 @@ fi $as_echo "$ac_cv_guild_program_name" >&6; } if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then - as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 + as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 fi GUILD="$ac_cv_guild_program_name" @@ -11189,7 +11211,7 @@ $as_echo "$ac_cv_guild_program_name" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } -if test "${ac_cv_guild_program_name+set}" = set; then : +if ${ac_cv_guild_program_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" @@ -11208,7 +11230,7 @@ fi $as_echo "$ac_cv_guild_program_name" >&6; } if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then - as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 + as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 fi GUILD="$ac_cv_guild_program_name" @@ -11229,7 +11251,7 @@ $as_echo "$ac_cv_guild_program_name" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 $as_echo_n "checking whether guild supports this host... " >&6; } -if test "${ac_cv_guild_ok+set}" = set; then : +if ${ac_cv_guild_ok+:} false; then : $as_echo_n "(cached) " >&6 else echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 @@ -11266,7 +11288,7 @@ $as_echo "#define HAVE_GUILE 1" >>confdefs.h for ac_func in scm_new_smob do : ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" -if test "x$ac_cv_func_scm_new_smob" = x""yes; then : +if test "x$ac_cv_func_scm_new_smob" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SCM_NEW_SMOB 1 _ACEOF @@ -11293,84 +11315,60 @@ else fi -# --------------------- # -# Check for libmcheck. # -# --------------------- # - -# Enable -lmcheck by default (it provides cheap-enough memory mangling), -# but turn it off if Python is enabled with threads, since -lmcheck is -# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), -# and for releases. -if test \( "${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 - +# ---------------------------- # +# Check for source highlight. # +# ---------------------------- # - if test -z "${ENABLE_LIBMCHECK}"; then - ENABLE_LIBMCHECK=${libmcheck_default} - fi +SRCHIGH_LIBS= +SRCHIGH_CFLAGS= - 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 +# Check whether --enable-source-highlight was given. +if test "${enable_source_highlight+set}" = set; then : + enableval=$enable_source_highlight; case "${enableval}" in + yes) enable_source_highlight=yes ;; + no) enable_source_highlight=no ;; + *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; +esac else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmcheck $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + enable_source_highlight=auto +fi -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mcheck_main=yes -else - ac_cv_lib_mcheck_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 -$as_echo "$ac_cv_lib_mcheck_main" >&6; } -if test "x$ac_cv_lib_mcheck_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMCHECK 1 -_ACEOF +if test "${enable_source_highlight}" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 +$as_echo_n "checking for the source-highlight library... " >&6; } + if test "${pkg_config_prog_path}" = "missing"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 +$as_echo "no - pkg-config not found" >&6; } + if test "${enable_source_highlight}" = "yes"; then + as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 + fi + else + case "$LDFLAGS" in + *static-libstdc*) + as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 + ;; + esac - LIBS="-lmcheck $LIBS" + if ${pkg_config_prog_path} --exists source-highlight; then + SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` + SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` -fi +$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "${enable_source_highlight}" = "yes"; then + as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 + fi + fi fi +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 # Check whether --with-intel_pt was given. @@ -11404,10 +11402,10 @@ if ac_fn_c_try_cpp "$LINENO"; then : else perf_event=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext if test "$perf_event" != yes; then if test "$with_intel_pt" = yes; then - as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5 + as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} @@ -11826,7 +11824,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 $as_echo_n "checking for libipt... " >&6; } -if test "${ac_cv_libipt+set}" = set; then : +if ${ac_cv_libipt+:} false; then : $as_echo_n "(cached) " >&6 else @@ -11878,7 +11876,7 @@ $as_echo "$LIBIPT" >&6; } if test "$HAVE_LIBIPT" != yes; then if test "$with_intel_pt" = yes; then - as_fn_error "libipt is missing or unusable" "$LINENO" 5 + as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} @@ -11889,7 +11887,7 @@ $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be u for ac_func in pt_insn_event do : ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" -if test "x$ac_cv_func_pt_insn_event" = x""yes; then : +if test "x$ac_cv_func_pt_insn_event" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PT_INSN_EVENT 1 _ACEOF @@ -11899,7 +11897,7 @@ done ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include " -if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then : +if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_PT_INSN_ENABLED 1 @@ -11909,7 +11907,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include " -if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then : +if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_PT_INSN_RESYNCED 1 @@ -11928,7 +11926,7 @@ 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 : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12040,18 +12038,15 @@ fi # elf_hp.h is for HP/UX 64-bit shared library support. for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ - thread_db.h \ - sys/fault.h \ + thread_db.h linux/elf.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 \ - termios.h elf_hp.h \ - dlfcn.h + sys/reg.h sys/debugreg.h sys/select.h \ + termios.h elf_hp.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 : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12060,22 +12055,6 @@ 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 -# include -#endif - -" -if test "x$ac_cv_header_sys_proc_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PROC_H 1 -_ACEOF - -fi - -done - for ac_header in sys/user.h do : ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H @@ -12083,7 +12062,7 @@ do : #endif " -if test "x$ac_cv_header_sys_user_h" = x""yes; then : +if test "x$ac_cv_header_sys_user_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_USER_H 1 _ACEOF @@ -12097,8 +12076,7 @@ for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses 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 : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12114,7 +12092,7 @@ do : #endif " -if test "x$ac_cv_header_term_h" = x""yes; then : +if test "x$ac_cv_header_term_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TERM_H 1 _ACEOF @@ -12131,7 +12109,7 @@ done # Check for presence and size of long long. ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : +if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 @@ -12143,7 +12121,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then : +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : @@ -12152,9 +12130,8 @@ else if test "$ac_cv_type_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 (long long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi @@ -12174,8 +12151,9 @@ _ACEOF fi - ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : + as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` +ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" +if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : ac_have_decl=1 else ac_have_decl=0 @@ -12185,7 +12163,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_BASENAME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" -if test "x$ac_cv_have_decl_ffs" = x""yes; then : +if test "x$ac_cv_have_decl_ffs" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12195,7 +12173,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFS $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_asprintf" = x""yes; then : +if test "x$ac_cv_have_decl_asprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12205,7 +12183,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ASPRINTF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vasprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12215,7 +12193,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VASPRINTF $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 : +if test "x$ac_cv_have_decl_snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12225,7 +12203,7 @@ 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 : +if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12236,7 +12214,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtol" = x""yes; then : +if test "x$ac_cv_have_decl_strtol" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12246,7 +12224,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoul" = x""yes; then : +if test "x$ac_cv_have_decl_strtoul" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12256,7 +12234,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOUL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoll" = x""yes; then : +if test "x$ac_cv_have_decl_strtoll" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12266,7 +12244,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOLL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoull" = x""yes; then : +if test "x$ac_cv_have_decl_strtoull" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12277,7 +12255,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" -if test "x$ac_cv_have_decl_strverscmp" = x""yes; then : +if test "x$ac_cv_have_decl_strverscmp" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12289,38 +12267,8 @@ _ACEOF -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 - -cat >>confdefs.h <<_ACEOF -#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 : +if test "x$ac_cv_have_decl_snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -12333,7 +12281,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${am_cv_val_LC_MESSAGES+set}" = set; then : +if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12369,7 +12317,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h # ----------------------- # ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -12378,7 +12326,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -12396,7 +12344,7 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include " -if test "x$ac_cv_type_socklen_t" = x""yes; then : +if test "x$ac_cv_type_socklen_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SOCKLEN_T 1 @@ -12412,7 +12360,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12421,11 +12369,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -12442,8 +12390,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -12459,10 +12408,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -12492,7 +12441,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -12534,7 +12483,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -12752,7 +12701,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error "unknown endianness + as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @@ -12761,12 +12710,15 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h # Checks for library functions. # # ------------------------------ # -for ac_header in stdlib.h unistd.h + + + + for ac_header in $ac_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 : +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12775,10 +12727,17 @@ fi done + + + + + + + for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -12788,7 +12747,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12831,11 +12790,6 @@ char *malloc (); /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ @@ -12870,8 +12824,9 @@ int main () { char *data, *data2, *data3; + const char *cdata2; int i, pagesize; - int fd; + int fd, fd2; pagesize = getpagesize (); @@ -12884,27 +12839,41 @@ main () umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) - return 1; + return 2; if (write (fd, data, pagesize) != pagesize) - return 1; + return 3; close (fd); + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + /* 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); + return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; + return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) - return 1; + return 11; /* 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 @@ -12913,12 +12882,12 @@ main () *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) - return 1; + return 12; if (read (fd, data3, pagesize) != pagesize) - return 1; + return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) - return 1; + return 14; close (fd); return 0; } @@ -12940,10 +12909,10 @@ if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi -rm -f conftest.mmap +rm -f conftest.mmap conftest.txt 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_type_pid_t" = xyes; then : else @@ -12956,7 +12925,7 @@ 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 : +if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF @@ -12969,8 +12938,7 @@ 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 : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12981,7 +12949,7 @@ 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 : +if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13034,7 +13002,7 @@ 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 : +if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13169,16 +13137,15 @@ fi for ac_func in getauxval getrusage getuid getgid \ pipe poll pread pread64 pwrite resize_term \ - sbrk setpgid setpgrp setsid \ - sigaction sigprocmask sigsetmask socketpair \ + sbrk getpgid setpgid setpgrp setsid \ + sigaction sigsetmask socketpair \ ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ setrlimit getrlimit posix_madvise waitpid \ - ptrace64 sigaltstack mkdtemp setns + ptrace64 sigaltstack setns use_default_colors 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 : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13189,7 +13156,7 @@ done { $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 : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13220,10 +13187,90 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + 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_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + { $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 : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13337,7 +13384,7 @@ fi # 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 : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13370,7 +13417,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13389,7 +13436,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -13433,7 +13480,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13460,8 +13507,7 @@ 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 : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -13475,7 +13521,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13485,23 +13531,20 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -13527,7 +13570,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13559,12 +13602,11 @@ $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 termios.h + for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.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" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -13574,12 +13616,12 @@ fi done - for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction + for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \ + sigprocmask 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 : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13588,18 +13630,8 @@ 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_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" +if test "x$ac_cv_have_decl_strstr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -13610,1025 +13642,1385 @@ cat >>confdefs.h <<_ACEOF _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 -$as_echo_n "checking for sigsetjmp... " >&6; } -if test "${gdb_cv_func_sigsetjmp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + # Check for std::thread. This does not work on some platforms, like + # mingw and DJGPP. + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -#include + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + if test "x$PTHREAD_CC" != "x"; then : + CC="$PTHREAD_CC" +fi + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } + 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 pthread_join (); int main () { -sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); +return pthread_join (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_func_sigsetjmp=yes -else - gdb_cv_func_sigsetjmp=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 -$as_echo "$gdb_cv_func_sigsetjmp" >&6; } -if test $gdb_cv_func_sigsetjmp = yes; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) -$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h +case $host_os in -fi + freebsd*) + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# Check the return and argument types of ptrace. + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + hpux*) -for ac_header in sys/ptrace.h ptrace.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 + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." -fi + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; -done + openedition*) + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) -gdb_ptrace_headers=' -#include -#if HAVE_SYS_PTRACE_H -# include -#endif -#if HAVE_UNISTD_H -# include -#endif -' -# There is no point in checking if we don't have a prototype. -ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers -" -if test "x$ac_cv_have_decl_ptrace" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PTRACE $ac_have_decl _ACEOF -if test $ac_have_decl = 1; then : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} +fi +rm -f conftest* -else + ;; - : ${gdb_cv_func_ptrace_ret='int'} - : ${gdb_cv_func_ptrace_args='int,int,long,long'} + solaris*) -fi + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). -# Check return type. Varargs (used on GNU/Linux) conflict with the -# empty argument list, so check for that explicitly. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 -$as_echo_n "checking return type of ptrace... " >&6; } -if test "${gdb_cv_func_ptrace_ret+set}" = set; then : + ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ;; +esac + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +if test "x$GCC" = "xyes"; then : + ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" +fi + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +if test "x$ax_pthread_check_macro" = "x--"; then : + ax_pthread_check_cond=0 +else + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" +fi + +# Are we compiling with Clang? + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +$as_echo_n "checking whether $CC is Clang... " >&6; } +if ${ax_cv_PTHREAD_CLANG+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers -int -main () -{ -extern long ptrace (enum __ptrace_request, ...); - ; - return 0; -} +/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_func_ptrace_ret='long' +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : + ax_cv_PTHREAD_CLANG=yes +fi +rm -f conftest* + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + +ax_pthread_clang_warning=no + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + PTHREAD_CFLAGS="-pthread" + PTHREAD_LIBS= + + ax_pthread_ok=yes + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + if test "x$ax_pthread_try" = "xunknown"; then : + break +fi + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers -int -main () -{ -extern int ptrace (); - ; - return 0; -} +int main(void){return 0;} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_func_ptrace_ret='int' -else - gdb_cv_func_ptrace_ret='long' +if ac_fn_c_try_link "$LINENO"; then : + ac_link="$ax_pthread_2step_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + break 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 -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 + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + if test "x$ax_pthread_try" = "x"; then : + ax_pthread_try=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 -$as_echo "$gdb_cv_func_ptrace_ret" >&6; } + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" -cat >>confdefs.h <<_ACEOF -#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret -_ACEOF +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } -# Check argument types. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 -$as_echo_n "checking types of arguments for ptrace... " >&6; } -if test "${gdb_cv_func_ptrace_args+set}" = set; then : + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -mt,pthread) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 +$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } + PTHREAD_CFLAGS="-mt" + PTHREAD_LIBS="-lpthread" + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-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 ${ac_cv_prog_ax_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ax_pthread_config="yes" + $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_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test "x$ax_pthread_config" = "xno"; then : + continue +fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers +#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } int main () { -extern long ptrace (enum __ptrace_request, ...); +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' -else +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -for gdb_arg1 in 'int' 'long'; do - for gdb_arg2 in 'pid_t' 'int' 'long'; do - for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do - for gdb_arg4 in 'int' 'long' 'void *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$gdb_ptrace_headers -int -main () -{ + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xyes"; then : + break +fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; - break 4; + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - for gdb_arg5 in 'int *' 'int' 'long'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } +if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers +#include int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); - +int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; - break 5; +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done - done - done -done -# Provide a safe default value. -: ${gdb_cv_func_ptrace_args='int,int,long,long'} +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 -$as_echo "$gdb_cv_func_ptrace_args" >&6; } -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift - -cat >>confdefs.h <<_ACEOF -#define PTRACE_TYPE_ARG1 $1 -_ACEOF - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } + if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : cat >>confdefs.h <<_ACEOF -#define PTRACE_TYPE_ARG3 $3 +#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR _ACEOF + ax_pthread_joinable_attr_defined=yes -cat >>confdefs.h <<_ACEOF -#define PTRACE_TYPE_ARG4 $4 -_ACEOF - -if test -n "$5"; then +fi -cat >>confdefs.h <<_ACEOF -#define PTRACE_TYPE_ARG5 $5 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } +if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } + if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"; then : + PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes fi - -if test "$cross_compiling" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include int main () { -/* If this system has a BSD-style setpgrp which takes arguments, - setpgrp(1, 1) will fail with ESRCH and return -1, in that case - exit successfully. */ - return setpgrp (1,1) != -1; +int i = PTHREAD_PRIO_INHERIT; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_setpgrp_void=no +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes else - ac_cv_func_setpgrp_void=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ax_cv_PTHREAD_PRIO_INHERIT=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_setpgrp_void" >&5 -$as_echo "$ac_cv_func_setpgrp_void" >&6; } -if test $ac_cv_func_setpgrp_void = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : -$as_echo "#define SETPGRP_VOID 1" >>confdefs.h +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + + ax_pthread_prio_inherit_defined=yes fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then : + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +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 ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ - - if (setpgrp(1,1) == -1) - exit (0); - else - exit (1); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_setpgrp_void=no -else - ac_cv_func_setpgrp_void=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 -$as_echo "$ac_cv_func_setpgrp_void" >&6; } -if test $ac_cv_func_setpgrp_void = yes; then - $as_echo "#define SETPGRP_VOID 1" >>confdefs.h + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CC="$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 - -# Assume we'll default to using the included libiberty regex. -gdb_use_included_regex=yes - -# However, if the system regex is GNU regex, then default to *not* -# using the included regex. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 -$as_echo_n "checking for GNU regex... " >&6; } -if test "${gdb_cv_have_gnu_regex+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#define REGEX_INTERFACE_VERSION 1 -#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION -# error "Version mismatch" -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_gnu_regex=yes +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } else - gdb_cv_have_gnu_regex=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 -$as_echo "$gdb_cv_have_gnu_regex" >&6; } -if test $gdb_cv_have_gnu_regex = yes; then - gdb_use_included_regex=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Check whether --with-included-regex was given. -if test "${with_included_regex+set}" = set; then : - withval=$with_included_regex; gdb_with_regex=$withval -else - gdb_with_regex=$gdb_use_included_regex + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi fi -if test "$gdb_with_regex" = yes; then - -$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h - -fi +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" -# Check if defines `struct thread' with a td_pcb member. -ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include -#include -" -if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_THREAD_TD_PCB 1 -_ACEOF +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + threads=yes + : +else + ax_pthread_ok=no + threads=no fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# See if defines `struct lwp`. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 -$as_echo_n "checking for struct lwp... " >&6; } -if test "${gdb_cv_struct_lwp+set}" = set; then : + if test "$threads" = "yes"; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 +$as_echo_n "checking for std::thread... " >&6; } +if ${gdb_cv_cxx_std_thread+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#define _KMEMUSER -#include +#include + void callback() { } int main () { -struct lwp l; +std::thread t(callback); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_struct_lwp=yes +if ac_fn_cxx_try_compile "$LINENO"; then : + gdb_cv_cxx_std_thread=yes else - gdb_cv_struct_lwp=no + gdb_cv_cxx_std_thread=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 -$as_echo "$gdb_cv_struct_lwp" >&6; } -if test $gdb_cv_struct_lwp = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 +$as_echo "$gdb_cv_cxx_std_thread" >&6; } -$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h + # This check must be here, while LIBS includes any necessary + # threading library. + for ac_func in pthread_sigmask pthread_setname_np +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done -# See if degines `struct reg'. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 -$as_echo_n "checking for struct reg in machine/reg.h... " >&6; } -if test "${gdb_cv_struct_reg+set}" = set; then : + + LIBS="$save_LIBS" + CXXFLAGS="$save_CXXFLAGS" + fi + if test $gdb_cv_cxx_std_thread = yes; then + +$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h + + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 +$as_echo_n "checking for sigsetjmp... " >&6; } +if ${gdb_cv_func_sigsetjmp+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include + +#include + int main () { -struct reg r; +sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_struct_reg=yes + gdb_cv_func_sigsetjmp=yes else - gdb_cv_struct_reg=no + gdb_cv_func_sigsetjmp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 -$as_echo "$gdb_cv_struct_reg" >&6; } -if test $gdb_cv_struct_reg = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 +$as_echo "$gdb_cv_func_sigsetjmp" >&6; } +if test $gdb_cv_func_sigsetjmp = yes; then -$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h +$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h fi -# See if supports the %fs and %gs i386 segment registers. -# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. -ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include -#include -" -if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_REG_R_FS 1 -_ACEOF +# Check the return and argument types of ptrace. -fi -ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include -#include -" -if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_REG_R_GS 1 +for ac_header in sys/ptrace.h ptrace.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _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 +done -fi -ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include +gdb_ptrace_headers=' +#include +#if HAVE_SYS_PTRACE_H +# include +#endif +#if HAVE_UNISTD_H +# include +#endif +' +# There is no point in checking if we don't have a prototype. +ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers " -if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : +if test "x$ac_cv_have_decl_ptrace" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 +#define HAVE_DECL_PTRACE $ac_have_decl _ACEOF +if test $ac_have_decl = 1; then : +else -fi + : ${gdb_cv_func_ptrace_ret='int'} + : ${gdb_cv_func_ptrace_args='int,int,long,long'} +fi -# See if provides the PTRACE_GETREGS request. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 -$as_echo_n "checking for PTRACE_GETREGS... " >&6; } -if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : +# Check return type. Varargs (used on GNU/Linux) conflict with the +# empty argument list, so check for that explicitly. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 +$as_echo_n "checking return type of ptrace... " >&6; } +if ${gdb_cv_func_ptrace_ret+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$gdb_ptrace_headers int main () { -PTRACE_GETREGS; +extern long ptrace (enum __ptrace_request, ...); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_ptrace_getregs=yes -else - gdb_cv_have_ptrace_getregs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 -$as_echo "$gdb_cv_have_ptrace_getregs" >&6; } -if test $gdb_cv_have_ptrace_getregs = yes; then - -$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h - -fi - -# See if provides the PTRACE_GETFPXREGS request. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 -$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } -if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : - $as_echo_n "(cached) " >&6 + gdb_cv_func_ptrace_ret='long' else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$gdb_ptrace_headers int main () { -PTRACE_GETFPXREGS; +extern int ptrace (); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_ptrace_getfpxregs=yes + gdb_cv_func_ptrace_ret='int' else - gdb_cv_have_ptrace_getfpxregs=no + gdb_cv_func_ptrace_ret='long' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 -$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } -if test $gdb_cv_have_ptrace_getfpxregs = yes; then - -$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 +$as_echo "$gdb_cv_func_ptrace_ret" >&6; } -# See if provides the PT_GETDBREGS request. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 -$as_echo_n "checking for PT_GETDBREGS... " >&6; } -if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : +cat >>confdefs.h <<_ACEOF +#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret +_ACEOF + +# Check argument types. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 +$as_echo_n "checking types of arguments for ptrace... " >&6; } +if ${gdb_cv_func_ptrace_args+:} false; then : $as_echo_n "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +$gdb_ptrace_headers int main () { -PT_GETDBREGS; +extern long ptrace (enum __ptrace_request, ...); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_pt_getdbregs=yes + gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' else - gdb_cv_have_pt_getdbregs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 -$as_echo "$gdb_cv_have_pt_getdbregs" >&6; } -if test $gdb_cv_have_pt_getdbregs = yes; then - -$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h - -fi -# See if provides the PT_GETXMMREGS request. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 -$as_echo_n "checking for PT_GETXMMREGS... " >&6; } -if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +for gdb_arg1 in 'int' 'long'; do + for gdb_arg2 in 'pid_t' 'int' 'long'; do + for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do + for gdb_arg4 in 'int' 'long' 'void *'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +$gdb_ptrace_headers int main () { -PT_GETXMMREGS; + +extern $gdb_cv_func_ptrace_ret + ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gdb_cv_have_pt_getxmmregs=yes -else - gdb_cv_have_pt_getxmmregs=no + gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; + break 4; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi + for gdb_arg5 in 'int *' 'int' 'long'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$gdb_ptrace_headers +int +main () +{ -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 -$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } -if test $gdb_cv_have_pt_getxmmregs = yes; then +extern $gdb_cv_func_ptrace_ret + ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); -$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; + break 5; fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + done + done + done +done +# Provide a safe default value. +: ${gdb_cv_func_ptrace_args='int,int,long,long'} -# See if supports LWP names on FreeBSD -# Older FreeBSD versions don't have the pl_tdname member of -# `struct ptrace_lwpinfo'. -ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include -" -if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then : +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 +$as_echo "$gdb_cv_func_ptrace_args" >&6; } +ac_save_IFS=$IFS; IFS=',' +set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` +IFS=$ac_save_IFS +shift cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 +#define PTRACE_TYPE_ARG1 $1 _ACEOF -fi - - -# See if supports syscall fields on FreeBSD. The -# pl_syscall_code member of `struct ptrace_lwpinfo' was added in -# FreeBSD 10.3. -ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include -" -if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 +#define PTRACE_TYPE_ARG3 $3 _ACEOF -fi - - -# Detect which type of /proc is in use, such as for Solaris. - -if test "${target}" = "${host}"; then - case "${host}" in - *-*-sysv4.2* | *-*-sysv5* ) - -$as_echo "#define NEW_PROC_API 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PTRACE_TYPE_ARG4 $4 +_ACEOF - ;; - *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) +if test -n "$5"; then -$as_echo "#define NEW_PROC_API 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PTRACE_TYPE_ARG5 $5 +_ACEOF - ;; - esac fi -if test "$ac_cv_header_sys_procfs_h" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 : + +if test "$cross_compiling" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if ${ac_cv_func_setpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#define _SYSCALL32 -/* Needed for new procfs interface on sparc-solaris. */ -#define _STRUCTURED_PROC 1 -#include +$ac_includes_default int main () { -gregset_t avar +/* If this system has a BSD-style setpgrp which takes arguments, + setpgrp(1, 1) will fail with ESRCH and return -1, in that case + exit successfully. */ + return setpgrp (1,1) != -1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_gregset_t=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_setpgrp_void=no else - bfd_cv_have_sys_procfs_type_gregset_t=no - + ac_cv_func_setpgrp_void=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } +if test $ac_cv_func_setpgrp_void = yes; then -$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h +$as_echo "#define SETPGRP_VOID 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } +fi - { $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 : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if ${ac_cv_func_setpgrp_void+:} false; 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 +#include + int main () { -fpregset_t avar + + if (setpgrp(1,1) == -1) + exit (0); + else + exit (1); + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_fpregset_t=yes + ac_cv_func_setpgrp_void=no else - bfd_cv_have_sys_procfs_type_fpregset_t=no - + ac_cv_func_setpgrp_void=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } +if test $ac_cv_func_setpgrp_void = yes; then + $as_echo "#define SETPGRP_VOID 1" >>confdefs.h - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then - -$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h +fi +fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } +# Assume we'll default to using the included libiberty regex. +gdb_use_included_regex=yes - { $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 : +# However, if the system regex is GNU regex, then default to *not* +# using the included regex. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 +$as_echo_n "checking for GNU regex... " >&6; } +if ${gdb_cv_have_gnu_regex+:} false; 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 +#include int main () { -prgregset_t avar +#define REGEX_INTERFACE_VERSION 1 +#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION +# error "Version mismatch" +#endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset_t=yes + gdb_cv_have_gnu_regex=yes else - bfd_cv_have_sys_procfs_type_prgregset_t=no - + gdb_cv_have_gnu_regex=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 +$as_echo "$gdb_cv_have_gnu_regex" >&6; } +if test $gdb_cv_have_gnu_regex = yes; then + gdb_use_included_regex=no +fi - if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then -$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h +# Check whether --with-included-regex was given. +if test "${with_included_regex+set}" = set; then : + withval=$with_included_regex; gdb_with_regex=$withval +else + gdb_with_regex=$gdb_use_included_regex +fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } +if test "$gdb_with_regex" = yes; 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. */ +$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h -#define _SYSCALL32 -/* Needed for new procfs interface on sparc-solaris. */ -#define _STRUCTURED_PROC 1 -#include +fi + +# Check if defines `struct thread' with a td_pcb member. +ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include +#include + +" +if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_THREAD_TD_PCB 1 +_ACEOF + + +fi + + +# See if defines `struct lwp`. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 +$as_echo_n "checking for struct lwp... " >&6; } +if ${gdb_cv_struct_lwp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#define _KMEMUSER +#include int main () { -prfpregset_t avar +struct lwp l; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset_t=yes + gdb_cv_struct_lwp=yes else - bfd_cv_have_sys_procfs_type_prfpregset_t=no - + gdb_cv_struct_lwp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 +$as_echo "$gdb_cv_struct_lwp" >&6; } +if test $gdb_cv_struct_lwp = yes; then - if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then - -$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h +$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } +fi - { $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 : +# See if degines `struct reg'. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 +$as_echo_n "checking for struct reg in machine/reg.h... " >&6; } +if ${gdb_cv_struct_reg+:} false; 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 +#include +#include int main () { -prgregset32_t avar +struct reg r; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset32_t=yes + gdb_cv_struct_reg=yes else - bfd_cv_have_sys_procfs_type_prgregset32_t=no - + gdb_cv_struct_reg=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 +$as_echo "$gdb_cv_struct_reg" >&6; } +if test $gdb_cv_struct_reg = yes; then + +$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h + fi - if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then +# See if supports the %fs and %gs i386 segment registers. +# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. +ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include +#include +" +if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : -$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_REG_R_FS 1 +_ACEOF - 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 : +fi +ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include +#include +" +if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_REG_R_GS 1 +_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 +#include +" +if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; 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 +#include +" +if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; 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; } +if ${gdb_cv_have_ptrace_getregs+:} false; 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 +#include int main () { -lwpid_t avar +PTRACE_GETREGS; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_lwpid_t=yes + gdb_cv_have_ptrace_getregs=yes else - bfd_cv_have_sys_procfs_type_lwpid_t=no - + gdb_cv_have_ptrace_getregs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 +$as_echo "$gdb_cv_have_ptrace_getregs" >&6; } +if test $gdb_cv_have_ptrace_getregs = yes; then -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h +$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 -$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } - if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : +# See if provides the PTRACE_GETFPXREGS request. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 +$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } +if ${gdb_cv_have_ptrace_getfpxregs+:} false; 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 +#include int main () { -psaddr_t avar +PTRACE_GETFPXREGS; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_psaddr_t=yes + gdb_cv_have_ptrace_getfpxregs=yes else - bfd_cv_have_sys_procfs_type_psaddr_t=no - + gdb_cv_have_ptrace_getfpxregs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 +$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } +if test $gdb_cv_have_ptrace_getfpxregs = yes; then -$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h +$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 -$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } - if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : +# See if provides the PT_GETDBREGS request. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 +$as_echo_n "checking for PT_GETDBREGS... " >&6; } +if ${gdb_cv_have_pt_getdbregs+:} false; 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 +#include +#include int main () { -prsysent_t avar +PT_GETDBREGS; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prsysent_t=yes + gdb_cv_have_pt_getdbregs=yes else - bfd_cv_have_sys_procfs_type_prsysent_t=no - + gdb_cv_have_pt_getdbregs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 +$as_echo "$gdb_cv_have_pt_getdbregs" >&6; } +if test $gdb_cv_have_pt_getdbregs = yes; then -$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h +$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_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 : +# See if provides the PT_GETXMMREGS request. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 +$as_echo_n "checking for PT_GETXMMREGS... " >&6; } +if ${gdb_cv_have_pt_getxmmregs+:} false; 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 +#include +#include int main () { -pr_sigset_t avar +PT_GETXMMREGS; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_sigset_t=yes + gdb_cv_have_pt_getxmmregs=yes else - bfd_cv_have_sys_procfs_type_pr_sigset_t=no - + gdb_cv_have_pt_getxmmregs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 +$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } +if test $gdb_cv_have_pt_getxmmregs = yes; then + +$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h + +fi + +# See if supports LWP names on FreeBSD +# Older FreeBSD versions don't have the pl_tdname member of +# `struct ptrace_lwpinfo'. +ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include +" +if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : -$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 +_ACEOF - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 : +fi + + +# See if supports syscall fields on FreeBSD. The +# pl_syscall_code member of `struct ptrace_lwpinfo' was added in +# FreeBSD 10.3. +ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include +" +if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 +_ACEOF + + +fi + + +if test "$ac_cv_header_sys_procfs_h" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 +$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } + if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14641,31 +15033,31 @@ else int main () { -pr_sigaction64_t avar +gregset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes + bfd_cv_have_sys_procfs_type_gregset_t=yes else - bfd_cv_have_sys_procfs_type_pr_sigaction64_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_pr_sigaction64_t = yes; then + if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then -$as_echo "#define HAVE_PR_SIGACTION64_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_pr_sigaction64_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 -$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } - if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 +$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } + if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14678,77 +15070,257 @@ else int main () { -pr_siginfo64_t avar +fpregset_t avar ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes + bfd_cv_have_sys_procfs_type_fpregset_t=yes else - bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no + bfd_cv_have_sys_procfs_type_fpregset_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then + if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then -$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h +$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_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 ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; 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 () +{ +prgregset_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_prgregset_t=yes +else + 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_prgregset_t = yes; then +$as_echo "#define HAVE_PRGREGSET_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; } - 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 prfpregset_t in sys/procfs.h" >&5 +$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } + if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gdb_cv_prfpregset_t_broken=yes + 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 ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; 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 () - { - if (sizeof (prfpregset_t) == sizeof (void *)) - return 1; - return 0; - } +int +main () +{ +prgregset32_t avar + ; + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_prfpregset_t_broken=no +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_prgregset32_t=yes else - gdb_cv_prfpregset_t_broken=yes + bfd_cv_have_sys_procfs_type_prgregset32_t=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 + + 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 ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; 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 ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; 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 () +{ +psaddr_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_psaddr_t=yes +else + bfd_cv_have_sys_procfs_type_psaddr_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - { $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 + if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then -$as_echo "#define PRFPREGSET_T_BROKEN 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_psaddr_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 +$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } + if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; 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 () +{ +elf_fpregset_t avar + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes +else + bfd_cv_have_sys_procfs_type_elf_fpregset_t=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then + +$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } - 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 : +if ${gdb_cv_c_long_long+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14773,14 +15345,14 @@ fi $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 + as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 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 : +if ${gdb_cv_printf_has_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14826,7 +15398,7 @@ fi { $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 : +if ${gdb_cv_printf_has_decfloat+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14873,7 +15445,7 @@ 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 : +if ${gdb_cv_c_long_double+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14899,7 +15471,7 @@ fi { $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 : +if ${gdb_cv_printf_has_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14941,7 +15513,7 @@ fi { $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 : +if ${gdb_cv_scanf_has_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -14983,7 +15555,7 @@ 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 : +if ${gdb_cv_bigtoc+:} false; then : $as_echo_n "(cached) " >&6 else @@ -15115,7 +15687,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then 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 : + if ${gdb_cv_have_aix_thread_debug+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15151,7 +15723,7 @@ $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } # 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 : +if test "x$ac_cv_have_decl_getthrds" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -15170,7 +15742,7 @@ 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 : +if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15197,7 +15769,7 @@ fi $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 : +if ${gdb_cv_thread_db_h_has_td_version+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15224,7 +15796,7 @@ fi $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 : +if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15268,7 +15840,7 @@ 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 : +if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -15453,12 +16025,58 @@ _ACEOF +# Check whether --with-system-gdbinit-dir was given. +if test "${with_system_gdbinit_dir+set}" = set; then : + withval=$with_system_gdbinit_dir; + SYSTEM_GDBINIT_DIR=$withval +else + SYSTEM_GDBINIT_DIR= +fi + + + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` + ac_define_dir=`eval echo $ac_define_dir` + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_GDBINIT_DIR "$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_DIR_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 ;; + *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; esac fi @@ -15475,11 +16093,19 @@ fi # The options we'll try to enable. build_warnings="-Wall -Wpointer-arith \ --Wno-unused -Wunused-value -Wunused-function \ +-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ -Wno-switch -Wno-char-subscripts \ -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ --Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \ --Wno-mismatched-tags" +-Wno-sign-compare -Wno-error=maybe-uninitialized \ +-Wno-mismatched-tags \ +-Wno-error=deprecated-register \ +-Wsuggest-override \ +-Wimplicit-fallthrough=3 \ +-Wduplicated-cond \ +-Wshadow=local \ +-Wdeprecated-copy \ +-Wdeprecated-copy-dtor \ +-Wredundant-move" case "${host}" in *-*-mingw32*) @@ -15492,7 +16118,10 @@ case "${host}" in build_warnings="$build_warnings -Wno-unknown-pragmas" # Solaris 11 marks vfork deprecated. build_warnings="$build_warnings -Wno-deprecated-declarations" ;; - *) build_warnings="$build_warnings -Wformat-nonliteral" ;; + *) + # Note that gcc requires -Wformat for -Wformat-nonliteral to work, + # but there's a special case for this below. + build_warnings="$build_warnings -Wformat-nonliteral" ;; esac # Check whether --enable-build-warnings was given. @@ -15548,6 +16177,12 @@ $as_echo_n "checking compiler warning flags... " >&6; } case $w in -Wno-*) wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; + -Wformat-nonliteral) + # gcc requires -Wformat before -Wformat-nonliteral + # will work, so stick them together. + w="-Wformat $w" + wtest="$w" + ;; *) wtest=$w ;; esac @@ -15560,7 +16195,30 @@ $as_echo_n "checking compiler warning flags... " >&6; } CFLAGS="$CFLAGS -Werror $wtest" saved_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror $wtest" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$w" = "x-Wunused-variable"; then + # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, + # fixed in GCC 4.9. This test is derived from the gdb + # source code that triggered this bug in GCC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +struct scoped_restore_base {}; + struct scoped_restore_tmpl : public scoped_restore_base { + ~scoped_restore_tmpl() {} + }; +int +main () +{ +const scoped_restore_base &b = scoped_restore_tmpl(); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + WARN_CFLAGS="${WARN_CFLAGS} $w" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15575,6 +16233,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then : WARN_CFLAGS="${WARN_CFLAGS} $w" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi CFLAGS="$saved_CFLAGS" CXXFLAGS="$saved_CXXFLAGS" esac @@ -15593,13 +16252,70 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# 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 +# Check whether --enable-ubsan was given. +if test "${enable_ubsan+set}" = set; then : + enableval=$enable_ubsan; else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + enable_ubsan=no +fi + +if test "x$enable_ubsan" = xauto; then + if $development; then + enable_ubsan=yes + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test "x$enable_ubsan" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 +$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } + saved_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + enable_ubsan=yes +else + enable_ubsan=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CXXFLAGS="$saved_CXXFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 +$as_echo "$enable_ubsan" >&6; } + if test "x$enable_ubsan" = xyes; then + WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" + CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + + +# 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 ${gdb_cv_os_cygwin+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined (__CYGWIN__) || defined (__CYGWIN32__) @@ -15624,6 +16340,7 @@ 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" ;; + *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; esac @@ -15663,7 +16380,7 @@ esac LIBS="-lbfd -liberty -lz $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 : +if ${gdb_cv_var_elf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15702,7 +16419,7 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h 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 : +if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -15736,11 +16453,11 @@ for ac_lib in '' dl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : + if ${ac_cv_search_dlopen+:} false; then : break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no @@ -15774,7 +16491,7 @@ fi LIBS="-lbfd -liberty -lz $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 : +if ${gdb_cv_var_macho+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16239,7 +16956,7 @@ fi { $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 : +if ${ac_cv_liblzma+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16293,7 +17010,7 @@ $as_echo "$LIBLZMA" >&6; } if test "$HAVE_LIBLZMA" != yes; then if test "$with_lzma" = yes; then - as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 + as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 fi fi fi @@ -16345,7 +17062,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 $as_echo_n "checking for Tcl configuration... " >&6; } - if test "${ac_cv_c_tclconfig+set}" = set; then : + if ${ac_cv_c_tclconfig+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16359,7 +17076,7 @@ else if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else - as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 + as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 fi fi @@ -16465,7 +17182,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 $as_echo_n "checking for Tk configuration... " >&6; } - if test "${ac_cv_c_tkconfig+set}" = set; then : + if ${ac_cv_c_tkconfig+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16475,7 +17192,7 @@ else if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else - as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 + as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 fi fi @@ -16658,7 +17375,7 @@ $as_echo_n "checking for Tcl private headers... " >&6; } fi if test x"${private_dir}" = x; then - as_fn_error "could not find private Tcl headers" "$LINENO" 5 + 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 @@ -16767,7 +17484,7 @@ $as_echo_n "checking for Tk private headers... " >&6; } fi if test x"${private_dir}" = x; then - as_fn_error "could not find Tk private headers" "$LINENO" 5 + 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 @@ -16839,8 +17556,8 @@ if test "x$with_x" = xno; then 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_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -16857,7 +17574,7 @@ 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. + # 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 @@ -16943,7 +17660,7 @@ else fi done fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -17119,89 +17836,570 @@ fi -if test x"${gdb_osabi}" != x ; then +if test x"${gdb_osabi}" != x ; then + +cat >>confdefs.h <<_ACEOF +#define GDB_OSABI_DEFAULT $gdb_osabi +_ACEOF + +fi + +# Check whether --enable-gdbserver was given. +if test "${enable_gdbserver+set}" = set; then : + enableval=$enable_gdbserver; case "${enableval}" in + yes| no|auto) ;; + *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; +esac +else + enable_gdbserver=auto +fi + + +# We only build gdbserver automatically in a native configuration, and +# only if the user did not explicitly disable its build. +if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 +$as_echo_n "checking whether gdbserver is supported on this host... " >&6; } + if test "x$build_gdbserver" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + subdirs="$subdirs gdbserver" + + gdbserver_build_enabled=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +fi + +# If the user explicitly request the gdbserver to be built, verify that +# we were in fact able to enable it. +if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then + as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 +fi + +# Check for babeltrace and babeltrace-ctf + +# Check whether --with-babeltrace was given. +if test "${with_babeltrace+set}" = set; then : + withval=$with_babeltrace; +else + with_babeltrace=auto +fi + +{ $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" + + + + + + + + + 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-libbabeltrace-prefix was given. +if test "${with_libbabeltrace_prefix+set}" = set; then : + withval=$with_libbabeltrace_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi + + LIBBABELTRACE= + LTLIBBABELTRACE= + INCBABELTRACE= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='babeltrace babeltrace-ctf' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBBABELTRACE; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBBABELTRACE; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + else + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" + else + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCBABELTRACE; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBBABELTRACE; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBBABELTRACE; do + + 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 + + + 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" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 +$as_echo_n "checking for libbabeltrace... " >&6; } +if ${ac_cv_libbabeltrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + + 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; + + pos->type = BT_SEEK_BEGIN; + bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); + 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_OSABI_DEFAULT $gdb_osabi + ; + return 0; +} _ACEOF - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_libbabeltrace=yes +else + ac_cv_libbabeltrace=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" -# 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 +{ $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 -if test "x$enable_multi_ice" = xyes; then - subdirs="$subdirs multi-ice" +$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h -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 -# Check whether --enable-gdbserver was given. -if test "${enable_gdbserver+set}" = set; then : - enableval=$enable_gdbserver; case "${enableval}" in - yes| no|auto) ;; - *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; -esac -else - enable_gdbserver=auto -fi -# We only build gdbserver automatically in a native configuration, and -# only if the user did not explicitly disable its build. -if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 -$as_echo_n "checking whether gdbserver is supported on this host... " >&6; } - if test "x$build_gdbserver" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - subdirs="$subdirs gdbserver" - gdbserver_build_enabled=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi -fi -# If the user explicitly request the gdbserver to be built, verify that -# we were in fact able to enable it. -if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then - as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 + + CFLAGS=$saved_CFLAGS + + 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 -# Check for babeltrace and babeltrace-ctf +# Check for xxhash -# Check whether --with-babeltrace was given. -if test "${with_babeltrace+set}" = set; then : - withval=$with_babeltrace; +# Check whether --with-xxhash was given. +if test "${with_xxhash+set}" = set; then : + withval=$with_xxhash; else - with_babeltrace=auto + with_xxhash=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" +if test "x$with_xxhash" != "xno"; then @@ -17224,9 +18422,9 @@ else prefix="$acl_save_prefix" -# Check whether --with-libbabeltrace-prefix was given. -if test "${with_libbabeltrace_prefix+set}" = set; then : - withval=$with_libbabeltrace_prefix; +# Check whether --with-libxxhash-prefix was given. +if test "${with_libxxhash_prefix+set}" = set; then : + withval=$with_libxxhash_prefix; if test "X$withval" = "Xno"; then use_additional=no else @@ -17251,13 +18449,13 @@ if test "${with_libbabeltrace_prefix+set}" = set; then : fi - LIBBABELTRACE= - LTLIBBABELTRACE= - INCBABELTRACE= + LIBXXHASH= + LTLIBXXHASH= + INCXXHASH= rpathdirs= ltrpathdirs= names_already_handled= - names_next_round='babeltrace babeltrace-ctf' + names_next_round='xxhash ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= @@ -17276,9 +18474,9 @@ fi if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" - test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" + test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" + test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" else : fi @@ -17305,7 +18503,7 @@ fi fi fi if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBBABELTRACE; do + for x in $LDFLAGS $LTLIBXXHASH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -17341,10 +18539,10 @@ fi done fi if test "X$found_dir" != "X"; then - LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" + LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-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" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" else haveit= for x in $ltrpathdirs; do @@ -17357,10 +18555,10 @@ fi ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then @@ -17373,7 +18571,7 @@ fi fi else haveit= - for x in $LDFLAGS $LIBBABELTRACE; do + for x in $LDFLAGS $LIBXXHASH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -17389,21 +18587,21 @@ fi fi done if test -z "$haveit"; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" else - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" else - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" fi fi additional_includedir= @@ -17424,7 +18622,7 @@ fi fi fi if test -z "$haveit"; then - for x in $CPPFLAGS $INCBABELTRACE; do + for x in $CPPFLAGS $INCXXHASH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -17441,7 +18639,7 @@ fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then - INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" + INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" fi fi fi @@ -17469,7 +18667,7 @@ fi fi if test -z "$haveit"; then haveit= - for x in $LDFLAGS $LIBBABELTRACE; do + for x in $LDFLAGS $LIBXXHASH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -17486,11 +18684,11 @@ fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" fi fi haveit= - for x in $LDFLAGS $LTLIBBABELTRACE; do + for x in $LDFLAGS $LTLIBXXHASH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -17507,7 +18705,7 @@ fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then - LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" + LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" fi fi fi @@ -17545,15 +18743,15 @@ fi 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" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" + LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" ;; esac done fi else - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" - LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" + LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" fi fi fi @@ -17569,27 +18767,27 @@ fi libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" - LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$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" + LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do - LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" + LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" done fi ac_save_CPPFLAGS="$CPPFLAGS" - for element in $INCBABELTRACE; do + for element in $INCXXHASH; do haveit= for x in $CPPFLAGS; do @@ -17612,62 +18810,52 @@ fi done - { $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 "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 +$as_echo_n "checking for libxxhash... " >&6; } +if ${ac_cv_libxxhash+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIBBABELTRACE" + LIBS="$LIBS $LIBXXHASH" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #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; - - pos->type = BT_SEEK_BEGIN; - bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); - scope = bt_ctf_get_top_level_scope (event, - BT_STREAM_EVENT_HEADER); - bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); +XXH32("foo", 3, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_libbabeltrace=yes + ac_cv_libxxhash=yes else - ac_cv_libbabeltrace=no + ac_cv_libxxhash=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 -$as_echo "$ac_cv_libbabeltrace" >&6; } - if test "$ac_cv_libbabeltrace" = yes; then - HAVE_LIBBABELTRACE=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 +$as_echo "$ac_cv_libxxhash" >&6; } + if test "$ac_cv_libxxhash" = yes; then + HAVE_LIBXXHASH=yes -$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h +$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h - { $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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 +$as_echo_n "checking how to link with libxxhash... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 +$as_echo "$LIBXXHASH" >&6; } else - HAVE_LIBBABELTRACE=no + HAVE_LIBXXHASH=no CPPFLAGS="$ac_save_CPPFLAGS" - LIBBABELTRACE= - LTLIBBABELTRACE= + LIBXXHASH= + LTLIBXXHASH= fi @@ -17675,47 +18863,47 @@ $as_echo "$LIBBABELTRACE" >&6; } - CFLAGS=$saved_CFLAGS - - 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 + if test "$HAVE_LIBXXHASH" != yes; then + if test "$with_xxhash" = yes; then + as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 + fi + fi + if test "x$with_xxhash" = "xauto"; then + with_xxhash="$HAVE_LIBXXHASH" fi fi -# If nativefile (NAT_FILE) is not set in configure.nat, we link to an -# empty version. - -files= -links= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 +$as_echo_n "checking whether to use xxhash... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 +$as_echo "$with_xxhash" >&6; } +NM_H= rm -f nm.h if test "${nativefile}" != ""; then case "${nativefile}" in nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; * ) GDB_NM_FILE="${nativefile}" esac - files="${files} ${GDB_NM_FILE}" - links="${links} nm.h" + ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" + cat >>confdefs.h <<_ACEOF #define GDB_NM_FILE "${GDB_NM_FILE}" _ACEOF + NM_H=nm.h fi + for ac_prog in xsltproc 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_path_XSLTPROC+set}" = set; then : +if ${ac_cv_path_XSLTPROC+:} false; then : $as_echo_n "(cached) " >&6 else case $XSLTPROC in @@ -17729,7 +18917,7 @@ 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 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$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 @@ -17757,36 +18945,48 @@ test -n "$XSLTPROC" || XSLTPROC="missing" if test "x$USE_MAINTAINER_MODE" = xyes; then if test "${XSLTPROC}" = missing; then - as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 + as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 fi fi -ac_sources="$files" -ac_dests="$links" -while test -n "$ac_sources"; do - set $ac_dests; ac_dest=$1; shift; ac_dests=$* - set $ac_sources; ac_source=$1; shift; ac_sources=$* - ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" -done -ac_config_links="$ac_config_links $ac_config_links_1" +$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h + -$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h +# Check whether we will enable the inclusion of unit tests when +# compiling GDB. +# +# The default value of this option changes depending whether we're on +# development mode (in which case it's "true") or not (in which case +# it's "false"). +# Check whether --enable-unit-tests was given. +if test "${enable_unit_tests+set}" = set; then : + enableval=$enable_unit_tests; case "${enableval}" in + yes) enable_unittests=true ;; + no) enable_unittests=false ;; + *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; +esac +else + enable_unittests=$development +fi -if $development; then +if $enable_unittests; then $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h - CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)" - CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)" + + CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o" + CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c" + fi + gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` if test "x$GDB_TRANSFORM_NAME" = x; then @@ -17804,7 +19004,7 @@ 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_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" cat >confcache <<\_ACEOF @@ -17871,10 +19071,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -17890,6 +19101,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -17905,20 +19117,20 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then - as_fn_error "conditional \"HAVE_PYTHON\" was never defined. + as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then - as_fn_error "conditional \"HAVE_GUILE\" was never defined. + as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -18019,6 +19231,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -18064,19 +19277,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -18214,16 +19427,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -18272,7 +19485,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -18283,28 +19496,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18326,7 +19527,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18367,6 +19568,7 @@ Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -18392,12 +19594,13 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18414,11 +19617,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -18432,12 +19640,15 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -18450,7 +19661,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -18459,7 +19670,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -18479,7 +19690,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -18504,6 +19715,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # INIT-COMMANDS # ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR +GDB_NM_FILE=$GDB_NM_FILE _ACEOF @@ -18516,14 +19728,15 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; - "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; + "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; + "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -18547,9 +19760,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -18557,12 +19771,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -18596,24 +19811,24 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { @@ -18621,18 +19836,18 @@ rm -f conf$$files.sh echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -18640,7 +19855,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -18654,7 +19869,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -18668,7 +19883,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -18688,7 +19903,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -18726,21 +19941,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -18752,7 +19975,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -18764,11 +19987,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -18853,7 +20076,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -18866,7 +20089,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -18885,7 +20108,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -18894,7 +20117,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -18920,8 +20143,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -19053,26 +20276,27 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" + $AWK -f "$ac_tmp/subs.awk" else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -19081,21 +20305,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; :L) @@ -19115,19 +20339,19 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then - as_fn_error "$ac_source: file not found" "$LINENO" 5 + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. - case $srcdir in + case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || - as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 @@ -19137,32 +20361,10 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "config.h":H) echo > stamp-h ;; "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; + "nm.h":L) echo > stamp-nmh ;; "gcore":F) chmod +x gcore ;; - "Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "gdb-gdb.gdb":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "doc/Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; - "data-directory/Makefile":F) -case x$CONFIG_HEADERS in -xconfig.h:config.in) -echo > stamp-h ;; -esac - ;; esac done # for ac_tag @@ -19173,7 +20375,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -19194,7 +20396,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi # @@ -19335,7 +20537,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach # 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 + as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir"