autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-206-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-206-g667dcc0
Date: Wed, 19 Nov 2008 04:55:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=667dcc0c3015a6ba7ee73b767c992d516a935541

The branch, master has been updated
       via  667dcc0c3015a6ba7ee73b767c992d516a935541 (commit)
       via  e84b404ff0cfc9ab0b56a538fa17283d6688284e (commit)
       via  12bb35717bf10ca68f2e40008334ab123dcbe152 (commit)
      from  740062eb427759b1c8203004dedeab07a60cab52 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 667dcc0c3015a6ba7ee73b767c992d516a935541
Author: Eric Blake <address@hidden>
Date:   Tue Nov 18 09:40:03 2008 -0700

    Use fn for shell functions, func for autoconf CHECK_FUNCS.
    
    * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Abbreviate shell
    function names.
    * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE)
    (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
    (AC_CHECK_DECL, AC_COMPUTE_INT): Likewise.
    * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL)
    (_AC_CHECK_HEADER_COMPILE, _AC_CHECK_HEADER_PREPROC): Likewise.
    * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, _AC_TYPE_INT)
    (_AC_TYPE_UNSIGNED_INT, AC_CHECK_MEMBER): Likewise.
    * lib/autotest/general.m4 (AT_INIT): Likewise.
    * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_EXIT_PREPARE)
    (AS_EXIT, AS_SET_STATUS, _AS_UNSET_PREPARE, _AS_MKDIR_P)
    (_AS_MKDIR_P_PREPARE, _AS_VAR_APPEND_PREPARE, AS_VAR_APPEND)
    (_AS_VAR_ARITH_PREPARE, AS_VAR_ARITH): Likewise.
    * doc/autoconf.texi (Shell Functions): Likewise.
    
    Signed-off-by: Eric Blake <address@hidden>

commit e84b404ff0cfc9ab0b56a538fa17283d6688284e
Author: Eric Blake <address@hidden>
Date:   Tue Nov 18 20:58:19 2008 -0700

    Alter default value of AS_EXIT.
    
    * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit
    parameter be optional.
    (AS_EXIT): Use it to make better default.
    (_AS_DETECT_BETTER_SHELL): Use new default.
    * bin/autoconf.as (exit_missing_arg, getopt): Likewise.
    * lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
    * tests/m4sh.at (AS@&address@hidden): Update test.
    * doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Mention
    new default behavior.
    (Limitations of Builtins) <trap>: Adjust to use new default.
    * NEWS: Mention the semantic change.
    Suggested by Ralf Wildenhues.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 12bb35717bf10ca68f2e40008334ab123dcbe152
Author: Eric Blake <address@hidden>
Date:   Tue Nov 18 20:07:19 2008 -0700

    Update example to match actual Tru64 behavior.
    
    * doc/autoconf.texi (Limitations of Builtins) <trap>: Correct
    the example.
    Reported by Ralf Wildenhues.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |   38 ++++++++++++++++++
 NEWS                      |    4 +-
 bin/autoconf.as           |    8 ++--
 doc/autoconf.texi         |   27 +++++++------
 lib/autoconf/functions.m4 |    6 +-
 lib/autoconf/general.m4   |   36 +++++++++---------
 lib/autoconf/headers.m4   |   18 ++++----
 lib/autoconf/status.m4    |    2 +-
 lib/autoconf/types.m4     |   24 ++++++------
 lib/autotest/general.m4   |   90 ++++++++++++++++++++++----------------------
 lib/m4sugar/m4sh.m4       |   92 +++++++++++++++++++++++---------------------
 tests/m4sh.at             |   18 +++++---
 12 files changed, 207 insertions(+), 156 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1e56b6e..fbbc671 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,43 @@
 2008-11-18  Eric Blake  <address@hidden>
 
+       Use fn for shell functions, func for autoconf CHECK_FUNCS.
+       * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Abbreviate shell
+       function names.
+       * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE)
+       (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
+       (AC_CHECK_DECL, AC_COMPUTE_INT): Likewise.
+       * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL)
+       (_AC_CHECK_HEADER_COMPILE, _AC_CHECK_HEADER_PREPROC): Likewise.
+       * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, _AC_TYPE_INT)
+       (_AC_TYPE_UNSIGNED_INT, AC_CHECK_MEMBER): Likewise.
+       * lib/autotest/general.m4 (AT_INIT): Likewise.
+       * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_EXIT_PREPARE)
+       (AS_EXIT, AS_SET_STATUS, _AS_UNSET_PREPARE, _AS_MKDIR_P)
+       (_AS_MKDIR_P_PREPARE, _AS_VAR_APPEND_PREPARE, AS_VAR_APPEND)
+       (_AS_VAR_ARITH_PREPARE, AS_VAR_ARITH): Likewise.
+       * doc/autoconf.texi (Shell Functions): Likewise.
+
+2008-11-18  Eric Blake  <address@hidden>
+
+       Alter default value of AS_EXIT.
+       * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit
+       parameter be optional.
+       (AS_EXIT): Use it to make better default.
+       (_AS_DETECT_BETTER_SHELL): Use new default.
+       * bin/autoconf.as (exit_missing_arg, getopt): Likewise.
+       * lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
+       * tests/m4sh.at (AS@&address@hidden): Update test.
+       * doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Mention
+       new default behavior.
+       (Limitations of Builtins) <trap>: Adjust to use new default.
+       * NEWS: Mention the semantic change.
+       Suggested by Ralf Wildenhues.
+
+       Update example to match actual Tru64 behavior.
+       * doc/autoconf.texi (Limitations of Builtins) <trap>: Correct
+       the example.
+       Reported by Ralf Wildenhues.
+
        Add AS_SET_STATUS, make AS_EXIT more efficient.
        * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New
        macros.
