From 8014a226f980331d3087c3b1ae2c12a4fb447a16 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 1 Aug 2015 12:41:24 +0100 Subject: [PATCH] Solution: check for libtoolize in autogen. Fixes #131 Autogen.sh looks for the libtool command as a mean to check if libtool is available. But distributions like Debian and Ubuntu have split the libtool package, and the libtool script is now in a separate package. The solution is to look for the libtoolize command too before failing, which is what the Autotools chain actually needs on Linux. Keep checking for libtool to be compatible with OSX, where the opposite is true. --- autogen.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index 52a88128..7af48637 100755 --- a/autogen.sh +++ b/autogen.sh @@ -20,10 +20,14 @@ # Script to generate all required files from fresh git checkout. -command -v libtool >/dev/null 2>&1 +# Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize. +command -v libtoolize >/dev/null 2>&1 if [ $? -ne 0 ]; then - echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 - exit 1 + command -v libtool >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 + exit 1 + fi fi command -v autoreconf >/dev/null 2>&1