diff options
author | Ruediger Meier | 2016-02-07 11:01:22 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-02-12 14:10:59 +0100 |
commit | 0024583ca048414c69eacb467e7e1805db2ba69c (patch) | |
tree | 17d6a2bda2643b1f6f5a58472a25b9e92abd5241 /autogen.sh | |
parent | Merge branch 'compiler-warnings' of https://github.com/rudimeier/util-linux (diff) | |
download | kernel-qcow2-util-linux-0024583ca048414c69eacb467e7e1805db2ba69c.tar.gz kernel-qcow2-util-linux-0024583ca048414c69eacb467e7e1805db2ba69c.tar.xz kernel-qcow2-util-linux-0024583ca048414c69eacb467e7e1805db2ba69c.zip |
build-sys: fix libtoolize for OSX
autoreconf would also call glibtoolize on Darwin.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/autogen.sh b/autogen.sh index f24ec44d0..bfa46fec3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -66,12 +66,25 @@ test -f sys-utils/mount.c || { echo DIE=1 } -(libtoolize --version) < /dev/null > /dev/null 2>&1 || { + +LIBTOOLIZE=libtoolize +case `uname` in Darwin*) LIBTOOLIZE=glibtoolize ;; esac +if ! ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then echo echo "You must have libtool-2 installed to generate the util-linux build system." echo DIE=1 -} +else + ltver=$($LIBTOOLIZE --version | awk '/^libtoolize/ { print $4 }') + ltver=${ltver:-"none"} + test ${ltver##2.} = "$ltver" && { + echo + echo "You must have libtool version >= 2.x.x, but you have $ltver." + echo + DIE=1 + } +fi + (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to generate the util-linux build system." @@ -79,13 +92,6 @@ test -f sys-utils/mount.c || { DIE=1 } -ltver=$(libtoolize --version | awk '/^libtoolize/ { print $4 }') -ltver=${ltver:-"none"} -test ${ltver##2.} = "$ltver" && { - echo "You must have libtool version >= 2.x.x, but you have $ltver." - DIE=1 -} - if test "$DIE" -eq 1; then exit 1 fi @@ -97,7 +103,7 @@ echo " aclocal: $(aclocal --version | head -1)" echo " autoconf: $(autoconf --version | head -1)" echo " autoheader: $(autoheader --version | head -1)" echo " automake: $(automake --version | head -1)" -echo " libtoolize: $(libtoolize --version | head -1)" +echo " libtoolize: $($LIBTOOLIZE --version | head -1)" rm -rf autom4te.cache @@ -109,7 +115,7 @@ if ! grep -q datarootdir po/Makefile.in.in; then sed -i -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\ datadir = @datadir@/g' po/Makefile.in.in fi -libtoolize --force $LT_OPTS +$LIBTOOLIZE --force $LT_OPTS aclocal -I m4 $AL_OPTS autoconf $AC_OPTS autoheader $AH_OPTS |