#!/bin/sh
# autogen.sh - generates configure using the autotools
-: ${LIBTOOLIZE=libtoolize}
+OS=`uname`
+if [ "$OS" == "Darwin" ]; then
+ : ${LIBTOOLIZE=glibtoolize}
+elif [ "$OS" == "Linux" ]; then
+ : ${LIBTOOLIZE=libtoolize}
+fi
+
: ${ACLOCAL=aclocal}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
${AUTOCONF}
-SILENT=`which libtoolize aclocal autoheader automake autoconf`
+SILENT=`which ${LIBTOOLIZE} ${ACLOCAL} ${AUTOHEADER} ${AUTOMAKE} ${AUTOCONF}`
case "$?" in
0 )
echo All build tools found.