X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=57f3d4449a99bef83b75b50f425dc548bc9ead60;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hp=3efb44f64047c5bdeedf6dc5d646230645a4afcd;hpb=2eb288109f6b369f3b917f72dde8df9e07691da4;p=collectd.git diff --git a/build.sh b/build.sh index 3efb44f6..bd4c1a31 100755 --- a/build.sh +++ b/build.sh @@ -1,15 +1,51 @@ -#! /bin/sh +#!/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 <