From: Roland McGrath Date: Sat, 8 Oct 2011 22:14:30 +0000 (-0700) Subject: Use POSIX.2 shell features in eu_version calculation. X-Git-Tag: elfutils-0.153~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9bf1d30e7fd35cbe11c6586500cab11a1d91918;p=thirdparty%2Felfutils.git Use POSIX.2 shell features in eu_version calculation. --- diff --git a/ChangeLog b/ChangeLog index de76d328b..b7b0c15a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-10-08 Roland McGrath + + * configure.ac (eu_version): Use sed instead of ${x/y/z} syntax. + Use POSIX.2 $((...)) syntax instead of $[...]. + Reported by Mike Frysinger . + 2011-10-08 Mike Frysinger * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. diff --git a/configure.ac b/configure.ac index cf3f6d68f..826e64417 100644 --- a/configure.ac +++ b/configure.ac @@ -255,7 +255,7 @@ AC_SUBST([eu_version]) # 1.234 -> 1234 case "$PACKAGE_VERSION" in -[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;; +[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;; *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;; esac case "$eu_version" in @@ -284,6 +284,6 @@ case "$eu_version" in esac # Round up to the next release API (x.y) version. -[eu_version=$[($eu_version + 999) / 1000]] +eu_version=$(( (eu_version + 999) / 1000 )) AC_OUTPUT