+2006-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ and Paul Eggert <eggert@cs.ucla.edu>
+
+ * doc/autoconf.texi (Programming in M4sh): Document
+ AS_BOURNE_COMPATIBLE and AS_SHELL_SANITIZE.
+
+2006-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Renamed to..
+ (AS_BOURNE_COMPATIBLE): ..this.
+ (_AS_RUN, AS_SHELL_SANITIZE): Adjusted all callers.
+
2006-02-12 Paul Eggert <eggert@cs.ucla.edu>
* doc/install.texi (Defining Variables): Tighten up the
M4sh provides portable alternatives for some common shell constructs
that unfortunately are not portable in practice.
+@defmac AS_BOURNE_COMPATIBLE
+@asindex{BOURNE_COMPATIBLE}
+Set up the shell to be more compatible with the Bourne shell as
+standardized by Posix, if possible. This may involve setting
+environment variables, or setting options, or similar
+implementation-specific actions.
+@end defmac
+
@defmac AS_DIRNAME (@var{file-name})
@asindex{DIRNAME}
Return the directory portion of @var{file-name}, using the algorithm
succeed in that case.
@end defmac
+@defmac AS_SHELL_SANITIZE
+@asindex{SHELL_SANITIZE}
+Initialize the shell suitably for @code{configure} scripts. This has
+the effect of @code{AS_BOURNE_COMPATIBLE}, and sets some other
+environment variables for predictable results from configuration tests.
+For example, it sets @env{LC_ALL} to change to the default C locale.
+@xref{Special Shell Variables}.
+@end defmac
+
@defmac AS_TR_CPP (@var{expression})
@asindex{TR_CPP}
Transform @var{expression} into a valid right-hand side for a C @code{#define}.
}])])])
-# _AS_BOURNE_COMPATIBLE
-# ---------------------
+# AS_BOURNE_COMPATIBLE
+# --------------------
# Try to be as Bourne and/or POSIX as possible.
-m4_define([_AS_BOURNE_COMPATIBLE],
+m4_define([AS_BOURNE_COMPATIBLE],
[# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
m4_define([_AS_RUN],
[m4_ifval([$2],
[{ $2 <<\_ASEOF
-_AS_BOURNE_COMPATIBLE
+AS_BOURNE_COMPATIBLE
$1
_ASEOF
}],
## M4sh Initialization. ##
## --------------------- ##
-_AS_BOURNE_COMPATIBLE
+AS_BOURNE_COMPATIBLE
# PATH needs CR
_AS_CR_PREPARE