From: Timo Sirainen Date: Mon, 19 Sep 2011 15:41:36 +0000 (+0300) Subject: Enable --no-undefined linker flag only for Linux. X-Git-Tag: 2.1.beta1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b8fa20cb884aa317b8a9abded26ba16b4ec55cc;p=thirdparty%2Fdovecot%2Fcore.git Enable --no-undefined linker flag only for Linux. BSDs don't seem to be happy with it. --- diff --git a/configure.in b/configure.in index 1ca6405f0c..f94914cc72 100644 --- a/configure.in +++ b/configure.in @@ -2674,7 +2674,15 @@ AC_DEFINE_UNQUOTED(CAPABILITY_BANNER_STRING, "$capability_banner", IMAP capabili CFLAGS="$CFLAGS $EXTRA_CFLAGS" if test "$with_gnu_ld" = yes; then - NOPLUGIN_LDFLAGS="-Wl,--as-needed -Wl,--no-undefined" + NOPLUGIN_LDFLAGS="-Wl,--as-needed" + case "$host_os" in + linux*) + # This appears to work in Linux, but not in BSDs.. + NOPLUGIN_LDFLAGS="$NOPLUGIN_LDFLAGS -Wl,--no-undefined" + ;; + *) + ;; + esac LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS" AC_SUBST(NOPLUGIN_LDFLAGS) fi