X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=20854b13b7d88cf6aa90f5ce990fd07370fff56c;hb=3ab61b1ff7e5c259256660a39c3e83f13a9a70f6;hp=3efb44f64047c5bdeedf6dc5d646230645a4afcd;hpb=2eb288109f6b369f3b917f72dde8df9e07691da4;p=collectd.git diff --git a/build.sh b/build.sh index 3efb44f6..20854b13 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,53 @@ #! /bin/sh -libtoolize=libtoolize +GLOBAL_ERROR_INDICATOR=0 -if which glibtoolize > /dev/null 2>&1; then - libtoolize=glibtoolize +check_for_application () +{ + for PROG in "$@" + do + which "$PROG" >/dev/null 2>&1 + if test $? -ne 0; then + cat >&2 </dev/null 2>/dev/null +if test $? -eq 0 +then + libtoolize=libtoolize +else + glibtoolize --version >/dev/null 2>/dev/null + if test $? -eq 0 + then + libtoolize=glibtoolize + else + cat >&2 <