build-sys/autogen: don't use bashisms (#4489)

Fixes:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Feb 17  2016 /bin/sh -> dash

$ ./autogen.sh c
./autogen.sh: 22: ./autogen.sh: [[: not found
...
checking whether make supports nested variables... (cached) yes
checking build system type... Invalid configuration `c': machine `c' not
recognized
configure: error: /bin/bash build-aux/config.sub c failed

this is a follow-up for a5e739a570
This commit is contained in:
Evgeny Vereshchagin 2016-10-26 02:39:48 +03:00 committed by Zbigniew Jędrzejewski-Szmek
parent 803467c46d
commit 2b7466a22b

View file

@ -19,13 +19,11 @@ set -e
verb="$1" verb="$1"
if [[ -n "$verb" ]]; then case "$verb" in
if [[ "$verb" != [cgals] ]]; then "") ;;
echo "Unexpected argument: $verb" >&2 [cgals]) shift ;;
exit 1 *) echo "Unexpected argument: $verb" >&2; exit 1 ;;
fi esac
shift
fi
oldpwd=$(pwd) oldpwd=$(pwd)
topdir=$(dirname $0) topdir=$(dirname $0)