2007-04-11 Stepan Kasal * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X when cross-compiling. Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.948 diff -u -r1.948 general.m4 --- lib/autoconf/general.m4 24 Feb 2007 21:48:24 -0000 1.948 +++ lib/autoconf/general.m4 11 Apr 2007 17:01:52 -0000 @@ -2428,14 +2428,23 @@ # ------------------------------------------------------------- # Try to link PROGRAM. # This macro can be used during the selection of a compiler. +# +# Test that resulting file is executable; see the problem reported by mwoehlke +# in . +# But skip the test when cross-compiling, to prevent problems like the one +# reported by Chris Johns in +# . +# m4_define([_AC_LINK_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest.$ac_objext conftest$ac_exeext AS_IF([_AC_DO_STDERR($ac_link) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - AS_TEST_X([conftest$ac_exeext])], + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + AS_TEST_X([conftest$ac_exeext]) + }], [$2], [_AC_MSG_LOG_CONFTEST $3])