]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Examine the selected libtoolize in order to determine it's configured
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 10 Jun 2005 19:28:52 +0000 (19:28 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 10 Jun 2005 19:28:52 +0000 (19:28 +0000)
  libtool.m4 path, rather than gross assumptions.  Leaving the gross
  assumptions as a fail-over if the structure of libtoolize script is
  somehow borked.

  Prefer, of course, any libtool that isn't libtool 1.3 or before, so
  push 'libtoolize' to the end of the desireables list.

  In the sandbox for some testing across platforms - will propose to
  dev@apr once some measure of portability is confirmed

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fips-dev@190009 13f79535-47bb-0310-9956-ffa450edef68

srclib/apr/buildconf

index b16441f4ab378cba59f61aa512c117b7b7ee4e7c..294ec02c139010333390a8f97a2dda222d227e8d 100755 (executable)
@@ -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