diff --git a/ChangeLog b/ChangeLog index 72a62957..385d380e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +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> * config/general.m4sh (func_quote_for_eval): Move backslash to diff --git a/config/getopt.m4sh b/config/getopt.m4sh index 89047df8..dc542af3 100644 --- a/config/getopt.m4sh +++ b/config/getopt.m4sh @@ -31,11 +31,11 @@ m4_include([general.m4sh]) # 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 } @@ -43,11 +43,11 @@ func_version () # 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 @@ -57,7 +57,7 @@ func_usage () # 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"'*; @@ -65,10 +65,10 @@ func_help () 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 }