autogen.sh, fix for Mac OS X

This commit is contained in:
Francesco Lannutti 2012-10-29 23:47:02 +01:00
parent 08ec219417
commit a10f497e97
1 changed files with 12 additions and 4 deletions

View File

@ -22,6 +22,14 @@ ADMS=0
DIE=0 DIE=0
# Check for Mac OS X
uname -a | grep -q "Darwin"
if [ $? -eq 0 ]; then
LIBTOOLIZE=glibtoolize
else
LIBTOOLIZE=libtoolize
fi
help() help()
{ {
echo echo
@ -68,7 +76,7 @@ check_autoconf()
DIE=1 DIE=1
} }
(libtoolize --version) < /dev/null > /dev/null 2>&1 || { ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo echo
echo "You must have libtool installed to compile $PROJECT." echo "You must have libtool installed to compile $PROJECT."
echo "See http://www.gnu.org/software/libtool/" echo "See http://www.gnu.org/software/libtool/"
@ -181,9 +189,9 @@ $znew
fi fi
echo "Running libtoolize" echo "Running $LIBTOOLIZE"
libtoolize --copy --force \ $LIBTOOLIZE --copy --force \
|| error_and_exit "libtoolize failed" || error_and_exit "$LIBTOOLIZE failed"
echo "Running aclocal $ACLOCAL_FLAGS" echo "Running aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS \ aclocal $ACLOCAL_FLAGS \