build-sys: fix libtoolize for OSX

autoreconf would also call glibtoolize on Darwin.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
Ruediger Meier 2016-02-07 11:01:22 +01:00
parent 173607a254
commit 0024583ca0
1 changed files with 17 additions and 11 deletions

View File

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