]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Let AC_TRY_RUN be more verbose
authorAkim Demaille <akim@epita.fr>
Fri, 17 Nov 2000 16:56:16 +0000 (16:56 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 17 Nov 2000 16:56:16 +0000 (16:56 +0000)
* 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)'.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index 397add56441d8ebdc5e0637e70fa1ebbccaa72a7..3bd1e99d346c1c761896c134339c4e4da3ff83b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-17  Akim Demaille  <akim@epita.fr>
+
+       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  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_INIT_DEFAULTS) <ac_includes_default>: Include
index c3d3c2fff5ec23039c28b5db3fff0952bfcb10fe..c4d9bb5594b662ca7e3c7ea5b77952c33ce2ff27 100644 (file)
@@ -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
 
index c3d3c2fff5ec23039c28b5db3fff0952bfcb10fe..c4d9bb5594b662ca7e3c7ea5b77952c33ce2ff27 100644 (file)
@@ -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