X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=build.sh;h=c0ccce3a5919dbdde3888c9bd8244bcc41040693;hp=40f5361d33032a50c760c09445caab68e72627da;hb=2bc8f11d9c7182e24fb62a6efefa3e0b74ac0afb;hpb=8fd8f76dc11064e75e44448d16d35e09e46191a2 diff --git a/build.sh b/build.sh index 40f5361d..c0ccce3a 100755 --- a/build.sh +++ b/build.sh @@ -1,54 +1,173 @@ -#! /bin/sh +#!/bin/sh GLOBAL_ERROR_INDICATOR=0 -check_for_application () +check_for_application() { - for PROG in "$@" - do - which "$PROG" >/dev/null 2>&1 - if test $? -ne 0; then - cat >&2 </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>/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 -set -x + 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 --copy --force \ -&& automake --add-missing --copy \ -&& autoconf