diff --git a/autogen.sh b/autogen.sh index 973fb98..2491cb9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -21,8 +21,8 @@ EOF exit 1 } -test -n "$srcdir" || srcdir=$(dirname "$0") -test -n "$srcdir" || srcdir=. +: ${srcdir:="$(dirname "$0")"} +: ${srcdir=.} olddir=$(pwd) @@ -36,23 +36,23 @@ cd $srcdir # shellcheck disable=SC2016 PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then +case "$# $NOCONFIGURE" in ('0 ') echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 echo "*** If you wish to pass any to it, please specify them on the" >&2 echo "*** '$0' command line." >&2 echo "" >&2 -fi +;;esac aclocal --install || exit 1 autoreconf --verbose --force --install || exit 1 cd "$olddir" -if [ "$NOCONFIGURE" = "" ]; then +case "$NOCONFIGURE" in ('') $srcdir/configure "$@" || exit 1 - if [ "$1" = "--help" ]; then exit 0 else + case "$1" in ("--help") exit 0 ;;(*) echo "Now type 'make' to compile $PKG_NAME" || exit 1 - fi -else + ;;esac +;;(*) echo "Skipping configure process." -fi +;;esac