X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=804b2e2593b6d497e0a15dbd77f6a4e35343c446;hb=3a4563d4bf50ba2b4ff42d827056d3a0f3ef727a;hp=cede2e48f2fc8cf3725ae04c9928e7862f1dd864;hpb=62430c784cf53c7dccb6fec021f9bb4c0d790a0f;p=collectd.git diff --git a/build.sh b/build.sh index cede2e48..804b2e25 100755 --- a/build.sh +++ b/build.sh @@ -1,19 +1,52 @@ #! /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 + if ! which "$PROG" >/dev/null 2>&1; 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