Skip to content

Commit 89fa904

Browse files
committed
Check for libtoolize instead of libtool on Linux
autogen.sh has a check for the libtool binary as a mean to check if libtool is available. But distributions like Debian and Ubuntu are splitting the libtool package, and the libtool binary is now in a separate package. What autoconf actually need is not the libtool binary, but libtoolize and other macro files. So check for libtoolize instead. On the other hand, OSX only ships libtool, not libtoolize, and uses a pre-generated libtool script to build. So check for libtoolize first and then for libtool, and fail if neither can be found.
1 parent a656b39 commit 89fa904

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

autogen.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020

2121
# Script to generate all required files from fresh git checkout.
2222

23-
command -v libtool >/dev/null 2>&1
23+
# Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize.
24+
command -v libtoolize >/dev/null 2>&1
2425
if [ $? -ne 0 ]; then
25-
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
26-
exit 1
26+
command -v libtool >/dev/null 2>&1
27+
if [ $? -ne 0 ]; then
28+
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
29+
exit 1
30+
fi
2731
fi
2832

2933
command -v autoreconf >/dev/null 2>&1

0 commit comments

Comments
 (0)