From: Akim Demaille Date: Fri, 17 Nov 2000 16:56:16 +0000 (+0000) Subject: Let AC_TRY_RUN be more verbose X-Git-Tag: autoconf-2.50~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf0baa2fa612ddb801c3612a0cf82e06b1203eec;p=thirdparty%2Fautoconf.git Let AC_TRY_RUN be more verbose * acgeneral.m4 (_AC_RUN_IFELSE): Instead of canceling the output of the test program, save it into the log. Save the exit status, and report it in the log when non zero. Just use `(./conftest)' instead of `(./conftest; exit)'. --- diff --git a/ChangeLog b/ChangeLog index 397add564..3bd1e99d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-11-17 Akim Demaille + + Let AC_TRY_RUN be more verbose + + * acgeneral.m4 (_AC_RUN_IFELSE): Instead of canceling the output + of the test program, save it into the log. + Save the exit status, and report it in the log when non zero. + Just use `(./conftest)' instead of `(./conftest; exit)'. + 2000-11-17 Akim Demaille * acgeneral.m4 (_AC_INIT_DEFAULTS) : Include diff --git a/acgeneral.m4 b/acgeneral.m4 index c3d3c2fff..c4d9bb559 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -2885,14 +2885,15 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5]) m4_define([_AC_RUN_IFELSE], [m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext -if AC_TRY_EVAL(ac_link) && - test -s conftest$ac_exeext && (./conftest$ac_exeext; exit) 2>/dev/null; then - m4_default([$2], :) -else - echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD -m4_ifvanl([$3], [ $3])dnl -fi +AC_TRY_EVAL(ac_link) && + (./conftest$ac_exeext) >&AS_MESSAGE_LOG_FD 2>&1; +ac_status=$? +AS_IFELSE([test $ac_status == 0], + [$2], +[echo "$as_me: program exited with status: $ac_status" >&AS_MESSAGE_LOG_FD +echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD +cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD +m4_ifvanl([$3], [$3])dnl]) rm -f conftest$ac_exeext ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_RUN_IFELSE diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index c3d3c2fff..c4d9bb559 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2885,14 +2885,15 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5]) m4_define([_AC_RUN_IFELSE], [m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext -if AC_TRY_EVAL(ac_link) && - test -s conftest$ac_exeext && (./conftest$ac_exeext; exit) 2>/dev/null; then - m4_default([$2], :) -else - echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD -m4_ifvanl([$3], [ $3])dnl -fi +AC_TRY_EVAL(ac_link) && + (./conftest$ac_exeext) >&AS_MESSAGE_LOG_FD 2>&1; +ac_status=$? +AS_IFELSE([test $ac_status == 0], + [$2], +[echo "$as_me: program exited with status: $ac_status" >&AS_MESSAGE_LOG_FD +echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD +cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD +m4_ifvanl([$3], [$3])dnl]) rm -f conftest$ac_exeext ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_RUN_IFELSE