X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=bd4c1a319108e28ac3ec0b8822c733bcdd6dd4e2;hb=be121194cc100248d3f306bb3f658899b8da39fe;hp=cede2e48f2fc8cf3725ae04c9928e7862f1dd864;hpb=089d33f1f455da115ca0c87160df8dbd49286377;p=collectd.git diff --git a/build.sh b/build.sh index cede2e48..bd4c1a31 100755 --- a/build.sh +++ b/build.sh @@ -1,25 +1,51 @@ -#! /bin/sh +#!/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 autoheader \ -&& aclocal \ -&& $libtoolize --ltdl --copy --force \ +&& aclocal -I m4 \ +&& $libtoolize --copy --force \ && automake --add-missing --copy \ && autoconf