autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

75-as-ifelse.patch


From: Akim Demaille
Subject: 75-as-ifelse.patch
Date: Thu, 14 Dec 2000 09:55:42 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * acgeneral.m4 (_AC_PREPROC_IFELSE): Use ac_status as set by
        AC_TRY_EVAL.
        (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): More alike,
        using AS_IFELSE, and systematically AC_TRY_COMMAND when testing
        something (for the logs).

Index: acgeneral.m4
--- acgeneral.m4 Wed, 13 Dec 2000 21:16:49 +0100 akim (ace/27_acgeneral. 
1.169.8.105 644)
+++ acgeneral.m4 Wed, 13 Dec 2000 21:34:17 +0100 akim (ace/27_acgeneral. 
1.169.8.105 644)
@@ -2744,8 +2744,7 @@ m4_define([AH_CHECK_LIB],
 # This macro can be used during the selection of a preprocessor.
 AC_DEFUN([_AC_PREPROC_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
-if AC_TRY_EVAL(ac_try); then
+if AC_TRY_COMMAND([$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err]); then
   if egrep -v '^ *\+' conftest.err | grep . >/dev/null; then
     ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
   else
@@ -2830,13 +2829,11 @@ AC_DEFUN([AC_EGREP_HEADER],
 m4_define([_AC_COMPILE_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext
-if AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext; then
-  m4_default([$2], :)
-else
-  echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
-  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
-m4_ifvaln([$3],[  $3])dnl
-fi
+AS_IFELSE([AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext],
+          [$2],
+[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
+cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
+m4_ifvaln([$3],[$3])dnl])
 rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 ])# _AC_COMPILE_IFELSE

@@ -2871,13 +2868,12 @@ AC_DEFUN([AC_TRY_COMPILE],
 m4_define([_AC_LINK_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext conftest$ac_exeext
-if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
-  m4_default([$2], :)
-else
-  echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
-  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
-m4_ifvaln([$3], [  $3])dnl
-fi
+AS_IFELSE([AC_TRY_EVAL(ac_link) &&
+            AC_TRY_COMMAND([test -s conftest$ac_exeext])],
+          [$2],
+          [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
+cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
+m4_ifvaln([$3], [$3])dnl])
 rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 ])# _AC_LINK_IFELSE

@@ -2929,10 +2925,7 @@ AC_DEFUN([AC_TRY_LINK],
 m4_define([_AC_RUN_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest$ac_exeext
-AC_TRY_EVAL(ac_link) &&
-  (./conftest$ac_exeext) >&AS_MESSAGE_LOG_FD 2>&1;
-ac_status=$?
-AS_IFELSE([test $ac_status = 0],
+AS_IFELSE([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
           [$2],
 [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
 echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]