2006-10-04 Paul Eggert <eggert@cs.ucla.edu>
+ * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE):
+ Use a single call to AC_DO_TOKENS rather than multiple, for
+ efficiency.
+ (_AC_LINK_IFELSE): Test that resulting file is executable.
+ Problem reported by mwoehlke in
+ <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
+
* lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather
than creating a file to use with test -x; this is much faster.
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext
AS_IF([_AC_DO_STDERR($ac_compile) &&
- _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
- _AC_DO_TOKENS([test -s conftest.$ac_objext])],
+ _AC_DO_TOKENS([{
+ test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext])],
[$2],
[_AC_MSG_LOG_CONFTEST
$3])
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext conftest$ac_exeext
AS_IF([_AC_DO_STDERR($ac_link) &&
- _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
- _AC_DO_TOKENS([test -s conftest$ac_exeext])],
+ _AC_DO_TOKENS([{
+ test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+ test ! -s conftest.err
+ } &&
+ test -s conftest$ac_exeext &&
+ AS_EXECUTABLE_P([conftest$ac_exeext])])],
[$2],
[_AC_MSG_LOG_CONFTEST
$3])