X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=build.sh;h=c0ccce3a5919dbdde3888c9bd8244bcc41040693;hp=89d3a68e0e49d86a3f586cd7c995530c6e344ff7;hb=2bc8f11d9c7182e24fb62a6efefa3e0b74ac0afb;hpb=418249bad5af0493ba4e08fdaf22fd7e402be6af diff --git a/build.sh b/build.sh index 89d3a68e..c0ccce3a 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,173 @@ -#! /bin/sh +#!/bin/sh -set -x +GLOBAL_ERROR_INDICATOR=0 + +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 <" >> src/gnulib_config.h + + cp libtool libtool_bak + sed -i "s%\$LTCC \$LTCFLAGS\(.*cwrapper.*\)%\$LTCC \1%" libtool + + make + make install + + cp "${GNULIB_DIR}/libgnu.dll" "${INSTALL_DIR}" + cp "${MINGW_ROOT}/bin/zlib1.dll" "${INSTALL_DIR}" + cp "${MINGW_ROOT}/bin/libwinpthread-1.dll" "${INSTALL_DIR}" + cp "${MINGW_ROOT}/bin/libdl.dll" "${INSTALL_DIR}" + + echo "Done." +} + +os_name="$(uname)" +if test "${os_name#CYGWIN}" != "$os_name"; then + build_cygwin +else + build +fi -autoheader \ -&& aclocal \ -&& libtoolize --ltdl --copy --force \ -&& automake --add-missing --copy \ -&& autoconf