aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2020-07-11 21:21:54 -0700
committerH. Peter Anvin <hpa@zytor.com>2020-07-12 06:03:58 -0700
commitb9a44fcdf0b0557a91082dc600a201bd06663484 (patch)
treecd15fa6aa5c56139ed1cb2a7a0953e0cfdb9d088 /autogen.sh
parentd8319155434f3577a2442ad6a27db59e6cfdd4d3 (diff)
downloadnasm-b9a44fcdf0b0557a91082dc600a201bd06663484.tar.gz
nasm-b9a44fcdf0b0557a91082dc600a201bd06663484.tar.xz
nasm-b9a44fcdf0b0557a91082dc600a201bd06663484.zip
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>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 5597c8a0..d1ca83db 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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