From 387bdf2d8afb233b1a35d4b90686c49e2b269d29 Mon Sep 17 00:00:00 2001 From: Christian Babeux Date: Thu, 29 Nov 2012 15:14:11 -0500 Subject: [PATCH] Force the ld "no-undefined" flag on Cygwin 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 --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 2b6b68739..dc2af5829 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.34.1