From: Florian Forster Date: Sat, 7 Feb 2009 09:27:08 +0000 (+0100) Subject: build.sh: Fix the check for libtoolize vs. glibtoolize. X-Git-Tag: collectd-4.6.0~48 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=287ad603740db2d8623730a816b07423f25de3d2;p=collectd.git build.sh: Fix the check for libtoolize vs. glibtoolize. The `which' command under Mac OS X exits with status 0 even if the program wasn't found. Use libtoolize --version to check for the program instead.. --- diff --git a/build.sh b/build.sh index 3822c2bc..804b2e25 100755 --- a/build.sh +++ b/build.sh @@ -25,20 +25,24 @@ check_for_application lex yacc autoheader aclocal automake autoconf check_for_application pkg-config libtoolize="" -if which libtoolize >/dev/null 2>&1 +libtoolize --version >/dev/null 2>/dev/null +if test $? -eq 0 then libtoolize=libtoolize -else if which glibtoolize >/dev/null 2>&1 -then - libtoolize=glibtoolize else - cat >&2 </dev/null 2>/dev/null + if test $? -eq 0 + then + libtoolize=glibtoolize + else + cat >&2 <