LRN: Compile against libgnurx (W32)
authorChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 09:07:09 +0000 (09:07 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 09:07:09 +0000 (09:07 +0000)
configure.ac

index 7957cc2a09cba51ec202b71843c58d7798490b75..e596766eb194cf6f01dde545905a6036098000b4 100644 (file)
@@ -142,7 +142,7 @@ netbsd*)
      AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
      AC_CHECK_LIB(intl, gettext)
      LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols"
-     LIBS="$LIBS -lws2_32 -lplibc"
+     LIBS="$LIBS -lws2_32 -lplibc -lgnurx"
      CFLAGS="-mms-bitfields $CFLAGS"
      CPPFLAGS="-D_WIN32_WINNT=0x0501 $CPPFLAGS"
      build_target="mingw"
@@ -183,6 +183,14 @@ AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
 # will be more selective!
 SAVE_LIBS=$LIBS
 
+# libgnurx (regex library for W32)
+gnurx=0
+AC_CHECK_LIB(gnurx, regexec, gnurx=1)
+if test "x$gnurx" = "x0" -a "x$build_target" = "xmingw"
+then
+  AC_MSG_ERROR([on W32 GNUnet needs libgnurx])
+fi
+
 # libgcrypt
 gcrypt=0
 AM_PATH_LIBGCRYPT(1.2.0, gcrypt=1)