X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=57f3d4449a99bef83b75b50f425dc548bc9ead60;hb=42ca41a0798e3a2b742f7da3bacc03fbaf6175fa;hp=cede2e48f2fc8cf3725ae04c9928e7862f1dd864;hpb=089d33f1f455da115ca0c87160df8dbd49286377;p=collectd.git diff --git a/build.sh b/build.sh index cede2e48..57f3d444 100755 --- a/build.sh +++ b/build.sh @@ -1,19 +1,53 @@ #! /bin/sh -if ! which lex > /dev/null 2>&1; then - echo "WARNING: lex not found!" >&2 - echo "Make sure that you have a flex compatible tool available." >&2 -fi +GLOBAL_ERROR_INDICATOR=0 -if ! which yacc > /dev/null 2>&1; then - echo "WARNING: yacc not found!" >&2 - echo "Make sure that you have a GNU bison compatible tool available." >&2 -fi +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 < /dev/null 2>&1; then - libtoolize=glibtoolize +if test "$GLOBAL_ERROR_INDICATOR" != "0" +then + exit 1 fi set -x