X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=20854b13b7d88cf6aa90f5ce990fd07370fff56c;hb=09147a2c9dde2e04e660409e7a5ac0eb09604b07;hp=cede2e48f2fc8cf3725ae04c9928e7862f1dd864;hpb=b9f818d0e8f2ce608e491f0ee0ba4024a2694101;p=collectd.git diff --git a/build.sh b/build.sh index cede2e48..20854b13 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