You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2011/08/09 15:10:29 UTC
svn commit: r1155352 - in /couchdb/trunk: THANKS bootstrap
Author: jan
Date: Tue Aug 9 13:10:28 2011
New Revision: 1155352
URL: http://svn.apache.org/viewvc?rev=1155352&view=rev
Log:
Allow "versioned" names of the auto-tools to be used.
Previously bootstrap required aclocal/automake to be available as
"aclocal" and "automake", but some platforms allows multiple versions
of these tools to be installed and makes them available as
"aclocal-<version>".
This patch extends the bootstrap script to try to search for various
names for the tools.
Patch by Trond Norbye.
Modified:
couchdb/trunk/THANKS
couchdb/trunk/bootstrap
Modified: couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/couchdb/trunk/THANKS?rev=1155352&r1=1155351&r2=1155352&view=diff
==============================================================================
--- couchdb/trunk/THANKS (original)
+++ couchdb/trunk/THANKS Tue Aug 9 13:10:28 2011
@@ -85,6 +85,6 @@ suggesting improvements or submitting ch
* Andrey Somov <tr...@gmail.com>
* Chris Coulson <chrisccoulson.googlemail.com>
* Dave Cottlehuber <da...@muse.net.nz>
-
+ * Trond Norbye <tr...@gmail.com>
For a list of authors see the `AUTHORS` file.
Modified: couchdb/trunk/bootstrap
URL: http://svn.apache.org/viewvc/couchdb/trunk/bootstrap?rev=1155352&r1=1155351&r2=1155352&view=diff
==============================================================================
--- couchdb/trunk/bootstrap (original)
+++ couchdb/trunk/bootstrap Tue Aug 9 13:10:28 2011
@@ -49,16 +49,42 @@ gunzip -c m4/ac_check_icu.m4.gz > m4/ac_
gunzip -c m4/ac_check_curl.m4.gz > m4/ac_check_curl.m4
gunzip -c m4/pkg.m4.gz > m4/pkg.m4
-if test -x "`which glibtoolize 2> /dev/null || true`"; then
- glibtoolize -f -c --automake
-else
- libtoolize -f -c --automake
-fi
-
-aclocal -I m4
-autoheader -f
-automake -f -a 2>&1 | sed -e "/install/d"
-autoconf -f
+# Seach a list of names for the first occurence of a program.
+# Some systems may use aclocal-1.10, others may have aclocal etc.
+#
+# Exit with status code 0 if the program exists (and print the
+# path to stdout), exit with status code 1 if it can't be
+# located
+find_program() {
+ set +e
+ for f in "$@"
+ do
+ file=`which ${f} 2>/dev/null | grep -v '^no '`
+ if test -n "x${file}" -a -x "${file}"
+ then
+ echo ${file}
+ set -e
+ exit 0
+ fi
+ done
+
+ echo "Failed to locate required program:" 1>&2
+ echo "\t$@" 1>&2
+ set -e
+ exit 1
+}
+
+LIBTOOLIZE=`find_program glibtoolize libtoolize`
+ACLOCAL=`find_program aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal`
+AUTOHEADER=`find_program autoheader`
+AUTOMAKE=`find_program automake-1.11 automake-1.10 automake-1.9 automake`
+AUTOCONF=`find_program autoconf`
+
+${LIBTOOLIZE} -f -c --automake
+${ACLOCAL} -I m4
+${AUTOHEADER} -f
+${AUTOMAKE} -f -a 2>&1 | sed -e "/install/d"
+${AUTOCONF} -f
ln -f -s "`dirname \`readlink build-aux/missing\``/INSTALL"