From b09e7fc2d9421660e16a6be334c7a3ad38ec314c Mon Sep 17 00:00:00 2001 From: "campbellsean@google.com" Date: Mon, 30 Jul 2018 13:12:16 -0400 Subject: [PATCH] Add GNULIB_DIR to LDFLAGS in configure.ac on Windows --- build.sh | 2 +- configure.ac | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index c7d557aa..c4eada6a 100755 --- a/build.sh +++ b/build.sh @@ -77,7 +77,7 @@ build_cygwin() echo "Installing collectd to ${INSTALL_DIR}." TOP_SRCDIR=$(pwd) MINGW_ROOT="$(x86_64-w64-mingw32-gcc -print-sysroot)/mingw" - GNULIB_DIR="${TOP_SRCDIR}/gnulib/build/gllib" + export GNULIB_DIR="${TOP_SRCDIR}/gnulib/build/gllib" export CC="x86_64-w64-mingw32-gcc" diff --git a/configure.ac b/configure.ac index 36b66e53..7bf3718b 100644 --- a/configure.ac +++ b/configure.ac @@ -779,8 +779,12 @@ AC_FUNC_STRERROR_R SAVE_CFLAGS="$CFLAGS" CFLAGS="-Wall -Werror" -SAVE_LDFAGS="$LDFLAGS" +SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="" +if test "x$ac_system" = "xWindows"; then + # This is exported from build.sh + LDFLAGS="$LDFLAGS -L${GNULIB_DIR}" +fi AC_CACHE_CHECK([for strtok_r], [c_cv_have_strtok_r_default], -- 2.11.0