simplify libtoolize detection

This commit is contained in:
shenleban tongying 2021-10-07 08:22:57 -04:00
parent b5013b41e1
commit f7f693f437

View File

@ -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.