1 # Process this file with autoconf to produce a configure script.
4 # Evolution-Data-Server version */
5 m4_define([eds_major_version], [2])
6 m4_define([eds_minor_version], [27])
7 m4_define([eds_micro_version], [5])
9 m4_define([eds_version],
10 [eds_major_version.eds_minor_version.eds_micro_version])
12 # This is for API/version tracking for things like Bonobo server files.
13 # This should always be the major/minor of the stable version or stable
14 # version to be. (XXX The API version is no longer meaningful.)
15 m4_define([base_version], [2.28])
16 m4_define([api_version], [1.2])
18 AC_INIT(evolution-data-server, [eds_version], http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server)
19 AM_INIT_AUTOMAKE([gnu 1.9])
20 AC_CONFIG_SRCDIR(README)
21 AC_CONFIG_HEADERS(config.h)
23 # Automake 1.11 - Silent Build Rules
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
26 # Required Package Versions
27 m4_define([glib_minimum_version], [2.16.1])
28 m4_define([gtk_minimum_version], [2.14.0])
29 m4_define([ORBit_minimum_version], [2.9.8])
30 m4_define([libbonobo_minimum_version], [2.20.3])
31 m4_define([gconf_minimum_version], [2.0.0]) # XXX Just a Guess
32 m4_define([libglade_minimum_version], [2.0.0]) # XXX Just a Guess
33 m4_define([libxml_minimum_version], [2.0.0]) # XXX Just a Guess
34 m4_define([libsoup_minimum_version], [2.3.0])
35 m4_define([gnome_keyring_minimum_version], [2.20.1])
36 m4_define([sqlite_minimum_version], [3.5])
37 m4_define([gweather_minimum_version], [2.25.4])
38 m4_define([libical_minimum_version], [0.43])
40 AC_SUBST([BASE_VERSION],[base_version])
41 AC_SUBST([API_VERSION],[api_version])
42 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
43 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
45 EDS_MAJOR_VERSION=eds_major_version
46 EDS_MINOR_VERSION=eds_minor_version
47 EDS_MICRO_VERSION=eds_micro_version
50 LIBEDATASERVER_CURRENT=11
51 LIBEDATASERVER_REVISION=1
54 LIBEDATASERVERUI_CURRENT=9
55 LIBEDATASERVERUI_REVISION=1
56 LIBEDATASERVERUI_AGE=1
63 LIBEDATACAL_REVISION=2
66 LIBEDATABOOK_CURRENT=6
67 LIBEDATABOOK_REVISION=1
74 LIBEGROUPWISE_CURRENT=13
75 LIBEGROUPWISE_REVISION=1
82 LIBEXCHANGE_STORAGE_CURRENT=3
83 LIBEXCHANGE_STORAGE_REVISION=0
84 LIBEXCHANGE_STORAGE_AGE=0
90 LIBGDATA_GOOGLE_CURRENT=1
91 LIBGDATA_GOOGLE_REVISION=0
95 LIBEBACKEND_REVISION=1
98 AC_SUBST(EDS_MAJOR_VERSION)
99 AC_SUBST(EDS_MINOR_VERSION)
100 AC_SUBST(EDS_MICRO_VERSION)
101 AC_SUBST(LIBEDATASERVER_CURRENT)
102 AC_SUBST(LIBEDATASERVER_REVISION)
103 AC_SUBST(LIBEDATASERVER_AGE)
104 AC_SUBST(LIBEDATASERVERUI_CURRENT)
105 AC_SUBST(LIBEDATASERVERUI_REVISION)
106 AC_SUBST(LIBEDATASERVERUI_AGE)
107 AC_SUBST(LIBECAL_CURRENT)
108 AC_SUBST(LIBECAL_REVISION)
109 AC_SUBST(LIBECAL_AGE)
110 AC_SUBST(LIBEDATACAL_CURRENT)
111 AC_SUBST(LIBEDATACAL_REVISION)
112 AC_SUBST(LIBEDATACAL_AGE)
113 AC_SUBST(LIBEBOOK_CURRENT)
114 AC_SUBST(LIBEBOOK_REVISION)
115 AC_SUBST(LIBEBOOK_AGE)
116 AC_SUBST(LIBEDATABOOK_CURRENT)
117 AC_SUBST(LIBEDATABOOK_REVISION)
118 AC_SUBST(LIBEDATABOOK_AGE)
119 AC_SUBST(LIBEGROUPWISE_CURRENT)
120 AC_SUBST(LIBEGROUPWISE_REVISION)
121 AC_SUBST(LIBEGROUPWISE_AGE)
122 AC_SUBST(LIBCAMEL_CURRENT)
123 AC_SUBST(LIBCAMEL_REVISION)
124 AC_SUBST(LIBCAMEL_AGE)
125 AC_SUBST(LIBEXCHANGE_STORAGE_CURRENT)
126 AC_SUBST(LIBEXCHANGE_STORAGE_REVISION)
127 AC_SUBST(LIBEXCHANGE_STORAGE_AGE)
128 AC_SUBST(LIBGDATA_CURRENT)
129 AC_SUBST(LIBGDATA_REVISION)
130 AC_SUBST(LIBGDATA_AGE)
131 AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
132 AC_SUBST(LIBGDATA_GOOGLE_REVISION)
133 AC_SUBST(LIBGDATA_GOOGLE_AGE)
134 AC_SUBST(LIBEBACKEND_CURRENT)
135 AC_SUBST(LIBEBACKEND_REVISION)
136 AC_SUBST(LIBEBACKEND_AGE)
138 dnl Put the ACLOCAL flags in the Makefile
139 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
141 # Compiler Warning Flags
143 AS_COMPILER_FLAGS(WARNING_FLAGS,
144 "-DG_DISABLE_DEPRECATED
145 -DPANGO_DISABLE_DEPRECATED
146 -DGDK_DISABLE_DEPRECATED
147 -DGDK_PIXBUF_DISABLE_DEPRECATED
149 -Wno-missing-field-initializers
151 -Wno-unused-parameter
152 -Wdeclaration-after-statement
153 -Werror-implicit-function-declaration
154 -Wformat-security -Winit-self
155 -Wmissing-declarations -Wmissing-include-dirs
156 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
157 -Wredundant-decls -Wundef -Wwrite-strings")
158 AC_SUBST(WARNING_FLAGS)
160 # Other useful compiler warnings for test builds only.
161 # These may produce warnings we have no control over.
163 # -Wformat-nonliteral
164 # -Wmissing-format-attribute
167 CFLAGS="$CFLAGS $WARNING_FLAGS"
169 dnl Initialize maintainer mode
180 AC_MSG_ERROR(You need bison to build evolution-data-server)
188 dnl Test whether jw is installed
189 AC_PATH_PROG(JW,jw,no)
190 if test x$JW = xno; then
195 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
199 IT_PROG_INTLTOOL([0.35.5])
203 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
204 AC_SUBST(GETTEXT_PACKAGE)
205 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
207 localedir='$(prefix)/$(DATADIRNAME)/locale'
210 dnl Initialize libtool
218 dnl ******************************
220 dnl ******************************
222 AC_MSG_CHECKING([for Win32])
226 NO_UNDEFINED='-no-undefined'
227 SOCKET_LIBS='-lws2_32 -ldnsapi'
230 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
231 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
232 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
238 SOFTOKN3_LIB='-lsoftokn3'
239 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
242 AC_MSG_RESULT([$os_win32])
243 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
244 AC_SUBST(NO_UNDEFINED)
245 AC_SUBST(SOCKET_LIBS)
246 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
248 AC_CHECK_HEADERS(pthread.h semaphore.h sys/wait.h)
249 AC_CHECK_FUNCS(fsync strptime strtok_r)
252 AC_CHECK_HEADERS(alloca.h)
254 # Check for base dependencies early.
255 PKG_CHECK_MODULES(GNOME_PLATFORM,
256 [glib-2.0 >= glib_minimum_version
257 gtk+-2.0 >= gtk_minimum_version
258 ORBit-2.0 >= ORBit_minimum_version
259 libbonobo-2.0 >= libbonobo_minimum_version
260 gconf-2.0 >= gconf_minimum_version
261 libglade-2.0 >= libglade_minimum_version
262 libxml-2.0 >= libxml_minimum_version
263 libsoup-2.4 >= libsoup_minimum_version])
265 LIBICAL_REQUIRED=libical_minimum_version
266 AC_SUBST(LIBICAL_REQUIRED)
268 dnl **************************************************
270 dnl **************************************************
271 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
273 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
274 [AC_MSG_ERROR([No regex library found])])])
277 dnl **************************************************
279 dnl **************************************************
282 AC_HELP_STRING( [--with-libdb],
283 [Prefix where libdb is installed]),
284 dynamic_libdb=yes, dynamic_libdb=no)
286 if test "x${dynamic_libdb}" = "xyes"; then
287 DB_CFLAGS="-I$withval/include"
288 DB_LIBS="-L$withval/lib -ldb"
290 AC_MSG_CHECKING([Berkeley DB])
291 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
292 save_libs=$LIBS; LIBS="$DB_LIBS"
294 [AC_LANG_PROGRAM([[#include <db.h>]],
295 [db_create(NULL, NULL, 0)])],
297 AC_MSG_ERROR(cannot find libdb))
301 msg_libdb="dynamically linked"
303 DB_CFLAGS="-I\$(top_builddir)/libdb/dist"
304 DB_LIBS="\$(top_builddir)/libdb/dist/libdb-4.1.la"
305 if test $os_win32 = yes; then
306 # Don't pointlessly auto-export the global symbols
307 # from the static libdb
308 DB_LIBS="$DB_LIBS -Wl,--exclude-libs=libdb-4.1.a"
310 AC_MSG_NOTICE(Using local libdb)
311 msg_libdb="statically linked to local copy"
313 AM_CONDITIONAL(WITH_LIBDB, test "x$dynamic_libdb" != "xno")
318 dnl ******************************
320 dnl ******************************
324 AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv, AC_TRY_LINK([
326 #include <stdlib.h>],[
328 cd = iconv_open ("UTF-8", "ISO-8859-1");
330 ], ac_cv_libiconv=yes, ac_cv_libiconv=no))
331 if test $ac_cv_libiconv = yes; then
333 if test $os_win32 = yes; then
334 # Don't pointlessly auto-export the global symbols
335 # from a potentially static libiconv.a
336 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
341 AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
344 if test $have_iconv = yes; then
345 if test $ac_cv_libiconv = no; then
346 AC_CHECK_FUNCS(gnu_get_libc_version)
348 AC_CACHE_CHECK([if iconv() handles UTF-8], ac_cv_libiconv_utf8, AC_TRY_RUN([
352 #ifdef HAVE_GNU_GET_LIBC_VERSION
353 #include <gnu/libc-version.h>
356 int main (int argc, char **argv)
358 char *from = "Some Text \xA4";
359 char *utf8 = "Some Text \xC2\xA4";
360 char *transbuf = malloc (20), *trans = transbuf;
362 size_t from_len = strlen (from), utf8_len = 20;
363 size_t utf8_real_len = strlen (utf8);
365 #ifdef HAVE_GNU_GET_LIBC_VERSION
366 /* glibc 2.1.2's iconv is broken in hard to test ways. */
367 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
371 cd = iconv_open ("UTF-8", "ISO-8859-1");
372 if (cd == (iconv_t) -1)
374 if (iconv (cd, &from, &from_len, &trans, &utf8_len) == -1 || from_len != 0)
376 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
380 }], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], ac_cv_libiconv_utf8=HOPEFULLY))
383 if test "$have_iconv" = no; then
384 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
388 CFLAGS="$CFLAGS -I$srcdir"
390 AC_MSG_CHECKING(preferred charset formats for system iconv)
393 #include "iconv-detect.c"
397 AC_MSG_RESULT(not found)
399 *** The iconv-detect program was unable to determine the
400 *** preferred charset formats recognized by your system
401 *** iconv library. It is suggested that you install a
402 *** working iconv library such as the one found at
403 *** ftp://ftp.gnu.org/pub/gnu/libiconv
406 if test x$os_win32 = xyes; then
407 AC_MSG_RESULT(using cached win32 result)
408 echo "/* This is an auto-generated header, DO NOT EDIT! */" > iconv-detect.h
409 echo "" >>iconv-detect.h
410 echo "#define ICONV_ISO_D_FORMAT \"iso-%d-%d\"" >>iconv-detect.h
411 echo "#define ICONV_ISO_S_FORMAT \"iso-%d-%s\"" >>iconv-detect.h
412 echo "#define ICONV_10646 \"UCS-4BE\"" >>iconv-detect.h
414 AC_MSG_RESULT(unknown)
416 *** The iconv-detect program was unable to determine the
417 *** preferred charset formats recognized by your system
418 *** iconv library. You are crosscompiling and supposed
419 *** to know what you are doing. (:-)
424 CFLAGS="$save_CFLAGS"
427 dnl Check for nl_langinfo and CODESET
428 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
429 AC_TRY_COMPILE([#include <langinfo.h>],
430 [char *codeset = nl_langinfo (CODESET);],
431 [ac_cv_langinfo_codeset=yes],
432 [ac_cv_langinfo_codeset=no])
433 if test x$ac_cv_langinfo_codeset = xyes; then
434 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
436 AC_MSG_RESULT($ac_cv_langinfo_codeset)
438 dnl Check to see if strftime supports the use of %l and %k
440 AC_MSG_CHECKING(for %l and %k support in strftime)
446 int main(int argc, char **argv)
453 timeinfo=localtime(&rawtime);
455 strftime(buf, 10, "%lx%k", timeinfo);
457 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
462 AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k])
464 ],ac_cv_lkstrftime=no,ac_cv_lkstrftime=no,[
465 AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k])
468 AC_MSG_RESULT($ac_cv_lkstrftime)
470 dnl ********************************************************************************
471 dnl security extension support (SSL and S/MIME)
473 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
474 dnl needed by Camel (SSL and S/MIME).
476 dnl The Evolution security extensions are only built if these libraries are found
477 dnl ********************************************************************************
481 dnl these 2 enable's are inverses of each other
483 AC_HELP_STRING( [--enable-nss=@<:@yes/no/static@:>@],
484 [Attempt to use Mozilla libnss for SSL support.]),
485 enable_nss="$enableval", enable_nss="yes")
488 AC_HELP_STRING( [--enable-smime=@<:@yes/no@:>@],
489 [Attempt to use Mozilla libnss for SMIME support (this requires --enable-nss)]),
490 enable_smime="$enableval", enable_smime="yes")
492 AC_ARG_ENABLE(gnome-keyring,
493 AC_HELP_STRING( [--enable-gnome-keyring=@<:@yes/no@:>@],
494 [Attempt to use Gnome Keyring for storing passwords]),
495 enable_gnome_keyring="$enableval", enable_gnome_keyring="no")
497 AC_ARG_WITH(nspr-includes,
498 AC_HELP_STRING( [--with-nspr-includes=PREFIX],
499 [Location of Mozilla nspr4 includes.]),
500 with_nspr_includes="$withval")
502 AC_ARG_WITH(nspr-libs,
503 AC_HELP_STRING( [--with-nspr-libs=PREFIX],
504 [Location of Mozilla nspr4 libs.]),
505 with_nspr_libs="$withval")
507 AC_ARG_WITH(nss-includes,
508 AC_HELP_STRING( [--with-nss-includes=PREFIX],
509 [Location of Mozilla nss3 includes.]),
510 with_nss_includes="$withval")
512 AC_ARG_WITH(nss-libs,
513 AC_HELP_STRING( [--with-nss-libs=PREFIX],
514 [Location of Mozilla nss3 libs.]),
515 with_nss_libs="$withval")
517 if test "x${enable_gnome_keyring}" = "xyes"; then
518 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= gnome_keyring_minimum_version, with_gnome_keyring="yes", with_gnome_keyring="no");
519 if test "x$with_gnome_keyring" = "xyes"; then
520 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Gnome Keyring available])
521 GNOME_KEYRING_REQUIREMENT="gnome-keyring-1"
523 GNOME_KEYRING_REQUIREMENT=""
527 if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
528 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}" || test "x${enable_nss}" = "xstatic"; then
534 if test "x${check_manually}" = "xno"; then
535 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
536 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
537 for pc in $mozilla_nspr_pcs; do
538 if $PKG_CONFIG --exists $pc; then
545 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
546 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
547 for pc in $mozilla_nss_pcs; do
548 if $PKG_CONFIG --exists $pc; then
555 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
556 msg_ssl="yes (Mozilla NSS)"
557 if test "x$enable_smime" = "xyes"; then
558 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
559 msg_smime="yes (Mozilla NSS)"
561 AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
562 AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
563 MANUAL_NSPR_CFLAGS=""
574 if test "x${check_manually}" = "xyes"; then
575 have_nspr_includes="no"
576 if test "x${with_nspr_includes}" != "xno"; then
577 CPPFLAGS_save="$CPPFLAGS"
579 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
582 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
583 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
584 CPPFLAGS="$CPPFLAGS_save"
586 if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
587 have_nspr_includes="yes"
588 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
591 AC_MSG_CHECKING(for Mozilla nspr4 includes)
596 if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
597 CFLAGS_save="$CFLAGS"
598 LDFLAGS_save="$LDFLAGS"
600 if test "$enable_nss" = "static"; then
601 if test -z "${with_nspr_libs}"; then
602 AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set.]
603 [Please specify the path to libnspr4.a]
604 [Example: --with-nspr-libs=/usr/lib])
606 nsprlibs="$DL_LIB $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
609 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
612 AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
615 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
617 if test "x${with_nspr_libs}" != "x"; then
619 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
625 AC_TRY_LINK_FUNC(PR_Init, ac_cv_moz_nspr_libs="yes", ac_cv_moz_nspr_libs="no")
626 CFLAGS="$CFLAGS_save"
627 LDFLAGS="$LDFLAGS_save"
630 if test "x$ac_cv_moz_nspr_libs" != "xno"; then
632 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
634 MANUAL_NSPR_CLFAGS=""
637 AC_MSG_CHECKING(for Mozilla nspr4 libraries)
641 if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
642 CPPFLAGS_save="$CPPFLAGS"
644 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
647 if test "x${with_nspr_includes}" != "x"; then
648 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
650 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
653 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
654 [ have_nss_includes="yes" ],
655 [ have_nss_includes="no" ])
657 CPPFLAGS="$CPPFLAGS_save"
659 if test "x${have_nss_includes}" = "xyes"; then
660 have_nss_includes="yes"
661 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
663 MANUAL_NSPR_CFLAGS=""
667 AC_MSG_CHECKING(for Mozilla nss3 includes)
671 if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
672 LDFLAGS_save="$LDFLAGS"
674 if test "$enable_nss" = "static"; then
675 if test -z "${with_nss_libs}"; then
676 AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set.]
677 [Please specify the path to libnss3.a]
678 [Example: --with-nspr-libs=/usr/lib/mozilla])
680 nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
683 nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
688 nsslibs="-lssl3 -lsmime3 -lnss3"
691 AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
694 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
695 LIBS="$nsslibs $nsprlibs"
696 AC_TRY_LINK_FUNC(NSS_Init, ac_cv_moz_nss_libs="yes", ac_cv_moz_nss_libs="no")
697 if test "$ac_cv_moz_nss_libs" = no; then
698 nsslibs="-lssl3 -lsmime3 -lnss3"
699 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
700 AC_TRY_LINK_FUNC(NSS_Init, ac_cv_moz_nss_libs="yes", ac_cv_moz_nss_libs="no")
702 LDFLAGS="$LDFLAGS_save"
705 if test "$ac_cv_moz_nss_libs" != no; then
708 if test "$enable_nss" = "static"; then
709 msg_ssl="yes (Mozilla NSS:static)"
711 msg_ssl="yes (Mozilla NSS)"
713 if test "$enable_smime" = "yes"; then
714 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
715 msg_smime="yes (Mozilla NSS)"
717 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
720 MANUAL_NSPR_CFLAGS=""
724 AC_MSG_CHECKING(for Mozilla nss libraries)
728 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
729 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
733 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
735 AC_SUBST(MANUAL_NSPR_CFLAGS)
736 AC_SUBST(MANUAL_NSPR_LIBS)
737 AC_SUBST(MANUAL_NSS_CFLAGS)
738 AC_SUBST(MANUAL_NSS_LIBS)
740 if test $os_win32 != yes; then
742 dnl check for socklen_t (in Unix98)
743 AC_MSG_CHECKING(for socklen_t)
744 AC_TRY_COMPILE([#include <sys/types.h>
745 #include <sys/socket.h>
747 ],[],[AC_MSG_RESULT(yes)],[
748 AC_TRY_COMPILE([#include <sys/types.h>
749 #include <sys/socket.h>
750 int accept (int, struct sockaddr *, size_t *);
752 AC_MSG_RESULT(size_t)
753 AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [
755 AC_DEFINE(socklen_t,int)])])
760 dnl system mail stuff
762 AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib)
763 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
765 AC_MSG_CHECKING(system mail directory)
766 if test -d /var/mail -a '!' -h /var/mail ; then
767 system_mail_dir=/var/mail
769 system_mail_dir=/var/spool/mail
771 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
773 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
775 CAMEL_LOCK_HELPER_USER=""
776 CAMEL_LOCK_HELPER_GROUP=""
777 system_mail_perm="world writable"
781 CAMEL_LOCK_HELPER_USER=""
782 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
783 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
787 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
788 CAMEL_LOCK_HELPER_GROUP=""
789 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
793 CAMEL_LOCK_HELPER_USER=""
794 CAMEL_LOCK_HELPER_GROUP=""
795 system_mail_perm="???"
799 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
800 AC_SUBST(CAMEL_LOCK_HELPER_USER)
801 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
807 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
813 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
814 if test $ac_cv_struct_tm_gmtoff = yes; then
815 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
817 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
822 ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
823 if test $ac_cv_var_timezone = yes; then
824 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
825 AC_CACHE_CHECK(for altzone variable, ac_cv_var_altzone,
830 ], ac_cv_var_altzone=yes, ac_cv_var_altzone=no))
831 if test $ac_cv_var_altzone = yes; then
832 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
835 AC_ERROR(unable to find a way to determine timezone)
840 dnl **************************************************
841 dnl ctime_r prototype
842 dnl **************************************************
844 AC_CACHE_CHECK([if ctime_r wants three arguments], ac_cv_ctime_r_three_args,
851 ctime_r (&date, buf, 100);
853 ac_cv_ctime_r_three_args=yes
855 ac_cv_ctime_r_three_args=no
859 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
860 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
863 dnl **************************************************
864 dnl gethostbyname_r prototype
865 dnl **************************************************
867 AC_CHECK_FUNCS(gethostbyname_r,[
868 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args,
871 #include "confdefs.h"
872 #include <sys/types.h>
873 #include <sys/socket.h>
874 #include <netinet/in.h>
877 #define BUFSIZE (sizeof(struct hostent)+10)
880 char buffer[BUFSIZE];
884 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
886 ac_cv_gethostbyname_r_five_args=yes
888 ac_cv_gethostbyname_r_five_args=no
892 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
893 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
896 dnl **************************************************
897 dnl gethostbyaddr_r prototype
898 dnl **************************************************
900 AC_CHECK_FUNCS(gethostbyaddr_r,[
901 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], ac_cv_gethostbyaddr_r_seven_args,
904 #include "confdefs.h"
905 #include <sys/types.h>
906 #include <sys/socket.h>
907 #include <netinet/in.h>
910 #define BUFSIZE (sizeof(struct hostent)+10)
913 char buffer[BUFSIZE];
917 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
919 ac_cv_gethostbyaddr_r_seven_args=yes
921 ac_cv_gethostbyaddr_r_seven_args=no
925 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
926 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
929 dnl **************************************************
930 dnl stat(v)fs location/type
931 dnl **************************************************
933 AC_CHECK_HEADERS(sys/statvfs.h)
934 AC_CHECK_FUNCS(statvfs)
935 AC_CHECK_HEADERS(sys/param.h)
936 AC_CHECK_HEADERS(sys/mount.h)
937 AC_CHECK_FUNCS(statfs)
939 dnl **************************************************
940 dnl * IPv6 support and getaddrinfo calls
941 dnl **************************************************
942 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], ac_cv_have_addrinfo,
945 #include "confdefs.h"
946 #include <sys/types.h>
947 #include <sys/socket.h>
948 #include <netinet/in.h>
954 #define NI_MAXHOST 1025
958 #define NI_MAXSERV 32
961 struct addrinfo hints, *res;
962 struct sockaddr_in6 sin6;
964 char host[NI_MAXHOST];
965 char serv[NI_MAXSERV];
967 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
969 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0);
971 ac_cv_have_addrinfo=yes
973 ac_cv_have_addrinfo=no
977 if test x"$ac_cv_have_addrinfo" = "xno" ; then
978 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
979 if test x"$enable_ipv6" = "xyes" ; then
980 AC_ERROR(system doesn't support necessary interfaces for ipv6 support)
985 AC_HELP_STRING( [--enable-ipv6=@<:@no/yes@:>@],
986 [Enable support for resolving IPv6 addresses.]),
988 if test x"$enable_ipv6" = "xyes"; then
990 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
992 #include "confdefs.h"
993 #include <sys/types.h>
994 #include <sys/socket.h>
995 #include <netinet/in.h>
999 struct addrinfo hints;
1001 hints.ai_flags = AI_ADDRCONFIG;
1003 AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])
1010 AM_CONDITIONAL(ENABLE_IPv6, test "x$enable_ipv6" = "xyes")
1012 dnl **************************************************
1013 dnl Calendar support
1014 dnl **************************************************
1015 AC_MSG_CHECKING(if we should build the calendar)
1016 AC_ARG_ENABLE(calendar,
1017 AC_HELP_STRING( [--enable-calendar=@<:@yes/no@:>@],
1018 [Enable the calendar components (default yes)]),
1019 enable_calendar="$enableval", enable_calendar="yes")
1021 if test "x${enable_calendar}" != "xno"; then
1022 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
1024 AM_CONDITIONAL(ENABLE_CALENDAR, test x$enable_calendar = xyes)
1025 AC_MSG_RESULT($enable_calendar)
1026 msg_calendar=$enable_calendar
1028 dnl **************************************************
1029 dnl Weather calendar backend support
1030 dnl **************************************************
1031 AC_MSG_CHECKING(if we should build the weather calendar backend)
1032 AC_ARG_WITH([weather],
1033 [AC_HELP_STRING([--with-weather], [Build the weather calendar backend (default=yes)])],
1034 [use_gweather=$withval],
1036 if test $enable_calendar = no; then
1037 use_gweather="no (calendar support is disabled)"
1039 AC_MSG_RESULT($use_gweather)
1041 if test $use_gweather = yes; then
1042 PKG_CHECK_MODULES([LIBGWEATHER],
1043 [gweather >= gweather_minimum_version],
1045 [AC_MSG_ERROR([The weather calendar backend requires GWeather >= gweather_minimum_version. Alternatively, you may specify --without-weather as a configure option to avoid building the backend.])])
1048 AM_CONDITIONAL(ENABLE_WEATHER, test $use_gweather = yes)
1050 dnl **************************************************
1052 dnl **************************************************
1054 AC_HELP_STRING( [--enable-nntp=@<:@no/yes@:>@],
1055 [Build Usenet news (NNTP) backend]),
1058 if test "x$enable_nntp" = "xyes"; then
1059 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1064 AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes)
1066 dnl **************************************************
1067 dnl New IMAP code support.
1068 dnl **************************************************
1069 AC_ARG_ENABLE(imapp,
1070 AC_HELP_STRING( [--enable-imapp=@<:@no/yes@:>@],
1071 [Attempt to compile alternative, incomplete, very unsupported IMAPv4r1 code]),
1074 if test "x$enable_imapp" = "xyes"; then
1075 AC_DEFINE(ENABLE_IMAPP,1,[Really don't try this at home])
1080 AM_CONDITIONAL(ENABLE_IMAPP, test x$enable_imapp = xyes)
1082 dnl **************************************************
1083 dnl IMAP4rev1 code support.
1084 dnl **************************************************
1085 AC_ARG_ENABLE(imap4,
1086 AC_HELP_STRING( [--enable-imap4=@<:@no/yes@:>@],
1087 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
1090 if test "x$enable_imap4" = "xyes"; then
1091 AC_DEFINE(ENABLE_IMAP4,1,[Really don't try this at home])
1096 AM_CONDITIONAL(ENABLE_IMAP4, test x$enable_imap4 = xyes)
1098 dnl **************************************************
1100 dnl **************************************************
1102 AC_HELP_STRING( [--enable-hula=@<:@no/yes@:>@],
1103 [Enable support for the now-defunct Hula project]),
1106 if test "x$enable_hula" = "xyes"; then
1107 AC_DEFINE(ENABLE_HULA,1,[Build Hula backend])
1112 AM_CONDITIONAL(ENABLE_HULA, test x$enable_hula = xyes)
1114 dnl **************************************************
1116 dnl **************************************************
1118 AC_ARG_ENABLE(dot-locking,
1119 AC_HELP_STRING( [--enable-dot-locking=@<:@yes/no@:>@],
1120 [Enable support for locking mail files with dot locking]),
1121 ,enable_dot_locking=yes)
1123 if test $os_win32 != yes -a "x$enable_dot_locking" = "xyes"; then
1124 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1130 AC_ARG_ENABLE(file-locking,
1131 AC_HELP_STRING( [--enable-file-locking=@<:@fcntl/flock/no@:>@],
1132 [Enable support for locking mail files with file locking]),
1133 ,enable_file_locking=fcntl)
1135 if test $os_win32 != yes -a "x$enable_file_locking" = "xfcntl"; then
1136 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1139 if test $os_win32 != yes -a "x$enable_file_locking" = "xflock"; then
1140 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1147 dnl **************************************************
1148 dnl * sendmail operation
1149 dnl **************************************************
1151 AC_MSG_CHECKING(for SunOS broken spool format)
1152 if test "x$host_os" = "xsunos" ; then
1153 with_broken_spool="yes"
1156 AC_ARG_WITH(broken-spool,
1157 AC_HELP_STRING( [--with-broken-spool=@<:@yes/no@:>@],
1158 [Using SunOS/Solaris sendmail which has a broken spool format]),
1159 ,with_broken_spool=${with_broken_spool:=no})
1161 if test "x$with_broken_spool" = "xyes"; then
1162 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1165 AC_MSG_RESULT($with_broken_spool)
1171 AC_HELP_STRING( [--with-krb5=DIR],
1172 [Location of Kerberos 5 install dir]),
1173 with_krb5="$withval", with_krb5="no")
1175 AC_ARG_WITH(krb5-libs,
1176 AC_HELP_STRING( [--with-krb5-libs=DIR],
1177 [Location of Kerberos 5 libraries]),
1178 with_krb5_libs="$withval", with_krb5_libs="$with_krb5/lib")
1180 AC_ARG_WITH(krb5-includes,
1181 AC_HELP_STRING( [--with-krb5-includes=DIR],
1182 [Location of Kerberos 5 headers]),
1183 with_krb5_includes="$withval", with_krb5_includes="")
1186 AC_HELP_STRING( [--with-krb4=DIR],
1187 [Location of Kerberos 4 install dir]),
1188 with_krb4="$withval", with_krb4="no")
1190 AC_ARG_WITH(krb4-libs,
1191 AC_HELP_STRING( [--with-krb4-libs=DIR],
1192 [Location of Kerberos 4 libraries]),
1193 with_krb4_libs="$withval", with_krb4_libs="$with_krb4/lib")
1195 AC_ARG_WITH(krb4-includes,
1196 AC_HELP_STRING( [--with-krb4-includes=DIR],
1197 [Location of Kerberos 4 headers]),
1198 with_krb4_includes="$withval", with_krb4_includes="")
1201 if test "x${with_krb5}" != "xno"; then
1204 mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
1205 heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
1206 sunlibs="-lkrb5 -lgss"
1207 AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5,
1209 LIBS="$LIBS -L$with_krb5_libs $mitlibs"
1210 AC_TRY_LINK([#include <krb5.h>],krb5_init_context, ac_cv_lib_kerberos5="$mitlibs",
1212 LIBS="$LIBS_save -L$with_krb5_libs $heimlibs"
1213 AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs",
1215 LIBS="$LIBS_save -L$with_krb5_libs $sunlibs"
1216 AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$sunlibs", ac_cv_lib_kerberos5="no")
1221 if test "$ac_cv_lib_kerberos5" != "no"; then
1222 AC_DEFINE(HAVE_KRB5,1,[Define if you have Krb5])
1223 if test "$ac_cv_lib_kerberos5" = "$mitlibs"; then
1224 AC_DEFINE(HAVE_MIT_KRB5,1,[Define if you have MIT Krb5])
1225 if test -z "$with_krb5_includes"; then
1226 KRB5_CFLAGS="-I$with_krb5/include"
1228 KRB5_CFLAGS="-I$with_krb5_includes"
1230 msg_krb5="yes (MIT)"
1232 if test "$ac_cv_lib_kerberos5" = "$heimlibs"; then
1233 AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal])
1234 if test -z "$with_krb5_includes"; then
1235 KRB5_CFLAGS="-I$with_krb5/include/heimdal"
1237 KRB5_CFLAGS="-I$with_krb5_includes"
1239 msg_krb5="yes (Heimdal)"
1241 AC_DEFINE(HAVE_SUN_KRB5,1,[Define if you have Sun Kerberosv5])
1242 if test -z "$with_krb5_includes"; then
1243 KRB5_CFLAGS="-I$with_krb5/include/kerberosv5"
1245 KRB5_CFLAGS="-I$with_krb5_includes"
1247 msg_krb5="yes (Sun)"
1250 KRB5_LDFLAGS="-L$with_krb5_libs $ac_cv_lib_kerberos5"
1251 AC_MSG_RESULT(msg_krb5)
1253 dnl AC_MSG_CHECKING([for Kerberos 5])
1255 AC_MSG_ERROR([You specified with krb5, but it was not found.])
1258 AC_MSG_WARN([krb5 support disabled])
1261 AM_CONDITIONAL(ENABLE_KRB5, test x$with_krb5 != xno)
1263 AC_CHECK_HEADER([et/com_err.h],[AC_DEFINE([HAVE_ET_COM_ERR_H], 1, [Have et/comm_err.h])])
1264 AC_CHECK_HEADER([com_err.h],[AC_DEFINE([HAVE_COM_ERR_H], 1, [Have comm_err.h])])
1267 if test "x${with_krb4}" != "xno"; then
1268 LDFLAGS_save="$LDFLAGS"
1269 AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4,
1271 ac_cv_lib_kerberos4="no"
1273 mitcompatlibs="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
1274 # Look for MIT krb5 compat krb4
1275 LDFLAGS="$LDFLAGS -L$with_krb4_libs $mitcompatlibs"
1276 AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="$mitcompatlibs")
1278 if test "$ac_cv_lib_kerberos4" = "no"; then
1280 LDFLAGS="$LDFLAGS_save -L$with_krb4_libs -lkrb -lcrypto -lcom_err -lroken"
1281 AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken")
1283 if test "$ac_cv_lib_kerberos4" = "no"; then
1284 # Look for old MIT krb4
1285 LDFLAGS="$LDFLAGS_save -L$with_krb4_libs -lkrb"
1286 AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb",
1288 LDFLAGS="$LDFLAGS -ldes"
1289 AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -ldes")
1293 LDFLAGS="$LDFLAGS_save"
1294 if test "$ac_cv_lib_kerberos4" != "no"; then
1295 AC_DEFINE(HAVE_KRB4,1,[Define if you have Krb4])
1298 if test -z "$with_krb4_includes"; then
1299 if test -f "$with_krb4/include/krb.h" -o -f "$with_krb4/include/port-sockets.h"; then
1300 KRB4_CFLAGS="-I$with_krb4/include"
1302 if test -d "$with_krb4/include/kerberosIV"; then
1303 KRB4_CFLAGS="$KRB4_CFLAGS -I$with_krb4/include/kerberosIV"
1306 KRB4_CFLAGS="-I$with_krb4_includes"
1308 KRB4_LDFLAGS="-L$with_krb4_libs $ac_cv_lib_kerberos4"
1310 CFLAGS_save="$CFLAGS"
1311 CFLAGS="$CFLAGS $KRB4_CFLAGS"
1312 AC_TRY_COMPILE([#include "krb.h"
1314 ],[return 0],[AC_DEFINE(NEED_KRB_SENDAUTH_PROTO,1,[Need krb_sendauth proto])],)
1315 CFLAGS="$CFLAGS_save"
1318 AC_MSG_CHECKING(for Kerberos 4)
1319 AC_MSG_RESULT(${with_krb4})
1322 AC_SUBST(KRB5_CFLAGS)
1323 AC_SUBST(KRB5_LDFLAGS)
1324 AC_SUBST(KRB4_CFLAGS)
1325 AC_SUBST(KRB4_LDFLAGS)
1332 dnl **************************************************
1334 dnl **************************************************
1335 AC_ARG_WITH(e2k-debug,
1336 AC_HELP_STRING( [--with-e2k-debug],
1342 AC_DEFINE(E2K_DEBUG, 1, [Define if you want E2K_DEBUG to be available])
1346 dnl **************************************************
1348 dnl **************************************************
1349 if test "$os_win32" != yes; then
1351 case $with_openldap in
1356 case $with_static_ldap in
1358 msg_ldap="$with_openldap (static)"
1361 msg_ldap="$with_openldap (dynamic)"
1366 dnl **************************************************
1367 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1368 dnl **************************************************
1369 if test "$with_openldap" = no ; then
1370 EVO_SUNLDAP_CHECK(no)
1371 case $with_sunldap in
1376 case $with_static_sunldap in
1378 msg_ldap="$with_sunldap (static)"
1381 msg_ldap="$with_sunldap (dynamic)"
1388 AM_CONDITIONAL(SUNLDAP, test "$with_sunldap" != no)
1390 SAVE_CFLAGS="$CFLAGS"
1392 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1393 CFLAGS="$CFLAGS $LDAP_CFLAGS"
1394 LIBS="$LIBS $LDAP_LIBS"
1395 AC_CHECK_FUNCS(ldap_ntlm_bind)
1396 CFLAGS="$SAVE_CFLAGS"
1398 dnl You need to enable LDAP and Kerberos to enable Exchange support in e-d-s
1401 if test "$msg_ldap" != "no" ; then
1402 if test "$ac_cv_func_ldap_ntlm_bind" != no ; then
1405 dnl The user wanted to build with openldap, but his openldap did not have NTLM
1406 dnl support. Make him aware of this with a warning message at the end.
1411 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1412 LDAP_LIBS="-lwldap32"
1413 AC_SUBST(LDAP_CFLAGS)
1415 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1416 AM_CONDITIONAL(ENABLE_LDAP, true)
1417 AM_CONDITIONAL(SUNLDAP, false)
1423 LIBBONOBO_REQUIRED=libbonobo_minimum_version
1424 AC_SUBST(LIBBONOBO_REQUIRED)
1426 ORBIT_REQUIRED=ORBit_minimum_version
1427 AC_SUBST(ORBIT_REQUIRED)
1429 dnl *******************
1430 dnl GObject marshalling
1431 dnl *******************
1434 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1435 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1436 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1438 dnl **************************************************
1439 dnl * Posix thread support
1440 dnl **************************************************
1442 dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
1443 dnl GNOME_PTHREAD_CHECK
1445 dnl if test "x$PTHREAD_LIB" = "x" ; then
1446 dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
1450 dnl Notice that this is a hack, and we wont be able to use this forever, but
1451 dnl at least for some time
1456 THREADS_LIBS="$PTHREAD_LIB"
1457 THREADS_CFLAGS="$PTHREAD_CFLAGS"
1459 AC_SUBST(THREADS_LIBS)
1460 AC_SUBST(THREADS_CFLAGS)
1461 AC_DEFINE(ENABLE_THREADS,1,[Required])
1463 PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= ORBit_minimum_version)
1464 test x$ORBIT_IDL = x && ORBIT_IDL=`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`
1465 AC_SUBST(ORBIT_CFLAGS)
1466 AC_SUBST(ORBIT_LIBS)
1469 AC_MSG_CHECKING(for CORBA include paths)
1470 IDL_INCLUDES="-I"`pkg-config --variable=idldir libbonobo-2.0`" -I"`pkg-config --variable=idldir bonobo-activation-2.0`
1471 AC_MSG_RESULT($IDL_INCLUDES)
1472 AC_SUBST(IDL_INCLUDES)
1474 dnl Utility macro to set compiler flags for a specific lib.
1475 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1476 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1477 PKG_CHECK_MODULES([$1], [$2])
1478 $1_CFLAGS="[$]$1_CFLAGS $3 "
1479 $1_LIBS="[$]$1_LIBS $4 "
1482 dnl ****************************************
1483 dnl Flags for the various libraries we build
1484 dnl ****************************************
1486 dnl --- libedataserver, libedataserverui, libebackend flags
1488 E_DATA_SERVER_DEPS="libxml-2.0 libbonobo-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1490 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
1491 AC_SUBST(E_DATA_SERVER_CFLAGS)
1492 AC_SUBST(E_DATA_SERVER_LIBS)
1494 E_DATA_SERVER_UI_DEPS="gtk+-2.0 libglade-2.0 gobject-2.0 gthread-2.0 gconf-2.0 $GNOME_KEYRING_REQUIREMENT"
1496 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, $THREADS_CFLAGS, $THREADS_LIBS)
1497 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1498 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1500 E_BACKEND_DEPS="gobject-2.0 libxml-2.0 gmodule-2.0"
1502 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1503 AC_SUBST(E_BACKEND_CFLAGS)
1504 AC_SUBST(E_BACKEND_LIBS)
1506 dnl --- evolution-addressbook flags
1508 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 libbonobo-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
1510 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1511 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1512 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1514 dnl --- evolution-calendar flags
1515 if test "x${enable_calendar}" = "xyes"; then
1516 EVOLUTION_CALENDAR_DEPS="libical >= libical_minimum_version libxml-2.0 libbonobo-2.0 gio-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
1519 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1520 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1521 dnl to differentiate between <libical/ical.h> and <ical.h>
1522 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1523 dnl libical is fixed, we have to work-around the buggy CFlags.
1525 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1526 LIBICAL_EXTRA_LIBS=""
1527 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1528 AC_SUBST(LIBICAL_EXTRA_LIBS)
1530 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1531 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1532 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1535 dnl --- factory flags
1537 E_FACTORY_DEPS="$mozilla_nspr"
1538 if test "x${enable_calendar}" = "xyes"; then
1539 E_FACTORY_DEPS="$E_FACTORY_DEPS libical"
1541 EVO_SET_COMPILE_FLAGS(E_FACTORY, $E_FACTORY_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS $LIBICAL_EXTRA_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS $LIBICAL_EXTRA_LIBS)
1542 AC_SUBST(E_FACTORY_CFLAGS)
1543 AC_SUBST(E_FACTORY_LIBS)
1545 dnl --- Google flags
1546 GDATA_DEPS="libsoup-2.4 libxml-2.0"
1547 EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
1548 AC_SUBST(GDATA_CFLAGS)
1549 AC_SUBST(GDATA_LIBS)
1551 dnl --- Groupwise flags
1552 LIBSOUP_REQUIRED=libsoup_minimum_version
1553 AC_SUBST(LIBSOUP_REQUIRED)
1555 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1556 AC_SUBST(SOUP_CFLAGS)
1560 SQLITE_REQUIRED=sqlite_minimum_version
1561 AC_SUBST(SQLITE_REQUIRED)
1564 dnl deflateInit is a #define, use deflateEnd instead
1565 AC_CHECK_LIB(z, deflateEnd,
1566 [ AC_CHECK_HEADER(zlib.h, zlib_found=true) ])
1567 if test "x$zlib_found" = "xfalse"; then
1568 AC_MSG_ERROR([*** zlib is required])
1571 dnl *************************************
1572 dnl *** Checks for large file support ***
1573 dnl *************************************
1574 AC_ARG_ENABLE(largefile,
1575 AC_HELP_STRING([--enable-largefile],
1576 [enable support for large files [[default=no]]]),,
1577 enable_largefile="no")
1578 if test "x$enable_largefile" != "xno"; then
1580 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], ac_cv_largefile64_source,
1583 #include <sys/types.h>
1584 #include <sys/stat.h>
1587 int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644);
1589 ac_cv_largefile64_source="no"
1592 #define _LARGEFILE64_SOURCE
1593 #include <sys/types.h>
1594 #include <sys/stat.h>
1597 int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644);
1599 ac_cv_largefile64_source="yes"
1601 ac_cv_largefile64_source="unknown"
1606 enable_largefile="no"
1608 if test "x$ac_cv_largefile64_source" = "xyes"; then
1609 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1610 enable_largefile="yes"
1611 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1612 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1615 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1616 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1617 enable_largefile="yes"
1620 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1621 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1622 enable_largefile="yes"
1625 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1629 AM_CONDITIONAL(ENABLE_LARGEFILE, test "x$enable_largefile" = "xyes")
1631 EVO_SET_COMPILE_FLAGS(CAMEL, $mozilla_nss gio-2.0 sqlite3 >= sqlite_minimum_version gthread-2.0,
1632 $THREADS_CFLAGS $KRB4_CFLAGS $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS,
1633 -lz $THREADS_LIBS $KRB4_LDFLAGS $KRB5_LDFLAGS $MANUAL_NSS_LIBS)
1634 AC_SUBST(CAMEL_CFLAGS)
1635 AC_SUBST(CAMEL_LIBS)
1636 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1637 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1639 dnl *******************
1640 dnl Special directories
1641 dnl *******************
1643 dnl --- If you add something here, consider whether or not you also
1644 dnl --- need to add it to one or more .pc.in files (for Connector,
1647 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1648 AC_SUBST(privdatadir)
1650 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1651 AC_SUBST(privincludedir)
1653 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1654 AC_SUBST(privlibdir)
1656 idldir='${datadir}'/idl/evolution-data-server-$API_VERSION
1659 imagesdir='${datadir}'/pixmaps/evolution-data-server
1662 serverdir="$libdir/bonobo/servers"
1665 extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
1666 AC_SUBST(extensiondir)
1668 gladedir="$privdatadir/glade"
1671 if test $use_gweather = yes; then
1672 weatherdatadir="$privdatadir/weather"
1673 AC_SUBST(weatherdatadir)
1676 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1677 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
1678 AC_SUBST(camel_providerdir)
1680 dnl ************************
1681 dnl IDL/Component Versioning
1682 dnl ************************
1684 INTERFACE_VERSION="$BASE_VERSION"
1685 AC_SUBST(INTERFACE_VERSION)
1686 AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "$INTERFACE_VERSION", [IDL interface version (Major.Minor)])
1688 EVO_SUBST_SERVER_RULE='%.server.in: %.server.in.in ; sed -e "s|\@BINDIR\@|$(bindir)|" -e "s|\@LIBEXECDIR_IN_SERVER_FILE\@|$(LIBEXECDIR_IN_SERVER_FILE)|" -e "s|\@COMPONENTDIR\@|$(componentdir)|" -e "s|\@IMPORTERSDIR\@|$(importersdir)|" -e "s|\@EXEEXT\@|$(EXEEXT)|" -e "s|\@VERSION\@|$(BASE_VERSION)|" -e "s|\@API_VERSION\@|$(API_VERSION)|" -e "s|\@INTERFACE_VERSION\@|$(INTERFACE_VERSION)|" $< > $@'
1689 EVO_NAME_SERVER_RULE='%_$(API_VERSION).server: %.server ; mv $< $@'
1690 AC_SUBST(EVO_SUBST_SERVER_RULE)
1691 AC_SUBST(EVO_NAME_SERVER_RULE)
1696 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1704 dnl ******************************
1706 dnl ******************************
1709 export privincludedir
1712 if test $dynamic_libdb = no; then
1713 AC_CONFIG_SUBDIRS(libdb/dist)
1717 evolution-data-server-zip
1718 evolution-data-server.pc
1719 addressbook/Makefile
1720 addressbook/idl/Makefile
1721 addressbook/libebook/Makefile
1722 addressbook/libebook/libebook.pc
1723 addressbook/libedata-book/Makefile
1724 addressbook/libedata-book/libedata-book.pc
1725 addressbook/backends/Makefile
1726 addressbook/backends/file/Makefile
1727 addressbook/backends/vcf/Makefile
1728 addressbook/backends/ldap/Makefile
1729 addressbook/backends/google/Makefile
1730 addressbook/backends/groupwise/Makefile
1731 addressbook/backends/webdav/Makefile
1732 addressbook/tests/Makefile
1733 addressbook/tests/ebook/Makefile
1734 addressbook/tests/vcard/Makefile
1737 calendar/idl/Makefile
1738 calendar/libecal/Makefile
1739 calendar/libecal/libecal.pc
1740 calendar/libedata-cal/Makefile
1741 calendar/libedata-cal/libedata-cal.pc
1742 calendar/backends/Makefile
1743 calendar/backends/caldav/Makefile
1744 calendar/backends/file/Makefile
1745 calendar/backends/groupwise/Makefile
1746 calendar/backends/http/Makefile
1747 calendar/backends/contacts/Makefile
1748 calendar/backends/weather/Makefile
1749 calendar/backends/google/Makefile
1750 calendar/tests/Makefile
1751 calendar/tests/ecal/Makefile
1753 camel/providers/Makefile
1754 camel/providers/groupwise/Makefile
1755 camel/providers/hula/Makefile
1756 camel/providers/imap/Makefile
1757 camel/providers/imapp/Makefile
1758 camel/providers/imap4/Makefile
1759 camel/providers/local/Makefile
1760 camel/providers/nntp/Makefile
1761 camel/providers/pop3/Makefile
1762 camel/providers/sendmail/Makefile
1763 camel/providers/smtp/Makefile
1764 camel/tests/Makefile
1765 camel/tests/folder/Makefile
1766 camel/tests/lib/Makefile
1767 camel/tests/message/Makefile
1768 camel/tests/mime-filter/Makefile
1769 camel/tests/misc/Makefile
1770 camel/tests/smime/Makefile
1771 camel/tests/stream/Makefile
1773 camel/camel-provider.pc
1775 libebackend/Makefile
1776 libebackend/libebackend.pc
1777 libedataserver/Makefile
1778 libedataserver/eds-version.h
1779 libedataserver/libedataserver.pc
1780 libedataserverui/Makefile
1781 libedataserverui/libedataserverui.pc
1783 servers/groupwise/Makefile
1784 servers/groupwise/libegroupwise.pc
1785 servers/exchange/Makefile
1786 servers/exchange/xntlm/Makefile
1787 servers/exchange/lib/Makefile
1788 servers/exchange/storage/Makefile
1789 servers/exchange/storage/libexchange-storage.pc
1790 servers/google/Makefile
1791 servers/google/libgdata/Makefile
1792 servers/google/libgdata/libgdata.pc
1793 servers/google/libgdata-google/Makefile
1794 servers/google/libgdata-google/libgdata-google.pc
1798 docs/reference/Makefile
1799 docs/reference/addressbook/Makefile
1800 docs/reference/addressbook/libebook/Makefile
1801 docs/reference/addressbook/libedata-book/Makefile
1802 docs/reference/calendar/Makefile
1803 docs/reference/calendar/libecal/Makefile
1804 docs/reference/calendar/libedata-cal/Makefile
1805 docs/reference/camel/Makefile
1806 docs/reference/libedataserver/Makefile
1807 docs/reference/libedataserverui/Makefile
1808 docs/reference/libebackend/Makefile
1814 # Override the old libtool in libdb/dist with the one from here
1815 cp libtool libdb/dist
1820 evolution-data-server has been configured as follows:
1821 Calendar: $msg_calendar
1822 Weather calendar: $use_gweather
1823 Mail Directory: $system_mail_dir, $system_mail_perm
1824 LDAP support: $msg_ldap"
1825 if test "$msg_nntp" = "yes"; then
1827 NNTP support: $msg_nntp"
1829 if test "$msg_hula" = "yes"; then
1831 Hula support: $msg_hula"
1834 Kerberos 4/5: $msg_krb4/$msg_krb5
1835 Gnome Keyring: $enable_gnome_keyring/$with_gnome_keyring
1836 SSL support: $msg_ssl
1837 SMIME support: $msg_smime
1838 IPv6 support: $msg_ipv6
1839 Berkeley DB: $msg_libdb
1840 Exchange support: $msg_exchange
1841 Dot Locking: $msg_dot
1842 File Locking: $msg_file
1843 Large files: $largefile_support
1844 Gtk Doc: $enable_gtk_doc
1846 if test "$msg_no_ntlm" != "no" ; then
1849 No NTLM support in OpenLDAP; Plaintext password authentication will be
1850 used when connecting to the Exchange Global Catalog server. Consider
1851 installing the evo-openldap package, or building OpenLDAP with the
1852 patch in servers/exchange/docs/openldap-ntlm.diff