diff --git a/NEWS b/NEWS
index b67d82c..6ef0725 100644
--- a/NEWS
+++ b/NEWS
@@ -33,7 +33,9 @@ GNU Autoconf NEWS - User visible changes.
    AS_LINENO_PREPARE  AS_ME_PREPARE  AS_SET_STATUS  AS_VAR_APPEND
    AS_VAR_ARITH  AS_VAR_COPY
 
-** The following m4sh macros are documented now:
+** The following m4sh macros are documented now, but in some cases
+   with slightly different semantics than what the previous
+   undocumented version had:
    AS_ECHO  AS_ECHO_N  AS_EXIT  AS_LITERAL_IF  AS_UNSET  AS_VAR_IF
    AS_VAR_POPDEF  AS_VAR_PUSHDEF  AS_VAR_SET  AS_VAR_SET_IF
    AS_VAR_TEST_SET  AS_VERSION_COMPARE
diff --git a/bin/autoconf.as b/bin/autoconf.as
index c678e55..c6bb0f6 100644
--- a/bin/autoconf.as
+++ b/bin/autoconf.as
@@ -81,7 +81,7 @@ Try \`$as_me --help' for more information."
 exit_missing_arg='
   AS_ECHO(["$as_me: option \`$[1]'\'' requires an argument"]) >&2
   AS_ECHO(["$help"]) >&2
-  AS_EXIT([1])
+  AS_EXIT
 ' # restore font-lock: "
 
 # Variables.
@@ -156,7 +156,7 @@ while test $# -gt 0 ; do
        exec >&2
        AS_ECHO(["$as_me: invalid option $[1]"])
        AS_ECHO(["$help"])
-       AS_EXIT([1]) ;;
+       AS_EXIT ;;
     * )
        break ;;
   esac
@@ -175,7 +175,7 @@ case $# in
       infile=configure.in
     else
       AS_ECHO(["$as_me: no input file"]) >&2
-      AS_EXIT([1])
+      AS_EXIT
     fi
     test -z "$traces" && test -z "$outfile" && outfile=configure;;
   1)
@@ -183,7 +183,7 @@ case $# in
   *) exec >&2
      AS_ECHO(["$as_me: invalid number of arguments."])
      AS_ECHO(["$help"])
-     AS_EXIT([1]) ;;
+     AS_EXIT ;;
 esac
 
 # Unless specified, the output is stdout.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 71d72f4..f06a545 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12010,12 +12010,15 @@ for portability, should not include more than one 
newline.  The bytes of
 Redirections can be placed outside the macro invocation.
 @end defmac
 
address@hidden AS_EXIT (@dvar{status, 1})
address@hidden AS_EXIT (@dvar{status, max($?/1)})
 @asindex{EXIT}
-Emit code to exit the shell with @var{status}.  This works around shells
-that see the exit status of the command prior to @code{exit} inside a
address@hidden 0} handler (@pxref{Limitations of Builtins, , Limitations of
-Shell Builtins}).
+Emit code to exit the shell with @var{status}.  If @var{status} is
+omitted, then @samp{$?} is used, except that a status of zero is
+converted to @samp{1}.  To exit with successful status, it is necessary
+to supply an explicit @var{status} that expands to @samp{0}.  This macro
+works around shells that see the exit status of the command prior to
address@hidden inside a @samp{trap 0} handler (@pxref{Limitations of
+Builtins, , Limitations of Shell Builtins}).
 @end defmac
 
 @defmac AS_IF (@var{test1}, @ovar{run-if-true1}, @dots{}, @ovar{run-if-false})
@@ -14687,7 +14690,7 @@ f: not found
 
 @noindent
 For this reason, Autoconf (actually M4sh, @pxref{Programming in M4sh})
-uses the prefix @samp{as_func_} for its functions.
+uses the prefix @samp{as_fn_} for its functions.
 
 Handling of positional parameters and shell options varies among shells.
 For example, Korn shells reset and restore trace output (@samp{set -x})
@@ -15435,19 +15438,19 @@ Another possibility is to warn @acronym{BSD} users 
not to use @samp{sh -e}.
 
 Portable scripts should not use @samp{set -e} if @command{trap} is used
 to install an exit handler.  This is because Tru64/OSF 5.1 @command{sh}
-enters the trap handler with the exit status of the command prior to the
-one that triggered the errexit handler:
+sometimes enters the trap handler with the exit status of the command
+prior to the one that triggered the errexit handler:
 
 @example
-$ @kbd{bash -c 'trap '\''echo $?'\'' 0; set -e; false'}
-1
-$ @kbd{sh -c 'trap '\''echo $?'\'' 0; set -e; false'}
+$ @kbd{sh -ec 'trap '\''echo $?'\'' 0; false'}
 0
+$ @kbd{sh -c 'set -e; trap '\''echo $?'\'' 0; false'}
+1
 @end example
 
 @noindent
 Thus, when writing a script in M4sh, rather than trying to rely on
address@hidden -e}, it is better to append @samp{|| AS_EXIT([$?])} to any
address@hidden -e}, it is better to append @samp{|| AS_EXIT} to any
 statement where it is desirable to abort on failure.
 
 @item @command{shift}
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index 0e22efc..aaf961b 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -80,13 +80,13 @@ m4_define([_AC_CHECK_FUNC_BODY],
 # variable ac_cv_func_FUNCTION accordingly, then execute
 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
 AC_DEFUN([AC_CHECK_FUNC],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_func],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_func],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_func],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_func],
     [LINENO FUNC VAR],
     [Tests whether FUNC exists, setting the cache variable VAR accordingly])],
   [_$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_func "$LINENO" "$1" "ac_var"
+[ac_fn_[]_AC_LANG_ABBREV[]_check_func "$LINENO" "$1" "ac_var"
 AS_VAR_IF([ac_var], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_var])])# AC_CHECK_FUNC
 
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 4afa794..2f40f82 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -2413,12 +2413,12 @@ m4_define([_AC_PREPROC_IFELSE_BODY],
 # This macro can be used during the selection of a preprocessor.
 # eval is necessary to expand ac_cpp.
 AC_DEFUN([_AC_PREPROC_IFELSE],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_cpp],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
     [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
   [$0_BODY])]dnl
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
-[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
+[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
 rm -f conftest.err[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
 ])# _AC_PREPROC_IFELSE
 
@@ -2500,12 +2500,12 @@ m4_define([_AC_COMPILE_IFELSE_BODY],
 # Try to compile PROGRAM.
 # This macro can be used during the selection of a compiler.
 AC_DEFUN([_AC_COMPILE_IFELSE],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_compile],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_compile], [LINENO],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO],
     [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
   [$0_BODY])]dnl
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
-[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
+[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
 rm -f core conftest.err conftest.$ac_objext[]m4_ifval([$1], [ 
conftest.$ac_ext])[]dnl
 ])# _AC_COMPILE_IFELSE
 
@@ -2571,12 +2571,12 @@ m4_define([_AC_LINK_IFELSE_BODY],
 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
 #
 AC_DEFUN([_AC_LINK_IFELSE],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_link],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_link], [LINENO],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO],
     [Try to link conftest.$ac_ext, and return whether this succeeded.])],
   [$0_BODY])]dnl
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
-[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
+[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
 ])# _AC_LINK_IFELSE
@@ -2639,13 +2639,13 @@ m4_define([_AC_RUN_IFELSE_BODY],
 # don't remove it.  We remove gmon.out and bb.out, which may be
 # created during the run if the program is built with profiling support.
 AC_DEFUN([_AC_RUN_IFELSE],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_run],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_run], [LINENO],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO],
     [Try to link conftest.$ac_ext, and return whether this succeeded.
      Assumes that executables *can* be run.])],
   [$0_BODY])]dnl
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
-[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
+[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest$ac_exeext[]m4_ifval([$1], [ 
conftest.$ac_ext])[]dnl
 ])# _AC_RUN_IFELSE
@@ -2748,13 +2748,13 @@ m4_define([_AC_CHECK_DECL_BODY],
 # -------------------------------------------------------
 # Check whether SYMBOL (a function, variable, or constant) is declared.
 AC_DEFUN([AC_CHECK_DECL],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_decl],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_decl],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_decl],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_decl],
     [LINENO SYMBOL VAR],
     [Tests whether SYMBOL is declared, setting cache variable VAR 
accordingly.])],
   [_$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_decl ]dnl
+[ac_fn_[]_AC_LANG_ABBREV[]_check_decl ]dnl
 ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
 AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Symbol])dnl
@@ -2961,14 +2961,14 @@ m4_define([_AC_COMPUTE_INT_BODY],
 # case of cross-compilation, if EXPRESSION is not computable at compile-time.
 AC_DEFUN([AC_COMPUTE_INT],
 [AC_LANG_COMPILER_REQUIRE()]dnl
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_compute_int],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_compute_int],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int],
     [LINENO EXPR VAR INCLUDES],
     [Tries to find the compile-time value of EXPR in a program that includes
      INCLUDES, setting VAR accordingly.  Returns whether the value could
      be computed])],
     [_$0_BODY])]dnl
-[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
+[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
        ["AS_ESCAPE([$3], [""])"],
        [], [$4])
 ])# AC_COMPUTE_INT
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 56bbb39..f4a4528 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -149,15 +149,15 @@ esac
 # because it obfuscate the code to try to factor everything, in particular
 # because of the cache variables, and the `checking...' messages.
 AC_DEFUN([_AC_CHECK_HEADER_MONGREL],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_header_mongrel],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_header_mongrel],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel],
     [LINENO HEADER VAR INCLUDES],
     [Tests whether HEADER exists, giving a warning if it cannot be compiled
      using the include files in INCLUDES and setting the cache variable VAR
      accordingly.])],
   [$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_header_mongrel ]dnl
