X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=build.sh;h=c0ccce3a5919dbdde3888c9bd8244bcc41040693;hb=5c35a31cf9b722e13ab0479f685bdd9c680775d6;hp=ca41cad0d28dc311373a52b2769ef731bd889582;hpb=a68fbc307be87f0b24fa5c8e6d0bc2116672a158;p=collectd.git diff --git a/build.sh b/build.sh index ca41cad0..c0ccce3a 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,173 @@ -#! /bin/sh +#!/bin/sh -set -x +GLOBAL_ERROR_INDICATOR=0 -true \ -&& autoheader --force \ -&& aclocal --force \ -&& libtoolize --ltdl --force --copy \ -&& automake --add-missing --copy \ -&& autoconf --force +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