diff --git a/src/configure b/src/configure index 115b142824..fa65032a97 100755 --- a/src/configure +++ b/src/configure @@ -4267,53 +4267,38 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu msg="for inline keyword" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - inline=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +cat >conftest.$ac_ext <<_ACEOF static inline int foo() { return 0; } int main() { return foo(); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&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='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then inline=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -inline=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + inline=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$inline" = "no" ; then MZOPTIONS="$MZOPTIONS -DNO_INLINE_KEYWORD" fi @@ -4323,54 +4308,39 @@ echo "${ECHO_T}$inline" >&6; } msg="for noinline attribute" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - noinline=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +cat >conftest.$ac_ext <<_ACEOF static int foo() __attribute__ ((noinline)); static int foo() { return 0; } int main() { return foo(); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&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='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then noinline=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -noinline=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + noinline=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$noinline" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -4378,21 +4348,13 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $inline" >&5 -echo "${ECHO_T}$inline" >&6; } +{ echo "$as_me:$LINENO: result: $noinline" >&5 +echo "${ECHO_T}$noinline" >&6; } msg="for GNU preprocessor" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - using_gnu_cpp=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +cat >conftest.$ac_ext <<_ACEOF int main () { #ifdef __GNUC__ return 0; @@ -4401,39 +4363,32 @@ int main () { #endif } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&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='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then using_gnu_cpp=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -using_gnu_cpp=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + using_gnu_cpp=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$using_gnu_cpp" = "yes" ; then XFORMFLAGS="$XFORMFLAGS --keep-lines" case "$build_os" in @@ -5221,15 +5176,7 @@ fi msg="for mbsrtowcs" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - mbsrtowcs=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +cat >conftest.$ac_ext <<_ACEOF #include #include int main() { @@ -5240,39 +5187,34 @@ cat >>conftest.$ac_ext <<_ACEOF return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then mbsrtowcs=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -mbsrtowcs=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + mbsrtowcs=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext if test "$mbsrtowcs" = "no" ; then MZOPTIONS="$MZOPTIONS -DNO_MBTOWC_FUNCTIONS" fi @@ -5283,15 +5225,7 @@ if test "${try_poll_syscall}" = "yes" ; then msg="for poll" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - use_poll=no -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() { struct pollfd pfd; @@ -5302,39 +5236,34 @@ cat >>conftest.$ac_ext <<_ACEOF return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then use_poll=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -use_poll=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + use_poll=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $use_poll" >&5 echo "${ECHO_T}$use_poll" >&6; } if test "${use_poll}" = "yes" ; then @@ -5350,15 +5279,7 @@ if test "${try_epoll_syscall}" = "yes" ; then msg="for epoll" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - use_epoll=no -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() { int fd; @@ -5369,39 +5290,34 @@ cat >>conftest.$ac_ext <<_ACEOF return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then use_epoll=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -use_epoll=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + use_epoll=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $use_epoll" >&5 echo "${ECHO_T}$use_epoll" >&6; } if test "${use_epoll}" = "yes" ; then @@ -5417,15 +5333,7 @@ if test "${try_kqueue_syscall}" = "yes" ; then msg="for kqueue" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - use_kqueue=no -else 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 @@ -5439,39 +5347,34 @@ cat >>conftest.$ac_ext <<_ACEOF return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then use_kqueue=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -use_kqueue=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + use_kqueue=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $use_kqueue" >&5 echo "${ECHO_T}$use_kqueue" >&6; } if test "${use_kqueue}" = "yes" ; then @@ -5590,15 +5493,7 @@ if test "${check_for_mprotect}" = "yes" ; then msg="for mmap and mprotect" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - use_mprotect=no -else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ #include #include int main() { @@ -5608,39 +5503,34 @@ cat >>conftest.$ac_ext <<_ACEOF return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then use_mprotect=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -use_mprotect=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + use_mprotect=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $use_mprotect" >&5 echo "${ECHO_T}$use_mprotect" >&6; } if test "${use_mprotect}" = "yes" ; then @@ -8722,15 +8612,7 @@ if test "${enable_mzrt}" = "yes" ; then msg="for compare-and-swap" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - cas_available=no -else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ int check1(long *addr, long old, long new_val) { return __sync_bool_compare_and_swap(addr, old, new_val); } @@ -8742,39 +8624,34 @@ int check1(long *addr, long old, long new_val) { return !check1(&l, 2, 4) || !check2(&s, 3, 6); } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cas_available=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -cas_available=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + cas_available=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $cas_available" >&5 echo "${ECHO_T}$cas_available" >&6; } if test "${cas_available}" = "yes" ; then @@ -8809,54 +8686,41 @@ _ACEOF msg="whether pthread_rwlock is available" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - rwlockavail=no -else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ #include pthread_rwlock_t l; int main() { return pthread_rwlock_init(&l, NULL); } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then rwlockavail=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rwlockavail=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + rwlockavail=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $rwlockavail" >&5 echo "${ECHO_T}$rwlockavail" >&6; } if test "$rwlockavail" = "yes" ; then @@ -8883,52 +8747,39 @@ if test "$check_gcc_dash_e" = "yes" ; then msg="whether linker accepts -Wl,-E" { echo "$as_me:$LINENO: checking $msg" >&5 echo $ECHO_N "checking $msg... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - linker_dash_e=no -else cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ int main() { return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then linker_dash_e=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -linker_dash_e=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + linker_dash_e=no fi - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext if test "$linker_dash_e" = "no" ; then LDFLAGS="${orig_ldflags}" fi diff --git a/src/racket/configure.ac b/src/racket/configure.ac index 4951c306b4..92af108355 100644 --- a/src/racket/configure.ac +++ b/src/racket/configure.ac @@ -770,12 +770,12 @@ AC_LANG_C [ msg="for inline keyword" ] AC_MSG_CHECKING($msg) -AC_TRY_RUN( +AC_COMPILE_IFELSE( static inline int foo() { return 0; } int main() { return foo(); }, - inline=yes, inline=no, inline=no) + inline=yes, inline=no) if test "$inline" = "no" ; then MZOPTIONS="$MZOPTIONS -DNO_INLINE_KEYWORD" fi @@ -783,27 +783,27 @@ AC_MSG_RESULT($inline) [ msg="for noinline attribute" ] AC_MSG_CHECKING($msg) -AC_TRY_RUN( +AC_COMPILE_IFELSE( static int foo() __attribute__ ((noinline)); static int foo() { return 0; } int main() { return foo(); - }, noinline=yes, noinline=no, noinline=no) + }, noinline=yes, noinline=no) if test "$noinline" = "yes" ; then AC_DEFINE(MZ_USE_NOINLINE,1,[Have noinline attribute]) fi -AC_MSG_RESULT($inline) +AC_MSG_RESULT($noinline) [ msg="for GNU preprocessor" ] AC_MSG_CHECKING($msg) -AC_TRY_RUN( +AC_COMPILE_IFELSE( int main () { #ifdef __GNUC__ return 0; #else return 1; #endif - }, using_gnu_cpp=yes, using_gnu_cpp=no, using_gnu_cpp=no) + }, using_gnu_cpp=yes, using_gnu_cpp=no) if test "$using_gnu_cpp" = "yes" ; then XFORMFLAGS="$XFORMFLAGS --keep-lines" case "$build_os" in @@ -876,7 +876,7 @@ fi [ msg="for mbsrtowcs" ] AC_MSG_CHECKING($msg) -AC_TRY_RUN( +AC_LINK_IFELSE( [ #include ] [ #include ] int main() { @@ -885,7 +885,7 @@ AC_TRY_RUN( [ bzero(&state, sizeof(mbstate_t));] [ mbsrtowcs(0, &src, 0, &state);] return 0; - }, mbsrtowcs=yes, mbsrtowcs=no, mbsrtowcs=no) + }, mbsrtowcs=yes, mbsrtowcs=no) if test "$mbsrtowcs" = "no" ; then MZOPTIONS="$MZOPTIONS -DNO_MBTOWC_FUNCTIONS" fi @@ -894,7 +894,7 @@ AC_MSG_RESULT($mbsrtowcs) if test "${try_poll_syscall}" = "yes" ; then [ msg="for poll" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( [ #include ] int main() { struct pollfd pfd; @@ -903,7 +903,7 @@ if test "${try_poll_syscall}" = "yes" ; then pfd.events = POLLIN; r = poll(&pfd, 1, 0); return 0; - }, use_poll=yes, use_poll=no, use_poll=no) + }, use_poll=yes, use_poll=no) AC_MSG_RESULT($use_poll) if test "${use_poll}" = "yes" ; then AC_DEFINE(HAVE_POLL_SYSCALL,1,[Have poll]) @@ -913,7 +913,7 @@ fi if test "${try_epoll_syscall}" = "yes" ; then [ msg="for epoll" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( [ #include ] int main() { int fd; @@ -922,7 +922,7 @@ if test "${try_epoll_syscall}" = "yes" ; then ev.events = EPOLLIN | EPOLLONESHOT; epoll_ctl(fd, EPOLL_CTL_ADD, 0, &ev); return 0; - }, use_epoll=yes, use_epoll=no, use_epoll=no) + }, use_epoll=yes, use_epoll=no) AC_MSG_RESULT($use_epoll) if test "${use_epoll}" = "yes" ; then AC_DEFINE(HAVE_EPOLL_SYSCALL,1,[Have epoll]) @@ -932,7 +932,7 @@ fi if test "${try_kqueue_syscall}" = "yes" ; then [ msg="for kqueue" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( [ #include ] [ #include ] [ #include ] @@ -944,7 +944,7 @@ if test "${try_kqueue_syscall}" = "yes" ; then EV_SET(&kev, 0, EVFILT_READ, EV_ADD, 0, 0, NULL); kevent(kq, &kev, 1, NULL, 0, &timeout); return 0; - }, use_kqueue=yes, use_kqueue=no, use_kqueue=no) + }, use_kqueue=yes, use_kqueue=no) AC_MSG_RESULT($use_kqueue) if test "${use_kqueue}" = "yes" ; then AC_DEFINE(HAVE_KQUEUE_SYSCALL,1,[Have kqueue]) @@ -1016,7 +1016,7 @@ fi if test "${check_for_mprotect}" = "yes" ; then [ msg="for mmap and mprotect" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( [ #include ] [ #include ] int main() { @@ -1024,7 +1024,7 @@ if test "${check_for_mprotect}" = "yes" ; then p = mmap(0, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, open("/dev/zero", O_RDWR), 0); mprotect(p, 2 << 16, PROT_READ | PROT_WRITE | PROT_EXEC); return 0; - }, use_mprotect=yes, use_mprotect=no, use_mprotect=no) + }, use_mprotect=yes, use_mprotect=no) AC_MSG_RESULT($use_mprotect) if test "${use_mprotect}" = "yes" ; then AC_DEFINE(HAVE_MMAP_MPROTECT,1,[Have mmap and mprotect]) @@ -1152,7 +1152,7 @@ fi if test "${enable_mzrt}" = "yes" ; then [ msg="for compare-and-swap" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( int check1(long *addr, long old, long new_val) { return __sync_bool_compare_and_swap(addr, old, new_val); } @@ -1162,7 +1162,7 @@ if test "${enable_mzrt}" = "yes" ; then int main() { long l = 2; short s = 3; return !check1(&l, 2, 4) || !check2(&s, 3, 6); - }, cas_available=yes, cas_available=no, cas_available=no) + }, cas_available=yes, cas_available=no) AC_MSG_RESULT($cas_available) if test "${cas_available}" = "yes" ; then AC_DEFINE(MZ_CAS_AVAILABLE,1,[Compare-and-swap available]) @@ -1187,12 +1187,12 @@ if test "${enable_pthread}" = "yes" ; then [ msg="whether pthread_rwlock is available" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( [ #include ] pthread_rwlock_t l; int main() { return pthread_rwlock_init(&l, NULL); - }, rwlockavail=yes, rwlockavail=no, rwlockavail=no) + }, rwlockavail=yes, rwlockavail=no) AC_MSG_RESULT($rwlockavail) if test "$rwlockavail" = "yes" ; then AC_DEFINE(HAVE_PTHREAD_RWLOCK,1,[Have pthread_rwlock]) @@ -1213,10 +1213,10 @@ if test "$check_gcc_dash_e" = "yes" ; then # Can use -Wl,-E for linking because we're using GNU linker? [ msg="whether linker accepts -Wl,-E" ] AC_MSG_CHECKING($msg) - AC_TRY_RUN( + AC_LINK_IFELSE( int main() { return 0; - }, linker_dash_e=yes, linker_dash_e=no, linker_dash_e=no) + }, linker_dash_e=yes, linker_dash_e=no) if test "$linker_dash_e" = "no" ; then LDFLAGS="${orig_ldflags}" fi