Add GNULIB_DIR to LDFLAGS in configure.ac on Windows
authorcampbellsean@google.com <campbellsean@google.com>
Mon, 30 Jul 2018 17:12:16 +0000 (13:12 -0400)
committerU-COLLECTD-WIN201\campbellsean <campbellsean@google.com>
Mon, 30 Jul 2018 18:08:05 +0000 (18:08 +0000)
build.sh
configure.ac

index c7d557a..c4eada6 100755 (executable)
--- 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"
 
index 36b66e5..7bf3718 100644 (file)
@@ -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],