autogen.sh: don't rely on sed -r

Not all versions of sed has "sed -r", so change it to use basic
regular expressions. Furthermore, not all systems support \| in basic
regular expressions, to work around it by converting the script names
explicitly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2020-07-11 21:21:54 -07:00
parent d831915543
commit b9a44fcdf0

View file

@ -20,11 +20,14 @@ if test ! x"$autolib" = x; then
for prg in install-sh compile config.guess config.sub; do
# Update autoconf helpers if and only if newer ones are available
if test -f "$autolib"/"$prg" && \
( test -f "$autolib"/"$prg" && \
sed -n -r -e \
's/^(scriptver(|sion)|timestamp)=['\''"]?([^'\''"]+).*$/\3/p' \
( set -e ; \
test -f autoconf/helpers/"$prg" && sed -n \
-e 's/^scriptver=/scriptversion=/' \
-e 's/^timestamp=/scriptversion=/' \
-e 's/^scriptversion=['\''"]?\([^'\''"]*\).*$/\1/p' \
"$autolib"/"$prg" autoconf/helpers/"$prg" | \
sort --check=quiet; test $? -ne 0 )
sort -c 2>/dev/null ; \
test $? -ne 0 )
then
cp -f "$autolib"/"$prg" autoconf/helpers
fi