rev 456 - trunk
[email protected] Thu, 25 Oct 2007 15:13:23 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: giles
Date: 2007-10-25 15:13:23 -0700 (Thu, 25 Oct 2007)
New Revision: 456
Modified:
trunk/autogen.sh
Log:
Update autogen.sh to detect automake 1.10 and later.
Modified: trunk/autogen.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/autogen.sh 2007-10-25 21:57:25 UTC (rev 455)
+++ trunk/autogen.sh 2007-10-25 22:13:23 UTC (rev 456)
@@ -20,29 +20,38 @@
exit 1
}
=20
-VERSIONGREP=3D"sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
-VERSIONMKINT=3D"sed -e s/[^0-9]//"
+VERSIONGREP=3D"sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
+VERSIONMKMAJ=3D"sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
+VERSIONMKMIN=3D"sed -e s/.*[0-9][0-9]*\.//"
=20
# do we need automake?
if test -r Makefile.am; then
- AM_NEEDED=3D`fgrep AUTOMAKE_OPTIONS Makefile.am | $VERSIONGREP`
- if test -z $AM_NEEDED; then
+ AM_OPTIONS=3D`fgrep AUTOMAKE_OPTIONS Makefile.am`
+ AM_NEEDED=3D`echo $AM_OPTIONS | $VERSIONGREP`
+ if test "x$AM_NEEDED" =3D "x$AM_OPTIONS"; then
+ AM_NEEDED=3D""
+ fi
+ if test -z "$AM_NEEDED"; then
echo -n "checking for automake... "
AUTOMAKE=3Dautomake
ACLOCAL=3Daclocal
if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
+ echo "yes"
+ else
echo "no"
AUTOMAKE=3D
- else
- echo "yes"
fi
else
echo -n "checking for automake $AM_NEEDED or later... "
- for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
- verneeded=3D`echo $AM_NEEDED | $VERSIONMKINT`
+ majneeded=3D`echo $AM_NEEDED | $VERSIONMKMAJ`
+ minneeded=3D`echo $AM_NEEDED | $VERSIONMKMIN`
+ for am in automake-$AM_NEEDED automake$AM_NEEDED automake \
+ automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
($am --version < /dev/null > /dev/null 2>&1) || continue
- ver=3D`$am --version < /dev/null | head -1 | $VERSIONGREP | $VERSI=
ONMKINT`
- if test $ver -ge $verneeded; then
+ ver=3D`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
+ maj=3D`echo $ver | $VERSIONMKMAJ`
+ min=3D`echo $ver | $VERSIONMKMIN`
+ if test $maj -eq $majneeded -a $min -ge $minneeded; then
AUTOMAKE=3D$am
echo $AUTOMAKE
break
@@ -50,11 +59,13 @@
done
test -z $AUTOMAKE && echo "no"
echo -n "checking for aclocal $AM_NEEDED or later... "
- for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
- verneeded=3D`echo $AM_NEEDED | $VERSIONMKINT`
+ for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal\
+ aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
($ac --version < /dev/null > /dev/null 2>&1) || continue
- ver=3D`$ac --version < /dev/null | head -1 | $VERSIONGREP | $VERSI=
ONMKINT`
- if test $ver -ge $verneeded; then
+ ver=3D`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
+ maj=3D`echo $ver | $VERSIONMKMAJ`
+ min=3D`echo $ver | $VERSIONMKMIN`
+ if test $maj -eq $majneeded -a $min -ge $minneeded; then
ACLOCAL=3D$ac
echo $ACLOCAL
break