From 287ad603740db2d8623730a816b07423f25de3d2 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 7 Feb 2009 10:27:08 +0100 Subject: [PATCH] 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.. --- build.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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 <