Mercurial > dovecot > core-2.2
diff configure.in @ 1404:54015ae11177 HEAD
--with-storage=maildir,mbox can now be used to compile in only the wanted
storage formats.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 27 Apr 2003 23:02:06 +0300 |
parents | 8d12b2a608c5 |
children | ccb430d3b945 |
line wrap: on
line diff
--- a/configure.in Sun Apr 27 19:40:35 2003 +0300 +++ b/configure.in Sun Apr 27 23:02:06 2003 +0300 @@ -181,6 +181,11 @@ want_pop3d=yes) AM_CONDITIONAL(BUILD_POP3D, test "$want_pop3d" = "yes") +AC_ARG_WITH(storages, +[ --with-storages Build specified mail storage formats (maildir,mbox)], [ + mail_storages=`echo "$withval"|sed 's/,/ /g'` ], + mail_storages="maildir mbox") + dnl * gcc specific options if test "x$ac_cv_prog_gcc" = "xyes"; then # -Wcast-qual -Wcast-align -Wconversion # too many warnings @@ -958,6 +963,22 @@ fi dnl ** +dnl ** storage classes +dnl ** + +maildir_libs="../lib-storage/index/maildir/libstorage_maildir.a ../lib-index/maildir/libstorage_index_maildir.a" +mbox_libs="../lib-storage/index/mbox/libstorage_mbox.a ../lib-index/mbox/libstorage_index_mbox.a" +index_libs="../lib-storage/index/libstorage_index.a ../lib-index/libindex.a" + +STORAGE_LIBS= +for storage in $mail_storages; do + STORAGE_LIBS="$STORAGE_LIBS `eval \"echo \\$${storage}_libs\"`" +done +STORAGE_LIBS="$STORAGE_LIBS $index_libs" +AC_SUBST(STORAGE_LIBS) + + +dnl ** dnl ** capabilities dnl ** @@ -1000,17 +1021,16 @@ dnl * do it after AC_OUTPUT(), so we know that the directory exists. dnl * it doesn't when building in different directory -STORAGE="maildir mbox" file="src/lib-storage/register/mail-storage-register.c" echo "/* this file is generated by configure */" > $file echo '#include "lib.h"' >> $file echo '#include "mail-storage.h"' >> $file -for storage in $STORAGE; do +for storage in $mail_storages; do echo "extern struct mail_storage ${storage}_storage;" >> $file done echo "void mail_storage_register_all(void) {" >> $file -for storage in $STORAGE; do +for storage in $mail_storages; do echo "mail_storage_class_register(&${storage}_storage);" >> $file done echo "}" >> $file