]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Enable --no-undefined linker flag only for Linux.
authorTimo Sirainen <tss@iki.fi>
Mon, 19 Sep 2011 15:41:36 +0000 (18:41 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 19 Sep 2011 15:41:36 +0000 (18:41 +0300)
BSDs don't seem to be happy with it.

configure.in

index 1ca6405f0c8bd8730e0d685662274b963e212ce3..f94914cc726e299b29ee1d7df8f582bbcef58081 100644 (file)
@@ -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