From 3d917d19234461d0ca88e7f14ebb5acf37597b51 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 11 Apr 2007 17:32:27 +0000 Subject: [PATCH] * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X when cross-compiling. 2007-04-11 Stepan Kasal --- ChangeLog | 5 +++++ lib/autoconf/general.m4 | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e979756..c7bb9aa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-11 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X + when cross-compiling. + 2007-04-11 Stepan Kasal * doc/autoconf.texi (External Software): Fix a typo in the diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 0773a933..689e09c1 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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 . +# 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]) -- 2.47.2