diff options
author | kan <kan@FreeBSD.org> | 2007-05-19 02:12:21 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-05-19 02:12:21 +0000 |
commit | cadd557b2c028e9d17846ceb76b7abe3b967db5d (patch) | |
tree | b4d827b7febdefd02ed5f510413d9d8c8f76ab39 /contrib/gcc/configure | |
parent | cbd790c8d27189110c36da6503196f44d88a5860 (diff) | |
download | FreeBSD-src-cadd557b2c028e9d17846ceb76b7abe3b967db5d.zip FreeBSD-src-cadd557b2c028e9d17846ceb76b7abe3b967db5d.tar.gz |
FreeBSD uses unchanged versions of this files.
Diffstat (limited to 'contrib/gcc/configure')
-rwxr-xr-x | contrib/gcc/configure | 7211 |
1 files changed, 5635 insertions, 1576 deletions
diff --git a/contrib/gcc/configure b/contrib/gcc/configure index 91f9326..a248d39 100755 --- a/contrib/gcc/configure +++ b/contrib/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -770,6 +770,14 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_GMPLIBS_set=${GMPLIBS+set} +ac_env_GMPLIBS_value=$GMPLIBS +ac_cv_env_GMPLIBS_set=${GMPLIBS+set} +ac_cv_env_GMPLIBS_value=$GMPLIBS +ac_env_GMPINC_set=${GMPINC+set} +ac_env_GMPINC_value=$GMPINC +ac_cv_env_GMPINC_set=${GMPINC+set} +ac_cv_env_GMPINC_value=$GMPINC # # Report the --help message. @@ -854,14 +862,17 @@ Optional Features: put copies of generated files in source dir intended for creating source tarballs for users without texinfo bison or flex. + --enable-werror-always enable -Werror always --enable-werror enable -Werror in bootstrap stage2 and later --enable-checking=LIST enable expensive run-time checks. With LIST, enable only specific categories of checks. - Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold; - default is no checking + Categories are: yes,no,all,none,release. + Flags are: assert,fold,gc,gcac,misc, + rtlflag,rtl,runtime,tree,valgrind. + --enable-mapped-location location_t is fileline integer cookie --enable-coverage=LEVEL - enable compiler\'s code coverage collection. + enable compiler's code coverage collection. Use to measure compiler performance and locate unused parts of the compiler. With LEVEL, specify optimization. Values are opt, noopt, @@ -869,15 +880,21 @@ Optional Features: --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering --enable-multilib enable library support for multiple ABIs --enable-__cxa_atexit enable __cxa_atexit for C++ + --enable-decimal-float enable decimal float extension to C --enable-threads enable thread usage for target GCC --enable-threads=LIB use LIB thread package for target GCC + --enable-tls enable or disable generation of tls code + overriding the assembler check for tls support --enable-objc-gc enable the use of Boehm's garbage collector with the GNU Objective-C runtime --disable-shared don't provide a shared libgcc --enable-intermodule build the compiler in one step + --enable-languages=LIST specify which front-ends to build + --disable-rpath do not hardcode runtime library paths --enable-initfini-array use .init_array/.fini_array sections --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling + --enable-secureplt enable -msecure-plt by default for PowerPC --disable-win32-registry disable lookup of installation paths in the Registry on Windows hosts @@ -895,6 +912,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-build-libsubdir=DIR Directory where to find libraries for build system --with-local-prefix=DIR specifies directory to put local include --with-gxx-include-dir=DIR specifies directory to put g++ header files @@ -903,17 +921,26 @@ Optional Packages: (relative to PREFIX) as well as PREFIX/bin --with-gnu-ld arrange to work with GNU ld. --with-ld arrange to use the specified ld (full pathname) + --with-demangler-in-ld try to use demangler in GNU ld. --with-gnu-as arrange to work with GNU as --with-as arrange to use the specified as (full pathname) --with-stabs arrange to use stabs instead of host debug format --with-dwarf2 force the default debug format to be DWARF 2 + --with-build-sysroot=sysroot + use sysroot as the system root during the build --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. - --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-system-libunwind use installed libunwind - --with-gc={simple,page,zone} choose the garbage collection mechanism to use + --with-long-double-128 Use 128-bit long double by default. + --with-gc={page,zone} choose the garbage collection mechanism to use with the compiler --with-system-zlib use installed libz - --with-slibdir=DIR shared libraries in DIR LIBDIR + --with-slibdir=DIR shared libraries in DIR [LIBDIR] + --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] + --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] + --with-htmldir=DIR html documentation in in DIR [DOCDIR] Some influential environment variables: CC C compiler command @@ -923,6 +950,8 @@ Some influential environment variables: CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor + GMPLIBS How to link GMP + GMPINC How to find GMP include files Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1366,6 +1395,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers auto-host.h:config.in" +gcc_version=`cat $srcdir/BASE-VER` + # Determine the host, build, and target systems ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -1492,11 +1523,36 @@ esac esac + + # Determine the target- and build-specific subdirectories - # Prefix 'build-' so this never conflicts with target_subdir. + +# post-stage1 host modules use a different CC_FOR_BUILD so, in order to +# have matching libraries, they should use host libraries: Makefile.tpl +# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). +# However, they still use the build modules, because the corresponding +# host modules (e.g. bison) are only built for the host when bootstrap +# finishes. So: +# - build_subdir is where we find build modules, and never changes. +# - build_libsubdir is where we find build libraries, and can be overridden. + +# Prefix 'build-' so this never conflicts with target_subdir. build_subdir="build-${build_noncanonical}" -# Not really a subdirectory, but here for completeness. -host_subdir=. + +# Check whether --with-build-libsubdir or --without-build-libsubdir was given. +if test "${with_build_libsubdir+set}" = set; then + withval="$with_build_libsubdir" + build_libsubdir="$withval" +else + build_libsubdir="$build_subdir" +fi; +# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories +if ( test $srcdir = . && test -d gcc ) \ + || test -d $srcdir/../host-${host_noncanonical}; then + host_subdir="host-${host_noncanonical}" +else + host_subdir=. +fi # No prefix. target_subdir=${target_noncanonical} @@ -1621,12 +1677,16 @@ no) ;; esac fi; +# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. if test x${gcc_gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then gcc_gxx_include_dir='${libsubdir}/include/c++' else - topsrcdir=${srcdir}/.. . ${srcdir}/../config.if - gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} + libstdcxx_incdir='include/c++/$(version)' + if test x$host != x$target; then + libstdcxx_incdir="$target_alias/$libstdcxx_incdir" + fi + gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" fi fi @@ -1692,8 +1752,9 @@ if test "${with_ld+set}" = set; then fi; if test x"${DEFAULT_LINKER+set}" = x"set"; then if test ! -x "$DEFAULT_LINKER"; then - { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 -echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} + { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 +echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} + { (exit 1); exit 1; }; } elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then gnu_ld_flag=yes fi @@ -1719,6 +1780,16 @@ else echo "${ECHO_T}no" >&6 fi +# With demangler in GNU ld + +# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. +if test "${with_demangler_in_ld+set}" = set; then + withval="$with_demangler_in_ld" + demangler_in_ld="$with_demangler_in_ld" +else + demangler_in_ld=no +fi; + # ---------------------- # Find default assembler # ---------------------- @@ -1741,8 +1812,9 @@ if test "${with_as+set}" = set; then fi; if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test ! -x "$DEFAULT_ASSEMBLER"; then - { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 -echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} + { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 +echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} + { (exit 1); exit 1; }; } elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then gas_flag=yes fi @@ -2802,6 +2874,22 @@ _ACEOF fi +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + # autoconf is lame and doesn't give us any substitution variable for this. if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then NO_MINUS_C_MINUS_O=yes @@ -2811,68 +2899,18 @@ fi +# Remove the -O2: for historical reasons, unless bootstrapping we prefer +# optimizations to be activated explicitly by the toplevel. +case "$CC" in + */prev-gcc/xgcc*) ;; + *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; +esac + + # ------------------------- # Check C compiler features # ------------------------- - -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_no_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - save_CFLAGS="$CFLAGS" -CFLAGS="-Wno-long-long" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_no_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_no_long_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$save_CFLAGS" -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6 - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3107,6 +3145,7 @@ 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 + echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then @@ -3179,9 +3218,26 @@ _ACEOF esac -echo "$as_me:$LINENO: checking for long long int" >&5 -echo $ECHO_N "checking for long long int... $ECHO_C" >&6 -if test "${ac_cv_c_long_long+set}" = set; then +# sizeof(char) is 1 by definition. + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3190,11 +3246,15 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> int main () { -long long int i; + ; return 0; } @@ -3221,28 +3281,61 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_long_long=yes + ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_long_long=no +ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi -echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 -echo "${ECHO_T}$ac_cv_c_long_long" >&6 - if test $ac_cv_c_long_long = yes; then +rm -f conftest* -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG 1 +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> - fi -echo "$as_me:$LINENO: checking for __int64" >&5 -echo $ECHO_N "checking for __int64... $ECHO_C" >&6 -if test "${ac_cv_c___int64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3250,15 +3343,93 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include <ctype.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -__int64 i; - ; - return 0; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); } _ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 @@ -3281,28 +3452,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c___int64=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c___int64=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 -echo "${ECHO_T}$ac_cv_c___int64" >&6 - if test $ac_cv_c___int64 = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE___INT64 1 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - fi +fi -echo "$as_me:$LINENO: checking for built-in _Bool" >&5 -echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6 -if test "${gcc_cv_c__bool+set}" = set; then +done + + +echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6 +if test "${ac_cv_type_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3311,11 +3484,14 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +$ac_includes_default int main () { -_Bool foo; +if ((void * *) 0) + return 0; +if (sizeof (void *)) + return 0; ; return 0; } @@ -3342,48 +3518,182 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gcc_cv_c__bool=yes + ac_cv_type_void_p=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_c__bool=no +ac_cv_type_void_p=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5 -echo "${ECHO_T}$gcc_cv_c__bool" >&6 -if test $gcc_cv_c__bool = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE__BOOL 1 -_ACEOF - fi +echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6 - -# sizeof(char) is 1 by definition. echo "$as_me:$LINENO: checking size of void *" >&5 echo $ECHO_N "checking size of void *... $ECHO_C" >&6 if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat >conftest.$ac_ext <<_ACEOF + if test "$ac_cv_type_void_p" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (void *) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3410,51 +3720,394 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=$ac_size + ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_void_p != x ; then break; fi -done + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 -if test x$ac_cv_sizeof_void_p = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5 -echo "$as_me: error: cannot determine a size for void *" >&2;} + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (void *)); } +unsigned long ulongval () { return (long) (sizeof (void *)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (void *))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (void *)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (void *)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_void_p=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_void_p=0 +fi +fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 - cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF +echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_short=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat >conftest.$ac_ext <<_ACEOF + if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (short) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3481,51 +4134,296 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=$ac_size + ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_short != x ; then break; fi -done + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test x$ac_cv_sizeof_short = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 -echo "$as_me: error: cannot determine a size for short" >&2;} +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_short=0 +fi +fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 - cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF +echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_int=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat >conftest.$ac_ext <<_ACEOF + if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> - +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (int) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3552,51 +4450,143 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_int=$ac_size + ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_int != x ; then break; fi -done - -fi + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test x$ac_cv_sizeof_int = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 -echo "$as_me: error: cannot determine a size for int" >&2;} - { (exit 1); exit 1; }; } -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> - - +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (long) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3623,52 +4613,127 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long=$ac_size + ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_long != x ; then break; fi done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ -fi + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test x$ac_cv_sizeof_long = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 -echo "$as_me: error: cannot determine a size for long" >&2;} +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_int=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -if test $ac_cv_c_long_long = yes; then - echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long_long+set}" = set; then +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> - - +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (long long) == $ac_size):; +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; ; return 0; } @@ -3695,53 +4760,182 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=$ac_size + ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_long_long != x ; then break; fi -done - fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 -if test x$ac_cv_sizeof_long_long = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5 -echo "$as_me: error: cannot determine a size for long long" >&2;} - { (exit 1); exit 1; }; } -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -if test $ac_cv_c___int64 = yes; then - echo "$as_me:$LINENO: checking size of __int64" >&5 -echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 -if test "${ac_cv_sizeof___int64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "confdefs.h" -#include <sys/types.h> - +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (__int64) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3768,319 +4962,835 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof___int64=$ac_size + ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof___int64 != x ; then break; fi -done + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= fi - -if test x$ac_cv_sizeof___int64 = x ; then - { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5 -echo "$as_me: error: cannot determine a size for __int64" >&2;} - { (exit 1); exit 1; }; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 -echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 - -cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ -# ----------------- -# Find Ada compiler -# ----------------- - -# See if GNAT has been installed - - + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. -set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_GNATBIND+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$GNATBIND"; then - ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -GNATBIND=$ac_cv_prog_GNATBIND -if test -n "$GNATBIND"; then - echo "$as_me:$LINENO: result: $GNATBIND" >&5 -echo "${ECHO_T}$GNATBIND" >&6 +rm -f conftest.val else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_sizeof_long=0 fi - fi -if test -z "$ac_cv_prog_GNATBIND"; then - ac_ct_GNATBIND=$GNATBIND - # Extract the first word of "gnatbind", so it can be a program name with args. -set dummy gnatbind; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_GNATBIND"; then - ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_GNATBIND="gnatbind" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no" +ac_cv_type_long_long=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND -if test -n "$ac_ct_GNATBIND"; then - echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5 -echo "${ECHO_T}$ac_ct_GNATBIND" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 +if test $ac_cv_type_long_long = yes; then - GNATBIND=$ac_ct_GNATBIND -else - GNATBIND="$ac_cv_prog_GNATBIND" -fi +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF -echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5 -echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6 -if test "${gcc_cv_cc_supports_ada+set}" = set; then +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.adb <<EOF -procedure conftest is begin null; end conftest; -EOF -gcc_cv_cc_supports_ada=no -# There is a bug in old released versions of GCC which causes the -# driver to exit successfully when the appropriate language module -# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. -# Therefore we must check for the error message as well as an -# unsuccessful exit. -# Other compilers, like HP Tru64 UNIX cc, exit successfully when -# given a .adb file, but produce no object file. So we must check -# if an object file was really produced to guard against this. -errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` -if test x"$errors" = x && test -f conftest.$ac_objext; then - gcc_cv_cc_supports_ada=yes - break + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_long=no fi -rm -f conftest.* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_cc_supports_ada" >&5 -echo "${ECHO_T}$gcc_cv_cc_supports_ada" >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 -if test x$GNATBIND != xno && test x$gcc_cv_cc_supports_ada != xno; then - have_gnat=yes +echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - have_gnat=no -fi + if test "$ac_cv_type_long_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 -# --------------------- -# Warnings and checking -# --------------------- + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -strict1_warn= -if test $ac_cv_prog_cc_no_long_long = yes ; then - strict1_warn="-pedantic -Wno-long-long" +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +test_array [0] = 0 -# If the native compiler is GCC, we can enable warnings even in stage1. -# That's useful for people building cross-compilers, or just running a -# quick `make'. -warn_cflags= -if test "x$GCC" = "xyes"; then - warn_cflags='$(GCC_WARN_CFLAGS)' -fi - + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +test_array [0] = 0 -# Enable -Werror in bootstrap stage2 and later. -# Change the default to "no" on release branches. -# Check whether --enable-werror or --disable-werror was given. -if test "${enable_werror+set}" = set; then - enableval="$enable_werror" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done else - enable_werror=no -fi; -if test x$enable_werror = xyes ; then - WERROR=-Werror + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Enable expensive internal checks -# Check whether --enable-checking or --disable-checking was given. -if test "${enable_checking+set}" = set; then - enableval="$enable_checking" - ac_checking= -ac_tree_checking= -ac_rtl_checking= -ac_rtlflag_checking= -ac_gc_checking= -ac_gc_always_collect= -ac_fold_checking= -case "${enableval}" in -yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; - ac_rtlflag_checking=1 ;; -no) ;; -*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," - set fnord $enableval; shift - IFS="$ac_save_IFS" - for check - do - case $check in - misc) ac_checking=1 ;; - tree) ac_tree_checking=1 ;; - rtlflag) ac_rtlflag_checking=1 ;; - rtl) ac_rtl_checking=1 ;; - gc) ac_gc_checking=1 ;; - gcac) ac_gc_always_collect=1 ;; - fold) ac_fold_checking=1 ;; - valgrind) ac_checking_valgrind=1 ;; - *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 -echo "$as_me: error: unknown check category $check" >&2;} +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; - esac - done - ;; esac - else - # By default, disable all checks for release versions of GCC. -ac_checking=; ac_tree_checking=; ac_gc_checking=; ac_rtlflag_checking=; -fi; -nocommon_flag="" -if test x$ac_checking != x ; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_CHECKING 1 + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long long)); } +unsigned long ulongval () { return (long) (sizeof (long long)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ - nocommon_flag=-fno-common -fi - -if test x$ac_tree_checking != x ; then + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); -cat >>confdefs.h <<\_ACEOF -#define ENABLE_TREE_CHECKING 1 + ; + return 0; +} _ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -if test x$ac_rtl_checking != x ; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_RTL_CHECKING 1 -_ACEOF - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test x$ac_rtlflag_checking != x ; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_RTL_FLAG_CHECKING 1 -_ACEOF - fi -if test x$ac_gc_checking != x ; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_GC_CHECKING 1 -_ACEOF - +rm -f conftest.val +else + ac_cv_sizeof_long_long=0 fi -if test x$ac_gc_always_collect != x ; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_GC_ALWAYS_COLLECT 1 +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF + fi -if test x$ac_fold_checking != x ; then -cat >>confdefs.h <<\_ACEOF -#define ENABLE_FOLD_CHECKING 1 +echo "$as_me:$LINENO: checking for __int64" >&5 +echo $ECHO_N "checking for __int64... $ECHO_C" >&6 +if test "${ac_cv_type___int64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((__int64 *) 0) + return 0; +if (sizeof (__int64)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type___int64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type___int64=no fi -valgrind_path_defines= -valgrind_command= +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 +echo "${ECHO_T}$ac_cv_type___int64" >&6 +if test $ac_cv_type___int64 = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE___INT64 1 +_ACEOF -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +echo "$as_me:$LINENO: checking for __int64" >&5 +echo $ECHO_N "checking for __int64... $ECHO_C" >&6 +if test "${ac_cv_type___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((__int64 *) 0) + return 0; +if (sizeof (__int64)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type___int64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type___int64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 +echo "${ECHO_T}$ac_cv_type___int64" >&6 -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then +echo "$as_me:$LINENO: checking size of __int64" >&5 +echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 +if test "${ac_cv_sizeof___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$ac_cv_type___int64" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; +test_array [0] = 0 ; return 0; @@ -4108,61 +5818,193 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_header_stdc=yes + ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <string.h> +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; +test_array [0] = 0 + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break else - ac_cv_header_stdc=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdlib.h> +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid else - ac_cv_header_stdc=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof___int64=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (__int64), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else if test "$cross_compiling" = yes; then - : + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4170,28 +6012,36 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <ctype.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +$ac_includes_default +long longval () { return (long) (sizeof (__int64)); } +unsigned long ulongval () { return (long) (sizeof (__int64)); } +#include <stdio.h> +#include <stdlib.h> int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (__int64))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (__int64)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (__int64)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext @@ -4205,57 +6055,223 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - : + ac_cv_sizeof___int64=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_header_stdc=no +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (__int64), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi +rm -f conftest.val +else + ac_cv_sizeof___int64=0 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 +echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF___INT64 $ac_cv_sizeof___int64 +_ACEOF -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 + +fi + + +# --------------------- +# Warnings and checking +# --------------------- + +# Check $CC warning features (if it's GCC). +# We want to use -pedantic, but we don't want warnings about +# * 'long long' +# * variadic macros +# * overlong strings +# So, we only use -pedantic if we can disable those warnings. + +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wno-long-long" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_w_no_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_w_no_long_long=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wno-variadic-macros" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_w_no_variadic_macros=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_w_no_variadic_macros=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wno-overlength-strings" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_w_no_overlength_strings=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_w_no_overlength_strings=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +strict1_warn= +if test $ac_cv_prog_cc_w_no_long_long = yes \ + && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ + && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then + strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" +fi + +# Add -Wold-style-definition if it's accepted +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wold-style-definition" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4279,26 +6295,320 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + ac_cv_prog_cc_w_old_style_definition=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" +ac_cv_prog_cc_w_old_style_definition=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 +if test $ac_cv_prog_cc_w_old_style_definition = yes ; then + strict1_warn="${strict1_warn} -Wold-style-definition" +fi + +# Add -Wmissing-format-attribute if it's accepted +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wmissing-format-attribute" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_w_missing_format_attribute=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_w_missing_format_attribute=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 +if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then + strict1_warn="${strict1_warn} -Wmissing-format-attribute" fi +# Enable -Werror, period. +# Check whether --enable-werror_always or --disable-werror_always was given. +if test "${enable_werror_always+set}" = set; then + enableval="$enable_werror_always" + +else + enable_werror_always=no +fi; +if test x${enable_werror_always} = xyes ; then + strict1_warn="${strict1_warn} -Werror" + WERROR=-Werror +fi + + + +# Get C++ compatibility warning flag, if supported. +echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="-Wc++-compat" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_w_cxx_compat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_w_cxx_compat=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6 +if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then + cxx_compat_warn="-Wc++-compat" +fi + + + +# If the native compiler is GCC, we can enable warnings even in stage1. +# That's useful for people building cross-compilers, or just running a +# quick `make'. +warn_cflags= +if test "x$GCC" = "xyes"; then + warn_cflags='$(GCC_WARN_CFLAGS)' +fi + + +# Enable -Werror in bootstrap stage2 and later. +is_release= +if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then + is_release=yes +fi +# Check whether --enable-werror or --disable-werror was given. +if test "${enable_werror+set}" = set; then + enableval="$enable_werror" + +else + if test x$is_release = x ; then + # Default to "yes" on development branches. + enable_werror=yes +else + # Default to "no" on release branches. + enable_werror=no +fi +fi; +if test x$enable_werror = xyes ; then + WERROR=-Werror +fi + + +# Enable expensive internal checks +# Check whether --enable-checking or --disable-checking was given. +if test "${enable_checking+set}" = set; then + enableval="$enable_checking" + ac_checking_flags="${enableval}" +else + +# Determine the default checks. +if test x$is_release = x ; then + ac_checking_flags=yes +else + ac_checking_flags=release +fi +fi; +ac_assert_checking=1 +ac_checking= +ac_fold_checking= +ac_gc_checking= +ac_gc_always_collect= +ac_rtl_checking= +ac_rtlflag_checking= +ac_runtime_checking=1 +ac_tree_checking= +ac_valgrind_checking= +IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," +for check in $ac_checking_flags +do + case $check in + # these set all the flags to specific states + yes) ac_assert_checking=1 ; ac_checking=1 ; + ac_fold_checking= ; ac_gc_checking=1 ; + ac_gc_always_collect= ; ac_rtl_checking= ; + ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; + ac_tree_checking=1 ; ac_valgrind_checking= ;; + no|none) ac_assert_checking= ; ac_checking= ; + ac_fold_checking= ; ac_gc_checking= ; + ac_gc_always_collect= ; ac_rtl_checking= ; + ac_rtlflag_checking= ; ac_runtime_checking= ; + ac_tree_checking= ; ac_valgrind_checking= ;; + all) ac_assert_checking=1 ; ac_checking=1 ; + ac_fold_checking=1 ; ac_gc_checking=1 ; + ac_gc_always_collect=1 ; ac_rtl_checking=1 ; + ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; + ac_tree_checking=1 ; ac_valgrind_checking= ;; + release) ac_assert_checking=1 ; ac_checking= ; + ac_fold_checking= ; ac_gc_checking= ; + ac_gc_always_collect= ; ac_rtl_checking= ; + ac_rtlflag_checking= ; ac_runtime_checking=1 ; + ac_tree_checking= ; ac_valgrind_checking= ;; + # these enable particular checks + assert) ac_assert_checking=1 ;; + fold) ac_fold_checking=1 ;; + gc) ac_gc_checking=1 ;; + gcac) ac_gc_always_collect=1 ;; + misc) ac_checking=1 ;; + rtl) ac_rtl_checking=1 ;; + rtlflag) ac_rtlflag_checking=1 ;; + runtime) ac_runtime_checking=1 ;; + tree) ac_tree_checking=1 ;; + valgrind) ac_valgrind_checking=1 ;; + *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 +echo "$as_me: error: unknown check category $check" >&2;} + { (exit 1); exit 1; }; } ;; + esac done +IFS="$ac_save_IFS" + +nocommon_flag="" +if test x$ac_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_CHECKING 1 +_ACEOF + + nocommon_flag=-fno-common +fi + +if test x$ac_assert_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_ASSERT_CHECKING 1 +_ACEOF + +fi + +if test x$ac_runtime_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_RUNTIME_CHECKING 1 +_ACEOF + +fi +if test x$ac_tree_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_TREE_CHECKING 1 +_ACEOF + + TREEBROWSER=tree-browser.o +fi + +if test x$ac_rtl_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_RTL_CHECKING 1 +_ACEOF + +fi +if test x$ac_rtlflag_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_RTL_FLAG_CHECKING 1 +_ACEOF + +fi +if test x$ac_gc_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_GC_CHECKING 1 +_ACEOF +fi +if test x$ac_gc_always_collect != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_GC_ALWAYS_COLLECT 1 +_ACEOF + +fi +if test x$ac_fold_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_FOLD_CHECKING 1 +_ACEOF + +fi +valgrind_path_defines= +valgrind_command= if test "${ac_cv_header_valgrind_h+set}" = set; then echo "$as_me:$LINENO: checking for valgrind.h" >&5 @@ -4445,7 +6755,7 @@ fi -if test x$ac_checking_valgrind != x ; then +if test x$ac_valgrind_checking != x ; then # It is certainly possible that there's valgrind but no valgrind.h. # GCC relies on making annotations so we must have both. echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 @@ -4630,22 +6940,42 @@ fi +# Check whether --enable-mapped-location or --disable-mapped-location was given. +if test "${enable_mapped_location+set}" = set; then + enableval="$enable_mapped_location" + +else + enable_mapped_location=no +fi; + +if test "$enable_mapped_location" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define USE_MAPPED_LOCATION 1 +_ACEOF + +fi + # Enable code coverage collection # Check whether --enable-coverage or --disable-coverage was given. if test "${enable_coverage+set}" = set; then enableval="$enable_coverage" case "${enableval}" in -yes|noopt) - coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" - ;; -opt) - coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" - ;; -*) - { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 + yes|noopt) + coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" + ;; + opt) + coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" + ;; + no) + # a.k.a. --disable-coverage + coverage_flags="" + ;; + *) + { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 echo "$as_me: error: unknown coverage setting $enableval" >&2;} { (exit 1); exit 1; }; } - ;; + ;; esac else coverage_flags="" @@ -4698,6 +7028,37 @@ if test "${enable___cxa_atexit+set}" = set; then fi; +# Enable C extension for decimal float if target supports it. +# Check whether --enable-decimal-float or --disable-decimal-float was given. +if test "${enable_decimal_float+set}" = set; then + enableval="$enable_decimal_float" + + if test x$enablevar = xyes ; then + case $target in + powerpc*-*-linux* | i?86*-*-linux*) + enable_decimal_float=yes + ;; + *) + { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 +echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} + enable_decimal_float=no + ;; + esac + fi + +else + enable_decimal_float=no +fi; + + + +dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` + +cat >>confdefs.h <<_ACEOF +#define ENABLE_DECIMAL_FLOAT $dfp +_ACEOF + + # Enable threads # Pass with no value to take the default # Pass with a value to specify a thread package @@ -4708,8 +7069,23 @@ if test "${enable_threads+set}" = set; then else enable_threads='' fi; -# Save in case it gets overwritten in config.gcc -enable_threads_flag=$enable_threads + +# Check whether --enable-tls or --disable-tls was given. +if test "${enable_tls+set}" = set; then + enableval="$enable_tls" + + case $enable_tls in + yes | no) ;; + *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. +Valid choices are 'yes' and 'no'." >&5 +echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. +Valid choices are 'yes' and 'no'." >&2;} + { (exit 1); exit 1; }; } ;; + esac + +else + enable_tls='' +fi; # Check whether --enable-objc-gc or --disable-objc-gc was given. if test "${enable_objc_gc+set}" = set; then @@ -4756,6 +7132,13 @@ fi; +# Check whether --with-build-sysroot or --without-build-sysroot was given. +if test "${with_build_sysroot+set}" = set; then + withval="$with_build_sysroot" + +fi; + + # Check whether --with-sysroot or --without-sysroot was given. if test "${with_sysroot+set}" = set; then withval="$with_sysroot" @@ -4809,6 +7192,38 @@ else fi; +# Sanity check enable_languages in case someone does not run the toplevel +# configure # script. +# Check whether --enable-languages or --disable-languages was given. +if test "${enable_languages+set}" = set; then + enableval="$enable_languages" + case ,${enable_languages}, in + ,,|,yes,) + # go safe -- we cannot be much sure without the toplevel + # configure's + # analysis of which target libs are present and usable + enable_languages=c + ;; + *,all,*) + { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 +echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} + { (exit 1); exit 1; }; } + ;; + *,c,*) + ;; + *) + enable_languages=c,${enable_languages} + ;; +esac +else + enable_languages=c +fi; + +# Used by documentation targets + + + + # ------------------------- # Checks for other programs # ------------------------- @@ -4884,7 +7299,7 @@ fi test -n "$AWK" && break done -# We need awk to run opts.sh (to create options.c and options.h). +# We need awk to create options.c and options.h. # Bail out if it's missing. case ${AWK} in "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 @@ -4892,74 +7307,70 @@ echo "$as_me: error: can't build without awk, bailing out" >&2;} { (exit 1); exit 1; }; } ;; esac -echo "$as_me:$LINENO: checking whether ln works" >&5 -echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 -if test "${gcc_cv_prog_LN+set}" = set; then +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +if test "${gcc_cv_prog_LN_S+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftestdata_t echo >conftestdata_f -if ln conftestdata_f conftestdata_t 2>/dev/null +if ln -s conftestdata_f conftestdata_t 2>/dev/null then - gcc_cv_prog_LN="ln" + gcc_cv_prog_LN_S="ln -s" else - if ln -s conftestdata_f conftestdata_t 2>/dev/null + if ln conftestdata_f conftestdata_t 2>/dev/null then - gcc_cv_prog_LN="ln -s" + gcc_cv_prog_LN_S=ln else - gcc_cv_prog_LN=cp + if cp -p conftestdata_f conftestdata_t 2>/dev/null + then + gcc_cv_prog_LN_S="cp -p" + else + gcc_cv_prog_LN_S=cp + fi fi fi rm -f conftestdata_f conftestdata_t fi -LN="$gcc_cv_prog_LN" -if test "$gcc_cv_prog_LN" = "ln"; then +LN_S="$gcc_cv_prog_LN_S" +if test "$gcc_cv_prog_LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - if test "$gcc_cv_prog_LN" = "ln -s"; then - echo "$as_me:$LINENO: result: no, using ln -s" >&5 -echo "${ECHO_T}no, using ln -s" >&6 + if test "$gcc_cv_prog_LN_S" = "ln"; then + echo "$as_me:$LINENO: result: no, using ln" >&5 +echo "${ECHO_T}no, using ln" >&6 else - echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5 -echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6 + echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 +echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 fi fi -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -if test "${gcc_cv_prog_LN_S+set}" = set; then +echo "$as_me:$LINENO: checking whether ln works" >&5 +echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 +if test "${acx_cv_prog_LN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftestdata_t echo >conftestdata_f -if ln -s conftestdata_f conftestdata_t 2>/dev/null +if ln conftestdata_f conftestdata_t 2>/dev/null then - gcc_cv_prog_LN_S="ln -s" + acx_cv_prog_LN=ln else - if ln conftestdata_f conftestdata_t 2>/dev/null - then - gcc_cv_prog_LN_S=ln - else - gcc_cv_prog_LN_S=cp - fi + acx_cv_prog_LN=no fi rm -f conftestdata_f conftestdata_t fi -LN_S="$gcc_cv_prog_LN_S" -if test "$gcc_cv_prog_LN_S" = "ln -s"; then +if test $acx_cv_prog_LN = no; then + LN="$LN_S" + echo "$as_me:$LINENO: result: no, using $LN" >&5 +echo "${ECHO_T}no, using $LN" >&6 +else + LN="$acx_cv_prog_LN" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else - if test "$gcc_cv_prog_LN_S" = "ln"; then - echo "$as_me:$LINENO: result: no, using ln" >&5 -echo "${ECHO_T}no, using ln" >&6 - else - echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5 -echo "${ECHO_T}no, and neither does ln, so using cp" >&6 - fi fi if test -n "$ac_tool_prefix"; then @@ -5042,6 +7453,19 @@ else RANLIB="$ac_cv_prog_RANLIB" fi +case "${host}" in +*-*-darwin*) + # By default, the Darwin ranlib will not treat common symbols as + # definitions when building the archive table of contents. Other + # ranlibs do that; pass an option to the Darwin ranlib that makes + # it behave similarly. + ranlib_flags="-c" + ;; +*) + ranlib_flags="" +esac + + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -5176,16 +7600,14 @@ echo "${ECHO_T}no" >&6 fi -# Do we have a single-tree copy of texinfo? -if test -f $srcdir/../texinfo/Makefile.in; then - MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' - gcc_cv_prog_makeinfo_modern=yes - echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5 -echo "${ECHO_T}Using makeinfo from the unified source tree." >&6 -else - # See if makeinfo has been installed and is modern enough - # that we can use it. - # Extract the first word of "makeinfo", so it can be a program name with args. +MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" + +# See if makeinfo has been installed and is modern enough +# that we can use it. + +ac_executable_extensions="$build_exeext" + +# Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -5229,10 +7651,10 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:5232: version of makeinfo is $ac_prog_version" >&5 + echo "configure:7654: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; - 4.[2-9]*) + 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;; *) gcc_cv_prog_makeinfo_modern=no;; esac @@ -5244,9 +7666,8 @@ else gcc_cv_prog_makeinfo_modern=no fi -fi - if test $gcc_cv_prog_makeinfo_modern = no; then + MAKEINFO="$MISSING makeinfo" { echo "$as_me:$LINENO: WARNING: *** Makeinfo is missing or too old. *** Info documentation will not be built." >&5 @@ -5258,6 +7679,7 @@ else BUILD_INFO=info fi + # Is pod2man recent enough to regenerate manpages? echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 @@ -5271,12 +7693,12 @@ echo "${ECHO_T}no" >&6 GENERATED_MANPAGES= fi + # How about lex? -if test -f $srcdir/../flex/skel.c; then - FLEX='$(objdir)/../flex/flex' -else - # Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 +for ac_prog in flex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_FLEX+set}" = set; then @@ -5292,14 +7714,13 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FLEX="flex" + ac_cv_prog_FLEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" fi fi FLEX=$ac_cv_prog_FLEX @@ -5311,15 +7732,16 @@ else echo "${ECHO_T}no" >&6 fi -fi + test -n "$FLEX" && break +done +test -n "$FLEX" || FLEX="$MISSING flex" + # Bison? -# The -L switch is so bison can find its skeleton file. -if test -f $srcdir/../bison/bison.simple; then - BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' -else - # Extract the first word of "bison", so it can be a program name with args. -set dummy bison; ac_word=$2 +for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_BISON+set}" = set; then @@ -5335,14 +7757,13 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_BISON="bison" + ac_cv_prog_BISON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" fi fi BISON=$ac_cv_prog_BISON @@ -5354,8 +7775,101 @@ else echo "${ECHO_T}no" >&6 fi + test -n "$BISON" && break +done +test -n "$BISON" || BISON="$MISSING bison" + + +# Binutils are not build modules, unlike bison/flex/makeinfo. So we +# check for build == host before using them. + +# NM +if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ + && test -d ../binutils ; then + NM='$(objdir)/../binutils/nm-new' +else + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NM="nm" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + echo "$as_me:$LINENO: result: $NM" >&5 +echo "${ECHO_T}$NM" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi + +# AR +if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ + && test -d ../binutils ; then + AR='$(objdir)/../binutils/ar' +else + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + fi + # -------------------- # Checks for C headers # -------------------- @@ -5661,67 +8175,6 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for working stdbool.h" >&5 -echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6 -if test "${ac_cv_header_stdbool_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdbool.h> -int -main () -{ -bool foo = false; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdbool_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdbool_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 -if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF - -fi - echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 if test "${gcc_cv_header_string+set}" = set; then @@ -5876,7 +8329,8 @@ fi -for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \ + +for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ sys/resource.h sys/param.h sys/times.h sys/stat.h \ direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h @@ -6142,8 +8596,7 @@ echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. + # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6152,13 +8605,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> + int main () { - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif + ; return 0; } @@ -6194,13 +8648,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> + int main () { - #if BYTE_ORDER != BIG_ENDIAN not big endian #endif + ; return 0; } @@ -6239,11 +8694,69 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - echo $ac_n "cross-compiling... " 2>&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6251,7 +8764,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -main () { +int +main () +{ /* Are we little or big endian? From Harbison&Steele. */ union { @@ -6285,67 +8800,26 @@ fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -if test $ac_cv_c_bigendian = unknown; then -echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 -echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 - -cat >conftest.c <<EOF -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } -int main() { _ascii (); _ebcdic (); return 0; } -EOF - if test -f conftest.c ; then - if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then - if test `grep -l BIGenDianSyS conftest.o` ; then - echo $ac_n ' big endian probe OK, ' 1>&6 - ac_cv_c_bigendian=yes - fi - if test `grep -l LiTTleEnDian conftest.o` ; then - echo $ac_n ' little endian probe OK, ' 1>&6 - if test $ac_cv_c_bigendian = yes ; then - ac_cv_c_bigendian=unknown; - else - ac_cv_c_bigendian=no - fi - fi - echo $ac_n 'guessing bigendian ... ' >&6 - fi - fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -fi -if test $ac_cv_c_bigendian = yes; then +case $ac_cv_c_bigendian in + yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HOST_WORDS_BIG_ENDIAN 1 -_ACEOF - - BYTEORDER=4321 -else - BYTEORDER=1234 -fi - -cat >>confdefs.h <<_ACEOF -#define BYTEORDER $BYTEORDER -_ACEOF - -if test $ac_cv_c_bigendian = unknown; then - { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5 -echo "$as_me: error: unknown endianess - sorry" >&2;} - { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; } -fi + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac # -------- @@ -6363,13 +8837,6 @@ vax-*-*) stage1_cflags="-J" fi ;; -powerpc-*-darwin*) - # The spiffy cpp-precomp chokes on some legitimate constructs in GCC - # sources; use -no-cpp-precomp to get to GNU cpp. - # Apple's GCC has bugs in designated initializer handling, so disable - # that too. - stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" - ;; esac @@ -6809,11 +9276,21 @@ fi -for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ - sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ - fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ - scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ - setlocale + + + + + + + + + + + +for ac_func in times clock kill getrlimit setrlimit atoll atoq \ + sysconf strsignal getrusage nl_langinfo scandir alphasort \ + gettimeofday mbstowcs wcswidth mmap mincore setlocale \ + clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -7182,13 +9659,59 @@ else fi -echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 -echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 -if test "${gcc_cv_func_printf_ptr+set}" = set; then + +echo "$as_me:$LINENO: checking for sys/mman.h" >&5 +echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_mman_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - gcc_cv_func_printf_ptr=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/mman.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_sys_mman_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_mman_h=no +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 +if test $ac_cv_header_sys_mman_h = yes; then + gcc_header_sys_mman_h=yes +else + gcc_header_sys_mman_h=no +fi + +echo "$as_me:$LINENO: checking for mmap" >&5 +echo $ECHO_N "checking for mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7196,53 +9719,93 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <stdio.h> +/* Define mmap to an innocuous variant, in case <limits.h> declares mmap. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define mmap innocuous_mmap -int main() +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mmap (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef mmap + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" { - char buf[64]; - char *p = buf, *q = NULL; - sprintf(buf, "%p", p); - sscanf(buf, "%p", &q); - return (p != q); +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mmap (); +/* 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_mmap) || defined (__stub___mmap) +choke me +#else +char (*f) () = mmap; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != mmap; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gcc_cv_func_printf_ptr=yes + ac_cv_func_mmap=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -gcc_cv_func_printf_ptr=no +ac_cv_func_mmap=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f core core.* *.core +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 -echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 -if test $gcc_cv_func_printf_ptr = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRINTF_PTR 1 -_ACEOF - +echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 +echo "${ECHO_T}$ac_cv_func_mmap" >&6 +if test $ac_cv_func_mmap = yes; then + gcc_func_mmap=yes +else + gcc_func_mmap=no fi -if test $ac_cv_header_sys_mman_h != yes \ - || test $ac_cv_func_mmap != yes; then +if test "$gcc_header_sys_mman_h" != yes \ + || test "$gcc_func_mmap" != yes; then gcc_cv_func_mmap_file=no gcc_cv_func_mmap_dev_zero=no gcc_cv_func_mmap_anon=no @@ -7866,73 +10429,576 @@ fi - - am_cv_lib_iconv_ldpath= - -# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then - withval="$with_libiconv_prefix" - - for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi - if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi - done - -fi; + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" -for ac_header in iconv.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + with_gnu_ld=no +fi; +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' else - ac_cpp_err= + PATH_SEPARATOR=: fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else - ac_cpp_err=yes + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. fi -rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +LD="$acl_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -done +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6 + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +fi; + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval="$with_libiconv_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; + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + 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" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$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 $LTLIBICONV; 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 + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-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 + LIBICONV="${LIBICONV}${LIBICONV:+ }$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 + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$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 $LIBICONV; 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 + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-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 $INCICONV; 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 + INCICONV="${INCICONV}${INCICONV:+ }-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 $LIBICONV; 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 + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; 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 + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-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$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-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" + LIBICONV="${LIBICONV}${LIBICONV:+ }$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" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; 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 echo "$as_me:$LINENO: checking for iconv" >&5 @@ -7993,7 +11059,7 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" - LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" + LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8055,6 +11121,21 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 if test "${am_cv_proto_iconv+set}" = set; then @@ -8132,11 +11213,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF fi - LIBICONV= - if test "$am_cv_lib_iconv" = yes; then - LIBICONV="$am_cv_lib_iconv_ldpath -liconv" - fi - # Until we have in-tree GNU iconv: LIBICONV_DEP= @@ -8206,15 +11282,119 @@ _ACEOF fi + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <langinfo.h> +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_langinfo_codeset=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + # We will need to find libiberty.h and ansidecl.h saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" -for ac_func in getenv atol sbrk abort atof getcwd getwd \ - strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ - fprintf_unlocked strstr errno snprintf vasprintf \ - malloc realloc calloc free basename getopt clock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ + strsignal strstr strverscmp \ + errno snprintf vsnprintf vasprintf malloc realloc calloc \ + free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked do - ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then @@ -8289,108 +11469,14 @@ _ACEOF fi done -if test x = y ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETENV 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_ATOL 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_SBRK 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_ABORT 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_ATOF 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETCWD 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETWD 1 -_ACEOF - \ - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_STRSIGNAL 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_PUTC_UNLOCKED 1 -_ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_FPUTS_UNLOCKED 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_FWRITE_UNLOCKED 1 -_ACEOF - \ - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_FPRINTF_UNLOCKED 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_STRSTR 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_ERRNO 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_SNPRINTF 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_VASPRINTF 1 -_ACEOF - \ - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_MALLOC 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_REALLOC 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_CALLOC 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_FREE 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_BASENAME 1 -_ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETOPT 1 -_ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_CLOCK 1 -_ACEOF -fi for ac_func in getrlimit setrlimit getrusage do - ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then @@ -8469,20 +11555,6 @@ _ACEOF fi done -if test x = y ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETRLIMIT 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_SETRLIMIT 1 -_ACEOF - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_GETRUSAGE 1 -_ACEOF -fi cat >conftest.$ac_ext <<_ACEOF @@ -8541,9 +11613,14 @@ _ACEOF fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible +# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname +# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs +# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. + for ac_func in ldgetname do - ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then @@ -8561,6 +11638,8 @@ cat >>conftest.$ac_ext <<_ACEOF #include "ansidecl.h" #include "system.h" #ifdef HAVE_LDFCN_H +#undef FREAD +#undef FWRITE #include <ldfcn.h> #endif @@ -8622,17 +11701,12 @@ _ACEOF fi done -if test x = y ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_LDGETNAME 1 -_ACEOF -fi for ac_func in times do - ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then @@ -8711,38 +11785,37 @@ _ACEOF fi done -if test x = y ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECL_TIMES 1 -_ACEOF -fi -# More time-related stuff. -echo "$as_me:$LINENO: checking for struct tms" >&5 -echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 -if test "${ac_cv_struct_tms+set}" = set; then +for ac_func in sigaltstack +do + ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` +echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 +if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#undef $ac_tr_decl +#define $ac_tr_decl 1 #include "ansidecl.h" #include "system.h" -#ifdef HAVE_SYS_TIMES_H -#include <sys/times.h> -#endif +#include <signal.h> + int main () { -struct tms tms; +#ifndef $ac_func +char *(*pfn) = (char *(*)) $ac_func ; +#endif ; return 0; } @@ -8769,30 +11842,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_struct_tms=yes + eval "gcc_cv_have_decl_$ac_func=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tms=no +eval "gcc_cv_have_decl_$ac_func=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 -echo "${ECHO_T}$ac_cv_struct_tms" >&6 -if test $ac_cv_struct_tms = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_TMS 1 +if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 0 _ACEOF fi -# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. -# revisit after autoconf 2.50. -echo "$as_me:$LINENO: checking for clock_t" >&5 -echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 -if test "${gcc_cv_type_clock_t+set}" = set; then +done + + +# More time-related stuff. +echo "$as_me:$LINENO: checking for struct tms" >&5 +echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 +if test "${ac_cv_struct_tms+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8805,11 +11885,14 @@ cat >>conftest.$ac_ext <<_ACEOF #include "ansidecl.h" #include "system.h" +#ifdef HAVE_SYS_TIMES_H +#include <sys/times.h> +#endif int main () { -clock_t x; +struct tms tms; ; return 0; } @@ -8836,31 +11919,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gcc_cv_type_clock_t=yes + ac_cv_struct_tms=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_type_clock_t=no +ac_cv_struct_tms=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 -echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 -if test $gcc_cv_type_clock_t = yes; then +echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 +echo "${ECHO_T}$ac_cv_struct_tms" >&6 +if test $ac_cv_struct_tms = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_CLOCK_T 1 +#define HAVE_STRUCT_TMS 1 _ACEOF fi -echo "$as_me:$LINENO: checking for uchar" >&5 -echo $ECHO_N "checking for uchar... $ECHO_C" >&6 -if test "${gcc_cv_type_uchar+set}" = set; then +# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. +# revisit after autoconf 2.50. +echo "$as_me:$LINENO: checking for clock_t" >&5 +echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 +if test "${gcc_cv_type_clock_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8873,8 +11959,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -if ((uchar *)0) return 0; - if (sizeof(uchar)) return 0; +clock_t x; ; return 0; } @@ -8901,21 +11986,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_uchar=yes + gcc_cv_type_clock_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uchar=no +gcc_cv_type_clock_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5 -echo "${ECHO_T}$gcc_cv_type_uchar" >&6 -if test $ac_cv_type_uchar = yes; then +echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 +echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 +if test $gcc_cv_type_clock_t = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_UCHAR 1 +#define HAVE_CLOCK_T 1 _ACEOF fi @@ -9085,6 +12170,15 @@ if test "${with_system_libunwind+set}" = set; then fi; +# config.gcc also contains tests of with_system_libunwind. +if test x$with_system_libunwind = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETIPINFO 1 +_ACEOF + +fi + # -------------------------------------------------------- # Build, host, and target specific configuration fragments # -------------------------------------------------------- @@ -9182,6 +12276,14 @@ _ACEOF fi +if test x$use_long_long_for_widest_fast_int = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 +_ACEOF + +fi + count=a for f in $host_xm_file; do count=${count}x @@ -9215,8 +12317,69 @@ if test "$host_xm_file" != "$build_xm_file"; then fi fi +case ${host} in + powerpc*-*-darwin*) + echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 +echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 +if test "${gcc_cv_mcontext_underscores+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + +#include <sys/signal.h> +#include <ucontext.h> +int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gcc_cv_mcontext_underscores=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gcc_cv_mcontext_underscores=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 +echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 + if test $gcc_cv_mcontext_underscores = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAS_MCONTEXT_T_UNDERSCORES +_ACEOF + + fi + ;; +esac + +# --------- +# Threading +# --------- + # Check if a valid thread package -case ${enable_threads_flag} in +case ${enable_threads} in "" | no) # No threads target_thread_file='single' @@ -9225,12 +12388,12 @@ case ${enable_threads_flag} in # default target_thread_file='single' ;; - aix | dce | gnat | irix | posix | rtems | \ + aix | dce | gnat | irix | posix | posix95 | rtems | \ single | solaris | vxworks | win32 ) - target_thread_file=${enable_threads_flag} + target_thread_file=${enable_threads} ;; *) - echo "${enable_threads_flag} is an unknown thread package" 1>&2 + echo "${enable_threads} is an unknown thread package" 1>&2 exit 1 ;; esac @@ -9241,9 +12404,24 @@ if test x${thread_file} = x; then thread_file=${target_thread_file} fi +# Make gthr-default.h if we have a thread file. +gthread_flags= +if test $thread_file != single; then + rm -f gthr-default.h + echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h + gthread_flags=-DHAVE_GTHR_DEFAULT +fi + + +# -------- +# UNSORTED +# -------- + +use_cxa_atexit=no if test x$enable___cxa_atexit = xyes || \ test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then - echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 + if test x$host = x$target; then + echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 if test "${ac_cv_func___cxa_atexit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9334,15 +12512,167 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 if test $ac_cv_func___cxa_atexit = yes; then + use_cxa_atexit=yes +else + echo "__cxa_atexit can't be enabled on this target" +fi + + else + # We can't check for __cxa_atexit when building a cross, so assume + # it is available + use_cxa_atexit=yes + fi + if test x$use_cxa_atexit = xyes; then cat >>confdefs.h <<\_ACEOF -#define DEFAULT_USE_CXA_ATEXIT 1 +#define DEFAULT_USE_CXA_ATEXIT 2 _ACEOF + fi +fi + +use_getipinfo=yes +if test x$with_system_libunwind = xyes; then + if test x$host = x$target; then + echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5 +echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6 +if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "__cxa_atexit can't be enabled on this target" + ac_func_search_save_LIBS=$LIBS +ac_cv_search__Unwind_GetIPInfo=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _Unwind_GetIPInfo (); +int +main () +{ +_Unwind_GetIPInfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search__Unwind_GetIPInfo="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search__Unwind_GetIPInfo" = no; then + for ac_lib in unwind; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _Unwind_GetIPInfo (); +int +main () +{ +_Unwind_GetIPInfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search__Unwind_GetIPInfo="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5 +echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6 +if test "$ac_cv_search__Unwind_GetIPInfo" != no; then + test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS" + +else + use_getipinfo=no fi + fi +fi + +if test x$use_getipinfo = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETIPINFO 1 +_ACEOF + +else + echo "The system unwind library does not support _Unwind_GetIPInfo." fi # Look for a file containing extra machine modes. @@ -9356,6 +12686,13 @@ _ACEOF fi +# Convert extra_options into a form suitable for Makefile use. +extra_opt_files= +for f in $extra_options; do + extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" +done + + # auto-host.h is the file containing items generated by autoconf and is # the first file included by config.h. # If host=build, it is correct to have bconfig include auto-host.h @@ -9364,7 +12701,6 @@ fi if test x$host = x$build then build_auto=auto-host.h - FORBUILD=.. else # We create a subdir, then run autoconf in the subdir. # To prevent recursion we set host and build for the new @@ -9381,6 +12717,7 @@ else saved_CFLAGS="${CFLAGS}" CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ --target=$target_alias --host=$build_alias --build=$build_alias CFLAGS="${saved_CFLAGS}" @@ -9390,7 +12727,6 @@ else cd .. rm -rf $tempdir build_auto=auto-build.h - FORBUILD=../${build_subdir} fi @@ -9400,21 +12736,12 @@ host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" # We don't want ansidecl.h in target files, write code there in ISO/GNU C. # put this back in temporarily. -xm_file="ansidecl.h ${xm_file}" +xm_file="auto-host.h ansidecl.h ${xm_file}" # -------- # UNSORTED # -------- -# Get the version trigger filename from the toplevel -if test "${with_gcc_version_trigger+set}" = set; then - gcc_version_trigger=$with_gcc_version_trigger -else - gcc_version_trigger=${srcdir}/version.c -fi -gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` -gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` - # Compile in configure arguments. if test -f configargs.h ; then # Being re-configured. @@ -9443,11 +12770,6 @@ static const struct { EOF # Internationalization -PACKAGE=gcc -VERSION="$gcc_version" - - - # If we haven't got the data from the intl directory, # assume NLS is disabled. USE_NLS=no @@ -9457,8 +12779,9 @@ INCINTL= XGETTEXT= GMSGFMT= POSUB= -if test -f ../intl/config.intl; then - . ../intl/config.intl + +if test -f ../intl/config.intl; then + . ../intl/config.intl fi echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 @@ -9490,8 +12813,8 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 # by the backticks, then collapsed again by the double quotes, # leaving us with one backslash in the sed expression (right # before the dot that mustn't act as a wildcard). - cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` - lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` + cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` + lang=`echo $cat | sed -e "s!\\\\.gmo!!"` # The user is allowed to set LINGUAS to a list of languages to # install catalogs for. If it's empty that means "all of them." if test "x$LINGUAS" = x; then @@ -9508,6 +12831,16 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 LINGUAS="$XLINGUAS" echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6 + + + DATADIRNAME=share + + INSTOBJEXT=.mo + + GENCAT=gencat + + CATOBJEXT=.gmo + fi # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get @@ -9516,25 +12849,23 @@ case "$LIBINTL" in *$LIBICONV*) LIBICONV= ;; esac +# Check whether --enable-secureplt or --disable-secureplt was given. +if test "${enable_secureplt+set}" = set; then + enableval="$enable_secureplt" + +fi; + # Windows32 Registry support for specifying GCC installation paths. # Check whether --enable-win32-registry or --disable-win32-registry was given. if test "${enable_win32_registry+set}" = set; then enableval="$enable_win32_registry" fi; -case $host_os in - win32 | pe | cygwin* | mingw32* | uwin*) -echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 -echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 -if test "x$enable_win32_registry" != xno; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_WIN32_REGISTRY 1 -_ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 +case $host_os in + win32 | pe | cygwin* | mingw32* | uwin*) + if test "x$enable_win32_registry" != xno; then + echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9658,41 +12989,29 @@ echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 if test "$ac_cv_search_RegOpenKeyExA" != no; then test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" -fi - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + enable_win32_registry=no fi -# Check if user specified a different registry key. -case "x${enable_win32_registry}" in -x | xyes) - # default. - gcc_cv_win32_registry_key="$VERSION" - ;; -xno) - # no registry lookup. - gcc_cv_win32_registry_key='' - ;; -*) - # user-specified key. - gcc_cv_win32_registry_key="$enable_win32_registry" - ;; -esac + fi + + if test "x$enable_win32_registry" != xno; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_WIN32_REGISTRY 1 +_ACEOF -if test "x$enable_win32_registry" != xno; then - echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 -echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 + + if test "x$enable_win32_registry" != xyes \ + && test "x$enable_win32_registry" != x; then cat >>confdefs.h <<_ACEOF -#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" +#define WIN32_REGISTRY_KEY "$enable_win32_registry" _ACEOF - echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 -echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 -fi -;; + fi + fi + ;; esac # Get an absolute path to the GCC top-level source directory @@ -9722,37 +13041,33 @@ do done tmake_file="${tmake_file_}" -symbolic_link='ln -s' - # If the host doesn't support symlinks, modify CC in # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. # Otherwise, we can use "CC=$(CC)". rm -f symtest.tem -if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null -then - cc_set_by_configure="\$(CC)" - quoted_cc_set_by_configure="\$(CC)" - stage_prefix_set_by_configure="\$(STAGE_PREFIX)" - quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" -else - rm -f symtest.tem - if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null - then - symbolic_link="cp -p" - else - symbolic_link="cp" - fi - cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" - quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" - stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" - quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" -fi -rm -f symtest.tem +case "$LN_S" in + *-s*) + cc_set_by_configure="\$(CC)" + quoted_cc_set_by_configure="\$(CC)" + stage_prefix_set_by_configure="\$(STAGE_PREFIX)" + quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" + ;; + *) + cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" + quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" + stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" + quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" + ;; +esac + +# This is a terrible hack which will go away some day. +host_cc_for_libada=${CC} + out_object_file=`basename $out_file .c`.o -tm_file_list= -tm_include_list= +tm_file_list="options.h" +tm_include_list="options.h" for f in $tm_file; do case $f in defaults.h ) @@ -9841,11 +13156,21 @@ done CROSS= ALL=all.internal SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' + +if test "x$with_build_sysroot" != x; then + build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' +else + # This value is used, even on a native system, because + # CROSS_SYSTEM_HEADER_DIR is just + # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). + build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' +fi + if test x$host != x$target then CROSS="-DCROSS_COMPILE" ALL=all.cross - SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + SYSTEM_HEADER_DIR=$build_system_header_dir case "$host","$target" in # Darwin crosses can use the host system's libraries and headers, # because of the fat library support. Of course, it must be the @@ -9867,8 +13192,7 @@ then CROSS="$CROSS -DNATIVE_CROSS" ;; esac elif test "x$TARGET_SYSTEM_ROOT" != x; then - # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) - SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + SYSTEM_HEADER_DIR=$build_system_header_dir fi # If this is a cross-compiler that does not @@ -9879,11 +13203,11 @@ fi # then define inhibit_libc in LIBGCC2_CFLAGS. # This prevents libgcc2 from containing any code which requires libc # support. -inhibit_libc= +inhibit_libc=false if { { test x$host != x$target && test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; } && { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then - inhibit_libc=-Dinhibit_libc + inhibit_libc=true fi @@ -9892,11 +13216,8 @@ fi # Also, we cannot run fixincludes or fix-header. # These are the normal (build=host) settings: -BUILD_PREFIX= -BUILD_PREFIX_1=ignore- CC_FOR_BUILD='$(CC)' BUILD_CFLAGS='$(ALL_CFLAGS)' - STMP_FIXINC=stmp-fixinc # Possibly disable fixproto, on a per-target basis. @@ -9913,13 +13234,12 @@ esac # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then - BUILD_PREFIX=build- - BUILD_PREFIX_1=build- BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' if test "x$TARGET_SYSTEM_ROOT" = x; then - STMP_FIXINC= - STMP_FIXPROTO= + if test "x$STMP_FIXPROTO" != x; then + STMP_FIXPROTO=stmp-install-fixproto + fi fi fi @@ -9931,6 +13251,13 @@ for file in ${extra_headers} ; do extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" done +# Define collect2 in Makefile. +case $host_can_use_collect2 in + no) collect2= ;; + *) collect2='collect2$(exeext)' ;; +esac + + # Add a definition of USE_COLLECT2 if system wants one. case $use_collect2 in no) use_collect2= ;; @@ -9938,9 +13265,20 @@ case $use_collect2 in *) host_xm_defines="${host_xm_defines} USE_COLLECT2" xm_defines="${xm_defines} USE_COLLECT2" + case $host_can_use_collect2 in + no) + { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 +echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} + { (exit 1); exit 1; }; } + ;; + esac ;; esac +# --------------------------- +# Assembler & linker features +# --------------------------- + # Identify the assembler which will work hand-in-glove with the newly # built GCC, so that we can examine its features. This is the assembler # which will be driven by the driver program. @@ -9948,30 +13286,87 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target assembler and hope that it will have the same features # as the host->target assembler we'll be using. -echo "$as_me:$LINENO: checking what assembler to use" >&5 -echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 -in_tree_gas=no -gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas + +if test "${gcc_cv_as+set}" = set; then + : +else + if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" -elif test -x "$AS"; then - gcc_cv_as="$AS" -elif test -x as$host_exeext; then - # Build using assembler in the current directory. - gcc_cv_as=./as$host_exeext elif test -f $gcc_cv_as_gas_srcdir/configure.in \ - && test -f ../gas/Makefile; then - # Single tree build which includes gas. + && test -f ../gas/Makefile \ + && test x$build = x$host; then + gcc_cv_as=../gas/as-new$build_exeext +elif test -x as$build_exeext; then + # Build using assembler in the current directory. + gcc_cv_as=./as$build_exeext +elif test -x $AS_FOR_TARGET; then + gcc_cv_as="$AS_FOR_TARGET" +else + # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. +set dummy $AS_FOR_TARGET; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_as+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_as in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_as=$ac_cv_path_gcc_cv_as + +if test -n "$gcc_cv_as"; then + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +fi + + +ORIGINAL_AS_FOR_TARGET=$gcc_cv_as + + +echo "$as_me:$LINENO: checking what assembler to use" >&5 +echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 +if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then + # Single tree build which includes gas. We want to prefer it + # over whatever linker top-level may have detected, since + # we'll use what we're building after installation anyway. + echo "$as_me:$LINENO: result: newly built gas" >&5 +echo "${ECHO_T}newly built gas" >&6 in_tree_gas=yes gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd for f in $gcc_cv_as_bfd_srcdir/configure \ $gcc_cv_as_gas_srcdir/configure \ $gcc_cv_as_gas_srcdir/configure.in \ $gcc_cv_as_gas_srcdir/Makefile.in ; do - gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` + gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` if test x$gcc_cv_gas_version != x; then break fi @@ -9986,8 +13381,6 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ + $gcc_cv_gas_minor_version \) \* 1000 \ + $gcc_cv_gas_patch_version` - rm -f as$host_exeext - $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null in_tree_gas_is_elf=no if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ || (grep 'obj_format = multi' ../gas/Makefile \ @@ -9995,77 +13388,11 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ then in_tree_gas_is_elf=yes fi -fi - -if test "x$gcc_cv_as" = x; then - # Search the same directories that the installed compiler will - # search. Else we may find the wrong assembler and lose. If we - # do not find a suitable assembler binary, then try the user's - # path. - # - # Also note we have to check MD_EXEC_PREFIX before checking the - # user's path. Unfortunately, there is no good way to get at the - # value of MD_EXEC_PREFIX here. So we do a brute force search - # through all the known MD_EXEC_PREFIX values. Ugh. This needs - # to be fixed as part of the make/configure rewrite too. - - if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - else - test_prefix=$exec_prefix - fi - - # If the loop below does not find an assembler, then use whatever - # one we can find in the users's path. - # user's path. - if test "x$program_prefix" != xNONE; then - gcc_cv_as=${program_prefix}as$host_exeext - else - gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext - fi - - test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ - $test_prefix/libexec/gcc/$target_noncanonical \ - /usr/lib/gcc/$target_noncanonical/$gcc_version \ - /usr/lib/gcc/$target_noncanonical \ - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ - $test_prefix/$target_noncanonical/bin" - - if test x$host = x$target; then - test_dirs="$test_dirs \ - /usr/libexec \ - /usr/ccs/gcc \ - /usr/ccs/bin \ - /udk/usr/ccs/bin \ - /bsd43/usr/lib/cmplrs/cc \ - /usr/cross64/usr/bin \ - /usr/lib/cmplrs/cc \ - /sysv/usr/lib/cmplrs/cc \ - /svr4/usr/lib/cmplrs/cc \ - /usr/bin" - fi - - for dir in $test_dirs; do - if test -x $dir/as$host_exeext; then - gcc_cv_as=$dir/as$host_exeext - break; - fi - done -fi -case $in_tree_gas in - yes) - echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 -echo "${ECHO_T}\"newly built gas\"" >&6 - ;; - no) - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +else + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 echo "${ECHO_T}$gcc_cv_as" >&6 - ;; -esac + in_tree_gas=no +fi # Identify the linker which will work hand-in-glove with the newly # built GCC, so that we can examine its features. This is the linker @@ -10074,166 +13401,248 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target linker and hope that it will have the same features # as the host->target linker we'll be using. -echo "$as_me:$LINENO: checking what linker to use" >&5 -echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 -in_tree_ld=no -gcc_cv_ld= gcc_cv_gld_major_version= gcc_cv_gld_minor_version= gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd + +if test "${gcc_cv_ld+set}" = set; then + : +else + if test -x "$DEFAULT_LINKER"; then gcc_cv_ld="$DEFAULT_LINKER" -elif test -x "$LD"; then - gcc_cv_ld="$LD" -elif test -x collect-ld$host_exeext; then - # Build using linker in the current directory. - gcc_cv_ld=./collect-ld$host_exeext elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ - && test -f ../ld/Makefile; then - # Single tree build which includes ld. + && test -f ../ld/Makefile \ + && test x$build = x$host; then + gcc_cv_ld=../ld/ld-new$build_exeext +elif test -x collect-ld$build_exeext; then + # Build using linker in the current directory. + gcc_cv_ld=./collect-ld$build_exeext +elif test -x $LD_FOR_TARGET; then + gcc_cv_ld="$LD_FOR_TARGET" +else + # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. +set dummy $LD_FOR_TARGET; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_ld in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_ld=$ac_cv_path_gcc_cv_ld + +if test -n "$gcc_cv_ld"; then + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +fi + + +ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld + + +echo "$as_me:$LINENO: checking what linker to use" >&5 +echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 +if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then + # Single tree build which includes ld. We want to prefer it + # over whatever linker top-level may have detected, since + # we'll use what we're building after installation anyway. + echo "$as_me:$LINENO: result: newly built ld" >&5 +echo "${ECHO_T}newly built ld" >&6 in_tree_ld=yes in_tree_ld_is_elf=no if (grep 'EMUL = .*elf' ../ld/Makefile \ - || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then + || grep 'EMUL = .*linux' ../ld/Makefile \ + || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then in_tree_ld_is_elf=yes fi for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in do - gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` + gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` if test x$gcc_cv_gld_version != x; then break fi done gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` - rm -f collect-ld$host_exeext - $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ - 2>/dev/null -fi - -if test "x$gcc_cv_ld" = x; then - # Search the same directories that the installed compiler will - # search. Else we may find the wrong linker and lose. If we - # do not find a suitable linker binary, then try the user's - # path. - # - # Also note we have to check MD_EXEC_PREFIX before checking the - # user's path. Unfortunately, there is no good way to get at the - # value of MD_EXEC_PREFIX here. So we do a brute force search - # through all the known MD_EXEC_PREFIX values. Ugh. This needs - # to be fixed as part of the make/configure rewrite too. - - if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - else - test_prefix=$exec_prefix - fi +else + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 + in_tree_ld=no +fi - # If the loop below does not find an linker, then use whatever - # one we can find in the users's path. - # user's path. - if test "x$program_prefix" != xNONE; then - gcc_cv_ld=${program_prefix}ld$host_exeext - else - gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext - fi +# Figure out what nm we will be using. +gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils +if test "${gcc_cv_nm+set}" = set; then + : +else - test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ - $test_prefix/libexec/gcc/$target_noncanonical \ - /usr/lib/gcc/$target_noncanonical/$gcc_version \ - /usr/lib/gcc/$target_noncanonical \ - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ - $test_prefix/$target_noncanonical/bin" - - if test x$host = x$target; then - test_dirs="$test_dirs \ - /usr/libexec \ - /usr/ccs/gcc \ - /usr/ccs/bin \ - /udk/usr/ccs/bin \ - /bsd43/usr/lib/cmplrs/cc \ - /usr/cross64/usr/bin \ - /usr/lib/cmplrs/cc \ - /sysv/usr/lib/cmplrs/cc \ - /svr4/usr/lib/cmplrs/cc \ - /usr/bin" - fi +if test -f $gcc_cv_binutils_srcdir/configure.in \ + && test -f ../binutils/Makefile \ + && test x$build = x$host; then + gcc_cv_nm=../binutils/nm-new$build_exeext +elif test -x nm$build_exeext; then + gcc_cv_nm=./nm$build_exeext +elif test -x $NM_FOR_TARGET; then + gcc_cv_nm="$NM_FOR_TARGET" +else + # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. +set dummy $NM_FOR_TARGET; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_nm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_nm in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - for dir in $test_dirs; do - if test -x $dir/ld$host_exeext; then - gcc_cv_ld=$dir/ld$host_exeext - break; - fi - done -fi -case $in_tree_ld in - yes) - echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 -echo "${ECHO_T}\"newly built ld\"" >&6 - ;; - no) - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 - ;; + ;; esac +fi +gcc_cv_nm=$ac_cv_path_gcc_cv_nm + +if test -n "$gcc_cv_nm"; then + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +fi + -# Figure out what nm we will be using. -gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils echo "$as_me:$LINENO: checking what nm to use" >&5 echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 -in_tree_nm=no -if test -x nm$host_exeext; then - gcc_cv_nm=./nm$host_exeext -elif test -f $gcc_cv_binutils_srcdir/configure.in \ - && test -f ../binutils/Makefile; then +if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then # Single tree build which includes binutils. + echo "$as_me:$LINENO: result: newly built nm" >&5 +echo "${ECHO_T}newly built nm" >&6 in_tree_nm=yes - gcc_cv_nm=./nm$host_exeext - rm -f nm$host_exeext - $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null -elif test "x$program_prefix" != xNONE; then - gcc_cv_nm=${program_prefix}nm$host_exeext -else - gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext -fi -case $in_tree_nm in - yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 -echo "${ECHO_T}\"newly built nm\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 ;; -esac +else + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 + in_tree_nm=no +fi + +ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm + # Figure out what objdump we will be using. +if test "${gcc_cv_objdump+set}" = set; then + : +else + +if test -f $gcc_cv_binutils_srcdir/configure.in \ + && test -f ../binutils/Makefile \ + && test x$build = x$host; then + # Single tree build which includes binutils. + gcc_cv_objdump=../binutils/objdump$build_exeext +elif test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext +elif test -x $OBJDUMP_FOR_TARGET; then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. +set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_objdump in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump + +if test -n "$gcc_cv_objdump"; then + echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 +echo "${ECHO_T}$gcc_cv_objdump" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +fi + + echo "$as_me:$LINENO: checking what objdump to use" >&5 echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 -in_tree_objdump=no -if test -x objdump$host_exeext; then - gcc_cv_objdump=./objdump$host_exeext -elif test -f $gcc_cv_binutils_srcdir/configure.in \ - && test -f ../binutils/Makefile; then +if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then # Single tree build which includes binutils. - in_tree_objdump=yes - gcc_cv_objdump=./objdump$host_exeext - rm -f objdump$host_exeext - $symbolic_link ../binutils/objdump$host_exeext \ - objdump$host_exeext 2>/dev/null -elif test "x$program_prefix" != xNONE; then - gcc_cv_objdump=${program_prefix}objdump$host_exeext -else - gcc_cv_objdump=`echo objdump | \ - sed ${program_transform_name}`$host_exeext -fi -case $in_tree_objdump in - yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 -echo "${ECHO_T}\"newly built objdump\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; -esac + echo "$as_me:$LINENO: result: newly built objdump" >&5 +echo "${ECHO_T}newly built objdump" >&6 +elif test x$gcc_cv_objdump = x; then + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 +else + echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 +echo "${ECHO_T}$gcc_cv_objdump" >&6 +fi # Figure out what assembler alignment features are present. echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 @@ -10397,6 +13806,43 @@ _ACEOF fi +echo "$as_me:$LINENO: checking assembler for .weakref" >&5 +echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 +if test "${gcc_cv_as_weakref+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_weakref=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` + then gcc_cv_as_weakref=yes +fi + elif test x$gcc_cv_as != x; then + echo ' .weakref foobar, barfnot' > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_weakref=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 +echo "${ECHO_T}$gcc_cv_as_weakref" >&6 +if test $gcc_cv_as_weakref = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GAS_WEAKREF 1 +_ACEOF + +fi + echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then @@ -10496,8 +13942,12 @@ else -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ - -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` + -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ + -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` + ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` + ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` + ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then # If there was date string, but was earlier than 2002-04-04, fail @@ -10506,9 +13956,6 @@ else # If there was no date string nor ld version number, something is wrong gcc_cv_ld_hidden=no else - ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` - ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` - ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` test -z "$ld_vers_patch" && ld_vers_patch=0 if test "$ld_vers_major" -lt 2; then gcc_cv_ld_hidden=no @@ -10535,6 +13982,7 @@ echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 libgcc_visibility=no + if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then libgcc_visibility=yes @@ -10667,11 +14115,14 @@ cat > conftest.big <<EOF EOF # If the assembler didn't choke, and we can objdump, # and we got the correct data, then succeed. + # The text in the here-document typically retains its unix-style line + # endings, while the output of objdump will use host line endings. + # Therefore, use diff -b for the comparisons. if test x$gcc_cv_objdump != x \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | tail -3 > conftest.got \ - && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ - || cmp conftest.big conftest.got > /dev/null 2>&1; } + && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ + || diff -b conftest.big conftest.got > /dev/null 2>&1; } then gcc_cv_as_eh_frame=yes elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' @@ -10735,12 +14186,137 @@ fi echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 +if test $gcc_cv_as_shf_merge = no; then + echo "$as_me:$LINENO: checking assembler for section merging support" >&5 +echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 +if test "${gcc_cv_as_shf_merge+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_shf_merge=no + if test $in_tree_gas = yes; then + if test $in_tree_gas_is_elf = yes \ + && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` + then gcc_cv_as_shf_merge=yes +fi + elif test x$gcc_cv_as != x; then + echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s + if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_shf_merge=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 +echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 + +fi cat >>confdefs.h <<_ACEOF #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` _ACEOF +echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 +echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 +if test "${gcc_cv_as_comdat_group+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_comdat_group=no + if test $in_tree_gas = yes; then + if test $in_tree_gas_is_elf = yes \ + && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` + then gcc_cv_as_comdat_group=yes +fi + elif test x$gcc_cv_as != x; then + echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s + if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_comdat_group=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 +echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 + +if test $gcc_cv_as_comdat_group = yes; then + gcc_cv_as_comdat_group_percent=no +else + echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 +echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 +if test "${gcc_cv_as_comdat_group_percent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_comdat_group_percent=no + if test $in_tree_gas = yes; then + if test $in_tree_gas_is_elf = yes \ + && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` + then gcc_cv_as_comdat_group_percent=yes +fi + elif test x$gcc_cv_as != x; then + echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s + if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_comdat_group_percent=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 +echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 + +fi +if test $in_tree_ld != yes && test x"$ld_vers" != x; then + comdat_group=yes + if test 0"$ld_date" -lt 20050308; then + if test -n "$ld_date"; then + # If there was date string, but was earlier than 2005-03-08, fail + comdat_group=no + elif test "$ld_vers_major" -lt 2; then + comdat_group=no + elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then + comdat_group=no + fi + fi +else + # assume linkers other than GNU ld don't support COMDAT group + comdat_group=no +fi +if test $comdat_group = no; then + gcc_cv_as_comdat_group=no + gcc_cv_as_comdat_group_percent=no +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi` +_ACEOF + + # Thread-local storage - the check is heavily parametrized. conftest_s= tls_first_major= @@ -10770,6 +14346,57 @@ foo: .long 25 tls_first_minor=13 tls_as_opt=--fatal-warnings ;; + frv*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits +x: .long 25 + .text + call #gettlsoff(x)' + tls_first_major=2 + tls_first_minor=14 + ;; + hppa*-*-linux*) + conftest_s=' +t1: .reg %r20 +t2: .reg %r21 +gp: .reg %r19 + .section ".tdata","awT",@progbits +foo: .long 25 + .text + .align 4 + addil LT%foo-$tls_gdidx$,gp + ldo RT%foo-$tls_gdidx$(%r1),%arg0 + b __tls_get_addr + nop + addil LT%foo-$tls_ldidx$,gp + b __tls_get_addr + ldo RT%foo-$tls_ldidx$(%r1),%arg0 + addil LR%foo-$tls_dtpoff$,%ret0 + ldo RR%foo-$tls_dtpoff$(%r1),%t1 + mfctl %cr27,%t1 + addil LT%foo-$tls_ieoff$,gp + ldw RT%foo-$tls_ieoff$(%r1),%t2 + add %t1,%t2,%t3 + mfctl %cr27,%t1 + addil LR%foo-$tls_leoff$,%t1 + ldo RR%foo-$tls_leoff$(%r1),%t2' + tls_first_major=2 + tls_first_minor=15 + tls_as_opt=--fatal-warnings + ;; + arm*-*-*) + conftest_s=' + .section ".tdata","awT",%progbits +foo: .long 25 + .text +.word foo(gottpoff) +.word foo(tpoff) +.word foo(tlsgd) +.word foo(tlsldm) +.word foo(tlsldo)' + tls_first_major=2 + tls_first_minor=17 + ;; i[34567]86-*-*) conftest_s=' .section ".tdata","awT",@progbits @@ -10823,6 +14450,23 @@ foo: data8 25 tls_first_minor=13 tls_as_opt=--fatal-warnings ;; + mips*-*-*) + conftest_s=' + .section .tdata,"awT",@progbits +x: + .word 2 + .text + addiu $4, $28, %tlsgd(x) + addiu $4, $28, %tlsldm(x) + lui $4, %dtprel_hi(x) + addiu $4, $4, %dtprel_lo(x) + lw $4, %gottprel(x)($28) + lui $4, %tprel_hi(x) + addiu $4, $4, %tprel_lo(x)' + tls_first_major=2 + tls_first_minor=16 + tls_as_opt='-32 --fatal-warnings' + ;; powerpc-*-*) conftest_s=' .section ".tdata","awT",@progbits @@ -10936,6 +14580,15 @@ foo: .long 25 ;; sparc*-*-*) case "$target" in + sparc*-sun-solaris2.[56789]*) + # TLS was introduced in the Solaris 9 4/04 release but + # we do not enable it by default on Solaris 9 either. + if test "x$enable_tls" = xyes ; then + on_solaris=yes + else + enable_tls=no; + fi + ;; sparc*-sun-solaris2.*) on_solaris=yes ;; @@ -10997,7 +14650,12 @@ foo: .long 25 fi ;; esac -if test -z "$tls_first_major"; then +set_have_as_tls=no +if test "x$enable_tls" = xno ; then + : # TLS explicitly disabled. +elif test "x$enable_tls" = xyes ; then + set_have_as_tls=yes # TLS explicitly enabled. +elif test -z "$tls_first_major"; then : # If we don't have a check, assume no support. else echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 @@ -11030,16 +14688,68 @@ fi echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 echo "${ECHO_T}$gcc_cv_as_tls" >&6 if test $gcc_cv_as_tls = yes; then + set_have_as_tls=yes +fi +fi +if test $set_have_as_tls = yes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_AS_TLS 1 _ACEOF fi -fi # Target-specific assembler checks. +echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 +echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 +gcc_cv_ld_static_dynamic=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then + gcc_cv_ld_static_dynamic=yes + fi +elif test x$gcc_cv_ld != x; then + # Check if linker supports -Bstatic/-Bdynamic option + if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ + && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then + gcc_cv_ld_static_dynamic=yes + fi +fi +if test x"$gcc_cv_ld_static_dynamic" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LD_STATIC_DYNAMIC 1 +_ACEOF + +fi +echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 +echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 + +if test x"$demangler_in_ld" = xyes; then + echo "$as_me:$LINENO: checking linker --demangle support" >&5 +echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 + gcc_cv_ld_demangle=no + if test $in_tree_ld = yes; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ + gcc_cv_ld_demangle=yes + fi + elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then + # Check if the GNU linker supports --demangle option + if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then + gcc_cv_ld_demangle=yes + fi + fi + if test x"$gcc_cv_ld_demangle" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LD_DEMANGLE 1 +_ACEOF + + fi + echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 +echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 +fi + case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) @@ -11375,6 +15085,55 @@ fi ;; i[34567]86-*-* | x86_64-*-*) + case $target_os in + cygwin* | pe | mingw32*) + # Used for DWARF 2 in PE + echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 +echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 +if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_ix86_pe_secrel32=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` + then gcc_cv_as_ix86_pe_secrel32=yes +fi + elif test x$gcc_cv_as != x; then + echo '.text +foo: nop +.data + .secrel32 foo' > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + if test x$gcc_cv_ld != x \ + && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then + gcc_cv_as_ix86_pe_secrel32=yes + fi + rm -f conftest + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 +if test $gcc_cv_as_ix86_pe_secrel32 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GAS_PE_SECREL32_RELOC 1 +_ACEOF + +fi + ;; + esac + echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then @@ -11445,6 +15204,39 @@ _ACEOF fi + echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5 +echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6 +if test "${gcc_cv_as_ix86_ffreep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_ix86_ffreep=no + if test x$gcc_cv_as != x; then + echo 'ffreep %st(1)' > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_ix86_ffreep=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6 +if test $gcc_cv_as_ix86_ffreep = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_IX86_FFREEP 1 +_ACEOF + +fi + # This one is used unconditionally by i386.[ch]; it is to be defined # to 1 if the feature is present, 0 otherwise. echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 @@ -11533,11 +15325,45 @@ fi powerpc*-*-*) case $target in - *-*-aix*) conftest_s=' .csect .text[PR] + *-*-aix*) conftest_s=' .machine "pwr5" + .csect .text[PR] mfcr 3,128';; - *-*-darwin*) conftest_s=' .text + *-*-darwin*) + echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 +echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 +if test "${gcc_cv_as_machine_directive+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_machine_directive=no + if test x$gcc_cv_as != x; then + echo ' .machine ppc7400' > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_machine_directive=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 +echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 + + if test x$gcc_cv_as_machine_directive != xyes; then + echo "*** This target requires an assembler supporting \".machine\"" >&2 + echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 + test x$build = x$target && exit 1 + fi + conftest_s=' .text mfcr r3,128';; - *) conftest_s=' .text + *) conftest_s=' .machine power4 + .text mfcr 3,128';; esac @@ -11577,6 +15403,148 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi + + case $target in + *-*-aix*) conftest_s=' .machine "pwr5" + .csect .text[PR] + popcntb 3,3';; + *) conftest_s=' .machine power5 + .text + popcntb 3,3';; + esac + + echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 +echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 +if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_powerpc_popcntb=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` + then gcc_cv_as_powerpc_popcntb=yes +fi + elif test x$gcc_cv_as != x; then + echo "$conftest_s" > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_powerpc_popcntb=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 +echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 +if test $gcc_cv_as_powerpc_popcntb = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_POPCNTB 1 +_ACEOF + +fi + + case $target in + *-*-aix*) conftest_s=' .machine "pwr5x" + .csect .text[PR] + frin 1,1';; + *) conftest_s=' .machine power5 + .text + frin 1,1';; + esac + + echo "$as_me:$LINENO: checking assembler for fp round support" >&5 +echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 +if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_powerpc_fprnd=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` + then gcc_cv_as_powerpc_fprnd=yes +fi + elif test x$gcc_cv_as != x; then + echo "$conftest_s" > conftest.s + if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_powerpc_fprnd=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 +echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 +if test $gcc_cv_as_powerpc_fprnd = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_FPRND 1 +_ACEOF + +fi + + case $target in + *-*-aix*) conftest_s=' .csect .text[PR] +LCF..0: + addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; + *-*-darwin*) + conftest_s=' .text +LCF0: + addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; + *) conftest_s=' .text +.LCF0: + addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; + esac + + echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 +echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 +if test "${gcc_cv_as_powerpc_rel16+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_powerpc_rel16=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` + then gcc_cv_as_powerpc_rel16=yes +fi + elif test x$gcc_cv_as != x; then + echo "$conftest_s" > conftest.s + if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + gcc_cv_as_powerpc_rel16=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 +echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 +if test $gcc_cv_as_powerpc_rel16 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_REL16 1 +_ACEOF + +fi ;; mips*-*-*) @@ -11615,9 +15583,26 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" fi fi + ;; +esac +# Mips and HP-UX need the GNU assembler. +# Linux on IA64 might be able to use the Intel assembler. + +case "$target" in + mips*-*-* | *-*-hpux* ) + if test x$gas_flag = xyes \ + || test x"$host" != x"$build" \ + || test ! -x "$gcc_cv_as" \ + || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then + : + else + echo "*** This configuration requires the GNU assembler" >&2 + exit 1 + fi ;; esac + # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any # info to the output file. So, as supported targets are added to gas 2.11, @@ -11627,7 +15612,7 @@ esac case "$target" in i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ - | xstormy16*-*-* | cris-*-* | xtensa-*-*) + | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-*) insn="nop" ;; ia64*-*-* | s390*-*-*) @@ -11662,8 +15647,9 @@ fi echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } then - # ??? This fails with non-gnu grep. Maybe use objdump? - if grep debug_line conftest.o > /dev/null 2>&1; then + if test x$gcc_cv_objdump != x \ + && $gcc_cv_objdump -h conftest.o 2> /dev/null \ + | grep debug_line > /dev/null 2>&1; then gcc_cv_as_dwarf2_debug_line=yes fi else @@ -11861,6 +15847,7 @@ elif test x$gcc_cv_ld != x; then gcc_cv_ld_eh_frame_hdr=yes fi fi + if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then cat >>confdefs.h <<\_ACEOF @@ -11895,63 +15882,115 @@ fi echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 echo "${ECHO_T}$gcc_cv_ld_pie" >&6 -echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 -echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 -gcc_cv_ld_static_dynamic=no +# -------- +# UNSORTED +# -------- + +echo "$as_me:$LINENO: checking linker --as-needed support" >&5 +echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 +if test "${gcc_cv_ld_as_needed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_ld_as_needed=no if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then - gcc_cv_ld_static_dynamic=yes + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ + && test $in_tree_ld_is_elf = yes; then + gcc_cv_ld_as_needed=yes fi elif test x$gcc_cv_ld != x; then - # Check if linker supports -Bstatic/-Bdynamic option - if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ - && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then - gcc_cv_ld_static_dynamic=yes + # Check if linker supports --as-needed and --no-as-needed options + if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then + gcc_cv_ld_as_needed=yes fi fi -if test x"$gcc_cv_ld_static_dynamic" = xyes; then + +fi +echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 +echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 +if test x"$gcc_cv_ld_as_needed" = xyes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_LD_STATIC_DYNAMIC 1 +#define HAVE_LD_AS_NEEDED 1 _ACEOF fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 -echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 -case "$target" in - *-*-linux*) - echo "$as_me:$LINENO: checking linker --as-needed support" >&5 -echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 -if test "${gcc_cv_ld_as_needed+set}" = set; then +case "$target:$tm_file" in + powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) + echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 +echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 +if test "${gcc_cv_ld_no_dot_syms+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - gcc_cv_ld_as_needed=no + gcc_cv_ld_no_dot_syms=no if test $in_tree_ld = yes ; then - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ - && test $in_tree_ld_is_elf = yes; then - gcc_cv_ld_as_needed=yes + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then + gcc_cv_ld_no_dot_syms=yes fi - elif test x$gcc_cv_ld != x; then - # Check if linker supports --as-needed and --no-as-needed options - if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then - gcc_cv_ld_as_needed=yes + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + cat > conftest1.s <<EOF + .text + bl .foo +EOF + cat > conftest2.s <<EOF + .section ".opd","aw" + .align 3 + .globl foo + .type foo,@function +foo: + .quad .LEfoo,.TOC.@tocbase,0 + .text +.LEfoo: + blr + .size foo,.-.LEfoo +EOF + if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ + && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ + && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then + gcc_cv_ld_no_dot_syms=yes fi + rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 -echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 - if test x"$gcc_cv_ld_as_needed" = xyes; then +echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 +echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 + if test x"$gcc_cv_ld_no_dot_syms" = xyes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_LD_AS_NEEDED 1 +#define HAVE_LD_NO_DOT_SYMS 1 _ACEOF fi ;; esac +echo "$as_me:$LINENO: checking linker --sysroot support" >&5 +echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 +if test "${gcc_cv_ld_sysroot+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_ld_sysroot=no + if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then + gcc_cv_ld_sysroot=yes + fi + elif test x$gcc_cv_ld != x; then + if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then + gcc_cv_ld_sysroot=yes + fi + fi +fi +echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 +echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 +if test x"$gcc_cv_ld_sysroot" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LD_SYSROOT 1 +_ACEOF + +fi + if test x$with_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then @@ -11961,142 +16000,94 @@ _ACEOF fi -# Figure out what language subdirectories are present. -# Look if the user specified --enable-languages="..."; if not, use -# the environment variable $LANGUAGES if defined. $LANGUAGES might -# go away some day. -# NB: embedded tabs in this IF block -- do not untabify -if test x"${enable_languages+set}" != xset; then - if test x"${LANGUAGES+set}" = xset; then - enable_languages="${LANGUAGES}" - { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5 -echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;} - +# Test for stack protector support in target C library. +case "$target" in + *-*-linux*) + echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 +echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 +if test "${gcc_cv_libc_provides_ssp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_libc_provides_ssp=no + if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then + if test "x$with_sysroot" = x; then + glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" + elif test "x$with_sysroot" = xyes; then + glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" else - enable_languages=all + glibc_header_dir="${with_sysroot}/usr/include" fi -else - if test x"${enable_languages}" = x \ - || test x"${enable_languages}" = xyes; - then - { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5 -echo "$as_me: error: --enable-languages needs at least one language argument" >&2;} - { (exit 1); exit 1; }; } + else + glibc_header_dir=/usr/include + fi + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. + if test -f $glibc_header_dir/features.h \ + && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ + $glibc_header_dir/features.h > /dev/null; then + if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ + $glibc_header_dir/features.h > /dev/null; then + gcc_cv_libc_provides_ssp=yes + elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ + $glibc_header_dir/features.h > /dev/null \ + && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ + $glibc_header_dir/features.h > /dev/null; then + gcc_cv_libc_provides_ssp=yes fi + fi fi -enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` +echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 +echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; + *) gcc_cv_libc_provides_ssp=no ;; +esac +if test x$gcc_cv_libc_provides_ssp = xyes; then -# First scan to see if an enabled language requires some other language. -# We assume that a given config-lang.in will list all the language -# front ends it requires, even if some are required indirectly. -for lang in ${srcdir}/*/config-lang.in -do - case $lang in - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/[*]/config-lang.in) - ;; - *) - lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` - this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` - for other in $this_lang_requires - do - case ,${enable_languages}, in - *,$other,*) - ;; - *,all,*) - ;; - *,$lang_alias,*) - enable_languages="$enable_languages,$other" - ;; - esac - done - ;; - esac -done +cat >>confdefs.h <<\_ACEOF +#define TARGET_LIBC_PROVIDES_SSP 1 +_ACEOF -expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` -found_languages= -subdirs= -for lang in ${srcdir}/*/config-lang.in -do - case $lang in - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/[*]/config-lang.in) ;; - *) - lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` - this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` - build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` - if test "x$lang_alias" = x - then - echo "$lang doesn't set \$language." 1>&2 - exit 1 - fi - case ${build_by_default},${enable_languages}, in - *,$lang_alias,*) add_this_lang=yes ;; - no,*) add_this_lang=no ;; - *,all,*) add_this_lang=yes ;; - *) add_this_lang=no ;; - esac - found_languages="${found_languages} ${lang_alias}" - if test x"${add_this_lang}" = xyes; then - case $lang in - ${srcdir}/ada/config-lang.in) - if test x$have_gnat = xyes ; then - subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" - fi - ;; - *) - subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" - ;; - esac - fi - ;; - esac -done +fi -missing_languages= -for expected_language in ${expected_languages} .. -do - if test "${expected_language}" != ..; then - missing_language="${expected_language}" - if test "${expected_language}" = "c" \ - || test "${expected_language}" = "all"; then - missing_language= - fi - for found_language in ${found_languages} .. - do - if test "${found_language}" != ..; then - if test "${expected_language}" = "${found_language}"; then - missing_language= - fi - fi - done - if test "x${missing_language}" != x; then - missing_languages="${missing_languages} ${missing_language}" - fi - fi -done +# Check if TFmode long double should be used by default or not. +# Some glibc targets used DFmode long double, but with glibc 2.4 +# and later they can use TFmode. +case "$target" in + powerpc*-*-*gnu* | \ + sparc*-*-linux* | \ + s390*-*-linux* | \ + alpha*-*-linux*) + +# Check whether --with-long-double-128 or --without-long-double-128 was given. +if test "${with_long_double_128+set}" = set; then + withval="$with_long_double_128" + gcc_cv_target_ldbl128="$with_long_double_128" +else + gcc_cv_target_ldbl128=no + if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then + if test "x$with_sysroot" = x; then + glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" + elif test "x$with_sysroot" = xyes; then + glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" + else + glibc_header_dir="${with_sysroot}/usr/include" + fi + else + glibc_header_dir=/usr/include + fi + grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ + $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ + && gcc_cv_target_ldbl128=yes -if test "x$missing_languages" != x; then - { { echo "$as_me:$LINENO: error: -The following requested languages were not found:${missing_languages} -The following languages were available: c${found_languages}" >&5 -echo "$as_me: error: -The following requested languages were not found:${missing_languages} -The following languages were available: c${found_languages}" >&2;} - { (exit 1); exit 1; }; } -fi +fi; + ;; +esac +if test x$gcc_cv_target_ldbl128 = xyes; then -# Make gthr-default.h if we have a thread file. -gthread_flags= -if test $thread_file != single; then - rm -f gthr-default.h - echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h - gthread_flags=-DHAVE_GTHR_DEFAULT -fi +cat >>confdefs.h <<\_ACEOF +#define TARGET_DEFAULT_LONG_DOUBLE_128 1 +_ACEOF +fi # Find out what GC implementation we want, or may, use. @@ -12104,9 +16095,17 @@ fi if test "${with_gc+set}" = set; then withval="$with_gc" case "$withval" in - simple | page | zone) + page) GGC=ggc-$withval ;; + zone) + GGC=ggc-$withval + +cat >>confdefs.h <<\_ACEOF +#define GGC_ZONE 1 +_ACEOF + + ;; *) { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} @@ -12153,32 +16152,24 @@ else MAINT='#' fi +# -------------- +# Language hooks +# -------------- + # Make empty files to contain the specs and options for each language. # Then add #include lines to for a compiler that has specs and/or options. +subdirs= lang_opt_files= lang_specs_files= lang_tree_files= -for subdir in . $subdirs -do - if test -f $srcdir/$subdir/lang.opt; then - lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" - fi - if test -f $srcdir/$subdir/lang-specs.h; then - lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" - fi - if test -f $srcdir/$subdir/$subdir-tree.def; then - lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" - fi -done - # These (without "all_") are set in each config-lang.in. # `language' must be a single word so is spelled singularly. all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders' +all_outputs='Makefile gccbug mklibgcc libada-mk' # List of language makefile fragments. all_lang_makefrags= # List of language subdirectory makefiles. Deprecated. @@ -12189,6 +16180,10 @@ all_gtfiles="$target_gtfiles" all_gtfiles_files_langs= all_gtfiles_files_files= +# These are the languages that are set in --enable-languages, +# and are available in the GCC tree. +all_selected_languages= + # Add the language fragments. # Languages are added via two mechanisms. Some information must be # recorded in makefile variables, these are defined in config-lang.in. @@ -12198,77 +16193,122 @@ all_gtfiles_files_files= language_hooks="Make-hooks" -for s in $subdirs +for lang in ${srcdir}/*/config-lang.in do - language= - boot_language= - compilers= - stagestuff= - outputs= - gtfiles= - . ${srcdir}/$s/config-lang.in - if test "x$language" = x - then - echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 - exit 1 - fi - all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" - if test -f ${srcdir}/$s/Makefile.in - then all_lang_makefiles="$s/Makefile" - fi - all_languages="$all_languages $language" - if test "x$boot_language" = xyes - then - all_boot_languages="$all_boot_languages $language" - fi - all_compilers="$all_compilers $compilers" - all_stagestuff="$all_stagestuff $stagestuff" - all_outputs="$all_outputs $outputs" - all_gtfiles="$all_gtfiles $gtfiles" - for f in $gtfiles - do - all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " - all_gtfiles_files_files="$all_gtfiles_files_files ${f} " - done + test "$lang" = "${srcdir}/*/config-lang.in" && continue + + lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` + if test "x$lang_alias" = x + then + echo "$lang doesn't set \$language." 1>&2 + exit 1 + fi + subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" + subdirs="$subdirs $subdir" + case ",$enable_languages," in + *,$lang_alias,*) + all_selected_languages="$all_selected_languages $lang_alias" + if test -f $srcdir/$subdir/lang-specs.h; then + lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" + fi + ;; + esac + + language= + boot_language= + compilers= + stagestuff= + outputs= + gtfiles= + subdir_requires= + . ${srcdir}/$subdir/config-lang.in + if test "x$language" = x + then + echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 + exit 1 + fi + + ok=: + case ",$enable_languages," in + *,$lang_alias,*) ;; + *) + for i in $subdir_requires; do + test -f "${srcdir}/$i/config-lang.in" && continue + ok=false + break + done + ;; + esac + $ok || continue + + all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" + if test -f $srcdir/$subdir/lang.opt; then + lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" + fi + if test -f $srcdir/$subdir/$subdir-tree.def; then + lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" + fi + if test -f ${srcdir}/$subdir/Makefile.in + then all_lang_makefiles="$subdir/Makefile" + fi + all_languages="$all_languages $language" + if test "x$boot_language" = xyes + then + all_boot_languages="$all_boot_languages $language" + fi + all_compilers="$all_compilers $compilers" + all_stagestuff="$all_stagestuff $stagestuff" + all_outputs="$all_outputs $outputs" + all_gtfiles="$all_gtfiles $gtfiles" + for f in $gtfiles + do + all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " + all_gtfiles_files_files="$all_gtfiles_files_files ${f} " + done done # Pick up gtfiles for c gtfiles= -s="c" +subdir="c" . ${srcdir}/c-config-lang.in all_gtfiles="$all_gtfiles $gtfiles" for f in $gtfiles do - all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " + all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " all_gtfiles_files_files="$all_gtfiles_files_files ${f} " done check_languages= -for language in $all_languages +for language in $all_selected_languages do - check_languages="$check_languages check-$language" + check_languages="$check_languages check-$language" done # We link each language in with a set of hooks, reached indirectly via -# lang.${target}. +# lang.${target}. Only do so for selected languages. rm -f Make-hooks touch Make-hooks -target_list="all.build all.cross start.encap rest.encap tags \ - install-normal install-common install-man \ +target_list="all.cross start.encap rest.encap tags \ + install-common install-man install-info dvi pdf html \ uninstall info man srcextra srcman srcinfo \ mostlyclean clean distclean maintainer-clean \ stage1 stage2 stage3 stage4 stageprofile stagefeedback" + for t in $target_list do x= - for lang in $all_languages + for lang in $all_selected_languages do - x="$x $lang.$t" + x="$x $lang.$t" done echo "lang.$t: $x" >> Make-hooks done +# -------- +# UNSORTED +# -------- + # Create .gdbinit. echo "dir ." > .gdbinit @@ -12349,18 +16389,37 @@ fi; objdir=`${PWDCMD-pwd}` -# Substitute configuration variables - - +# Check whether --with-datarootdir or --without-datarootdir was given. +if test "${with_datarootdir+set}" = set; then + withval="$with_datarootdir" + datarootdir="\${prefix}/$with_datarootdir" +else + datarootdir='$(prefix)/share' +fi; +# Check whether --with-docdir or --without-docdir was given. +if test "${with_docdir+set}" = set; then + withval="$with_docdir" + docdir="\${prefix}/$with_docdir" +else + docdir='$(datarootdir)' +fi; +# Check whether --with-htmldir or --without-htmldir was given. +if test "${with_htmldir+set}" = set; then + withval="$with_htmldir" + htmldir="\${prefix}/$with_htmldir" +else + htmldir='$(docdir)' +fi; +# Substitute configuration variables @@ -12420,27 +16479,9 @@ objdir=`${PWDCMD-pwd}` -if test x"$SET_GCC_LIB_PATH_CMD" != x; then - # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to - # - # eval "set_gcc_lib_path=XXX=path; export XXX;" - # - eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD" - # It will set set_gcc_lib_path to "export XXX=path" for GNU make. - set_gcc_lib_path="export $set_gcc_lib_path" -else - set_gcc_lib_path= -fi -# If it doesn't already exist, create document directory -echo "checking for the document directory." 1>&2 -if test -d doc ; then - true -else - mkdir doc -fi # Echo link setup. if test x${build} = x${host} ; then @@ -12460,6 +16501,9 @@ else fi fi + + + # Configure the subdirectories # AC_CONFIG_SUBDIRS($subdirs) @@ -12994,8 +17038,6 @@ cat >>$CONFIG_STATUS <<_ACEOF # subdirs='$subdirs' -symbolic_link='$symbolic_link' - _ACEOF @@ -13106,6 +17148,8 @@ s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t +s,@target_noncanonical@,$target_noncanonical,;t t +s,@build_libsubdir@,$build_libsubdir,;t t s,@build_subdir@,$build_subdir,;t t s,@host_subdir@,$host_subdir,;t t s,@target_subdir@,$target_subdir,;t t @@ -13120,29 +17164,34 @@ s,@OBJEXT@,$OBJEXT,;t t s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t s,@CPP@,$CPP,;t t -s,@GNATBIND@,$GNATBIND,;t t -s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t +s,@EGREP@,$EGREP,;t t s,@strict1_warn@,$strict1_warn,;t t +s,@cxx_compat_warn@,$cxx_compat_warn,;t t s,@warn_cflags@,$warn_cflags,;t t s,@WERROR@,$WERROR,;t t s,@nocommon_flag@,$nocommon_flag,;t t -s,@EGREP@,$EGREP,;t t +s,@TREEBROWSER@,$TREEBROWSER,;t t s,@valgrind_path@,$valgrind_path,;t t s,@valgrind_path_defines@,$valgrind_path_defines,;t t s,@valgrind_command@,$valgrind_command,;t t s,@coverage_flags@,$coverage_flags,;t t s,@enable_multilib@,$enable_multilib,;t t +s,@enable_decimal_float@,$enable_decimal_float,;t t s,@enable_shared@,$enable_shared,;t t s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t s,@onestep@,$onestep,;t t +s,@datarootdir@,$datarootdir,;t t +s,@docdir@,$docdir,;t t +s,@htmldir@,$htmldir,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@AWK@,$AWK,;t t -s,@LN@,$LN,;t t s,@LN_S@,$LN_S,;t t +s,@LN@,$LN,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@ranlib_flags@,$ranlib_flags,;t t s,@INSTALL@,$INSTALL,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -13153,19 +17202,21 @@ s,@BUILD_INFO@,$BUILD_INFO,;t t s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t s,@FLEX@,$FLEX,;t t s,@BISON@,$BISON,;t t +s,@NM@,$NM,;t t +s,@AR@,$AR,;t t s,@stage1_cflags@,$stage1_cflags,;t t s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t s,@LDEXP_LIB@,$LDEXP_LIB,;t t s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t s,@LIBICONV@,$LIBICONV,;t t +s,@LTLIBICONV@,$LTLIBICONV,;t t s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t s,@manext@,$manext,;t t s,@objext@,$objext,;t t +s,@gthread_flags@,$gthread_flags,;t t s,@extra_modes_file@,$extra_modes_file,;t t -s,@FORBUILD@,$FORBUILD,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t +s,@extra_opt_files@,$extra_opt_files,;t t s,@USE_NLS@,$USE_NLS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t @@ -13174,18 +17225,28 @@ s,@XGETTEXT@,$XGETTEXT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@POSUB@,$POSUB,;t t s,@CATALOGS@,$CATALOGS,;t t +s,@DATADIRNAME@,$DATADIRNAME,;t t +s,@INSTOBJEXT@,$INSTOBJEXT,;t t +s,@GENCAT@,$GENCAT,;t t +s,@CATOBJEXT@,$CATOBJEXT,;t t +s,@host_cc_for_libada@,$host_cc_for_libada,;t t s,@CROSS@,$CROSS,;t t s,@ALL@,$ALL,;t t s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t s,@inhibit_libc@,$inhibit_libc,;t t -s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t -s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t s,@STMP_FIXINC@,$STMP_FIXINC,;t t s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t +s,@collect2@,$collect2,;t t +s,@gcc_cv_as@,$gcc_cv_as,;t t +s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t +s,@gcc_cv_ld@,$gcc_cv_ld,;t t +s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t +s,@gcc_cv_nm@,$gcc_cv_nm,;t t +s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t +s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t s,@libgcc_visibility@,$libgcc_visibility,;t t -s,@gthread_flags@,$gthread_flags,;t t s,@GGC@,$GGC,;t t s,@zlibdir@,$zlibdir,;t t s,@zlibinc@,$zlibinc,;t t @@ -13204,6 +17265,7 @@ s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t s,@all_lang_makefrags@,$all_lang_makefrags,;t t s,@all_lang_makefiles@,$all_lang_makefiles,;t t s,@all_languages@,$all_languages,;t t +s,@all_selected_languages@,$all_selected_languages,;t t s,@all_stagestuff@,$all_stagestuff,;t t s,@build_exeext@,$build_exeext,;t t s,@build_install_headers_dir@,$build_install_headers_dir,;t t @@ -13225,10 +17287,6 @@ s,@extra_programs@,$extra_programs,;t t s,@float_h_file@,$float_h_file,;t t s,@gcc_config_arguments@,$gcc_config_arguments,;t t s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t -s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t -s,@gcc_version@,$gcc_version,;t t -s,@gcc_version_full@,$gcc_version_full,;t t -s,@gcc_version_trigger@,$gcc_version_trigger,;t t s,@host_exeext@,$host_exeext,;t t s,@host_xm_file_list@,$host_xm_file_list,;t t s,@host_xm_include_list@,$host_xm_include_list,;t t @@ -13245,7 +17303,6 @@ s,@out_file@,$out_file,;t t s,@out_object_file@,$out_object_file,;t t s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t -s,@symbolic_link@,$symbolic_link,;t t s,@thread_file@,$thread_file,;t t s,@tm_file_list@,$tm_file_list,;t t s,@tm_include_list@,$tm_include_list,;t t @@ -13255,11 +17312,11 @@ s,@tm_p_include_list@,$tm_p_include_list,;t t s,@xm_file_list@,$xm_file_list,;t t s,@xm_include_list@,$xm_include_list,;t t s,@xm_defines@,$xm_defines,;t t -s,@target_noncanonical@,$target_noncanonical,;t t s,@c_target_objs@,$c_target_objs,;t t s,@cxx_target_objs@,$cxx_target_objs,;t t s,@target_cpu_default@,$target_cpu_default,;t t -s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t +s,@GMPLIBS@,$GMPLIBS,;t t +s,@GMPINC@,$GMPINC,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t /@language_hooks@/r $language_hooks @@ -13840,7 +17897,7 @@ case ${CONFIG_HEADERS} in echo > cstamp-h ;; esac # Make sure all the subdirs exist. -for d in $subdirs +for d in $subdirs doc build do test -d $d || mkdir $d done @@ -13850,18 +17907,20 @@ done # FLAGS_TO_PASS has been modified to solve the problem there. # This is virtually a duplicate of what happens in configure.lang; we do # an extra check to make sure this only happens if ln -s can be used. -if test "$symbolic_link" = "ln -s"; then - for d in ${subdirs} fixinc ; do +case "$LN_S" in + *-s*) + for d in ${subdirs} ; do STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include do rm -f $t - $symbolic_link ../$t $t 2>/dev/null + $LN_S ../$t $t 2>/dev/null done cd $STARTDIR - done -else true ; fi + done + ;; +esac ;; esac done |