From: Greg Stein <gstein@users.sourceforge.net>
Date: Wed, 18 Jun 2003 01:11:45 +0000 (+0000)
Subject: Patch submitted by Joe Orton <joe@manyfish.co.uk> with additional
X-Git-Tag: R_1_95_7~46
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f42e8ae96be502e5f0d8995cd7f9a017b63ca1a4;p=libexpat

Patch submitted by Joe Orton <joe@manyfish.co.uk> with additional
modifications by Greg Stein (comments and text changes).

* buildconf.sh: to deal with crazy/custom libtool installations, allow
    the developer/package to specify the libtool.m4 location by
    setting the LIBTOOL_M4 environment variable. If that isn't set,
    then we use our previous method of trying to derive its location.
---

diff --git a/expat/buildconf.sh b/expat/buildconf.sh
index 4f67ca79..2fc5932a 100755
--- a/expat/buildconf.sh
+++ b/expat/buildconf.sh
@@ -66,10 +66,18 @@ echo "Copying libtool helper files ..."
 #
 $libtoolize --copy --automake
 
+#
+# Find the libtool.m4 file. The developer/packager can set the LIBTOOL_M4
+# environment variable to specify its location. If that variable is not
+# set, then we'll assume a "standard" libtool installation and try to
+# derive its location.
+#
 ltpath=`dirname $libtoolize`
-ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
+ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
 cp $ltfile conftools/libtool.m4
 
+echo "Using libtool.m4 from ${ltfile}."
+
 #--------------------------------------------------------------------------
 
 ### for a little while... remove stray aclocal.m4 files from