From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 7429B3857C44; Tue, 25 Jan 2022 00:59:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7429B3857C44 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib: update preprocessor configure checks X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: dfa088ab660c80678825ba89f88f9338cfaed3f7 X-Git-Newrev: 2e9aa5f56cc26a411014a7f788423c670cfb5646 Message-Id: <20220125005936.7429B3857C44@sourceware.org> Date: Tue, 25 Jan 2022 00:59:36 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2022 00:59:36 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D2e9aa5f56cc= 26a411014a7f788423c670cfb5646 commit 2e9aa5f56cc26a411014a7f788423c670cfb5646 Author: Mike Frysinger Date: Sat Jan 22 20:35:00 2022 -0500 newlib: update preprocessor configure checks =20 The nds32 & spu dirs are using compile tests to look for some preprocessor defines, but we don't need to compile the code, just preprocess it. So switch to AC_PREPROC_IFELSE. =20 The sh dir is using a preprocessor test via grep, but let's switch it to AC_PREPROC_IFELSE too to be consistent. =20 This should allow us to drop the uncommon AC_NO_EXECUTABLES call. Diff: --- newlib/libc/machine/nds32/Makefile.in | 1 + newlib/libc/machine/nds32/configure | 264 +++++-- newlib/libc/machine/nds32/configure.ac | 9 +- newlib/libc/machine/sh/Makefile.in | 2 - newlib/libc/machine/sh/configure | 232 +----- newlib/libc/machine/sh/configure.ac | 10 +- newlib/libc/machine/spu/Makefile.in | 6 + newlib/libc/machine/spu/aclocal.m4 | 64 ++ newlib/libc/machine/spu/configure | 1318 ++++++++++++++++++++++++++++= ---- newlib/libc/machine/spu/configure.ac | 15 +- newlib/libm/machine/nds32/Makefile.in | 1 + newlib/libm/machine/nds32/configure | 270 +++++-- newlib/libm/machine/nds32/configure.ac | 17 +- 13 files changed, 1656 insertions(+), 553 deletions(-) diff --git a/newlib/libc/machine/nds32/Makefile.in b/newlib/libc/machine/nd= s32/Makefile.in index 1c6a78e1f..605ad022e 100644 --- a/newlib/libc/machine/nds32/Makefile.in +++ b/newlib/libc/machine/nds32/Makefile.in @@ -197,6 +197,7 @@ CCAS =3D @CCAS@ CCASFLAGS =3D @CCASFLAGS@ CCDEPMODE =3D @CCDEPMODE@ CFLAGS =3D @CFLAGS@ +CPP =3D @CPP@ CPPFLAGS =3D @CPPFLAGS@ CYGPATH_W =3D @CYGPATH_W@ DEFS =3D @DEFS@ diff --git a/newlib/libc/machine/nds32/configure b/newlib/libc/machine/nds3= 2/configure index ec57dfece..fb04f71e0 100755 --- a/newlib/libc/machine/nds32/configure +++ b/newlib/libc/machine/nds32/configure @@ -582,13 +582,13 @@ PACKAGE_BUGREPORT=3D'' PACKAGE_URL=3D'' =20 ac_unique_file=3D"setjmp.S" -ac_no_link=3Dno ac_subst_vars=3D'am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS IS_NDS32_ISA_V3M_FALSE IS_NDS32_ISA_V3M_TRUE +CPP EXEEXT ac_ct_CC CPPFLAGS @@ -736,7 +736,8 @@ CC CFLAGS LDFLAGS LIBS -CPPFLAGS' +CPPFLAGS +CPP' =20 =20 # Initialize some variables set by options. @@ -1383,6 +1384,7 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor =20 Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1501,6 +1503,43 @@ fi as_fn_set_status $ac_retval =20 } # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=3D${as_lineno-"$1"} as_lineno_stack=3Das_lineno_stack=3D$as_li= neno_stack + if { { ac_try=3D"$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=3D$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=3D0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=3D1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3628,7 +3667,6 @@ OBJEXT=3D${oext} =20 =20 =20 - ac_ext=3Dc ac_cpp=3D'$CPP $CPPFLAGS' ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3960,29 +3998,6 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ =20 -int -main () -{ - - ; - return 0; -} -_ACEOF -if { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - ac_no_link=3Dno - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4179,59 +4194,6 @@ $as_echo "$cross_compiling" >&6; } =20 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=3D$ac_clean_files_save - -else - rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conf= test.dSYM - ac_no_link=3Dyes - # Setting cross_compile will disable run tests; it will - # also disable AC_CHECK_FILE but that's generally - # correct if we can't link. - cross_compiling=3Dyes - EXEEXT=3D - # Check that the compiler produces executables we can run. If not, eith= er -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross com= piling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" !=3D yes; then - { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; } - if { ac_try=3D'./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; }; then - cross_compiling=3Dno - else - if test "$cross_compiling" =3D maybe; then - cross_compiling=3Dyes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object fil= es" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : @@ -4554,10 +4516,148 @@ ac_compiler_gnu=3D$ac_cv_c_compiler_gnu =20 =20 =20 +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preproc= essor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP=3D +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=3D$CPP + +fi + CPP=3D$ac_cv_prog_CPP +else + ac_cv_prog_CPP=3D$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __NDS32_ISA_V3M__ -warning: This is nds32_isa_v3m. +# error "This is nds32_isa_v3m." #endif =20 int @@ -4568,12 +4668,12 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO"; then : is_nds32_isa_v3m=3D"no" else is_nds32_isa_v3m=3D"yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext if test "$is_nds32_isa_v3m" =3D "yes"; then IS_NDS32_ISA_V3M_TRUE=3D IS_NDS32_ISA_V3M_FALSE=3D'#' diff --git a/newlib/libc/machine/nds32/configure.ac b/newlib/libc/machine/n= ds32/configure.ac index f22358945..de3d32849 100644 --- a/newlib/libc/machine/nds32/configure.ac +++ b/newlib/libc/machine/nds32/configure.ac @@ -10,14 +10,11 @@ AC_CONFIG_AUX_DIR(../../../..) NEWLIB_CONFIGURE(../../..) =20 dnl Use builtin macro to detect if this is for "AndeStar ISA V3m". -AC_NO_EXECUTABLES -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#ifdef __NDS32_ISA_V3M__ -warning: This is nds32_isa_v3m. +# error "This is nds32_isa_v3m." #endif -]])], - [is_nds32_isa_v3m=3D"no"], - [is_nds32_isa_v3m=3D"yes"]) +]])], [is_nds32_isa_v3m=3D"no"], [is_nds32_isa_v3m=3D"yes"]) AM_CONDITIONAL(IS_NDS32_ISA_V3M, test "$is_nds32_isa_v3m" =3D "yes") =20 =20 diff --git a/newlib/libc/machine/sh/Makefile.in b/newlib/libc/machine/sh/Ma= kefile.in index 376a34a1b..0ab84f438 100644 --- a/newlib/libc/machine/sh/Makefile.in +++ b/newlib/libc/machine/sh/Makefile.in @@ -200,9 +200,7 @@ DEPDIR =3D @DEPDIR@ ECHO_C =3D @ECHO_C@ ECHO_N =3D @ECHO_N@ ECHO_T =3D @ECHO_T@ -EGREP =3D @EGREP@ EXEEXT =3D @EXEEXT@ -GREP =3D @GREP@ INSTALL =3D @INSTALL@ INSTALL_DATA =3D @INSTALL_DATA@ INSTALL_PROGRAM =3D @INSTALL_PROGRAM@ diff --git a/newlib/libc/machine/sh/configure b/newlib/libc/machine/sh/conf= igure index 4c6a463af..28daff777 100755 --- a/newlib/libc/machine/sh/configure +++ b/newlib/libc/machine/sh/configure @@ -195,8 +195,7 @@ test -x / || exit 1" as_suggested=3D" as_lineno_1=3D";as_suggested=3D$as_suggested$LINENO;as= _suggested=3D$as_suggested" as_lineno_1a=3D\$LINENO as_lineno_2=3D";as_suggested=3D$as_suggested$LINENO;as_suggested=3D$as_s= uggested" as_lineno_2a=3D\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" !=3D \"x\$as_lineno_2'\$as_run'\= " && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" =3D \"x\$as_lineno_2'\$as= _run'\"' || exit 1 -test \$(( 1 + 1 )) =3D 2 || exit 1" + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" =3D \"x\$as_lineno_2'\$as= _run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=3Dyes else @@ -583,15 +582,12 @@ PACKAGE_BUGREPORT=3D'' PACKAGE_URL=3D'' =20 ac_unique_file=3D"asm.h" -ac_no_link=3Dno ac_subst_vars=3D'am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS SH64_FALSE SH64_TRUE -EGREP -GREP CPP EXEEXT ac_ct_CC @@ -1932,8 +1928,6 @@ ac_configure=3D"$SHELL $ac_aux_dir/configure" # Plea= se don't use this var. =20 =20 =20 - - # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -4004,29 +3998,6 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ =20 -int -main () -{ - - ; - return 0; -} -_ACEOF -if { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - ac_no_link=3Dno - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4223,59 +4194,6 @@ $as_echo "$cross_compiling" >&6; } =20 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=3D$ac_clean_files_save - -else - rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conf= test.dSYM - ac_no_link=3Dyes - # Setting cross_compile will disable run tests; it will - # also disable AC_CHECK_FILE but that's generally - # correct if we can't link. - cross_compiling=3Dyes - EXEEXT=3D - # Check that the compiler produces executables we can run. If not, eith= er -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross com= piling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" !=3D yes; then - { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; } - if { ac_try=3D'./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; }; then - cross_compiling=3Dno - else - if test "$cross_compiling" =3D maybe; then - cross_compiling=3Dyes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object fil= es" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : @@ -4736,152 +4654,26 @@ ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPF= LAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=3D$ac_cv_c_compiler_gnu =20 =20 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles lo= ng lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=3Dfalse - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=3D$as_save_IFS - test -z "$as_dir" && as_dir=3D. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP=3D"$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP=3D"$ac_path_GREP" ac_path_GREP_found=3D:;; -*) - ac_count=3D0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"con= ftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=3D$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP=3D"$ac_path_GREP" - ac_path_GREP_max=3D$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=3D$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARA= TOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=3D$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP=3D"$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP=3D"$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=3Dfalse - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=3D$as_save_IFS - test -z "$as_dir" && as_dir=3D. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP=3D"$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP=3D"$ac_path_EGREP" ac_path_EGREP_found=3D:;; -*) - ac_count=3D0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null = || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=3D$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP=3D"$ac_path_EGREP" - ac_path_EGREP_max=3D$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=3D$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPAR= ATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=3D$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP=3D"$ac_cv_path_EGREP" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#if __SH5__ - sh5 +#if !defined(__SH5__) +# error "not SH5" #endif =20 +int +main () +{ + + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sh5" >/dev/null 2>&1; then : +if ac_fn_c_try_cpp "$LINENO"; then : have_sh64=3Dyes else have_sh64=3Dno fi -rm -f conftest* - +rm -f conftest.err conftest.i conftest.$ac_ext if test $have_sh64 =3D yes; then SH64_TRUE=3D SH64_FALSE=3D'#' diff --git a/newlib/libc/machine/sh/configure.ac b/newlib/libc/machine/sh/c= onfigure.ac index c7dd78926..838bef0d7 100644 --- a/newlib/libc/machine/sh/configure.ac +++ b/newlib/libc/machine/sh/configure.ac @@ -7,15 +7,13 @@ AC_CONFIG_SRCDIR([asm.h]) dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.=20 AC_CONFIG_AUX_DIR(../../../..) =20 -AC_NO_EXECUTABLES - NEWLIB_CONFIGURE(../../..) =20 -AC_EGREP_CPP([sh5], [ -#if __SH5__ - sh5 +AC_PREPROC_IFELSE([AC_LANG_PROGRAM( +[[#if !defined(__SH5__) +# error "not SH5" #endif -], [have_sh64=3Dyes], [have_sh64=3Dno]) +]])], [have_sh64=3Dyes], [have_sh64=3Dno]) AM_CONDITIONAL(SH64, [test $have_sh64 =3D yes]) =20 AC_CONFIG_FILES([Makefile]) diff --git a/newlib/libc/machine/spu/Makefile.in b/newlib/libc/machine/spu/= Makefile.in index 3a0b15aff..5055a70d8 100644 --- a/newlib/libc/machine/spu/Makefile.in +++ b/newlib/libc/machine/spu/Makefile.in @@ -276,17 +276,22 @@ CC =3D @CC@ CCAS =3D @CCAS@ CCASFLAGS =3D @CCASFLAGS@ CCDEPMODE =3D @CCDEPMODE@ +CFLAGS =3D @CFLAGS@ +CPP =3D @CPP@ +CPPFLAGS =3D @CPPFLAGS@ CYGPATH_W =3D @CYGPATH_W@ DEFS =3D @DEFS@ DEPDIR =3D @DEPDIR@ ECHO_C =3D @ECHO_C@ ECHO_N =3D @ECHO_N@ ECHO_T =3D @ECHO_T@ +EXEEXT =3D @EXEEXT@ INSTALL =3D @INSTALL@ INSTALL_DATA =3D @INSTALL_DATA@ INSTALL_PROGRAM =3D @INSTALL_PROGRAM@ INSTALL_SCRIPT =3D @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM =3D @INSTALL_STRIP_PROGRAM@ +LDFLAGS =3D @LDFLAGS@ LIBOBJS =3D @LIBOBJS@ LIBS =3D @LIBS@ LTLIBOBJS =3D @LTLIBOBJS@ @@ -314,6 +319,7 @@ abs_builddir =3D @abs_builddir@ abs_srcdir =3D @abs_srcdir@ abs_top_builddir =3D @abs_top_builddir@ abs_top_srcdir =3D @abs_top_srcdir@ +ac_ct_CC =3D @ac_ct_CC@ aext =3D @aext@ am__include =3D @am__include@ am__leading_dot =3D @am__leading_dot@ diff --git a/newlib/libc/machine/spu/aclocal.m4 b/newlib/libc/machine/spu/a= clocal.m4 index 1aa0c4023..263760c09 100644 --- a/newlib/libc/machine/spu/aclocal.m4 +++ b/newlib/libc/machine/spu/aclocal.m4 @@ -782,6 +782,70 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) =20 +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=3Dyes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=3Dno + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" !=3D 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=3D"\$(top_srcdir)/compile \$(CC)" + CC=3D"$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=3D$? + echo "$as_me:$LINENO: \$? =3D $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -= *- =20 # Copyright (C) 1996-2017 Free Software Foundation, Inc. diff --git a/newlib/libc/machine/spu/configure b/newlib/libc/machine/spu/co= nfigure index 3fa6cfd03..0893bc372 100644 --- a/newlib/libc/machine/spu/configure +++ b/newlib/libc/machine/spu/configure @@ -582,10 +582,18 @@ PACKAGE_BUGREPORT=3D'' PACKAGE_URL=3D'' =20 ac_unique_file=3D"Makefile.am" -ac_subst_vars=3D'LTLIBOBJS +ac_subst_vars=3D'am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS HAVE_SPU_EA_FALSE HAVE_SPU_EA_TRUE +CPP +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS sys_dir shared_machine_dir machine_dir @@ -723,7 +731,13 @@ enable_dependency_tracking host_alias target_alias CCAS -CCASFLAGS' +CCASFLAGS +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' =20 =20 # Initialize some variables set by options. @@ -1363,6 +1377,14 @@ Optional Features: Some influential environment variables: CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor =20 Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1481,6 +1503,43 @@ fi as_fn_set_status $ac_retval =20 } # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=3D${as_lineno-"$1"} as_lineno_stack=3Das_lineno_stack=3D$as_li= neno_stack + if { { ac_try=3D"$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=3D$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=3D0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=3D1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3610,148 +3669,1140 @@ OBJEXT=3D${oext} =20 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler sup= ports __ea" >&5 $as_echo_n "checking whether the compiler supports __ea... " >&6; } -cat > conftest.c <&5 - (eval $ac_try) 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; } | egrep yes >/dev/null 2>&1; then - spu_compiler_has_ea=3Dyes +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a progr= am name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else - spu_compiler_has_ea=3Dno + if test -n "$CC"; then + ac_cv_prog_CC=3D"$CC" # Let the user override the test. +else +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC=3D"${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS + fi - if test x${spu_compiler_has_ea} !=3D xno; then - HAVE_SPU_EA_TRUE=3D - HAVE_SPU_EA_FALSE=3D'#' +fi +CC=3D$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - HAVE_SPU_EA_TRUE=3D'#' - HAVE_SPU_EA_FALSE=3D + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi =20 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $spu_compiler_has_ea" >&5 -$as_echo "$spu_compiler_has_ea" >&6; } =20 -ac_config_files=3D"$ac_config_files Makefile" +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=3D$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC=3D"$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC=3D"gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS =20 -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. +fi +fi +ac_ct_CC=3D$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi =20 -_ACEOF + if test "x$ac_ct_CC" =3D x; then + CC=3D"" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not pr= efixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triple= t" >&2;} +ac_tool_warned=3Dyes ;; +esac + CC=3D$ac_ct_CC + fi +else + CC=3D"$ac_cv_prog_CC" +fi =20 -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=3D.*/\= 1/p'`; do - eval ac_val=3D\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache vari= able $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;= } ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var=3D ;; #( - *) { eval $ac_var=3D; unset $ac_var;} ;; - esac ;; - esac +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a prog= ram name with args. +set dummy ${ac_tool_prefix}cc; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC=3D"$CC" # Let the user override the test. +else +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC=3D"${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done done +IFS=3D$as_save_IFS =20 - (set) 2>&1 | - case $as_nl`(ac_space=3D' '; set) 2>&1` in #( - *${as_nl}ac_space=3D\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=3D\\(.*\\)/\\1=3D'\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=3D/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=3D]*\)=3D\(.*[{}].*\)$/test "${\1+set}" =3D set || &/ - t end - s/^\([^=3D]*\)=3D\(.*\)$/\1=3D${\1=3D\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" !=3D "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file"= >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache= $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi fi -rm -f confcache +fi +CC=3D$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi =20 -test "x$prefix" =3D xNONE && prefix=3D$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' =20 -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=3D' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=3D\2= /g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=3D\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC=3D"$CC" # Let the user override the test. +else + ac_prog_rejected=3Dno +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" =3D "/usr/ucb/cc"; then + ac_prog_rejected=3Dyes + continue + fi + ac_cv_prog_CC=3D"cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS + +if test $ac_prog_rejected =3D yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# !=3D 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC=3D"$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=3D$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a = program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC=3D"$CC" # Let the user override the test. +else +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC=3D"$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS + +fi +fi +CC=3D$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=3D$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with= args. +set dummy $ac_prog; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC=3D"$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC=3D"$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS + +fi +fi +ac_ct_CC=3D$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" =3D x; then + CC=3D"" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not pr= efixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triple= t" >&2;} +ac_tool_warned=3Dyes ;; +esac + CC=3D$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$a= c_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=3D$2 +for ac_option in --version -v -V -qversion; do + { { ac_try=3D"$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=3D$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=3D$ac_clean_files +ac_clean_files=3D"$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler w= orks" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=3D`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files=3D"a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles=3D +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.= map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles=3D"$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try=3D"$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=3D$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT =3D no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.= map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext=3D'' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" =3D set && test "$ac_cv_exeext" !=3D no; + then :; else + ac_cv_exeext=3D`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" =3D no && ac_cv_exeext=3D + +else + ac_file=3D'' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default o= utput file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=3D$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=3D$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executable= s" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try=3D"$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=3D$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.= map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=3D`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and l= ink +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=3D$ac_cv_exeext +ac_exeext=3D$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f =3D fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) !=3D 0; + + ; + return 0; +} +_ACEOF +ac_clean_files=3D"$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross com= piling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" !=3D yes; then + { { ac_try=3D"$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=3D$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; } + if { ac_try=3D'./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=3D$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; }; }; then + cross_compiling=3Dno + else + if test "$cross_compiling" =3D maybe; then + cross_compiling=3Dyes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=3D$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object fil= es" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try=3D"$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=3D$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.= map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=3D`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=3D$ac_cv_objext +ac_objext=3D$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the= GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=3Dyes +else + ac_compiler_gnu=3Dno +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=3D$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu =3D yes; then + GCC=3Dyes +else + GCC=3D +fi +ac_test_CFLAGS=3D${CFLAGS+set} +ac_save_CFLAGS=3D$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" = >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=3D$ac_c_werror_flag + ac_c_werror_flag=3Dyes + ac_cv_prog_cc_g=3Dno + CFLAGS=3D"-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=3Dyes +else + CFLAGS=3D"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=3D$ac_save_c_werror_flag + CFLAGS=3D"-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=3Dyes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=3D$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" =3D set; then + CFLAGS=3D$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g =3D yes; then + if test "$GCC" =3D yes; then + CFLAGS=3D"-g -O2" + else + CFLAGS=3D"-g" + fi +else + if test "$GCC" =3D yes; then + CFLAGS=3D"-O2" + else + CFLAGS=3D + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept= ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=3Dno +ac_save_CC=3D$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s =3D g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!=3D'x' always comes out true, for an + array size at least. It's necessary to write '\x00'=3D=3D0 to get some= thing + that's true only with -std. */ +int osf4_cc_array ['\x00' =3D=3D 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parame= ters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) =3D=3D 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), = int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) !=3D argv[0] || f (e, argv, 1) !=3D argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=3Dextc89 -qlanglvl=3Dansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC=3D"$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=3D$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" !=3D "xno" && break +done +rm -f conftest.$ac_ext +CC=3D$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC=3D"$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >= &5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" !=3D xno; then : + +fi + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands = -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=3Dyes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_ob= jext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=3D$? + echo "$as_me:$LINENO: \$? =3D $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=3Dno + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" !=3D 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=3D"\$(top_srcdir)/compile \$(CC)" + CC=3D"$am_aux_dir/compile $CC" +fi +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu + + + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preproc= essor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP=3D +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=3D$CPP + +fi + CPP=3D$ac_cv_prog_CPP +else + ac_cv_prog_CPP=3D$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if !defined (__EA32__) && !defined (__EA64__) +# error "__ea not supported" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + spu_compiler_has_ea=3Dyes +else + spu_compiler_has_ea=3Dno +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test x${spu_compiler_has_ea} !=3D xno; then + HAVE_SPU_EA_TRUE=3D + HAVE_SPU_EA_FALSE=3D'#' +else + HAVE_SPU_EA_TRUE=3D'#' + HAVE_SPU_EA_FALSE=3D +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $spu_compiler_has_ea" >&5 +$as_echo "$spu_compiler_has_ea" >&6; } + +ac_config_files=3D"$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=3D.*/\= 1/p'`; do + eval ac_val=3D\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache vari= able $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;= } ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var=3D ;; #( + *) { eval $ac_var=3D; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=3D' '; set) 2>&1` in #( + *${as_nl}ac_space=3D\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=3D\\(.*\\)/\\1=3D'\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=3D/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=3D]*\)=3D\(.*[{}].*\)$/test "${\1+set}" =3D set || &/ + t end + s/^\([^=3D]*\)=3D\(.*\)$/\1=3D${\1=3D\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" !=3D "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file"= >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache= $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" =3D xNONE && prefix=3D$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=3D' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=3D\2= /g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=3D\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H @@ -3795,6 +4846,13 @@ $as_echo_n "checking that generated files are newer = than configure... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE=3D + am__EXEEXT_FALSE=3D'#' +else + am__EXEEXT_TRUE=3D'#' + am__EXEEXT_FALSE=3D +fi =20 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"= ; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. diff --git a/newlib/libc/machine/spu/configure.ac b/newlib/libc/machine/spu= /configure.ac index 5567df048..a6d19a7c6 100644 --- a/newlib/libc/machine/spu/configure.ac +++ b/newlib/libc/machine/spu/configure.ac @@ -10,18 +10,11 @@ AC_CONFIG_AUX_DIR(../../../..) NEWLIB_CONFIGURE(../../..) =20 AC_MSG_CHECKING([whether the compiler supports __ea]) -dnl We do not use AC_COMPILE_IFELSE to support building newlib with -dnl a cross-compiler that is not (yet) able to link executables -cat > conftest.c </dev/null 2>&1; then - spu_compiler_has_ea=3Dyes -else - spu_compiler_has_ea=3Dno -fi +]])], [spu_compiler_has_ea=3Dyes], [spu_compiler_has_ea=3Dno]) AM_CONDITIONAL(HAVE_SPU_EA, test x${spu_compiler_has_ea} !=3D xno) AC_MSG_RESULT($spu_compiler_has_ea) =20 diff --git a/newlib/libm/machine/nds32/Makefile.in b/newlib/libm/machine/nd= s32/Makefile.in index ec448232f..2bd695e46 100644 --- a/newlib/libm/machine/nds32/Makefile.in +++ b/newlib/libm/machine/nds32/Makefile.in @@ -193,6 +193,7 @@ CCAS =3D @CCAS@ CCASFLAGS =3D @CCASFLAGS@ CCDEPMODE =3D @CCDEPMODE@ CFLAGS =3D @CFLAGS@ +CPP =3D @CPP@ CPPFLAGS =3D @CPPFLAGS@ CYGPATH_W =3D @CYGPATH_W@ DEFS =3D @DEFS@ diff --git a/newlib/libm/machine/nds32/configure b/newlib/libm/machine/nds3= 2/configure old mode 100644 new mode 100755 index 7c8bb1775..8f80c485d --- a/newlib/libm/machine/nds32/configure +++ b/newlib/libm/machine/nds32/configure @@ -582,7 +582,6 @@ PACKAGE_BUGREPORT=3D'' PACKAGE_URL=3D'' =20 ac_unique_file=3D"Makefile.am" -ac_no_link=3Dno ac_subst_vars=3D'am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -591,6 +590,7 @@ HAS_NDS32_FPU_DP_FALSE HAS_NDS32_FPU_DP_TRUE HAS_NDS32_FPU_SP_FALSE HAS_NDS32_FPU_SP_TRUE +CPP EXEEXT ac_ct_CC CPPFLAGS @@ -738,7 +738,8 @@ CC CFLAGS LDFLAGS LIBS -CPPFLAGS' +CPPFLAGS +CPP' =20 =20 # Initialize some variables set by options. @@ -1385,6 +1386,7 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor =20 Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1503,6 +1505,43 @@ fi as_fn_set_status $ac_retval =20 } # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=3D${as_lineno-"$1"} as_lineno_stack=3Das_lineno_stack=3D$as_li= neno_stack + if { { ac_try=3D"$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; + *) ac_try_echo=3D$ac_try;; +esac +eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=3D$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 + test $ac_status =3D 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=3D0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=3D1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3631,7 +3670,6 @@ OBJEXT=3D${oext} =20 =20 =20 - ac_ext=3Dc ac_cpp=3D'$CPP $CPPFLAGS' ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3963,29 +4001,6 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ =20 -int -main () -{ - - ; - return 0; -} -_ACEOF -if { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - ac_no_link=3Dno - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - int main () { @@ -4182,59 +4197,6 @@ $as_echo "$cross_compiling" >&6; } =20 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=3D$ac_clean_files_save - -else - rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conf= test.dSYM - ac_no_link=3Dyes - # Setting cross_compile will disable run tests; it will - # also disable AC_CHECK_FILE but that's generally - # correct if we can't link. - cross_compiling=3Dyes - EXEEXT=3D - # Check that the compiler produces executables we can run. If not, eith= er -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross com= piling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" !=3D yes; then - { { ac_try=3D"$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; } - if { ac_try=3D'./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=3D\$ac_try;; - *) ac_try_echo=3D$ac_try;; -esac -eval ac_try_echo=3D"\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; }; then - cross_compiling=3Dno - else - if test "$cross_compiling" =3D maybe; then - cross_compiling=3Dyes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object fil= es" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : @@ -4557,10 +4519,148 @@ ac_compiler_gnu=3D$ac_cv_c_compiler_gnu =20 =20 =20 +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preproc= essor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP=3D +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=3D$CPP + +fi + CPP=3D$ac_cv_prog_CPP +else + ac_cv_prog_CPP=3D$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=3Dfalse +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=3D: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=3Dc +ac_cpp=3D'$CPP $CPPFLAGS' +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$= ac_ext $LIBS >&5' +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (__NDS32_EXT_FPU_SP__) -warning: Has nds32 FPU SP extension support +# error "Has nds32 FPU SP extension support" #endif =20 int @@ -4571,12 +4671,12 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO"; then : has_nds32_fpu_sp=3D"no" else has_nds32_fpu_sp=3D"yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext if test "$has_nds32_fpu_sp" =3D "yes"; then HAS_NDS32_FPU_SP_TRUE=3D HAS_NDS32_FPU_SP_FALSE=3D'#' @@ -4589,7 +4689,7 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (__NDS32_EXT_FPU_DP__) -warning: Has nds32 FPU DP extension support +# error "Has nds32 FPU DP extension support" #endif =20 int @@ -4600,12 +4700,12 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO"; then : has_nds32_fpu_dp=3D"no" else has_nds32_fpu_dp=3D"yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext if test "$has_nds32_fpu_dp" =3D "yes"; then HAS_NDS32_FPU_DP_TRUE=3D HAS_NDS32_FPU_DP_FALSE=3D'#' diff --git a/newlib/libm/machine/nds32/configure.ac b/newlib/libm/machine/n= ds32/configure.ac index 7d49c9ae2..e3589a072 100644 --- a/newlib/libm/machine/nds32/configure.ac +++ b/newlib/libm/machine/nds32/configure.ac @@ -11,23 +11,18 @@ NEWLIB_CONFIGURE(../../..) =20 =20 dnl Use builtin macro to detect if FPU extension support is on. -AC_NO_EXECUTABLES -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#if (__NDS32_EXT_FPU_SP__) -warning: Has nds32 FPU SP extension support +# error "Has nds32 FPU SP extension support" #endif -]])], - [has_nds32_fpu_sp=3D"no"], - [has_nds32_fpu_sp=3D"yes"]) +]])], [has_nds32_fpu_sp=3D"no"], [has_nds32_fpu_sp=3D"yes"]) AM_CONDITIONAL(HAS_NDS32_FPU_SP, test "$has_nds32_fpu_sp" =3D "yes") =20 -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#if (__NDS32_EXT_FPU_DP__) -warning: Has nds32 FPU DP extension support +# error "Has nds32 FPU DP extension support" #endif -]])], - [has_nds32_fpu_dp=3D"no"], - [has_nds32_fpu_dp=3D"yes"]) +]])], [has_nds32_fpu_dp=3D"no"], [has_nds32_fpu_dp=3D"yes"]) AM_CONDITIONAL(HAS_NDS32_FPU_DP, test "$has_nds32_fpu_dp" =3D "yes") =20 AC_CONFIG_FILES([Makefile])