Force the ld "no-undefined" flag on Cygwin
authorChristian Babeux <christian.babeux@efficios.com>
Wed, 28 Nov 2012 01:31:47 +0000 (20:31 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Wed, 28 Nov 2012 03:26:39 +0000 (22:26 -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.

configure.ac

index 511da2e95c8b672efb593824cd684cb139030664..22d5ee5d6bd782ab8c0a836cfea843b85c89a4bd 100644 (file)
@@ -169,6 +169,10 @@ got it
                     [ust_cv_i386_is_x86_64=no])
                     CPPFLAGS="$save_CPPFLAGS"])
     ;;
+    # 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_MSG_CHECKING([library format for the host system])
This page took 0.024789 seconds and 4 git commands to generate.