[gs-cvs] rev 7918 - trunk/gs/ijs

till at ghostscript.com till at ghostscript.com
Tue May 8 10:44:47 PDT 2007


Author: till
Date: 2007-05-08 10:44:46 -0700 (Tue, 08 May 2007)
New Revision: 7918

Modified:
   trunk/gs/ijs/autogen.sh
Log:
Makes ijs/ working with automake 1.10


Modified: trunk/gs/ijs/autogen.sh
===================================================================
--- trunk/gs/ijs/autogen.sh	2007-05-08 17:43:12 UTC (rev 7917)
+++ trunk/gs/ijs/autogen.sh	2007-05-08 17:44:46 UTC (rev 7918)
@@ -34,6 +34,10 @@
 # do we need automake?
 (grep "^AM_INIT_AUTOMAKE" "$CONFIG_AC" >/dev/null) && {
   AM_NEEDED=`fgrep AUTOMAKE_OPTIONS Makefile.am | $VERSIONGREP`
+  AM_NMAJOR=`echo $AM_NEEDED |cut -d. -f1`
+  AM_NMINOR=`echo $AM_NEEDED |cut -d. -f2`
+  AM_NPATCHLEVEL=`echo $AM_NEEDED |cut -d. -f3`
+  AM_NVERSION=`expr $AM_NMAJOR '*' 10000 + $AM_NMINOR '*' 100 + 0$AM_NPATCHLEVEL`
   if test -z $AM_NEEDED; then
     echo -n "checking for automake... "
     AUTOMAKE=automake
@@ -49,8 +53,11 @@
     echo -n "checking for automake $AM_NEEDED or later... "
     for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
       ($am --version < /dev/null > /dev/null 2>&1) || continue
-      ver=`$am --version < /dev/null | head -1 | $VERSIONGREP`
-      if test $ver = $AM_NEEDED; then
+      AM_MAJOR=`echo $AM_NEEDED |cut -d. -f1`
+      AM_MINOR=`echo $AM_NEEDED |cut -d. -f2`
+      AM_PATCHLEVEL=`echo $AM_NEEDED |cut -d. -f3`
+      AM_VERSION=`expr $AM_NMAJOR '*' 10000 + $AM_NMINOR '*' 100 + 0$AM_NPATCHLEVEL`
+      if test $AM_VERSION -ge $AM_NVERSION; then
         AUTOMAKE=$am
         echo $AUTOMAKE
         break
@@ -60,8 +67,11 @@
     echo -n "checking for aclocal $AM_NEEDED or later... "
     for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
       ($ac --version < /dev/null > /dev/null 2>&1) || continue
-      ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
-      if test $ver = $AM_NEEDED; then
+      AM_MAJOR=`echo $AM_NEEDED |cut -d. -f1`
+      AM_MINOR=`echo $AM_NEEDED |cut -d. -f2`
+      AM_PATCHLEVEL=`echo $AM_NEEDED |cut -d. -f3`
+      AM_VERSION=`expr $AM_NMAJOR '*' 10000 + $AM_NMINOR '*' 100 + 0$AM_NPATCHLEVEL`
+      if test $AM_VERSION -ge $AM_NVERSION; then
         ACLOCAL=$ac
         echo $ACLOCAL
         break



More information about the gs-cvs mailing list