+
+ CYRUS_USER=@cyrus_user@
+ CYRUS_GROUP=@cyrus_group@
+@@ -133,22 +135,20 @@
+ $(srcdir)/../install-sh -d ${DESTDIR}$(service_path)
+ for file in $(PROGS); \
+ do \
+- $(INSTALL) -m 755 $$file $(DESTDIR)$(service_path) || exit 1; \
++ $(LIBTOOL) --mode=install $(INSTALL) -m 755 $$file $(DESTDIR)$(service_path) || exit 1; \
+ done
+ ln -f $(DESTDIR)$(service_path)/pop3d $(DESTDIR)$(service_path)/pop3proxyd
+ ln -f $(DESTDIR)$(service_path)/imapd $(DESTDIR)$(service_path)/proxyd
+ ln -f $(DESTDIR)$(service_path)/lmtpd $(DESTDIR)$(service_path)/lmtpproxyd
+
+-.c.lo:
+- $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
++%.lo: %.c
++ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+ ### libimap
+
+ libimap.la: $(LOBJS)
+- rm -f libimap.la
+- ar cr libimap.la $(LOBJS)
+- $(RANLIB) libimap.la
++ $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $(LOBJS)
+
+ ### Built Source Files
+
+@@ -181,185 +181,185 @@
+
+ ### Services
+ idled: idled.lo mutex_fake.lo libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ lmtpd: lmtpd.lo proxy.lo $(LMTPOBJS) $(SIEVE_OBJS) mutex_fake.lo \
+ libimap.la $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ lmtpd.pure: lmtpd.lo proxy.lo $(LMTPOBJS) $(SIEVE_OBJS) \
+ mutex_fake.lo libimap.la $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+- $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o $@ $? \
++ $(PURIFY) $(PUREOPT) $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ imapd: $(IMAPDOBJS) mutex_fake.lo libimap.la $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ imapd.pure: $(IMAPDOBJS) mutex_fake.lo libimap.la $(DEPLIBS) $(SERVICE)
+- $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o $@ $? \
++ $(PURIFY) $(PUREOPT) $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ imapd.quant: $(IMAPDOBJS) mutex_fake.lo libimap.la $(DEPLIBS) $(SERVICE)
+- $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o $@ $? \
++ $(QUANTIFY) $(QUANTOPT) $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ mupdate: mupdate.lo mupdate-slave.lo mupdate-client.lo mutex_pthread.lo tls.lo \
+ libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(SERVICETHREAD) \
+ $(LIBS) $(LIB_WRAP) -lpthread
+
+ mupdate.pure: mupdate.lo mupdate-slave.lo mupdate-client.lo mutex_pthread.lo \
+ libimap.la $(DEPLIBS)
+- $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o $@ $? \
++ $(PURIFY) $(PUREOPT) $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(SERVICETHREAD) \
+ $(LIBS) $(LIB_WRAP) -lpthread
+
+ pop3d: pop3d.lo proxy.lo backend.lo tls.lo mutex_fake.lo libimap.la \
+ $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ nntpd: nntpd.lo proxy.lo backend.lo index.lo smtpclient.lo spool.lo tls.lo \
+ mutex_fake.lo nntp_err.lo libimap.la $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ fud: fud.lo libimap.la mutex_fake.lo $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ smmapd: smmapd.lo libimap.la mutex_fake.lo $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ sync_server: sync_server.lo sync_support.lo \
+ imapparse.lo tls.lo libimap.la mutex_fake.lo $(DEPLIBS) $(SERVICE)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) $(LIB_WRAP)
+
+ ### Command Line Utilities
+ arbitron: arbitron.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_userseen: cyr_userseen.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_sequence: cyr_sequence.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_dbtool: cyr_dbtool.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_synclog: cyr_synclog.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cvt_cyrusdb: cvt_cyrusdb.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ chk_cyrus: chk_cyrus.lo mutex_fake.lo libimap.la $(CLIOBJS) $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ deliver: deliver.lo $(LMTPOBJS) proxy.lo mutex_fake.lo libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ ctl_deliver: ctl_deliver.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ ctl_mboxlist: ctl_mboxlist.lo mupdate-client.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ ctl_cyrusdb: ctl_cyrusdb.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_expire: cyr_expire.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ fetchnews: fetchnews.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ squatter: squatter.lo index.lo squat_build.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ mbpath: mbpath.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ ipurge: ipurge.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_virusscan: cyr_virusscan.lo index.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS) -lclamav
+
+ cyrdump: cyrdump.lo index.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ cyr_df: cyr_df.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ mbexamine: mbexamine.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ reconstruct: reconstruct.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ quota: quota.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ tls_prune: tls_prune.lo tls.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ unexpunge: unexpunge.lo $(CLIOBJS) libimap.la $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ make_md5: make_md5.lo libimap.la mutex_fake.lo $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ make_sha1: make_sha1.lo libimap.la mutex_fake.lo $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ sync_client: sync_client.lo sync_support.lo \
+ backend.lo tls.lo imapparse.lo libimap.la mutex_fake.lo $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ sync_reset: sync_reset.lo sync_support.lo \
+ libimap.la mutex_fake.lo $(DEPLIBS)
+- $(CC) $(LDFLAGS) -o $@ $? \
++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $? \
+ $(LIBS)
+
+ ### Other Misc Targets
+
+ clean:
+- rm -f *.lo *.la Makefile.bak makedepend.log \
++ rm -rf .libs *.lo *.o *.la *.a Makefile.bak makedepend.log \
+ $(BUILTSOURCES) $(PROGS) $(SUIDPROGS) cyr_virusscan
+
+ distclean: clean
+--- cyrus-imapd-2.4.4/imtest/imtest.c 2010-11-30 07:53:22.205286646 +0200
++++ cyrus-imapd-2.4.4-shared-patch//imtest/imtest.c 2010-11-29 08:14:14.318040263 +0200
+@@ -283,6 +283,9 @@
+ imtest_fatal(msg);
+ }
+
++/* config.c stuff */
++const int config_need_data = 0;
++
+ int mysasl_config(void *context __attribute__((unused)),
+ const char *plugin_name,
+ const char *option,
+--- cyrus-imapd-2.4.4/imtest/Makefile.in 2010-11-30 07:53:22.205286646 +0200
++++ cyrus-imapd-2.4.4-shared-patch//imtest/Makefile.in 2010-11-29 08:56:17.502937602 +0200
+@@ -45,11 +45,12 @@
+
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@