summaryrefslogtreecommitdiff
path: root/buildconf
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2005-06-11 17:04:32 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2005-06-11 17:04:32 +0000
commit1883fc33613940db7dc37841d27715a433304ea7 (patch)
treecf410242dbaec92f15ce12a860a0d01431bd9adb /buildconf
parente0ca73f036d4566746770a2f327fdf62391ad1bb (diff)
downloadapr-1883fc33613940db7dc37841d27715a433304ea7.tar.gz
* Test for preferred libtoolize15/libtoolize14 before trusting
that libtoolize's version is sane (at least on freebsd, it isn't) * Ask the selected libtoolize for the libtool_m4 path corresponding to *THIS* version of libtoolize, so we remain in sync. LIBTOOL_M4 continues to override the user's choice [although this should either become unconditional, e.g. replace libtool.m4 even when installed by libtoolize, or become a last resort, preferring the libtool_m4 envvar from libtoolize over LIBTOOL_M4 user choice. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@190152 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buildconf')
-rwxr-xr-xbuildconf12
1 files changed, 9 insertions, 3 deletions
diff --git a/buildconf b/buildconf
index b16441f4a..500a8ca8e 100755
--- a/buildconf
+++ b/buildconf
@@ -22,7 +22,7 @@
#
build/buildcheck.sh || exit 1
-libtoolize=`build/PrintPath glibtoolize libtoolize libtoolize15 libtoolize14`
+libtoolize=`build/PrintPath glibtoolize libtoolize15 libtoolize14 libtoolize`
if [ "x$libtoolize" = "x" ]; then
echo "libtoolize not found in path"
exit 1
@@ -45,8 +45,14 @@ $libtoolize --copy --automake
if [ -f libtool.m4 ]; then
ltfile=`pwd`/libtool.m4
else
- ltpath=`dirname $libtoolize`
- ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
+ ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
+ < $libtoolize`"
+ ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
+ # Expecting the code above to be very portable, but just in case...
+ if [ -e "$ltfile" -o ! -f "$ltfile" ]; then
+ ltpath=`dirname $libtoolize`
+ ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
+ fi
fi
if [ ! -f $ltfile ]; then