+[ac_fn_[]_AC_LANG_ABBREV[]_check_header_mongrel ]dnl
 ["$LINENO" "$1" "ac_Header" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
 AS_VAR_IF([ac_Header], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_MONGREL
@@ -182,14 +182,14 @@ m4_define([_AC_CHECK_HEADER_COMPILE_BODY],
 # --------------------------------------------------------------
 # Check the compiler accepts HEADER-FILE.  The INCLUDES are defaulted.
 AC_DEFUN([_AC_CHECK_HEADER_COMPILE],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_header_compile],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_header_compile],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_compile],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_compile],
     [LINENO HEADER VAR INCLUDES],
     [Tests whether HEADER exists and can be compiled using the include files
      in INCLUDES, setting the cache variable VAR accordingly.])],
   [$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_header_compile ]dnl
+[ac_fn_[]_AC_LANG_ABBREV[]_check_header_compile ]dnl
 ["$LINENO" "$1" "ac_Header" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
 AS_VAR_IF([ac_Header], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_COMPILE
@@ -214,13 +214,13 @@ m4_define([_AC_CHECK_HEADER_PREPROC_BODY],
 # --------------------------------------------------------------
 # Check the preprocessor accepts HEADER-FILE.
 AC_DEFUN([_AC_CHECK_HEADER_PREPROC],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_header_preproc],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_header_preproc],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc],
     [LINENO HEADER VAR],
     [Tests whether HEADER is present, setting the cache variable VAR 
accordingly.])],
   [$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_header_preproc "$LINENO" "$1" "ac_Header"
+[ac_fn_[]_AC_LANG_ABBREV[]_check_header_preproc "$LINENO" "$1" "ac_Header"
 AS_VAR_IF([ac_Header], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Header])dnl
 ])# _AC_CHECK_HEADER_PREPROC
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index c134bb7..fe78358 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1307,7 +1307,7 @@ if test "$no_create" != yes; then
   exec AS_MESSAGE_LOG_FD>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || AS_EXIT([1])
