From f7f693f43758a49e7d9fbb4809f43a92fb45c164 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Thu, 7 Oct 2021 08:22:57 -0400 Subject: [PATCH] simplify libtoolize detection --- src/autogen.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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.