X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfigure;h=220fcafa11799e3c638bd664fd6a4461ab3dcb1b;hb=54daa60094d5125e41489c6f6fe28a6ec3302473;hp=33a6da9e15f0fff7233f2287e7c3a2095da98497;hpb=151899c537d746a9a9256b24370056707d6ec494;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/configure b/gcc/configure index 33a6da9e15f..220fcafa117 100755 --- a/gcc/configure +++ b/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #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 strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER 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_S LN 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 gthread_flags 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 collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB 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 GMPLIBS GMPINC 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_subdir host_subdir target_subdir gcc_version_trigger gcc_version_full gcc_version GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER 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_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 PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 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_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 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 set_gcc_lib_path GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -867,11 +867,11 @@ Optional Features: --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 misc,tree,gc,rtlflag + Categories are: assert,fold,gc,gcac,misc, + rtlflag,rtl,tree,valgrind,release,yes,all; --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, @@ -886,10 +886,10 @@ Optional Features: --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-libunwind-exceptions force use libunwind for exceptions --disable-win32-registry disable lookup of installation paths in the Registry on Windows hosts @@ -915,16 +915,19 @@ 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-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={page,zone} choose the garbage collection mechanism to use with the compiler --with-system-zlib use installed libz - --with-libbanshee enable libbanshee --with-slibdir=DIR shared libraries in DIR LIBDIR Some influential environment variables: @@ -1380,6 +1383,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers auto-host.h:config.in" +#Set to 1 on a release branch +is_release= + # Determine the host, build, and target systems ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -1506,6 +1512,8 @@ esac esac + + # Determine the target- and build-specific subdirectories # Prefix 'build-' so this never conflicts with target_subdir. build_subdir="build-${build_noncanonical}" @@ -1593,6 +1601,23 @@ echo "$as_me: error: { (exit 1); exit 1; }; } fi + +if test "${with_gcc_version_trigger+set}" = set; then + gcc_version_trigger=$with_gcc_version_trigger +else + gcc_version_trigger=$srcdir/../gcc/version.c +fi +if test -f "${gcc_version_trigger}"; then + gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` +else + gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` +fi +gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` + + + + + # ----------- # Directories # ----------- @@ -1639,7 +1664,7 @@ 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 + libstdcxx_incdir=c++/${gcc_version} gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} fi fi @@ -1734,6 +1759,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 # ---------------------- @@ -2818,6 +2853,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 @@ -3261,26 +3312,42 @@ _ACEOF # 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 "$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 - 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 - +#include +#include +#include +#include int main () { -switch (0) case 0: case (sizeof (void *) == $ac_size):; + ; return 0; } @@ -3307,125 +3374,154 @@ 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_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_void_p != x ; then break; fi -done +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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi +rm -f conftest* -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;} - { (exit 1); exit 1; }; } 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 +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 +_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* -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 +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 - 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 - +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -switch (0) case 0: case (sizeof (short) == $ac_size):; - ; - 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_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 +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='test -s conftest.$ac_objext' + (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=$ac_size + : else - echo "$as_me: failed program was:" >&5 + 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 conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_short != x ; then break; fi -done - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - -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 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +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 SIZEOF_SHORT $ac_cv_sizeof_short +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 _ACEOF +fi -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 +# 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 - 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 - +$ac_includes_default -int -main () -{ -switch (0) case 0: case (sizeof (int) == $ac_size):; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -3449,51 +3545,46 @@ 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 + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_int != x ; then break; fi -done - 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 -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 >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF +done -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 "$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 - 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 - - +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (long) == $ac_size):; +if ((void * *) 0) + return 0; +if (sizeof (void *)) + return 0; ; return 0; } @@ -3520,52 +3611,43 @@ 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_cv_type_void_p=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_type_void_p=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_sizeof_long != x ; then break; fi -done - fi +echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6 -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 1); exit 1; }; } -fi -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 - - -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 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 - - +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (long long) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; +test_array [0] = 0 + ; return 0; } @@ -3592,53 +3674,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_sizeof_long_long=$ac_size -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 x$ac_cv_sizeof_long_long != x ; then break; fi -done - -fi - -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 - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -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 -else - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. - cat >conftest.$ac_ext <<_ACEOF + 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. */ -#include "confdefs.h" -#include - - +$ac_includes_default int main () { -switch (0) case 0: case (sizeof (__int64) == $ac_size):; +static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } @@ -3665,57 +3715,81 @@ 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_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___int64 != x ; then break; fi -done - -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; }; } -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 -echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define SIZEOF___INT64 $ac_cv_sizeof___int64 +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 - -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 -# 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 + ; + 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 (void *))) >= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -3739,34 +3813,48 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_w_no_long_long=yes + ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_no_long_long=no +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 - CFLAGS="$save_CFLAGS" + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo= ac_hi= 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" +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 + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -3790,42 +3878,130 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_w_no_variadic_macros=yes + ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_no_variadic_macros=no +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" +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 +#include +int +main () +{ -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 + 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); -strict1_warn= -if test $ac_cv_prog_cc_w_no_long_long = yes \ - && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then - strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" + ; + 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 -# 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 "$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 - 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 +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 @@ -3849,192 +4025,1840 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_w_old_style_definition=yes + ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_old_style_definition=no +ac_cv_type_short=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_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 +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 -# 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" - +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 - enable_werror_always=no -fi; -if test x${enable_werror_always} = xyes ; then - strict1_warn="${strict1_warn} -Werror" - WERROR=-Werror -fi + 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 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)' + ; + 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 () +{ +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_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 + 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 +#include +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 + +( 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 + 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. */ +$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 () +{ +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_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 (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_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 + +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 + +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 (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_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_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 +#include +int +main () +{ + + 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 + +( 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 +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_INT $ac_cv_sizeof_int +_ACEOF + + +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 + 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 *) 0) + return 0; +if (sizeof (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=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 +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_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 + + ; + 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 +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))) < 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 () +{ +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_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 + 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))) <= $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 +#include +int +main () +{ + + 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); + + ; + 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 + 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 +rm -f conftest.val +else + ac_cv_sizeof_long=0 +fi +fi +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 + + +if test $ac_cv_c_long_long = yes; 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.$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.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 +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 + 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 -# 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=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 + ; + 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 - enable_werror=yes -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=`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 -# 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;} + ; + 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 + + ; + 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 + 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 + +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 - # Enable some checks by default for development versions of GCC -ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; -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 +#include +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 - TREEBROWSER=tree-browser.o +( 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 +fi +rm -f conftest.val +else + ac_cv_sizeof_long_long=0 +fi +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_gc_checking != x ; then -cat >>confdefs.h <<\_ACEOF -#define ENABLE_GC_CHECKING 1 +fi +if test $ac_cv_c___int64 = yes; 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 + 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 -if test x$ac_gc_always_collect != x ; then +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 -cat >>confdefs.h <<\_ACEOF -#define ENABLE_GC_ALWAYS_COLLECT 1 +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 + 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; +test_array [0] = 0 -fi -if test x$ac_fold_checking != x ; then + ; + 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 -cat >>confdefs.h <<\_ACEOF -#define ENABLE_FOLD_CHECKING 1 + ; + 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 -valgrind_path_defines= -valgrind_command= - - -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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done 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: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -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 +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))) < 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. */ -#include -#include -#include -#include - +$ac_includes_default int main () { +static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; +test_array [0] = 0 ; return 0; @@ -4062,61 +5886,95 @@ 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no +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 $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 - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + done 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= ac_hi= fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +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 +$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. */ @@ -4124,28 +5982,36 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +$ac_includes_default +long longval () { return (long) (sizeof (__int64)); } +unsigned long ulongval () { return (long) (sizeof (__int64)); } +#include +#include 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 @@ -4159,57 +6025,170 @@ 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 - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 +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 + fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. +# --------------------- +# 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 +# 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" +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 +strict1_warn= +if test $ac_cv_prog_cc_w_no_long_long = yes \ + && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then + strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" +fi -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 +# 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 @@ -4233,26 +6212,181 @@ 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 -_ACEOF +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 + +# 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 + +# 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. +# 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_tree_checking= +ac_rtl_checking= +ac_rtlflag_checking= +ac_gc_checking= +ac_gc_always_collect= +ac_fold_checking= +IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," +for check in $ac_checking_flags +do + case $check in + yes) ac_assert_checking=1 ; ac_checking=1 ; + ac_tree_checking=1 ; ac_gc_checking=1 ; + ac_rtlflag_checking=1 ;; + no) ac_assert_checking= ; ac_checking= ; + ac_tree_checking= ; ac_rtl_checking= ; + ac_rtlflag_checking= ; ac_gc_checking= ; + ac_gc_always_collect= ; ac_fold_checking= ;; + all) ac_assert_checking=1 ; ac_checking=1 ; + ac_tree_checking=1 ; ac_rtl_checking=1 ; + ac_rtlflag_checking=1 ; ac_gc_checking=1 ; + ac_gc_always_collect=1 ; ac_fold_checking=1 ;; + release) ac_assert_checking=1 ;; + 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 ;; + rtlflag) ac_rtlflag_checking=1 ;; + rtl) ac_rtl_checking=1 ;; + tree) ac_tree_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;} + { (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_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 @@ -4906,7 +7040,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 @@ -4929,7 +7063,12 @@ else then gcc_cv_prog_LN_S=ln else - gcc_cv_prog_LN_S=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 @@ -4944,8 +7083,8 @@ else 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 + 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 @@ -5055,6 +7194,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: @@ -5189,16 +7341,11 @@ 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. +# 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 @@ -5242,7 +7389,7 @@ 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:5245: version of makeinfo is $ac_prog_version" >&5 + echo "configure:7392: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[2-9]*) @@ -5254,49 +7401,140 @@ fi echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 else - gcc_cv_prog_makeinfo_modern=no -fi + gcc_cv_prog_makeinfo_modern=no +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 +echo "$as_me: WARNING: +*** Makeinfo is missing or too old. +*** Info documentation will not be built." >&2;} + BUILD_INFO= +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 +if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + GENERATED_MANPAGES=generated-manpages +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + GENERATED_MANPAGES= +fi + + +# How about lex? +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$FLEX"; then + ac_cv_prog_FLEX="$FLEX" # 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_FLEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +FLEX=$ac_cv_prog_FLEX +if test -n "$FLEX"; then + echo "$as_me:$LINENO: result: $FLEX" >&5 +echo "${ECHO_T}$FLEX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$FLEX" && break +done +test -n "$FLEX" || FLEX="$MISSING flex" + + +# Bison? +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # 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_BISON="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done fi - -if test $gcc_cv_prog_makeinfo_modern = no; then - { echo "$as_me:$LINENO: WARNING: -*** Makeinfo is missing or too old. -*** Info documentation will not be built." >&5 -echo "$as_me: WARNING: -*** Makeinfo is missing or too old. -*** Info documentation will not be built." >&2;} - BUILD_INFO= -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 -if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - GENERATED_MANPAGES=generated-manpages +BISON=$ac_cv_prog_BISON +if test -n "$BISON"; then + echo "$as_me:$LINENO: result: $BISON" >&5 +echo "${ECHO_T}$BISON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - GENERATED_MANPAGES= fi -# How about lex? -if test x${build} = x${host} && test -f $srcdir/../flex/skel.c; then - FLEX='$(objdir)/../flex/flex' + 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 "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 + # 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_FLEX+set}" = set; then +if test "${ac_cv_prog_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$FLEX"; then - ac_cv_prog_FLEX="$FLEX" # Let the user override the test. + 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 @@ -5305,20 +7543,20 @@ 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_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_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" + test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" fi fi -FLEX=$ac_cv_prog_FLEX -if test -n "$FLEX"; then - echo "$as_me:$LINENO: result: $FLEX" >&5 -echo "${ECHO_T}$FLEX" >&6 +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 @@ -5326,20 +7564,20 @@ fi fi -# Bison? -# The -L switch is so bison can find its skeleton file. -if test x${build} = x${host} && test -f $srcdir/../bison/bison.simple; then - BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' +# 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 "bison", so it can be a program name with args. -set dummy bison; ac_word=$2 + # 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_BISON+set}" = set; then +if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$BISON"; then - ac_cv_prog_BISON="$BISON" # Let the user override the test. + 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 @@ -5348,20 +7586,20 @@ 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_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_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" fi fi -BISON=$ac_cv_prog_BISON -if test -n "$BISON"; then - echo "$as_me:$LINENO: result: $BISON" >&5 -echo "${ECHO_T}$BISON" >&6 +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 @@ -5369,6 +7607,7 @@ fi fi + # -------------------- # Checks for C headers # -------------------- @@ -5828,7 +8067,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 @@ -7193,8 +9433,153 @@ _ACEOF fi -if test $ac_cv_header_sys_mman_h != yes \ - || test $ac_cv_func_mmap != yes; 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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mmap to an innocuous variant, in case declares mmap. + For example, HP-UX 11i declares gettimeofday. */ +#define mmap innocuous_mmap + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mmap (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef mmap + +/* 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 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_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_func_mmap=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_mmap=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +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 "$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 @@ -7775,116 +10160,619 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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_func_vfork_works=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 +echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_VFORK 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define vfork fork +_ACEOF + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_FORK 1 +_ACEOF + +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" + + +# 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 + with_gnu_ld=no +fi; +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + 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 + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi -( exit $ac_status ) -ac_cv_func_vfork_works=no +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 -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +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 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 +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 -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi -if test "x$ac_cv_func_vfork_works" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_VFORK 1 -_ACEOF + 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; + -cat >>confdefs.h <<\_ACEOF -#define vfork fork -_ACEOF -fi -if test "x$ac_cv_func_fork_works" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_FORK 1 -_ACEOF -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" - 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 + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then -fi; + 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\" -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 -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 - else - ac_cpp_err= + 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 -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -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 -fi -done + + + + + + 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 @@ -7945,7 +10833,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 @@ -8007,6 +10895,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 @@ -8084,11 +10987,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= @@ -8158,6 +11056,71 @@ _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 +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" @@ -8184,10 +11147,11 @@ 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 + malloc realloc calloc free basename getopt clock getpagesize do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 @@ -8408,6 +11372,10 @@ _ACEOF fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# On AIX 5.2, conflicts with , as both define incompatible +# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname +# in collect2.c, 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 @@ -8429,6 +11397,8 @@ cat >>conftest.$ac_ext <<_ACEOF #include "ansidecl.h" #include "system.h" #ifdef HAVE_LDFCN_H +#undef FREAD +#undef FWRITE #include #endif @@ -8868,89 +11838,14 @@ _ACEOF fi; -if test x$host = x$target; then - echo "$as_me:$LINENO: checking for main in -lunwind" >&5 -echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6 -if test "${ac_cv_lib_unwind_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lunwind $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -main (); - ; - 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_lib_unwind_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_unwind_main=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5 -echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6 -if test $ac_cv_lib_unwind_main = yes; then - use_libunwind_default=yes -else - use_libunwind_default=no -fi - -else - use_libunwind_default=no -fi -# Use libunwind based exception handling. -# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. -if test "${enable_libunwind_exceptions+set}" = set; then - enableval="$enable_libunwind_exceptions" - use_libunwind_exceptions=$enableval -else - use_libunwind_exceptions=$use_libunwind_default -fi; -if test x"$use_libunwind_exceptions" = xyes; then +# For platforms with the unwind ABI which includes an unwind library, +# libunwind, we can choose to use the system libunwind. -cat >>confdefs.h <<\_ACEOF -#define USE_LIBUNWIND_EXCEPTIONS 1 -_ACEOF +# Check whether --with-system-libunwind or --without-system-libunwind was given. +if test "${with_system_libunwind+set}" = set; then + withval="$with_system_libunwind" -fi +fi; # -------------------------------------------------------- # Build, host, and target specific configuration fragments @@ -9049,6 +11944,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 @@ -9096,7 +11999,7 @@ case ${enable_threads} 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} ;; @@ -9125,9 +12028,11 @@ 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 @@ -9218,15 +12123,23 @@ 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 _ACEOF -else - echo "__cxa_atexit can't be enabled on this target" -fi - + fi fi # Look for a file containing extra machine modes. @@ -9248,7 +12161,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 @@ -9275,7 +12187,6 @@ else cd .. rm -rf $tempdir build_auto=auto-build.h - FORBUILD=../${build_subdir} fi @@ -9291,15 +12202,6 @@ xm_file="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. @@ -9331,6 +12233,11 @@ EOF PACKAGE=gcc VERSION="$gcc_version" +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + # If we haven't got the data from the intl directory, @@ -9607,32 +12514,24 @@ 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 out_object_file=`basename $out_file .c`.o @@ -9777,11 +12676,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. @@ -9798,13 +12694,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 "x$STMP_FIXPROTO" != x ; then + STMP_FIXPROTO=stmp-install-fixproto + fi fi fi @@ -9860,9 +12755,9 @@ gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" -elif test -x as$host_exeext; then +elif test -x as$build_exeext; then # Build using assembler in the current directory. - gcc_cv_as=./as$host_exeext + gcc_cv_as=./as$build_exeext elif test -f $gcc_cv_as_gas_srcdir/configure.in \ && test -f ../gas/Makefile \ && test x$build = x$host; then @@ -9875,7 +12770,7 @@ 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 @@ -9890,8 +12785,8 @@ 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 + rm -f as$build_exeext + $LN_S ../gas/as-new$build_exeext as$build_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 \ @@ -9931,17 +12826,21 @@ if test "x$gcc_cv_as" = x; then # 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 + gcc_cv_as=${program_prefix}as$build_exeext else - gcc_cv_as=`echo as | sed "${program_transform_name}"`$host_exeext + gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_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$build; then + 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" + else + test_dirs= + fi if test x$host = x$target; then test_dirs="$test_dirs \ @@ -9958,8 +12857,8 @@ if test "x$gcc_cv_as" = x; then fi for dir in $test_dirs; do - if test -x $dir/as$host_exeext; then - gcc_cv_as=$dir/as$host_exeext + if test -x $dir/as$build_exeext; then + gcc_cv_as=$dir/as$build_exeext break; fi done @@ -9992,9 +12891,9 @@ 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 -x "$DEFAULT_LINKER"; then gcc_cv_ld="$DEFAULT_LINKER" -elif test -x collect-ld$host_exeext; then +elif test -x collect-ld$build_exeext; then # Build using linker in the current directory. - gcc_cv_ld=./collect-ld$host_exeext + gcc_cv_ld=./collect-ld$build_exeext elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ && test -f ../ld/Makefile \ && test x$build = x$host; then @@ -10004,21 +12903,21 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ 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 + rm -f collect-ld$build_exeext + $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null elif test -x "$LD_FOR_TARGET"; then gcc_cv_ld="$LD_FOR_TARGET" elif test -x "$LD" && test x$host = x$target; then @@ -10051,17 +12950,21 @@ if test "x$gcc_cv_ld" = x; then # 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 + gcc_cv_ld=${program_prefix}ld$build_exeext else - gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$host_exeext + gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_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$build; then + 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" + else + test_dirs= + fi if test x$host = x$target; then test_dirs="$test_dirs \ @@ -10078,8 +12981,8 @@ if test "x$gcc_cv_ld" = x; then fi for dir in $test_dirs; do - if test -x $dir/ld$host_exeext; then - gcc_cv_ld=$dir/ld$host_exeext + if test -x $dir/ld$build_exeext; then + gcc_cv_ld=$dir/ld$build_exeext break; fi done @@ -10100,19 +13003,19 @@ 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 +if test -x nm$build_exeext; then + gcc_cv_nm=./nm$build_exeext elif test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; then # Single tree build which includes binutils. 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 + gcc_cv_nm=./nm$build_exeext + rm -f nm$build_exeext + $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null elif test "x$program_prefix" != xNONE; then - gcc_cv_nm=${program_prefix}nm$host_exeext + gcc_cv_nm=${program_prefix}nm$build_exeext else - gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$host_exeext + gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext fi case $in_tree_nm in yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 @@ -10125,21 +13028,20 @@ esac 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 +if test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext elif test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; 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 + gcc_cv_objdump=./objdump$build_exeext + rm -f objdump$build_exeext + $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null elif test "x$program_prefix" != xNONE; then - gcc_cv_objdump=${program_prefix}objdump$host_exeext + gcc_cv_objdump=${program_prefix}objdump$build_exeext else gcc_cv_objdump=`echo objdump | \ - sed "${program_transform_name}"`$host_exeext + sed "${program_transform_name}"`$build_exeext fi case $in_tree_objdump in yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 @@ -10310,6 +13212,44 @@ _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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gcc_cv_as_nsubspa_comdat=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_nsubspa_comdat=yes +fi + elif test x$gcc_cv_as != x; then + echo ' .SPACE $TEXT$ + .NSUBSPA $CODE$,COMDAT' > 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_nsubspa_comdat=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_nsubspa_comdat" >&5 +echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 +if test $gcc_cv_as_nsubspa_comdat = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GAS_NSUBSPA_COMDAT 1 +_ACEOF + +fi + # .hidden needs to be supported in both the assembler and the linker, # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for; we have to check the @@ -10610,12 +13550,117 @@ 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 \) + 15 \) \* 1000 + 91` + 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 \) + 15 \) \* 1000 + 91` + 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 + +cat >>confdefs.h <<_ACEOF +#define HAVE_GAS_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= @@ -10915,6 +13960,55 @@ 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*) @@ -11188,9 +14282,9 @@ else (exit $ac_status); }; } then if test x$gcc_cv_objdump != x \ - && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ + && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | grep ' 82106000 82106000' > /dev/null 2>&1; then - gcc_cv_as_offsetable_lo10=yes + gcc_cv_as_sparc_offsetable_lo10=yes fi else echo "configure: failed program was" >&5 @@ -11420,9 +14514,42 @@ fi case $target in *-*-aix*) conftest_s=' .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 @@ -11501,6 +14628,15 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then fi fi + 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 @@ -11547,8 +14683,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 @@ -11813,6 +14950,56 @@ _ACEOF fi +case "$target" in + powerpc64*-*-linux*) + 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_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; then + gcc_cv_ld_no_dot_syms=yes + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + cat > conftest1.s < conftest2.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_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_NO_DOT_SYMS 1 +_ACEOF + + fi + ;; +esac + if test x$with_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then @@ -11877,38 +15064,6 @@ else MAINT='#' fi -echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5 -echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6 - -# Check whether --with-libbanshee or --without-libbanshee was given. -if test "${with_libbanshee+set}" = set; then - withval="$with_libbanshee" - libbanshee="$with_libbanshee" -else - libbanshee=no -fi; - -if test x"$libbanshee" = xyes; then - BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a " - BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to" - ANDER="tree-alias-ander.o" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BANSHEE 1 -_ACEOF - -else - BANSHEELIB="" - BANSHEEINC="" - ANDER="" -fi -echo "$as_me:$LINENO: result: $with_libbanshee" >&5 -echo "${ECHO_T}$with_libbanshee" >&6 - - - - - # -------------- # Language hooks # -------------- @@ -11938,7 +15093,7 @@ all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk' +all_outputs='Makefile gccbug mklibgcc libada-mk' # List of language makefile fragments. all_lang_makefrags= # List of language subdirectory makefiles. Deprecated. @@ -12178,18 +15333,20 @@ objdir=`${PWDCMD-pwd}` - - - - -# If it doesn't already exist, create document directory -echo "checking for the document directory." 1>&2 -if test -d doc ; then - true +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 - mkdir doc + set_gcc_lib_path= fi + + # Echo link setup. if test x${build} = x${host} ; then if test x${host} = x${target} ; then @@ -12745,8 +15902,6 @@ cat >>$CONFIG_STATUS <<_ACEOF # subdirs='$subdirs' -symbolic_link='$symbolic_link' - _ACEOF @@ -12857,9 +16012,13 @@ 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_subdir@,$build_subdir,;t t s,@host_subdir@,$host_subdir,;t t s,@target_subdir@,$target_subdir,;t t +s,@gcc_version_trigger@,$gcc_version_trigger,;t t +s,@gcc_version_full@,$gcc_version_full,;t t +s,@gcc_version@,$gcc_version,;t t s,@GENINSRC@,$GENINSRC,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t @@ -12871,12 +16030,12 @@ 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,@EGREP@,$EGREP,;t t s,@strict1_warn@,$strict1_warn,;t t s,@warn_cflags@,$warn_cflags,;t t s,@WERROR@,$WERROR,;t t s,@nocommon_flag@,$nocommon_flag,;t t s,@TREEBROWSER@,$TREEBROWSER,;t t -s,@EGREP@,$EGREP,;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 @@ -12893,6 +16052,7 @@ 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 @@ -12903,18 +16063,20 @@ 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,@USE_NLS@,$USE_NLS,;t t @@ -12929,8 +16091,6 @@ 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 @@ -12941,9 +16101,6 @@ s,@GGC@,$GGC,;t t s,@zlibdir@,$zlibdir,;t t s,@zlibinc@,$zlibinc,;t t s,@MAINT@,$MAINT,;t t -s,@ANDER@,$ANDER,;t t -s,@BANSHEEINC@,$BANSHEEINC,;t t -s,@BANSHEELIB@,$BANSHEELIB,;t t s,@gcc_tooldir@,$gcc_tooldir,;t t s,@dollar@,$dollar,;t t s,@slibdir@,$slibdir,;t t @@ -12980,9 +16137,6 @@ 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 @@ -12999,7 +16153,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 @@ -13009,10 +16162,10 @@ 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 @@ -13595,7 +16748,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 @@ -13605,18 +16758,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