+  $ac_cs_success || AS_EXIT
 fi
 dnl config.status should not do recursion.
 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4
index b233591..2d055de 100644
--- a/lib/autoconf/types.m4
+++ b/lib/autoconf/types.m4
@@ -167,14 +167,14 @@ m4_define([_AC_CHECK_TYPE_NEW_BODY],
 # Check whether the type TYPE is supported by the system, maybe via the
 # the provided includes.
 AC_DEFUN([_AC_CHECK_TYPE_NEW],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_type],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_type],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_type],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_type],
     [LINENO TYPE VAR INCLUDES],
     [Tests whether TYPE exists after having included INCLUDES, setting
      cache variable VAR accordingly.])],
     [$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_type "$LINENO" "$1" "ac_Type" ]dnl
+[ac_fn_[]_AC_LANG_ABBREV[]_check_type "$LINENO" "$1" "ac_Type" ]dnl
 ["AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
 AS_VAR_IF([ac_Type], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Type])dnl
@@ -679,12 +679,12 @@ m4_define([_AC_TYPE_INT_BODY],
 # exactly NBITS bits was found.  In the third case, intNBITS_t is AC_DEFINEd
 # to type, as well.
 AC_DEFUN([_AC_TYPE_INT],
-[AC_REQUIRE_SHELL_FN([ac_func_c_find_intX_t],
-  [AS_FUNCTION_DESCRIBE([ac_func_c_find_intX_t], [LINENO BITS VAR],
+[AC_REQUIRE_SHELL_FN([ac_fn_c_find_intX_t],
+  [AS_FUNCTION_DESCRIBE([ac_fn_c_find_intX_t], [LINENO BITS VAR],
     [Finds a signed integer type with width BITS, setting cache variable VAR
      accordingly.])],
     [$0_BODY])]dnl
-[ac_func_c_find_intX_t "$LINENO" "$1" "ac_cv_c_int$1_t"
+[ac_fn_c_find_intX_t "$LINENO" "$1" "ac_cv_c_int$1_t"
 case $ac_cv_c_int$1_t in #(
   no|yes) ;; #(
   *)
@@ -724,12 +724,12 @@ m4_define([_AC_TYPE_UNSIGNED_INT_BODY],
 # exactly NBITS bits was found.  In the third case, uintNBITS_t is AC_DEFINEd
 # to type, as well.
 AC_DEFUN([_AC_TYPE_UNSIGNED_INT],
-[AC_REQUIRE_SHELL_FN([ac_func_c_find_uintX_t],
-  [AS_FUNCTION_DESCRIBE([ac_func_c_find_uintX_t], [LINENO BITS VAR],
+[AC_REQUIRE_SHELL_FN([ac_fn_c_find_uintX_t],
+  [AS_FUNCTION_DESCRIBE([ac_fn_c_find_uintX_t], [LINENO BITS VAR],
     [Finds an unsigned integer type with width BITS, setting cache variable VAR
      accordingly.])],
   [$0_BODY])]dnl
-[ac_func_c_find_uintX_t "$LINENO" "$1" "ac_cv_c_uint$1_t"
+[ac_fn_c_find_uintX_t "$LINENO" "$1" "ac_cv_c_uint$1_t"
 case $ac_cv_c_uint$1_t in #(
   no|yes) ;; #(
   *)
@@ -887,8 +887,8 @@ return 0;])],
 # AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
 # variables are not a valid argument.
 AC_DEFUN([AC_CHECK_MEMBER],
-[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_member],
-  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_member],
+[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_member],
+  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_member],
     [LINENO AGGR MEMBER VAR INCLUDES],
     [Tries to find if the field MEMBER exists in type AGGR, after including
      INCLUDES, setting cache variable VAR accordingly.])],
@@ -896,7 +896,7 @@ AC_DEFUN([AC_CHECK_MEMBER],
 [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires literal arguments])])]dnl
 [m4_if(m4_index([$1], [.]), -1, [m4_fatal([$0: Did not see any dot in 
`$1'])])]dnl
 [AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])]dnl
-[ac_func_[]_AC_LANG_ABBREV[]_check_member "$LINENO" ]dnl
+[ac_fn_[]_AC_LANG_ABBREV[]_check_member "$LINENO" ]dnl
 [m4_bpatsubst([$1], [^\([^.]*\)\.\(.*\)], ["\1" "\2"]) "ac_Member" ]dnl
 ["AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
 AS_VAR_IF([ac_Member], [yes], [$2], [$3])
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index e497c02..704dbbf 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -249,22 +249,22 @@ m4_divert_push([PREPARE_TESTS])dnl
 
 m4_text_box([Autotest shell functions.])
 
-AS_FUNCTION_DESCRIBE([at_func_banner], [NUMBER],
+AS_FUNCTION_DESCRIBE([at_fn_banner], [NUMBER],
 [Output banner NUMBER, provided the testsuite is running multiple groups
 and this particular banner has not yet been printed.])
-at_func_banner ()
+at_fn_banner ()
 {
   $at_print_banners || return 0
   eval at_banner_text=\$at_banner_text_$[1]
   test "x$at_banner_text" = x && return 0
   eval at_banner_text_$[1]=
   AS_ECHO(["$as_nl$at_banner_text$as_nl"])
-} # at_func_banner
+} # at_fn_banner
 
-AS_FUNCTION_DESCRIBE([at_func_check_newline], [COMMAND],
+AS_FUNCTION_DESCRIBE([at_fn_check_newline], [COMMAND],
 [Test if COMMAND includes a newline and, if so, print a message and return
 exit code 1.])
-at_func_check_newline ()
+at_fn_check_newline ()
 {
   case "$[1]" in
  *'
@@ -274,21 +274,21 @@ at_func_check_newline ()
   esac
 }
 
-AS_FUNCTION_DESCRIBE([at_func_filter_trace], [EXIT-CODE],
+AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [EXIT-CODE],
 [Split the contents of file "$at_stder1" into the "set -x" trace (on
 stderr) and the other lines (on file "$at_stderr").  Return the exit
 code EXIT-CODE.])
-at_func_filter_trace ()
+at_fn_filter_trace ()
 {
   grep '^ *+' "$at_stder1" >&2
   grep -v '^ *+' "$at_stder1" >"$at_stderr"
   return $[1]
 }
 
-AS_FUNCTION_DESCRIBE([at_func_log_failure], [FILE-LIST],
+AS_FUNCTION_DESCRIBE([at_fn_log_failure], [FILE-LIST],
 [Copy the files in the list on stdout with a "> " prefix, and exit the shell
 with a failure exit code.])
-at_func_log_failure ()
+at_fn_log_failure ()
 {
   for file
     do AS_ECHO(["$file:"]); sed 's/^/> /' "$file"; done
@@ -296,21 +296,21 @@ at_func_log_failure ()
   exit 1
 }
 
-AS_FUNCTION_DESCRIBE([at_func_check_skip], [EXIT-CODE],
+AS_FUNCTION_DESCRIBE([at_fn_check_skip], [EXIT-CODE],
 [Check whether EXIT-CODE is the special exit code 77, and if so exit the shell
 with that same exit code.])
-at_func_check_skip ()
+at_fn_check_skip ()
 {
   case $[1] in
     77) echo 77 > "$at_status_file"; exit 77;;
   esac
 }
 
-AS_FUNCTION_DESCRIBE([at_func_check_status], [EXPECTED EXIT-CODE LINE],
+AS_FUNCTION_DESCRIBE([at_fn_check_status], [EXPECTED EXIT-CODE LINE],
 [Check whether EXIT-CODE is the expected exit code, and if so do nothing.
 Otherwise, if it is 77 exit the shell with that same exit code; if it is
 anything else print an error message and fail the test.])
-at_func_check_status ()
+at_fn_check_status ()
 {
 dnl This order ensures that we don't `skip' if we are precisely checking
 dnl $? = 77.
@@ -322,27 +322,27 @@ dnl $? = 77.
   esac
 }
 
-AS_FUNCTION_DESCRIBE([at_func_diff_devnull], [FILE],
+AS_FUNCTION_DESCRIBE([at_fn_diff_devnull], [FILE],
 [Emit a diff between /dev/null and FILE.  Uses "test -s" to avoid useless
 diff invocations.])
-at_func_diff_devnull ()
+at_fn_diff_devnull ()
 {
   test -s "$[1]" || return 0
   $at_diff "$at_devnull" "$[1]"
 }
 
-AS_FUNCTION_DESCRIBE([at_func_test], [NUMBER],
+AS_FUNCTION_DESCRIBE([at_fn_test], [NUMBER],
 [Parse out test NUMBER from the tail of this file.])
-at_func_test ()
+at_fn_test ()
 {
   eval at_sed=\$at_sed$[1]
   sed "$at_sed" "$at_myself" > "$at_test_source"
 }
 
-AS_FUNCTION_DESCRIBE([at_func_create_debugging_script], [],
+AS_FUNCTION_DESCRIBE([at_fn_create_debugging_script], [],
 [Create the debugging script $at_group_dir/run which will reproduce the
 current test group.])
-at_func_create_debugging_script ()
+at_fn_create_debugging_script ()
 {
   {
     echo "#! /bin/sh" &&
@@ -417,10 +417,10 @@ at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])'
 # Description of all the test groups.
 at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"
 
-AS_FUNCTION_DESCRIBE([at_func_validate_ranges], [NAME...],
+AS_FUNCTION_DESCRIBE([at_fn_validate_ranges], [NAME...],
 [Validate and normalize the test group number contained in each
 variable NAME.  Leading zeroes are treated as decimal.])
-at_func_validate_ranges ()
+at_fn_validate_ranges ()
 {
   for at_grp
   do
@@ -492,14 +492,14 @@ do
        ;;
 
     [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])
-       at_func_validate_ranges at_option
+       at_fn_validate_ranges at_option
        AS_VAR_APPEND([at_groups], ["$at_option "])
        ;;
 
     # Ranges
     [[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
        at_range_start=`echo $at_option |tr -d X-`
-       at_func_validate_ranges at_range_start
+       at_fn_validate_ranges at_range_start
        at_range=`AS_ECHO([" $at_groups_all "]) | \
          sed -e 's/^.* \('$at_range_start' \)/\1/'`
        AS_VAR_APPEND([at_groups], ["$at_range "])
@@ -507,7 +507,7 @@ do
 
     [-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]])
        at_range_end=`echo $at_option |tr -d X-`
-       at_func_validate_ranges at_range_end
+       at_fn_validate_ranges at_range_end
        at_range=`AS_ECHO([" $at_groups_all "]) | \
          sed -e 's/\( '$at_range_end'\) .*$/\1/'`
        AS_VAR_APPEND([at_groups], ["$at_range "])
@@ -526,7 +526,7 @@ do
          at_range_end=$at_range_start
          at_range_start=$at_tmp
        fi
-       at_func_validate_ranges at_range_start at_range_end
+       at_fn_validate_ranges at_range_start at_range_end
        at_range=`AS_ECHO([" $at_groups_all "]) | \
          sed -e 's/^.*\( '$at_range_start' \)/\1/' \
              -e 's/\( '$at_range_end'\) .*$/\1/'`
@@ -1032,9 +1032,9 @@ AS_ERROR([testsuite directory setup failed])
 # test group execution outside of a shell function in order
 # to avoid hitting zsh 4.x exit status bugs.
 
-AS_FUNCTION_DESCRIBE([at_func_group_prepare], [],
+AS_FUNCTION_DESCRIBE([at_fn_group_prepare], [],
 [Prepare running a test group.])
-at_func_group_prepare ()
+at_fn_group_prepare ()
 {
   # The directory for additional per-group helper files.
   at_job_dir=$at_helper_dir/$at_group
@@ -1082,9 +1082,9 @@ at_func_group_prepare ()
   fi
 }
 
-AS_FUNCTION_DESCRIBE([at_func_group_postprocess], [],
+AS_FUNCTION_DESCRIBE([at_fn_group_postprocess], [],
 [Perform cleanup after running a test group.])
-at_func_group_postprocess ()
+at_fn_group_postprocess ()
 {
   # Be sure to come back to the suite directory, in particular
   # since below we might `rm' the group directory we are in currently.
@@ -1151,7 +1151,7 @@ _ATEOF
 
       # Cleanup the group directory, unless the user wants the files.
       if $at_debug_p; then
-       at_func_create_debugging_script
+       at_fn_create_debugging_script
       else
        if test -d "$at_group_dir"; then
          find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
@@ -1168,7 +1168,7 @@ _ATEOF
 
       # Upon failure, keep the group directory for autopsy, and create
       # the debugging script.  With -e, do not start any further tests.
-      at_func_create_debugging_script
+      at_fn_create_debugging_script
       if $at_errexit; then
        echo stop > "$at_stop_file"
       fi
@@ -1202,15 +1202,15 @@ then
   for at_group in $at_groups; do
     (
       # Start one test group.
-      at_func_group_prepare
+      at_fn_group_prepare
       if cd "$at_group_dir" &&
-        at_func_test $at_group &&
+        at_fn_test $at_group &&
         . "$at_test_source" # AT_JOB_FIFO_FD<&-
       then :; else
        AS_WARN([unable to parse test group: $at_group])
        at_failed=:
       fi
-      at_func_group_postprocess
+      at_fn_group_postprocess
       echo token >&AT_JOB_FIFO_FD
     ) &
     shift # Consume one token.
@@ -1236,14 +1236,14 @@ then
 else
   # Run serially, avoid forks and other potential surprises.
   for at_group in $at_groups; do
-    at_func_group_prepare
+    at_fn_group_prepare
     if cd "$at_group_dir" &&
-       at_func_test $at_group &&
+       at_fn_test $at_group &&
        . "$at_test_source"; then :; else
       AS_WARN([unable to parse test group: $at_group])
       at_failed=:
     fi
-    at_func_group_postprocess
+    at_fn_group_postprocess
     test -f "$at_stop_file" && break
     at_first=false
   done
@@ -1604,7 +1604,7 @@ m4_divert_push([TEST_GROUPS])dnl
 [#AT_START_]AT_ordinal
 @%:@ AT_ordinal. m4_defn([AT_line]): m4_defn([AT_description])
 at_setup_line='m4_defn([AT_line])'
-m4_if(AT_banner_ordinal, [0], [], [at_func_banner AT_banner_ordinal
+m4_if(AT_banner_ordinal, [0], [], [at_fn_banner AT_banner_ordinal
 ])dnl
 at_desc="AS_ESCAPE(m4_dquote(m4_defn([AT_description])))"
 at_desc_line=m4_format(["%3d: $at_desc%*s"], AT_ordinal,
@@ -1854,7 +1854,7 @@ dnl We know at build time that tracing COMMANDS is always 
safe.
 [test -n "$at_traceon"],
 dnl COMMANDS may contain parameter expansions; expand them at runtime.
 [test -n "$at_traceon" \
-  && at_func_check_newline "AS_ESCAPE([$1], [`\"])"])])[]dnl
+  && at_fn_check_newline "AS_ESCAPE([$1], [`\"])"])])[]dnl
 m4_popdef([at_reason])])
 
 
@@ -1869,7 +1869,7 @@ m4_define([AT_DIFF_STDERR(ignore)],
 m4_define([AT_DIFF_STDERR(experr)],
          [$at_diff experr "$at_stderr" || at_failed=:])
 m4_define([AT_DIFF_STDERR()],
-         [at_func_diff_devnull "$at_stderr" || at_failed=:])
+         [at_fn_diff_devnull "$at_stderr" || at_failed=:])
 
 m4_define([AT_DIFF_STDOUT(stdout)],
          [echo stdout:; tee stdout <"$at_stdout"])
@@ -1878,7 +1878,7 @@ m4_define([AT_DIFF_STDOUT(ignore)],
 m4_define([AT_DIFF_STDOUT(expout)],
          [$at_diff expout "$at_stdout" || at_failed=:])
 m4_define([AT_DIFF_STDOUT()],
-         [at_func_diff_devnull "$at_stdout" || at_failed=:])
+         [at_fn_diff_devnull "$at_stdout" || at_failed=:])
 
 # _AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR,
 #           [RUN-IF-FAIL], [RUN-IF-PASS], SHELL_ESCAPE_IO)
@@ -1925,7 +1925,7 @@ echo AT_LINE >"$at_check_line_file"
 if _AT_DECIDE_TRACEABLE([$1]); then
   : >"$at_stder1"
   ( $at_traceon; $1 ) >>"$at_stdout" 2>>"$at_stder1"
-  at_func_filter_trace $?
+  at_fn_filter_trace $?
 else
   : >"$at_stderr"
   ( :; $1 ) >>"$at_stdout" 2>>"$at_stderr"
@@ -1938,9 +1938,9 @@ m4_ifdef([AT_DIFF_STDERR($4)], 
[m4_indir([AT_DIFF_STDERR($4)])],
 m4_ifdef([AT_DIFF_STDOUT($3)], [m4_indir([AT_DIFF_STDOUT($3)])],
   [echo >>"$at_stdout"; AS_ECHO(["m4_ifval([$7],[AS_ESCAPE([$3])],[$3])"]) | \
   $at_diff - "$at_stdout" || at_failed=:])
-m4_if([$2], [ignore], [at_func_check_skip],
-  [at_func_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
+m4_if([$2], [ignore], [at_fn_check_skip],
+  [at_fn_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
 AS_IF($at_failed, [$5], [$6])
-$at_failed && at_func_log_failure AT_capture_files
+$at_failed && at_fn_log_failure AT_capture_files
 $at_traceon; }
 ])# _AT_CHECK
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index f056ee3..8863c82 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -270,7 +270,7 @@ _m4_defn([AC_PACKAGE_BUGREPORT]), [], [and 
_m4_defn([AC_PACKAGE_BUGREPORT])])])
 Then install a modern shell, or manually run the script under such a
 shell if you do have one.], [$[]0: ], [], [62])")
   fi
-      AS_EXIT(1)])])
+  AS_EXIT])])
 fi
 SHELL=${CONFIG_SHELL-/bin/sh}
 export SHELL
