summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2007-09-10 05:51:52 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2007-09-10 05:51:52 +0000
commit4c30f1ff9e59e6bb8826c7b6b26a59daf59b983f (patch)
treea67a44a03dded8b43fc4a964ab01d2e20731dac4 /autogen.sh
parentcb43114b6300f11b7777d7905e835ea407bc94bf (diff)
downloadflac-4c30f1ff9e59e6bb8826c7b6b26a59daf59b983f.tar.gz
automake-1.10 fixes (SF#1791361: https://sourceforge.net/tracker/index.php?func=detail&aid=1791361&group_id=13478&atid=113478)
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/autogen.sh b/autogen.sh
index 70c3d527..273e5437 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -46,8 +46,9 @@ echo "checking for autoconf... "
DIE=1
}
-VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
-VERSIONMKINT="sed -e s/[^0-9]//"
+VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
+VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
+VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
# do we need automake?
if test -r Makefile.am; then
@@ -68,12 +69,15 @@ if test -r Makefile.am; then
fi
else
echo -n "checking for automake $AM_NEEDED or later... "
+ majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
+ minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
for am in automake-$AM_NEEDED automake$AM_NEEDED \
- automake automake-1.7 automake-1.8 automake-1.9; do
+ automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
($am --version < /dev/null > /dev/null 2>&1) || continue
- ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
- verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
- if test $ver -ge $verneeded; then
+ ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
+ maj=`echo $ver | $VERSIONMKMAJ`
+ min=`echo $ver | $VERSIONMKMIN`
+ if test $maj -eq $majneeded -a $min -ge $minneeded; then
AUTOMAKE=$am
echo $AUTOMAKE
break
@@ -82,11 +86,12 @@ if test -r Makefile.am; then
test -z $AUTOMAKE && echo "no"
echo -n "checking for aclocal $AM_NEEDED or later... "
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
- aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9; do
+ aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
($ac --version < /dev/null > /dev/null 2>&1) || continue
- ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
- verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
- if test $ver -ge $verneeded; then
+ ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
+ maj=`echo $ver | $VERSIONMKMAJ`
+ min=`echo $ver | $VERSIONMKMIN`
+ if test $maj -eq $majneeded -a $min -ge $minneeded; then
ACLOCAL=$ac
echo $ACLOCAL
break