[json-glib] build: Use -no-undefined when compiling on win32



commit d28db01f5d12497ec96d5e507af4003b076dd154
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Sep 29 17:25:18 2010 +0100

    build: Use -no-undefined when compiling on win32

 configure.ac |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0cc80bd..fa9c08d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,19 @@ JSON_LT_REVISION=lt_revision
 JSON_LT_AGE=lt_age
 JSON_LT_VERSION="$JSON_LT_CURRENT:$JSON_LT_REVISION:$JSON_LT_AGE"
 JSON_LT_LDFLAGS="-version-info $JSON_LT_VERSION"
+
+AC_MSG_CHECKING([if building for some Win32 platform])
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    JSON_LT_LDFLAGS="$JSON_LT_LDFLAGS -no-undefined"
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+
 AC_SUBST(JSON_LT_LDFLAGS)
 
 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]