@@ -402,18 +402,18 @@ m4_define([_AS_RUN],
 # This is a spy to detect "in the wild" shells that do not support shell
 # functions correctly.  It is based on the m4sh.at Autotest testcases.
 m4_define([_AS_SHELL_FN_WORK],
-[as_func_return () { (exit [$]1); }
-as_func_success () { as_func_return 0; }
-as_func_failure () { as_func_return 1; }
-as_func_ret_success () { return 0; }
-as_func_ret_failure () { return 1; }
+[as_fn_return () { (exit [$]1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
 
 exitcode=0
-as_func_success || { exitcode=1; echo as_func_success failed.; }
-as_func_failure && { exitcode=1; echo as_func_failure succeeded.; }
-as_func_ret_success || { exitcode=1; echo as_func_ret_success failed.; }
-as_func_ret_failure && { exitcode=1; echo as_func_ret_failure succeeded.; }
-AS_IF([( set x; as_func_ret_success y && test x = "[$]1" )], [],
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+AS_IF([( set x; as_fn_ret_success y && test x = "[$]1" )], [],
       [exitcode=1; echo positional parameters were not saved.])
 test x$exitcode = x0[]])# _AS_SHELL_FN_WORK
 
@@ -535,23 +535,27 @@ esac])# AS_CASE
 # Other shells don't use `$?' as default for `exit', hence just repeating
 # the exit value can only help improving portability.
 m4_defun([_AS_EXIT_PREPARE],
-[AS_REQUIRE_SHELL_FN([as_func_set_status],
-  [AS_FUNCTION_DESCRIBE([as_func_set_status], [STATUS],
+[AS_REQUIRE_SHELL_FN([as_fn_set_status],
+  [AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS],
     [Set $? to STATUS, without forking.])], [  return $[]1])]dnl
-[AS_REQUIRE_SHELL_FN([as_func_exit],
-  [AS_FUNCTION_DESCRIBE([as_func_exit], [STATUS],
-    [Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])],
-[  set +e
-  as_func_set_status $[]1
-  exit $[]1])])#_AS_EXIT_PREPARE
-
-
-# AS_EXIT([EXIT-CODE = 1])
-# ------------------------
+[AS_REQUIRE_SHELL_FN([as_fn_exit],
+  [AS_FUNCTION_DESCRIBE([as_fn_exit], [[[STATUS]]],
+    [Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+     If STATUS is omitted, use the maximum of $? and 1.])],
+[  as_status=$?
+  set +e
+  test $as_status = 0 && as_status=1
+  as_fn_set_status ${1-$as_status}
+  exit ${1-$as_status}])])#_AS_EXIT_PREPARE
+
+
+# AS_EXIT([EXIT-CODE = $?/1])
+# ---------------------------
 # Exit, with status set to EXIT-CODE in the way that it's seen
-# within "trap 0", and without interference from "set -e".
+# within "trap 0", and without interference from "set -e".  If
+# EXIT-CODE is omitted, then use $?, except use 1 if $? is 0.
 m4_defun([AS_EXIT],
-[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_func_exit m4_default([$1], 1)])
+[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit[]m4_ifval([$1], [ $1])])
 
 
 # AS_FOR(MACRO, SHELL-VAR, [LIST = "$@"], [BODY = :])
@@ -614,7 +618,7 @@ m4_map_args_pair([_$0], [_$0_ELSE], m4_shift2($@))]dnl
 # ---------------------
 # Set the shell status ($?) to STATUS, without forking.
 m4_defun([AS_SET_STATUS],
-[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_func_set_status $1])
+[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_set_status $1])
 
 
 # _AS_UNSET_PREPARE
@@ -622,12 +626,12 @@ m4_defun([AS_SET_STATUS],
 # Define $as_unset to execute AS_UNSET, for backwards compatibility
 # with older versions of M4sh.
 m4_defun([_AS_UNSET_PREPARE],
-[AS_FUNCTION_DESCRIBE([as_func_unset], [VAR], [Portably unset VAR.])
-as_func_unset ()
+[AS_FUNCTION_DESCRIBE([as_fn_unset], [VAR], [Portably unset VAR.])
+as_fn_unset ()
 {
   AS_UNSET([$[1]])
 }
-as_unset=as_func_unset])
+as_unset=as_fn_unset])
 
 
 # AS_UNSET(VAR)
@@ -1167,14 +1171,14 @@ m4_define([_AS_MKDIR_P],
 # Emulate `mkdir -p' with plain `mkdir' if needed.
 m4_defun_init([AS_MKDIR_P],
 [AS_REQUIRE([_$0_PREPARE])],
-[as_dir=$1; as_func_mkdir_p])# AS_MKDIR_P
+[as_dir=$1; as_fn_mkdir_p])# AS_MKDIR_P
 
 
 # _AS_MKDIR_P_PREPARE
 # -------------------
 m4_defun([_AS_MKDIR_P_PREPARE],
-[AS_REQUIRE_SHELL_FN([as_func_mkdir_p],
-  [AS_FUNCTION_DESCRIBE([as_func_mkdir_p], [],
+[AS_REQUIRE_SHELL_FN([as_fn_mkdir_p],
+  [AS_FUNCTION_DESCRIBE([as_fn_mkdir_p], [],
     [Create "$as_dir" as a directory, including parents if necessary.])],
 [
   _AS_MKDIR_P
@@ -1713,24 +1717,24 @@ m4_defun([_AS_TR_PREPARE],
 
 # _AS_VAR_APPEND_PREPARE
 # ----------------------
-# Define as_func_append to the optimum definition for the current
+# Define as_fn_append to the optimum definition for the current
 # shell (bash and zsh provide the += assignment operator to avoid
 # quadratic append growth over repeated appends).
 m4_defun([_AS_VAR_APPEND_PREPARE],
-[AS_FUNCTION_DESCRIBE([as_func_append], [VAR VALUE],
+[AS_FUNCTION_DESCRIBE([as_fn_append], [VAR VALUE],
 [Append the text in VALUE to the end of the definition contained in
 VAR.  Take advantage of any shell optimizations that allow amortized
 linear growth over repeated appends, instead of the typical quadratic
 growth present in naive implementations.])
 AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])],
-[eval 'as_func_append ()
+[eval 'as_fn_append ()
   {
     eval $[]1+=\$[]2
   }'],
-[as_func_append ()
+[as_fn_append ()
   {
     eval $[]1=\$$[]1\$[]2
-  }]) # as_func_append
+  }]) # as_fn_append
 ])
 
 # _AS_VAR_APPEND_WORKS
@@ -1751,27 +1755,27 @@ m4_define([_AS_VAR_APPEND_WORKS],
 # field splitting and file name expansion.
 m4_defun_init([AS_VAR_APPEND],
 [AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])],
-[as_func_append $1 $2])
+[as_fn_append $1 $2])
 
 
 # _AS_VAR_ARITH_PREPARE
 # ---------------------
-# Define as_func_arith to the optimum definition for the current
+# Define as_fn_arith to the optimum definition for the current
 # shell (using POSIX $(()) where supported).
 m4_defun([_AS_VAR_ARITH_PREPARE],
-[AS_FUNCTION_DESCRIBE([as_func_arith], [ARG...],
+[AS_FUNCTION_DESCRIBE([as_fn_arith], [ARG...],
 [Perform arithmetic evaluation on the ARGs, and store the result in
 the global $as_val.  Take advantage of shells that can avoid forks.
 The arguments must be portable across $(()) and expr.])
 AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
-[eval 'as_func_arith ()
+[eval 'as_fn_arith ()
   {
     as_val=$(( $[]* ))
   }'],
-[as_func_arith ()
+[as_fn_arith ()
   {
     as_val=`expr "$[]@" || test $? -eq 1`
-  }]) # as_func_arith
+  }]) # as_fn_arith
 ])
 
 # _AS_VAR_ARITH_WORKS
@@ -1794,7 +1798,7 @@ m4_define([_AS_VAR_ARITH_WORKS],
 m4_defun_init([AS_VAR_ARITH],
 [_AS_DETECT_SUGGESTED([_AS_VAR_ARITH_WORKS])]dnl
 [AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])],
-[as_func_arith $2 && AS_VAR_SET([$1], [$as_val])])
+[as_fn_arith $2 && AS_VAR_SET([$1], [$as_val])])
 
 
 # AS_VAR_COPY(DEST, SOURCE)
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 85ad5d8..1f39bb1 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -305,11 +305,12 @@ AT_DATA_M4SH([script.as],
 [[AS_INIT
 test x${1} = xa && AS_EXIT
 test x${1} = xb && AS_EXIT([${2}])
-test x${1} = xc && trap 's=$?; echo $s; AS_EXIT([$s])' 0
-test x${2} = xd && set -e
+test x${1} = xc && { AS_SET_STATUS([${2}]); AS_EXIT; }
+test x${1} = xd && trap 's=$?; echo $s; AS_EXIT([$s])' 0
+test x${2} = xe && set -e
 AS_SET_STATUS([3])
 dnl Solaris /bin/sh 'set -e' doesn't react to failed function calls
-test x${2} = xd \
+test x${2} = xe \
   && { echo 'skipping rest of test: set -e support is lousy'; exit 77; }
 AS_SET_STATUS([4])
 ]])
@@ -317,9 +318,12 @@ AS_SET_STATUS([4])
 AT_CHECK_M4SH
 AT_CHECK([./script], [4])
 AT_CHECK([./script a], [1])
-AT_CHECK([./script b], [0])
+AT_CHECK([./script b], [1])
+AT_CHECK([./script b 0], [0])
 AT_CHECK([./script b 2], [2])
-AT_CHECK([./script c], [4], [[4
+AT_CHECK([./script c 0], [1])
+AT_CHECK([./script c 2], [2])
+AT_CHECK([./script d], [4], [[4
 ]])
 dnl If we got to this point without a FAIL, then AS_EXIT at least works.
 dnl The rest of this test relies on semi-decent 'set -e' support, even
@@ -327,8 +331,8 @@ dnl though m4sh in general should not try to rely on it 
because of
 dnl portability nightmares on what constructs are considered errors across
 dnl various shells; therefore, an overall SKIP result is desirable on
 dnl broken shells like Solaris /bin/sh.
-AT_CHECK([./script '' d], [3])
-AT_CHECK([./script c d], [3], [[3
+AT_CHECK([./script '' e], [3])
+AT_CHECK([./script d e], [3], [[3
 ]])
 
 AT_CLEANUP


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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