Skip to content

Commit

Permalink
Allow "versioned" names of the auto-tools to be used.
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1155352 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
janl committed Aug 9, 2011
1 parent 81456a1 commit e50487f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion THANKS
Expand Up @@ -85,6 +85,6 @@ suggesting improvements or submitting changes. Some of these people are:
* Andrey Somov <trophybase@gmail.com>
* Chris Coulson <chrisccoulson.googlemail.com>
* Dave Cottlehuber <dave@muse.net.nz>

* Trond Norbye <trond.norbye@gmail.com>

For a list of authors see the `AUTHORS` file.
44 changes: 35 additions & 9 deletions bootstrap
Expand Up @@ -49,16 +49,42 @@ gunzip -c m4/ac_check_icu.m4.gz > m4/ac_check_icu.m4
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
# 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`

aclocal -I m4
autoheader -f
automake -f -a 2>&1 | sed -e "/install/d"
autoconf -f
${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"

Expand Down

0 comments on commit e50487f

Please sign in to comment.