From: Christian Babeux Date: Thu, 29 Nov 2012 20:14:11 +0000 (-0500) Subject: Force the ld "no-undefined" flag on Cygwin X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=387bdf2d8afb233b1a35d4b90686c49e2b269d29;p=lttng-tools.git 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 --- 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