X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=465eff9d8eaffcd1a917382722364c4a152791e2;hb=64b8150edec2271bb110f36e70915fdd87d9cac2;hp=3efb44f64047c5bdeedf6dc5d646230645a4afcd;hpb=3bb58d8d87a0db2b3177cbc52c2078c5543e7944;p=collectd.git diff --git a/build.sh b/build.sh index 3efb44f6..465eff9d 100755 --- a/build.sh +++ b/build.sh @@ -1,15 +1,59 @@ #! /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 <