* THIS IS 7.44 (BETA RELEASE ONLY)
[citadel.git] / citadel / configure.ac
index add01aff0fc4a3dc87ff72a7cfb64774697d6863..84c97ba9d15b4e283955253351412f4e89fc8568 100644 (file)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
 AC_PREREQ(2.52)
-AC_INIT([Citadel], [7.37], [http://www.citadel.org/])
+AC_INIT([Citadel], [7.44], [http://www.citadel.org/])
 AC_REVISION([$Revision: 5108 $])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_PREFIX_DEFAULT(/usr/local/citadel)
@@ -95,6 +95,18 @@ AC_ARG_WITH(sysconfdir,
                        ]
 )
 
+dnl Checks for the Configdir
+AC_ARG_WITH(autosysconfdir, 
+                       [  --with-autosysconfdir         directory to store the automaticaly maintained configs under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_AUTO_ETC_DIR, [], [should we search our automatic config in an alternate place?])
+                                               AC_DEFINE_UNQUOTED(AUTO_ETC_DIR, "$withval", [where to search our automatic config files])
+                                               MAKE_AUTO_ETC_DIR=$withval
+                                               AC_SUBST(MAKE_AUTO_ETC_DIR)
+                         fi
+                       ]
+)
+
 dnl Checks for where to put our utilities
 AC_ARG_WITH(utility-bindir, 
                        [  --with-utility-bindir   directory where to find helper binaries],
@@ -142,6 +154,22 @@ AC_ARG_WITH(docdir,
 )
 
 
+dnl Checks for the zlib compression library.
+if test "x$with_zlib" != xno ; then
+       AC_CHECK_HEADERS(zlib.h,
+               [AC_CHECK_LIB(z, zlibVersion,
+                       [ok_zlib=yes],,
+       )])
+fi
+
+if test "x$ok_zlib" = xyes ; then
+dnl  libcitadel will bring libz, so we don't need it here.     LDFLAGS="-lz $LDFLAGS" 
+       AC_DEFINE(HAVE_ZLIB, [], [define this if you have zlib compression available])
+fi
+
+
+
+
 dnl Here is the check for a libc integrated iconv
 AC_ARG_ENABLE(iconv,
        [  --disable-iconv         do not use iconv charset conversion],
@@ -192,10 +220,10 @@ if test "$ok_iconv" = no; then
                )
 fi     
 if test "$ok_iconv" != "no"; then
-       AC_MSG_RESULT(WebCit will be built with character set conversion.)
+       AC_MSG_RESULT(Citadel will be built with character set conversion.)
        AC_DEFINE(HAVE_ICONV,[],[whether we have iconv for charset conversion])
 else
-       AC_MSG_RESULT(WebCit will be built without character set conversion.)
+       AC_MSG_RESULT(Citadel will be built without character set conversion.)
 fi
 
 AC_CHECK_LIB(intl, libintl_bindtextdomain, [LDFLAGS="$LDFLAGS -lintl"])
@@ -220,7 +248,6 @@ AC_ARG_WITH(ssl,
 )
 AC_ARG_WITH(ncurses, [  --without-ncurses       don't use ncurses])
 
-AC_ARG_WITH(with_zlib, [  --with-zlib             use zlib compression if present])
 AC_ARG_WITH(with_ldap, [  --with-ldap             use OpenLDAP client library])
 AC_ARG_WITH(with_libdspam, [  --with-libdspam         use libdspam mail spam scanning library])
 
@@ -468,12 +495,46 @@ fi
 
 test -d /usr/kerberos/include && CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
 
+dnl Checks for the libical iCalendar library.
+AC_CHECK_HEADER(libical/ical.h,
+       [AC_CHECK_LIB(ical, icaltimezone_set_tzid_prefix,
+               [
+                       SERVER_LIBS="-lical $SERVER_LIBS"
+               ],
+               [
+                       AC_MSG_ERROR(libical was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
+               ]
+       ,
+       )],
+       [
+               AC_MSG_ERROR(libical/ical.h was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
+       ]
+)
+
 
+dnl Checks for the libsieve mailbox sorting library.
+AC_CHECK_HEADER(sieve2.h,
+       [AC_CHECK_LIB(sieve, sieve2_license,
+               [
+                       SERVER_LIBS="-lsieve $SERVER_LIBS"
+               ],
+               [
+                       AC_MSG_ERROR(libsieve was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
+               ]
+       ,
+       )],
+       [
+               AC_MSG_ERROR(sieve2.h was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
+       ]
+)
+
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $SERVER_LIBS"
 dnl Check for libcitadel
 AC_CHECK_HEADER(libcitadel.h,
        [AC_CHECK_LIB(citadel, libcitadel_version_string,
                [
-                       LIBS="-lcitadel $LIBS"
+                       LIBS="-lcitadel $LIBS $SERVER_LIBS"
                ],
                [
                        AC_MSG_ERROR(libcitadel was not found or is not usable.  Please install libcitadel.)
@@ -485,6 +546,7 @@ AC_CHECK_HEADER(libcitadel.h,
        ]
 )
 
+CFLAGS="$saved_CFLAGS"
 
 
 
@@ -624,19 +686,6 @@ if test "x$with_db" != xno; then
 
 fi
 
-dnl Checks for the zlib compression library.
-if test "x$with_zlib" != xno ; then
-       AC_CHECK_HEADERS(zlib.h,
-               [AC_CHECK_LIB(z, zlibVersion,
-                       [ok_zlib=yes],,
-       )])
-fi
-
-if test "x$ok_zlib" = xyes ; then
-       SERVER_LIBS="-lz $SERVER_LIBS"
-       AC_DEFINE(HAVE_ZLIB, [], [define this if you have zlib compression available])
-fi
-
 
 
 
@@ -667,7 +716,7 @@ fi
 
 if test "x$ok_libdspam" = xyes ; then
        SERVER_LIBS="-ldspam $SERVER_LIBS"
-       AC_DEFINE(HAVE_LIBDSPAM, [], [define this if you have the libdspam mail spam scanning library available])
+       AC_DEFINE(HAVE_LIBDSPAM, [], [(unfinished) define this if you have the libdspam mail spam scanning library available])
 fi
 
 
@@ -716,39 +765,6 @@ AC_CHECK_HEADER(curl/curl.h,
 
 
 
-dnl Checks for the libical iCalendar library.
-AC_CHECK_HEADER(libical/ical.h,
-       [AC_CHECK_LIB(ical, icalcomponent_new,
-               [
-                       SERVER_LIBS="-lical $SERVER_LIBS"
-               ],
-               [
-                       AC_MSG_ERROR(libical was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
-               ]
-       ,
-       )],
-       [
-               AC_MSG_ERROR(libical/ical.h was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
-       ]
-)
-
-
-dnl Checks for the libsieve mailbox sorting library.
-AC_CHECK_HEADER(sieve2.h,
-       [AC_CHECK_LIB(sieve, sieve2_license,
-               [
-                       SERVER_LIBS="-lsieve $SERVER_LIBS"
-               ],
-               [
-                       AC_MSG_ERROR(libsieve was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
-               ]
-       ,
-       )],
-       [
-               AC_MSG_ERROR(sieve2.h was not found and is required.  More info: http://www.citadel.org/doku.php/installation:start)
-       ]
-)
-
 
 
 
@@ -978,7 +994,6 @@ if test -z "$DATABASE"; then
 fi
 
 echo ------------------------------------------------------------------------
-echo 'zlib compression:                ' $ok_zlib
 echo 'LDAP support:                    ' $ok_ldap
 echo 'Character set conversion support:' $ok_iconv
 echo 'DSpam Scanning support:          ' $ok_libdspam