X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=build.sh;h=20854b13b7d88cf6aa90f5ce990fd07370fff56c;hp=3efb44f64047c5bdeedf6dc5d646230645a4afcd;hb=66f9d645f883eee0aa408428eefdebdcc6dcfa7e;hpb=a2ef6243e563dae68c71d58c1d9af924a5817e5a 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 <