+2004-12-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * config/getopt.m4sh (func_version, func_usage, func_help):
+ Use `$SED -n' instead of `$SED RANGE {..}; d' as AIX sed cannot
+ handle the latter.
+ (func_help): start autoconf and automake in subshells to avoid
+ error messages from ash or Bourne shell if not available.
+
2004-12-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
Gary V. Vaughan <gary@gnu.org>
# Echo version message to standard output and exit.
func_version ()
{
- $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
s/^# //; s/^# *$//;
s/\((C)\)[[ 0-9,-]]*\( [[1-9]][[0-9]]*\)/\1\2/;
p;
- }; d' < "$progpath"
+ }' < "$progpath"
exit $EXIT_SUCCESS
}
# Echo short help message to standard output and exit.
func_usage ()
{
- $SED '/^# Usage:/,/# -h/ {
+ $SED -n '/^# Usage:/,/# -h/ {
s/^# //; s/^# *$//;
s/\$progname/'$progname'/;
p;
- }; d' < "$progpath"
+ }' < "$progpath"
$ECHO
$ECHO "run \`$progname --help | more' for full usage"
exit $EXIT_SUCCESS
# Echo long help message to standard output and exit.
func_help ()
{
- $SED '/^# Usage:/,/# Report bugs to/ {
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
s/^# //; s/^# *$//;
s*\$progname*'$progname'*;
s*\$SHELL*'"$SHELL"'*;
s*\$LTCFLAGS*'"$LTCFLAGS"'*;
s*\$LD*'"$LD"'*;
s/\$with_gnu_ld/'"$with_gnu_ld"'/;
- s/\$automake_version/'"`automake --version 2>/dev/null |$SED 1q`"'/;
- s/\$autoconf_version/'"`autoconf --version 2>/dev/null |$SED 1q`"'/;
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/;
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/;
p;
- }; d' < "$progpath"
+ }' < "$progpath"
exit $EXIT_SUCCESS
}