]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Apr 2007 17:32:27 +0000 (17:32 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Apr 2007 17:32:27 +0000 (17:32 +0000)
when cross-compiling.

2007-04-11  Stepan Kasal  <kasal@ucw.cz>

ChangeLog
lib/autoconf/general.m4

index 1e9797568a0b37494508571b35076f2f4b87152d..c7bb9aa33bcd9ba0c4ae6779b39be58ca7e689f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-11  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X
+       when cross-compiling.
+
 2007-04-11  Stepan Kasal  <kasal@ucw.cz>
 
        * doc/autoconf.texi (External Software): Fix a typo in the
index 0773a933f945ef4fb6690b919e30388fcea243ef..689e09c17356469735a7d85691fffbab05ff5804 100644 (file)
@@ -2428,14 +2428,23 @@ AU_DEFUN([AC_TRY_COMPILE],
 # -------------------------------------------------------------
 # 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 <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
+# But skip the test when cross-compiling, to prevent problems like the one
+# reported by Chris Johns in
+# <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
+#
 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])