[rrd-developers] [PATCH] On MAC OS X libtool & libtoolize are prefix with g

Antoine Musso amusso+rrd at free.fr
Wed Jun 2 21:59:49 CEST 2010


MAC OS X ships with binaries named 'libtool' and 'libtoolize' which are
not the GNU tools. Those are prefixed with letter 'g'.
---
 MakeMakefile |    9 ++++++++-
 autogen.sh   |   10 +++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/MakeMakefile b/MakeMakefile
index 90e4700..1b07f19 100755
--- a/MakeMakefile
+++ b/MakeMakefile
@@ -20,8 +20,15 @@ ERROR=0
 LIBTOOL_VER="1.5.6"
 AUTOMAKE_VER="1.9.2"
 AUTOCONF_VER="2.59"
+LIBTOOL_BIN="libtool"
 
-if vcheck $LIBTOOL_VER "libtool --version"
+# On MAC OS X, GNU libtool is named 'glibtool':
+if [ `(uname -s) 2>/dev/null` == 'Darwin' ]
+then
+  LIBTOOL_BIN="glibtool"
+fi
+
+if vcheck $LIBTOOL_VER "$LIBTOOL_BIN --version"
 then
   echo "get a copy of GNU libtool >= $LIBTOOL_VER"
   ERROR=1
diff --git a/autogen.sh b/autogen.sh
index a7226cc..45a11a4 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,3 +1,11 @@
 #!/bin/sh
-libtoolize
+
+# On MAC OS X, GNU libtoolize is named 'glibtoolize':
+if [ `(uname -s) 2>/dev/null` == 'Darwin' ]
+then
+	glibtoolize
+else
+	libtoolize
+fi
+
 autoreconf --force --install --verbose -I m4
-- 
1.7.0.4



More information about the rrd-developers mailing list