[Pcre-svn] [484] code/trunk: Update autogen.sh to try severa…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [484] code/trunk: Update autogen.sh to try several names for libtoolize.
Revision: 484
          http://vcs.pcre.org/viewvc?view=rev&revision=484
Author:   ph10
Date:     2010-01-04 17:11:54 +0000 (Mon, 04 Jan 2010)


Log Message:
-----------
Update autogen.sh to try several names for libtoolize.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/autogen.sh


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2010-01-04 16:19:17 UTC (rev 483)
+++ code/trunk/ChangeLog    2010-01-04 17:11:54 UTC (rev 484)
@@ -102,7 +102,10 @@
     example, SunCC recognizes above declarations as different functions and
     generates broken code for hbpcre." I have changed the declarations to use 
     USPTR.
-        
+    
+16. GNU libtool is named differently on some systems. The autogen.sh script now 
+    tries several variants such as glibtoolize (MacOSX) and libtoolize1x
+    (FreeBSD).





Modified: code/trunk/autogen.sh
===================================================================
--- code/trunk/autogen.sh    2010-01-04 16:19:17 UTC (rev 483)
+++ code/trunk/autogen.sh    2010-01-04 17:11:54 UTC (rev 484)
@@ -1,21 +1,37 @@
 #!/bin/sh


set -ex
-
rm -rf autom4te.cache
-
aclocal --force

-libtoolize -c -f
+# GNU libtool is named differently on some systems. This code tries several
+# variants like glibtoolize (MacOSX) and libtoolize1x (FreeBSD)

+set +ex
+echo "Looking for a version of libtoolize (which can have different names)..."
+libtoolize=""
+for l in glibtoolize libtoolize15 libtoolize14 libtoolize ; do
+    $l --version > /dev/null 2>&1
+    if [ $? = 0 ]; then
+        libtoolize=$l
+        echo "Found $l" 
+        break
+    fi
+    echo "Did not find $l" 
+done
+
+if [ "x$libtoolize" == "x" ]; then
+    echo "Can't find libtoolize on your system"
+    exit 1
+fi
+
+set -ex
+$libtoolize -c -f
 autoconf -f -W all,no-obsolete
-
 autoheader -f -W all
-
 automake -a -c -f -W all


rm -rf autom4te.cache
-
exit 0

# end autogen.sh