summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-08-21 11:23:58 +0000
committerOwen Taylor <otaylor@redhat.com>2005-08-21 11:23:58 +0000
commitd93d56caeffb80ac92a0432ad1ebdecee5c0e2b6 (patch)
tree2e30c3be67fc3ac406a9876809c1b1e009c77fa4
parent2396b502a5de39ee44d53af971b7382a1f130a87 (diff)
Check automake-<ver> if automake isn't sufficiently new. (#3593, Philip Van Hoof)
-rw-r--r--ChangeLog5
-rwxr-xr-xautogen.sh29
2 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 87cae39fd..71917fca0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-08-21 Owen Taylor <otaylor@redhat.com>
+ * autogen.sh: Check automake-<ver> if automake isn't sufficiently
+ new. (#3593, Philip Van Hoof)
+
+2005-08-21 Owen Taylor <otaylor@redhat.com>
+
* autogen.sh: When invoked as, say, ../autogen.sh, switch to
the sourcedir to run the auto*. Based on corresponding code
in GTK+'s autogen.sh. (#3402, Thomas Fitzsimmons)
diff --git a/autogen.sh b/autogen.sh
index 55886dec1..bd6f49da2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,9 +6,7 @@ PACKAGE=cairo
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
LIBTOOLIZE_FLAGS="--copy --force"
-ACLOCAL=${ACLOCAL-aclocal}
AUTOHEADER=${AUTOHEADER-autoheader}
-AUTOMAKE=${AUTOMAKE-automake}
AUTOMAKE_FLAGS="--add-missing"
AUTOCONF=${AUTOCONF-autoconf}
@@ -51,6 +49,33 @@ else
DIE="yes"
fi
+#
+# Hunt for an appropriate version of automake and aclocal; we can't
+# assume that 'automake' is necessarily the most recent installed version
+#
+# We check automake first to allow it to be a newer version than we know about.
+#
+if test x"$AUTOMAKE" = x || test x"$ACLOCAL" = x ; then
+ am_ver=""
+ for ver in "" "-1.9" "-1.8" "-1.7" ; do
+ am="automake$ver"
+ if ($am --version) < /dev/null > /dev/null 2>&1 ; then
+ if ($am --version | head -n 1 | awk 'NR==1 { if( $(NF) >= '$automake_min_vers') \
+ exit 1; exit 0; }'); then : ; else
+ am_ver=$ver
+ break;
+ fi
+ fi
+ done
+
+ AUTOMAKE=${AUTOMAKE-automake$am_ver}
+ ACLOCAL=${ACLOCAL-aclocal$am_ver}
+fi
+
+#
+# Now repeat the tests with the copies we decided upon and error out if they
+# aren't sufficiently new.
+#
if ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 ; then
if ($AUTOMAKE --version | head -n 1 | awk 'NR==1 { if( $(NF) >= '$automake_min_vers') \
exit 1; exit 0; }');