Mercurial > dovecot > core-2.2
diff configure.in @ 15205:b0c7d2f8a185
--without-shared-libs: Link Dovecot libraries with --whole-archive flag for binaries.
This removes the need for the ugly unused_objects lists for binaries, which
were needed to avoid plugins from failing because they were missing some
functions.
Apparently there's no easy way to use --whole-archive properly with libtool,
so there's now a rather ugly cc-wrapper.sh that does it. Also this is done
only when GNU ld is deted. Most people are going to use --with-shared-libs
though, so I don't think any of this is going to be a real problem.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 12 Oct 2012 03:08:13 +0300 |
parents | c30673b5ec1b |
children | 269104a0821b |
line wrap: on
line diff
--- a/configure.in Fri Oct 12 02:59:59 2012 +0300 +++ b/configure.in Fri Oct 12 03:08:13 2012 +0300 @@ -2723,6 +2723,15 @@ LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS" AC_SUBST(NOPLUGIN_LDFLAGS) +if test "$with_gnu_ld" = yes -a "$want_shared_libs" = "no"; then + # libtool can't handle using whole-archive flags, so we need to do this + # with a CC wrapper.. shouldn't be much of a problem, since most people + # are building with shared libs. + sed "s/@CC@/$CC/" < $srcdir/cc-wrapper.sh.in > cc-wrapper.sh + chmod +x cc-wrapper.sh + CC=`pwd`/cc-wrapper.sh +fi + if test "$docdir" = ""; then dnl docdir supported only by autoconf v2.59c and later docdir='${datadir}/doc/${PACKAGE_TARNAME}'