[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AS_EXIT, optimization
From: |
Pavel Roskin |
Subject: |
AS_EXIT, optimization |
Date: |
Mon, 30 Oct 2000 10:35:29 -0500 (EST) |
Hello!
As requested.
ChangeLog:
* 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.
Regards,
Pavel Roskin
______________________________________
Index: acgeneral.m4
--- acgeneral.m4 Mon Oct 30 09:39:35 2000
+++ acgeneral.m4 Mon Oct 30 10:03:33 2000
@@ -2794,7 +2794,7 @@
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: m4sh.m4
--- m4sh.m4 Mon Oct 30 09:39:35 2000
+++ m4sh.m4 Mon Oct 30 10:33:06 2000
@@ -106,8 +106,13 @@
# 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]) }])
______________________________________
- AS_EXIT, optimization,
Pavel Roskin <=