+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.
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)
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)
# 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]); }])
# 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]); }])