summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2021-06-05 14:37:20 -0400
committerWill Estes <westes575@gmail.com>2021-06-05 14:37:20 -0400
commitc26cd7bc13b30fcfafe394330f3fe70672d9e47a (patch)
tree9a7b113baea421b4978a15fa3c9f5361dc19f6cc
parent83aaf1b4ce146f0c2f7cf18e932457d5dba039b1 (diff)
parent9be1980ef268b7199b3fe26304ddbc1a6ad4bdd7 (diff)
downloadflex-git-c26cd7bc13b30fcfafe394330f3fe70672d9e47a.tar.gz
Merge branch 'autogen-sh' of git://github.com/Explorer09/flex into Explorer09-autogen-sh
-rwxr-xr-xautogen.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/autogen.sh b/autogen.sh
index 6802e9f..d9b8dd9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -25,19 +25,20 @@
# and procede with the "normal" build procedures.
# use LIBTOOLIZE, if set
-LIBTOOLIZE_ORIG="$LIBTOOLIZE";
-if test "x$LIBTOOLIZE" = "x"; then LIBTOOLIZE=libtoolize; fi
+if test "x$LIBTOOLIZE" = "x"; then
+ for ac_prog in libtoolize glibtoolize; do
+ if $ac_prog --version >/dev/null 2>&1; then
+ LIBTOOLIZE=$ac_prog
+ break
+ fi
+ done
+fi
# test libtoolize
-$LIBTOOLIZE --version 2>/dev/null
-if test "$?" -ne 0; then
- LIBTOOLIZE=glibtoolize
- $LIBTOOLIZE --version 2>/dev/null
- if test "$?" -ne 0; then
- echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize"
- echo " LIBTOOLIZE is currently \"$LIBTOOLIZE_ORIG\""
- exit 1
- fi
+if test "x$LIBTOOLIZE" = "x" || ! $LIBTOOLIZE --version >/dev/null; then
+ echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize">&2
+ echo " LIBTOOLIZE is currently \"$LIBTOOLIZE\"">&2
+ exit 1
fi
#if we pretend to have a ChangeLog, then automake is less
@@ -47,5 +48,5 @@ fi
if ! test -f ChangeLog; then
touch ChangeLog
fi
-"$LIBTOOLIZE" --install --force
+$LIBTOOLIZE --install --force
autoreconf --install --force