]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* m4sh.m4 (AS_EXIT): Use "false" for exit code 1, ":" for 0.
authorPavel Roskin <proski@gnu.org>
Mon, 30 Oct 2000 19:47:58 +0000 (19:47 +0000)
committerPavel Roskin <proski@gnu.org>
Mon, 30 Oct 2000 19:47:58 +0000 (19:47 +0000)
        * acgeneral.m4 (AC_MSG_ERROR): Don't use m4_default for the
        second argument - AS_EXIT takes care of it.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
lib/m4sugar/m4sh.m4
m4sh.m4

index 8957355c6a59a5e908cd007a526100f297f45402..d740411bf2e89814635e3be9e05701c6a5943da3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-10-30  Pavel Roskin  <proski@gnu.org>
+
+       * m4sh.m4 (AS_EXIT): Use "false" for exit code 1, ":" for 0.
+       * acgeneral.m4 (AC_MSG_ERROR): Don't use m4_default for the
+       second argument - AS_EXIT takes care of it.
+
 2000-10-30  Akim Demaille  <akim@epita.fr>
 
        * m4sugar.m4: Formatting changes.
index fae3bc4e38b68f025e912d33392e7276dc57987b..d27e1c50ebb2519c2aba7bfbab1e2c63fbf79f32 100644 (file)
@@ -2772,7 +2772,7 @@ _AC_ECHO([configure: WARNING: $1], 2); }])
 define([AC_MSG_ERROR],
 [{ _AC_ECHO([configure:__oline__: error: $1], AC_FD_LOG)
   _AC_ECHO([configure: error: $1], 2)
-  AS_EXIT([m4_default([$2], 1)]); }])
+  AS_EXIT([$2]); }])
 
 
 # AU::AC_CHECKING(FEATURE)
index fae3bc4e38b68f025e912d33392e7276dc57987b..d27e1c50ebb2519c2aba7bfbab1e2c63fbf79f32 100644 (file)
@@ -2772,7 +2772,7 @@ _AC_ECHO([configure: WARNING: $1], 2); }])
 define([AC_MSG_ERROR],
 [{ _AC_ECHO([configure:__oline__: error: $1], AC_FD_LOG)
   _AC_ECHO([configure: error: $1], 2)
-  AS_EXIT([m4_default([$2], 1)]); }])
+  AS_EXIT([$2]); }])
 
 
 # AU::AC_CHECKING(FEATURE)
index eb43f2ec195198bc64136be6f03d993796293155..a66c7c8f915df9336fd5ca7ba7249bc2a1d1d0ba 100644 (file)
@@ -106,8 +106,13 @@ define([AS_UNSET],
 # We cannot simply use "exit N" because some shells (zsh and Solaris sh)
 # will not set $? to N while running the code set by "trap 0"
 # So we set $? by executing "exit N" in the subshell and then exit.
+# "false" is used for exit code 1 (default), ":" is used for 0
 define([AS_EXIT],
-[{ (exit m4_default([$1], 1)); exit; }])
+[{ m4_case([$1],
+           [0], [:; exit],
+           [],  [false; exit],
+           [1], [false; exit],
+           [(exit $1); exit]); }])
 
 
 
diff --git a/m4sh.m4 b/m4sh.m4
index eb43f2ec195198bc64136be6f03d993796293155..a66c7c8f915df9336fd5ca7ba7249bc2a1d1d0ba 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -106,8 +106,13 @@ define([AS_UNSET],
 # We cannot simply use "exit N" because some shells (zsh and Solaris sh)
 # will not set $? to N while running the code set by "trap 0"
 # So we set $? by executing "exit N" in the subshell and then exit.
+# "false" is used for exit code 1 (default), ":" is used for 0
 define([AS_EXIT],
-[{ (exit m4_default([$1], 1)); exit; }])
+[{ m4_case([$1],
+           [0], [:; exit],
+           [],  [false; exit],
+           [1], [false; exit],
+           [(exit $1); exit]); }])