Force the ld "no-undefined" flag on Cygwin
authorChristian Babeux <christian.babeux@efficios.com>
Thu, 29 Nov 2012 20:14:11 +0000 (15:14 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Fri, 7 Dec 2012 20:17:55 +0000 (15:17 -0500)
In order to build shared libraries on Cygwin/MinGW/Windows, all
symbols must be defined at link time. Activating the "-no-undefined"
flag will fail the build if it's not the case.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
configure.ac

index 2b6b68739f3717a984bb53e8ba3835611340eea8..dc2af5829f7d1824e32c8d436b059abe0c5d93af 100644 (file)
@@ -187,6 +187,13 @@ AX_CONFIG_FEATURE(
 )
 AM_CONDITIONAL([COMPAT_EPOLL], [ test "$enable_epoll" = "yes" ])
 
+case "${host}" in
+    # All symbols must be resolved at link time on Cygwin/MinGW/Windows,
+    # else libtool will not be able to build shared libraries.
+    *-*-cygwin*)
+    LDFLAGS="-Wl,-no-undefined $LDFLAGS";;
+esac
+
 AC_SYS_LARGEFILE
 AC_PROG_CC
 LT_INIT
This page took 0.025769 seconds and 4 git commands to generate.