diff --git a/src/autogen.sh b/src/autogen.sh index b22c5093..62759a5e 100755 --- a/src/autogen.sh +++ b/src/autogen.sh @@ -4,15 +4,18 @@ set -x aclocal -if test X"$HOMEBREW_ENV" != X; then - glt=`which glibtoolize` -fi -if test X"$glt" != X; then - $glt --copy +# detect libtoolize on linux or glibtoolize in some systems +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 - libtoolize --copy + echo "libtoolize or glibtoolize was not found! Please install libtool." 1>&2 + exit 1 fi +$LIBTOOLIZE --copy + automake --add-missing --force-missing --copy autoconf # Our ylwrap gets clobbered by the above.