Smake: Use glibtoolize instead of libtoolize, if it is available. 20130523010503/pspp 20130524010504/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 22 May 2013 03:32:27 +0000 (20:32 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 22 May 2013 03:32:27 +0000 (20:32 -0700)
Requested by Teppo Jussmäki <jussmaki@fastmail.fm>.
Tested by Teppo Jussmäki <jussmaki@fastmail.fm>.

Smake

diff --git a/Smake b/Smake
index d061973d12a1271476b40cee9cb4de70463dcce6..47821265bce4796e052d8fe2789939fc4e0e7b8e 100644 (file)
--- a/Smake
+++ b/Smake
@@ -130,7 +130,15 @@ prep_ph:
                --source-base=gl --lib=libgl --tests-base=tests \
                --doc-base=gl/doc --aux-dir=build-aux  \
                --libtool $(GNULIB_MODULES)
-       libtoolize --force --automake
+       if (glibtoolize --version) >/dev/null 2>&1; then        \
+               LIBTOOLIZE=glibtoolize;                         \
+       elif (libtoolize --version) >/dev/null 2>&1; then       \
+               LIBTOOLIZE=libtoolize;                          \
+       else                                                    \
+               echo >&2 "libtoolize not found";                \
+               exit 1;                                         \
+       fi;                                                     \
+       $$LIBTOOLIZE --force --automake
 
 aclocal.m4:
        aclocal -I m4 -I gl/m4