summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2012-02-10 18:06:43 +0100
committerPeter Stuge <peter@stuge.se>2012-02-10 18:06:43 +0100
commit3df437680f8f5406795ec5f32d96612d327b2ca4 (patch)
treed381de0dfabc0799fbb8d2acef2897f838980421
parent4afbc78fe09bfc3dd7a609e5f82e9272c9e6226d (diff)
downloadlibusb-3df437680f8f5406795ec5f32d96612d327b2ca4.tar.gz
autogen.sh: Try to use libtoolize before trying glibtoolize
This helps on Mac OS X where an old glibtoolize is included in the system and newer, manually installed, versions provide libtoolize. See also http://marc.info/?m=132490560131894
-rwxr-xr-xautogen.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index d5c6a19..c7bb679 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,14 @@
#!/bin/sh
-# use glibtoolize if it is available (darwin)
-(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize
+# use libtoolize if available, otherwise look for glibtoolize (darwin)
+if (libtoolize --version) < /dev/null > /dev/null 2>&1; then
+ LIBTOOLIZE=libtoolize
+elif (glibtoolize --version) < /dev/null > /dev/null 2>&1; then
+ LIBTOOLIZE=glibtoolize
+else
+ echo "libtoolize or glibtoolize was not found! Please install libtool."
+ exit
+fi
$LIBTOOLIZE --copy --force || exit 1
aclocal || exit 1