1 dnl Evolution-Data-Server version
2 m4_define([eds_major_version], [2])
3 m4_define([eds_minor_version], [29])
4 m4_define([eds_micro_version], [1])
6 m4_define([eds_version],
7 [eds_major_version.eds_minor_version.eds_micro_version])
9 dnl Base Version: This is for API/version tracking for things like
10 dnl Bonobo server files. This should always be the major/minor of
11 dnl the stable version or stable version to be. Note, this is set
12 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
14 m4_define([base_version], [2.30])
16 dnl This number is meaningless, but we're now stuck with it in our
17 dnl library names for backward compatibility.
18 m4_define([api_version], [1.2])
20 dnl Autoconf / Automake Initialization
22 AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
23 AM_INIT_AUTOMAKE([gnu 1.9 tar-ustar])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_SRCDIR(README)
26 AC_CONFIG_HEADERS(config.h)
28 dnl This is for the autoconf tests only - it set's the language we use
31 dnl Automake 1.11 - Silent Build Rules
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 dnl Required Package Versions
35 m4_define([glib_minimum_version], [2.16.1])
36 m4_define([gtk_minimum_version], [2.14.0])
37 m4_define([gconf_minimum_version], [2.0.0]) dnl XXX Just a Guess
38 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
39 m4_define([libsoup_minimum_version], [2.3.0])
40 m4_define([gnome_keyring_minimum_version], [2.20.1])
41 m4_define([sqlite_minimum_version], [3.5])
42 m4_define([gweather_minimum_version], [2.25.4])
43 m4_define([libical_minimum_version], [0.43])
44 m4_define([dbus_glib_minimum_version], [0.6])
46 AC_SUBST([BASE_VERSION],[base_version])
47 AC_SUBST([API_VERSION],[api_version])
48 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
49 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
51 EDS_MAJOR_VERSION=eds_major_version
52 EDS_MINOR_VERSION=eds_minor_version
53 EDS_MICRO_VERSION=eds_micro_version
55 dnl ******************************
56 dnl Libtool versioning
57 dnl ******************************
58 LIBEDATASERVER_CURRENT=11
59 LIBEDATASERVER_REVISION=1
62 LIBEDATASERVERUI_CURRENT=9
63 LIBEDATASERVERUI_REVISION=1
64 LIBEDATASERVERUI_AGE=1
71 LIBEDATACAL_REVISION=2
74 LIBEDATABOOK_CURRENT=6
75 LIBEDATABOOK_REVISION=1
82 LIBEGROUPWISE_CURRENT=13
83 LIBEGROUPWISE_REVISION=1
90 LIBEXCHANGE_STORAGE_CURRENT=3
91 LIBEXCHANGE_STORAGE_REVISION=0
92 LIBEXCHANGE_STORAGE_AGE=0
98 LIBGDATA_GOOGLE_CURRENT=1
99 LIBGDATA_GOOGLE_REVISION=0
100 LIBGDATA_GOOGLE_AGE=0
102 LIBEBACKEND_CURRENT=0
103 LIBEBACKEND_REVISION=1
106 AC_SUBST(EDS_MAJOR_VERSION)
107 AC_SUBST(EDS_MINOR_VERSION)
108 AC_SUBST(EDS_MICRO_VERSION)
109 AC_SUBST(LIBEDATASERVER_CURRENT)
110 AC_SUBST(LIBEDATASERVER_REVISION)
111 AC_SUBST(LIBEDATASERVER_AGE)
112 AC_SUBST(LIBEDATASERVERUI_CURRENT)
113 AC_SUBST(LIBEDATASERVERUI_REVISION)
114 AC_SUBST(LIBEDATASERVERUI_AGE)
115 AC_SUBST(LIBECAL_CURRENT)
116 AC_SUBST(LIBECAL_REVISION)
117 AC_SUBST(LIBECAL_AGE)
118 AC_SUBST(LIBEDATACAL_CURRENT)
119 AC_SUBST(LIBEDATACAL_REVISION)
120 AC_SUBST(LIBEDATACAL_AGE)
121 AC_SUBST(LIBEBOOK_CURRENT)
122 AC_SUBST(LIBEBOOK_REVISION)
123 AC_SUBST(LIBEBOOK_AGE)
124 AC_SUBST(LIBEDATABOOK_CURRENT)
125 AC_SUBST(LIBEDATABOOK_REVISION)
126 AC_SUBST(LIBEDATABOOK_AGE)
127 AC_SUBST(LIBEGROUPWISE_CURRENT)
128 AC_SUBST(LIBEGROUPWISE_REVISION)
129 AC_SUBST(LIBEGROUPWISE_AGE)
130 AC_SUBST(LIBCAMEL_CURRENT)
131 AC_SUBST(LIBCAMEL_REVISION)
132 AC_SUBST(LIBCAMEL_AGE)
133 AC_SUBST(LIBEXCHANGE_STORAGE_CURRENT)
134 AC_SUBST(LIBEXCHANGE_STORAGE_REVISION)
135 AC_SUBST(LIBEXCHANGE_STORAGE_AGE)
136 AC_SUBST(LIBGDATA_CURRENT)
137 AC_SUBST(LIBGDATA_REVISION)
138 AC_SUBST(LIBGDATA_AGE)
139 AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
140 AC_SUBST(LIBGDATA_GOOGLE_REVISION)
141 AC_SUBST(LIBGDATA_GOOGLE_AGE)
142 AC_SUBST(LIBEBACKEND_CURRENT)
143 AC_SUBST(LIBEBACKEND_REVISION)
144 AC_SUBST(LIBEBACKEND_AGE)
146 dnl **************************************
147 dnl Put the ACLOCAL flags in the Makefile
148 dnl **************************************
149 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
151 dnl ******************************
152 dnl Compiler Warning Flags
153 dnl ******************************
154 AS_COMPILER_FLAGS(WARNING_FLAGS,
155 "-DG_DISABLE_DEPRECATED
156 -DPANGO_DISABLE_DEPRECATED
157 -DGDK_DISABLE_DEPRECATED
158 -DGDK_PIXBUF_DISABLE_DEPRECATED
159 -DG_DISABLE_SINGLE_INCLUDES
160 -DGTK_DISABLE_SINGLE_INCLUDES
162 -Wno-missing-field-initializers
164 -Wno-unused-parameter
165 -Wdeclaration-after-statement
166 -Werror-implicit-function-declaration
167 -Wformat-security -Winit-self
168 -Wmissing-declarations -Wmissing-include-dirs
169 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
170 -Wredundant-decls -Wundef -Wwrite-strings")
171 AC_SUBST(WARNING_FLAGS)
173 dnl Other useful compiler warnings for test builds only.
174 dnl These may produce warnings we have no control over.
176 dnl -Wformat-nonliteral
177 dnl -Wmissing-format-attribute
179 CFLAGS="$CFLAGS $WARNING_FLAGS"
181 dnl ******************************
182 dnl Initialize maintainer mode
183 dnl ******************************
197 AC_MSG_ERROR([You need bison to build evolution-data-server])
201 dnl ******************************
202 dnl Test whether jw is installed
203 dnl ******************************
204 AC_PATH_PROG(JW,jw,no)
205 if test x$JW = xno; then
210 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
213 dnl ******************************
215 dnl ******************************
216 IT_PROG_INTLTOOL([0.35.5])
220 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
221 AC_SUBST(GETTEXT_PACKAGE)
222 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
224 localedir='$(prefix)/$(DATADIRNAME)/locale'
227 dnl ******************************
228 dnl Initialize libtool
229 dnl ******************************
231 LT_INIT(disable-static win32-dll)
235 dnl ******************************
237 dnl ******************************
238 AC_MSG_CHECKING([for Win32])
242 NO_UNDEFINED='-no-undefined'
243 SOCKET_LIBS='-lws2_32 -ldnsapi'
246 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
247 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
248 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
255 SOFTOKN3_LIB='-lsoftokn3'
256 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
259 AC_MSG_RESULT([$os_win32])
260 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
261 AC_SUBST(NO_UNDEFINED)
262 AC_SUBST(SOCKET_LIBS)
263 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
265 dnl **************************************
266 dnl Check for posix compatible sys/wait.h
267 dnl **************************************
270 dnl ************************************
271 dnl Check for posix compatible alloca()
272 dnl ************************************
275 dnl ******************************
276 dnl Checks for functions
277 dnl ******************************
278 AC_CHECK_FUNCS(fsync strptime strtok_r)
280 dnl ***********************************
281 dnl Check for base dependencies early.
282 dnl ***********************************
283 PKG_CHECK_MODULES(GNOME_PLATFORM,
284 [glib-2.0 >= glib_minimum_version
285 gtk+-2.0 >= gtk_minimum_version
286 gconf-2.0 >= gconf_minimum_version
287 libxml-2.0 >= libxml_minimum_version
288 libsoup-2.4 >= libsoup_minimum_version])
290 LIBICAL_REQUIRED=libical_minimum_version
291 AC_SUBST(LIBICAL_REQUIRED)
293 dnl ******************************
295 dnl ******************************
296 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
298 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
299 [AC_MSG_ERROR([No regex library found])])])
302 dnl ******************************
304 dnl ******************************
306 AS_HELP_STRING([--with-libdb=PREFIX],
307 [Prefix where libdb is installed]),
308 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
310 DB_CFLAGS="-I$libdb_prefix/include"
311 DB_LIBS="-L$libdb_prefix/lib -ldb"
313 AC_MSG_CHECKING([Berkeley DB])
314 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
315 save_libs=$LIBS; LIBS="$DB_LIBS"
316 AC_LINK_IFELSE([AC_LANG_PROGRAM(
318 [[db_create(NULL, NULL, 0)]])],
319 [AC_MSG_RESULT([yes])],
320 [AC_MSG_ERROR([Cannot find libdb])])
326 dnl ******************************
328 dnl ******************************
332 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
333 AC_LINK_IFELSE([AC_LANG_PROGRAM(
340 cd = iconv_open ("UTF-8", "ISO-8859-1");
342 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
344 if test $ac_cv_libiconv = yes; then
346 if test $os_win32 = yes; then
347 dnl Don't pointlessly auto-export the global symbols
348 dnl from a potentially static libiconv.a
349 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
354 AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
357 if test $have_iconv = yes; then
358 if test $ac_cv_libiconv = no; then
359 AC_CHECK_FUNCS(gnu_get_libc_version)
361 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
362 AC_RUN_IFELSE([AC_LANG_SOURCE([[
366 #ifdef HAVE_GNU_GET_LIBC_VERSION
367 #include <gnu/libc-version.h>
370 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
371 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
372 char *transbuf = malloc (10), *trans = transbuf;
374 size_t jp_len = strlen (jp), utf8_len = 10;
375 size_t utf8_real_len = strlen (utf8);
377 #ifdef HAVE_GNU_GET_LIBC_VERSION
378 /* glibc 2.1.2's iconv is broken in hard to test ways. */
379 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
383 cd = iconv_open ("UTF-8", "ISO-2022-JP");
384 if (cd == (iconv_t) -1)
386 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
388 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
392 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
395 if test "$have_iconv" = no; then
396 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
400 CFLAGS="$CFLAGS -I$srcdir"
402 AC_MSG_CHECKING([preferred charset name formats for system iconv])
403 AC_RUN_IFELSE([AC_LANG_SOURCE([[
405 #include "iconv-detect.c"
407 [AC_MSG_RESULT([found])],
408 [AC_MSG_RESULT([not found])
410 *** The iconv-detect program was unable to determine the
411 *** preferred charset name formats recognized by your
412 *** iconv library. It is suggested that you install a
413 *** working iconv library such as the one found at
414 *** ftp://ftp.gnu.org/pub/gnu/libiconv
416 [if test x$os_win32 = xyes; then
417 AC_MSG_RESULT([using known win32 result])
418 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
419 echo >>iconv-detect.h
420 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
421 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
422 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
424 AC_MSG_RESULT([unknown])
426 *** We can't determine the preferred charset name formats
427 *** recognized by your iconv library. You are
428 *** cross-compiling and supposed to know what you are doing.
429 *** Please construct the iconv-detect.h file manually.
434 CFLAGS="$save_CFLAGS"
437 dnl **********************************
438 dnl Check for nl_langinfo and CODESET
439 dnl **********************************
440 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
441 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
442 [[#include <langinfo.h>]],
443 [[char *codeset = nl_langinfo (CODESET);]]
444 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
445 if test x$ac_cv_langinfo_codeset = xyes; then
446 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
448 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
450 dnl *******************************************************
451 dnl Check to see if strftime supports the use of %l and %k
452 dnl *******************************************************
453 AC_MSG_CHECKING([for %l and %k support in strftime])
454 AC_RUN_IFELSE([AC_LANG_SOURCE(
455 [[ #include <stdlib.h>
458 int main(int argc, char **argv) {
464 timeinfo=localtime(&rawtime);
466 strftime(buf, 10, "%lx%k", timeinfo);
468 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
475 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
476 AC_MSG_RESULT([$ac_cv_lkstrftime])
478 dnl ********************************************************************************
479 dnl security extension support (SSL and S/MIME)
481 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
482 dnl needed by Camel (SSL and S/MIME).
484 dnl The Evolution security extensions are only built if these libraries are found
485 dnl ********************************************************************************
490 AS_HELP_STRING([--enable-ssl],
491 [Enable SSL support through Mozilla nss @<:@default=yes@:>@]),
492 [enable_ssl="$enableval"],[enable_ssl="yes"])
494 AC_ARG_ENABLE([smime],
495 AS_HELP_STRING([--enable-smime],
496 [Enable SMIME support through Mozilla nss @<:@default=yes,requires --enable-ssl@:>@ ]),
497 [enable_smime="$enableval"],[enable_smime="yes"])
499 AC_ARG_WITH([nspr-includes],
500 AS_HELP_STRING([--with-nspr-includes],
501 [Prefix of Mozilla nspr4 includes.]),
502 [with_nspr_includes="$withval"])
504 AC_ARG_WITH([nspr-libs],
505 AS_HELP_STRING([--with-nspr-libs],
506 [Prefix of Mozilla nspr4 libs.]),
507 [with_nspr_libs="$withval"])
509 AC_ARG_WITH([nss-includes],
510 AS_HELP_STRING([--with-nss-includes],
511 [Prefix of Mozilla nss3 includes.]),
512 [with_nss_includes="$withval"])
514 AC_ARG_WITH([nss-libs],
515 AS_HELP_STRING([--with-nss-libs],
516 [Prefix of Mozilla nss3 libs.]),
517 [with_nss_libs="$withval"])
519 if test "x${enable_ssl}" = "xyes"; then
520 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
526 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
527 if test "x${check_manually}" = "xno"; then
528 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
529 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
530 for pc in $mozilla_nspr_pcs; do
531 if $PKG_CONFIG --exists $pc; then
538 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
539 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
540 for pc in $mozilla_nss_pcs; do
541 if $PKG_CONFIG --exists $pc; then
548 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
550 if test "x$enable_smime" = "xyes"; then
551 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
554 AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
555 AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
556 MANUAL_NSPR_CFLAGS=""
567 if test "x${check_manually}" = "xyes"; then
568 dnl ******************
570 dnl ******************
571 AC_MSG_CHECKING([for Mozilla nspr4 includes])
572 CPPFLAGS_save="$CPPFLAGS"
573 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
575 AC_CHECK_HEADERS(nspr.h prio.h,
576 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
577 CPPFLAGS="$CPPFLAGS_save"
579 if test "x${moz_nspr_includes}" = "xyes"; then
580 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
582 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
584 AC_MSG_RESULT([$moz_nspr_includes])
586 AC_MSG_CHECKING([for Mozilla nspr libraries])
587 CFLAGS_save="$CFLAGS"
588 LDFLAGS_save="$LDFLAGS"
590 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
592 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
594 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
595 if test -n "${with_nspr_libs}"; then
596 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
601 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
602 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
604 CFLAGS="$CFLAGS_save"
605 LDFLAGS="$LDFLAGS_save"
608 if test -n "${moz_nspr_libs}"; then
609 if test -n "${with_nspr_libs}"; then
610 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
612 MANUAL_NSPR_LIBS="$nsprlibs"
615 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
617 AC_MSG_RESULT([$moz_nspr_libs])
619 dnl *****************
621 dnl *****************
622 AC_MSG_CHECKING([for Mozilla nss3 includes])
623 CPPFLAGS_save="$CPPFLAGS"
624 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
626 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
627 [moz_nss_includes="yes"],[moz_nss_includes="no"])
628 CPPFLAGS="$CPPFLAGS_save"
630 if test "x${moz_nss_includes}" = "xyes"; then
631 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
633 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
635 AC_MSG_RESULT($moz_nss_includes)
637 AC_MSG_CHECKING([for Mozilla nss libraries])
638 LDFLAGS_save="$LDFLAGS"
640 nsslibs="-lssl3 -lsmime3 -lnss3"
642 LIBS="$nsslibs $nsprlibs"
643 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
644 if test -n "${with_nss_libs}"; then
645 LDFLAGS="$LDFLAGS $-L$with_nss_libs"
647 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR"
650 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
651 [moz_nss_libs="yes"],[moz_nss_libs="no"])
652 LDFLAGS="$LDFLAGS_save"
655 if test "x${moz_nss_libs}" = "xyes"; then
659 if test "x${enable_smime}" = "xyes"; then
660 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
663 if test -n "${with_nss_libs}"; then
664 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
666 MANUAL_NSS_LIBS="$nsslibs"
669 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
671 AC_MSG_RESULT([$moz_nss_libs])
673 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
674 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
678 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
680 AC_SUBST(MANUAL_NSPR_CFLAGS)
681 AC_SUBST(MANUAL_NSPR_LIBS)
682 AC_SUBST(MANUAL_NSS_CFLAGS)
683 AC_SUBST(MANUAL_NSS_LIBS)
685 dnl ******************************
686 dnl system mail stuff
687 dnl ******************************
688 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
689 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
691 AC_MSG_CHECKING([system mail directory])
692 if test -d /var/mail -a '!' -h /var/mail ; then
693 system_mail_dir="/var/mail"
695 system_mail_dir="/var/spool/mail"
697 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
699 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
701 CAMEL_LOCK_HELPER_USER=""
702 CAMEL_LOCK_HELPER_GROUP=""
703 system_mail_perm="world writable"
706 CAMEL_LOCK_HELPER_USER=""
707 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
708 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
711 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
712 CAMEL_LOCK_HELPER_GROUP=""
713 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
716 CAMEL_LOCK_HELPER_USER=""
717 CAMEL_LOCK_HELPER_GROUP=""
718 system_mail_perm="???"
722 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
723 AC_SUBST(CAMEL_LOCK_HELPER_USER)
724 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
726 dnl ******************************
728 dnl ******************************
729 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
730 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
731 [[ #include <time.h> ]],
736 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
737 if test $ac_cv_struct_tm_gmtoff = yes; then
738 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
740 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
741 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
742 [[ #include <time.h> ]],
744 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
745 if test $ac_cv_var_timezone = yes; then
746 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
747 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
748 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
749 [[ #include <time.h> ]],
751 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
752 if test $ac_cv_var_altzone = yes; then
753 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
756 AC_MSG_ERROR([unable to find a way to determine timezone])
760 dnl ******************************
761 dnl ctime_r prototype
762 dnl ******************************
763 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
765 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
766 [[ #include <time.h> ]],
769 ctime_r (&date, buf, 100); ]]
770 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
773 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
774 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
777 dnl ******************************
778 dnl gethostbyname_r prototype
779 dnl ******************************
780 AC_CHECK_FUNCS(gethostbyname_r,[
781 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
783 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
785 #include "confdefs.h"
786 #include <sys/types.h>
787 #include <sys/socket.h>
788 #include <netinet/in.h>
790 #define BUFSIZE (sizeof(struct hostent)+10)
794 char buffer[BUFSIZE];
797 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
799 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
802 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
803 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
806 dnl ******************************
807 dnl gethostbyaddr_r prototype
808 dnl ******************************
809 AC_CHECK_FUNCS(gethostbyaddr_r,[
810 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
812 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
814 #include "confdefs.h"
815 #include <sys/types.h>
816 #include <sys/socket.h>
817 #include <netinet/in.h>
819 #define BUFSIZE (sizeof(struct hostent)+10)
823 char buffer[BUFSIZE];
826 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
827 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
830 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
831 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
834 dnl ******************************
835 dnl stat(v)fs location/type
836 dnl ******************************
837 AC_CHECK_HEADER([sys/statvfs.h],
838 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
839 [[ #if HAVE_SYS_STATVFS_H
840 #include <sys/statvfs.h>
843 AC_CHECK_FUNCS(statvfs)
845 AC_CHECK_HEADER([sys/param.h],
846 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
847 [[ #if HAVE_SYS_PARAM_H
848 #include <sys/param.h>
851 AC_CHECK_HEADER([sys/mount.h],
852 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
853 [[ #if HAVE_SYS_MOUNT_H
854 #include <sys/mount.h>
857 AC_CHECK_FUNCS(statfs)
859 dnl ******************************
860 dnl IPv6 support and getaddrinfo calls
861 dnl ******************************
862 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
864 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
865 [[ #include "confdefs.h"
866 #include <sys/types.h>
867 #include <sys/socket.h>
868 #include <netinet/in.h>
872 [[ #ifndef NI_MAXHOST
873 #define NI_MAXHOST 1025
877 #define NI_MAXSERV 32
880 struct addrinfo hints, *res;
881 struct sockaddr_in6 sin6;
883 char host[NI_MAXHOST];
884 char serv[NI_MAXSERV];
886 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
888 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
889 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
892 if test x"$ac_cv_have_addrinfo" = "xno" ; then
893 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
894 if test x"$enable_ipv6" = "xyes" ; then
895 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
899 AC_ARG_ENABLE([ipv6],
900 AS_HELP_STRING([--enable-ipv6=no/yes],
901 [Enable support for resolving IPv6 addresses.]),
902 [enable_ipv6=$enableval],[enable_ipv6=yes])
903 if test x"$enable_ipv6" = "xyes"; then
905 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
906 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
907 [[ #include "confdefs.h"
908 #include <sys/types.h>
909 #include <sys/socket.h>
910 #include <netinet/in.h>
913 [[ struct addrinfo hints;
914 hints.ai_flags = AI_ADDRCONFIG;
916 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
922 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
924 dnl ******************************
926 dnl ******************************
927 AC_MSG_CHECKING([if we should build the calendar])
928 AC_ARG_ENABLE([calendar],
929 AS_HELP_STRING([--enable-calendar=yes/no],
930 [Enable the calendar components (default yes)]),
931 [enable_calendar=$enableval], [enable_calendar=yes])
933 if test "x${enable_calendar}" != "xno"; then
934 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
936 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
937 AC_MSG_RESULT([$enable_calendar])
938 msg_calendar=$enable_calendar
940 dnl **********************************
941 dnl Weather calendar backend support
942 dnl **********************************
943 AC_MSG_CHECKING([if we should build the weather calendar backend])
944 AC_ARG_WITH([weather],
945 [AS_HELP_STRING([--with-weather],
946 [Build the weather calendar backend (default=yes)])],
947 [use_gweather=$withval], [use_gweather=yes])
948 if test "$enable_calendar" = "no"; then
949 use_gweather="no (calendar support is disabled)"
952 AC_MSG_RESULT([$use_gweather])
953 if test "$use_gweather" = "yes"; then
954 PKG_CHECK_MODULES([LIBGWEATHER], [gweather >= gweather_minimum_version],[],
955 [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.])])
957 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
959 dnl ******************************
961 dnl ******************************
962 AC_ARG_ENABLE([nntp],
963 AS_HELP_STRING([--enable-nntp],
964 [Build Usenet news (NNTP) backend]),
965 [enable_nntp=$enableval],[enable_nntp=yes])
966 if test "x$enable_nntp" = "xyes"; then
967 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
972 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
974 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
976 dnl ******************************
977 dnl IMAP4rev1 code support.
978 dnl ******************************
980 AS_HELP_STRING([--enable-imap4=no/yes],
981 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
982 [],[enable_imap4=no])
984 if test "x$enable_imap4" = "xyes"; then
985 AC_DEFINE(ENABLE_IMAP4,1,[Really don't try this at home])
990 AM_CONDITIONAL(ENABLE_IMAP4, [test x$enable_imap4 = xyes])
992 dnl ******************************
993 dnl IMAPX code support.
994 dnl ******************************
996 AS_HELP_STRING([--enable-imapx=no/yes],
997 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
998 [],[enable_imapx=no])
1000 if test "x$enable_imapx" = "xyes"; then
1001 AC_DEFINE(ENABLE_IMAPX,1,[Really don't try this at home])
1002 AC_PATH_PROG(GPERF, gperf)
1003 if test -z "$GPERF" ; then
1004 AC_MSG_ERROR([You need gperf to compile imapx provider])
1010 AM_CONDITIONAL(ENABLE_IMAPX, [test x$enable_imapx = xyes])
1012 dnl ******************************
1014 dnl ******************************
1015 AC_ARG_ENABLE([hula],
1016 AS_HELP_STRING([--enable-hula=no/yes],
1017 [Enable support for the now-defunct Hula project]),
1018 [],[enable_hula=no])
1020 if test "x$enable_hula" = "xyes"; then
1021 AC_DEFINE(ENABLE_HULA,1,[Build Hula backend])
1026 AM_CONDITIONAL(ENABLE_HULA, [test x$enable_hula = xyes])
1028 dnl ******************************
1030 dnl ******************************
1031 AC_ARG_ENABLE([dot-locking],
1032 AS_HELP_STRING([--enable-dot-locking=yes/no],
1033 [Enable support for locking mail files with dot locking]),
1034 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1036 if test $os_win32 != yes -a "x$enable_dot_locking" = "xyes"; then
1037 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1043 AC_ARG_ENABLE([file-locking],
1044 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1045 [Enable support for locking mail files with file locking]),
1046 [],[enable_file_locking=fcntl])
1048 if test $os_win32 != yes -a "x$enable_file_locking" = "xfcntl"; then
1049 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1052 if test $os_win32 != yes -a "x$enable_file_locking" = "xflock"; then
1053 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1060 dnl ******************************
1061 dnl sendmail operation
1062 dnl ******************************
1063 AC_MSG_CHECKING([for SunOS broken spool format])
1064 if test "x$host_os" = "xsunos" ; then
1065 with_broken_spool="yes"
1068 AC_ARG_WITH([broken-spool],
1069 AS_HELP_STRING([--with-broken-spool=yes/no],
1070 [Using SunOS/Solaris sendmail which has a broken spool format]),
1071 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1073 if test "x$with_broken_spool" = "xyes"; then
1074 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1077 AC_MSG_RESULT([$with_broken_spool])
1079 dnl ******************************
1081 dnl ******************************
1083 AS_HELP_STRING([--with-krb5=PATH],
1084 [Location of Kerberos 5 install dir]),
1085 [with_krb5="$withval"], [with_krb5="no"])
1087 AC_ARG_WITH([krb5-libs],
1088 AS_HELP_STRING([--with-krb5-libs=PATH],
1089 [Location of Kerberos 5 libraries]),
1090 [with_krb5_libs="$withval"], [with_krb5_libs="$with_krb5/lib"])
1092 AC_ARG_WITH([krb5-includes],
1093 AS_HELP_STRING([--with-krb5-includes=PATH],
1094 [Location of Kerberos 5 headers]),
1095 [with_krb5_includes="$withval"], [with_krb5_includes=""])
1097 dnl ******************************
1099 dnl ******************************
1101 if test "x${with_krb5}" != "xno"; then
1104 mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
1105 heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
1106 sunlibs="-lkrb5 -lgss"
1107 AC_CACHE_CHECK([for Kerberos 5], [ac_cv_lib_kerberos5],
1109 LIBS="$LIBS -L$with_krb5_libs $mitlibs"
1110 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1111 [ac_cv_lib_kerberos5="$mitlibs"],
1113 LIBS="$LIBS_save -L$with_krb5_libs $heimlibs"
1114 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1115 [ac_cv_lib_kerberos5="$heimlibs"],
1117 LIBS="$LIBS_save -L$with_krb5_libs $sunlibs"
1118 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1119 [ac_cv_lib_kerberos5="$sunlibs"], [ac_cv_lib_kerberos5="no"])
1124 if test "$ac_cv_lib_kerberos5" != "no"; then
1125 AC_DEFINE(HAVE_KRB5,1,[Define if you have Krb5])
1126 if test "$ac_cv_lib_kerberos5" = "$mitlibs"; then
1127 AC_DEFINE(HAVE_MIT_KRB5,1,[Define if you have MIT Krb5])
1128 if test -z "$with_krb5_includes"; then
1129 KRB5_CFLAGS="-I$with_krb5/include"
1131 KRB5_CFLAGS="-I$with_krb5_includes"
1133 msg_krb5="yes (MIT)"
1135 if test "$ac_cv_lib_kerberos5" = "$heimlibs"; then
1136 AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal])
1137 if test -z "$with_krb5_includes"; then
1138 KRB5_CFLAGS="-I$with_krb5/include/heimdal"
1140 KRB5_CFLAGS="-I$with_krb5_includes"
1142 msg_krb5="yes (Heimdal)"
1144 AC_DEFINE(HAVE_SUN_KRB5,1,[Define if you have Sun Kerberosv5])
1145 if test -z "$with_krb5_includes"; then
1146 KRB5_CFLAGS="-I$with_krb5/include/kerberosv5"
1148 KRB5_CFLAGS="-I$with_krb5_includes"
1150 msg_krb5="yes (Sun)"
1153 KRB5_LIBS="-L$with_krb5_libs $ac_cv_lib_kerberos5"
1154 AC_MSG_RESULT([msg_krb5])
1156 dnl AC_MSG_CHECKING([for Kerberos 5])
1158 AC_MSG_ERROR([You specified with krb5, but it was not found.])
1161 AC_MSG_WARN([krb5 support disabled])
1164 AM_CONDITIONAL(ENABLE_KRB5, [test x$with_krb5 != xno])
1166 AC_CHECK_HEADER([et/com_err.h],
1167 [AC_DEFINE([HAVE_ET_COM_ERR_H], 1, [Have <et/comm_err.h>])],,
1168 [[ #if HAVE_ET_COM_ERR_H
1169 #include <com_err.h>
1172 AC_CHECK_HEADER([com_err.h],
1173 [AC_DEFINE([HAVE_COM_ERR_H], 1, [Have <comm_err.h>])],,
1174 [[ #if HAVE_COM_ERR_H
1175 #include <com_err.h>
1179 AC_SUBST(KRB5_CFLAGS)
1182 dnl ******************************
1184 dnl ******************************
1187 dnl ******************************
1189 dnl ******************************
1190 AC_ARG_ENABLE([e2k-debug],
1191 AS_HELP_STRING([--enable-e2kdebug],
1193 [enable_e2kdebug=$enableval],[enable_e2kdebug="no"])
1195 if test "$enable_e2kdebug" = "yes"; then
1196 AC_DEFINE(E2K_DEBUG, 1, [Define if you want E2K_DEBUG to be available])
1199 dnl ******************************
1201 dnl ******************************
1202 if test "$os_win32" != yes; then
1204 case $with_openldap in
1209 case $with_static_ldap in
1211 msg_ldap="$with_openldap (static)"
1214 msg_ldap="$with_openldap (dynamic)"
1219 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1220 if test "$with_openldap" = no ; then
1221 EVO_SUNLDAP_CHECK(no)
1222 case $with_sunldap in
1227 case $with_static_sunldap in
1229 msg_ldap="$with_sunldap (static)"
1232 msg_ldap="$with_sunldap (dynamic)"
1239 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1241 SAVE_CFLAGS="$CFLAGS"
1243 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1244 CFLAGS="$CFLAGS $LDAP_CFLAGS"
1245 LIBS="$LIBS $LDAP_LIBS"
1246 AC_CHECK_FUNCS(ldap_ntlm_bind)
1247 CFLAGS="$SAVE_CFLAGS"
1249 dnl You need to enable LDAP and Kerberos to enable Exchange support in e-d-s
1252 if test "$msg_ldap" != "no" ; then
1253 if test "$ac_cv_func_ldap_ntlm_bind" != no ; then
1256 dnl The user wanted to build with openldap, but his openldap did not have NTLM
1257 dnl support. Make him aware of this with a warning message at the end.
1262 dnl Win32 LDAP support
1263 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1264 LDAP_LIBS="-lwldap32"
1265 AC_SUBST(LDAP_CFLAGS)
1267 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1268 AM_CONDITIONAL(ENABLE_LDAP, true)
1269 AM_CONDITIONAL(SUNLDAP, false)
1275 DBUS_GLIB_REQUIRED=dbus_glib_minimum_version
1276 AC_SUBST(DBUS_GLIB_REQUIRED)
1278 dnl ******************************
1279 dnl GObject marshalling
1280 dnl ******************************
1283 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1284 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1285 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1287 dnl ******************************
1288 dnl Posix thread support
1289 dnl ******************************
1291 dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
1292 dnl GNOME_PTHREAD_CHECK
1294 dnl if test "x$PTHREAD_LIB" = "x" ; then
1295 dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
1298 dnl Notice that this is a hack, and we wont be able to use this forever, but
1299 dnl at least for some time
1303 THREADS_LIBS="$PTHREAD_LIB"
1304 THREADS_CFLAGS="$PTHREAD_CFLAGS"
1306 AC_SUBST(THREADS_LIBS)
1307 AC_SUBST(THREADS_CFLAGS)
1308 AC_DEFINE(ENABLE_THREADS,1,[Required])
1310 dnl ******************************
1312 dnl ******************************
1313 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_minimum_version)
1314 AC_SUBST(DBUS_GLIB_CFLAGS)
1315 AC_SUBST(DBUS_GLIB_LIBS)
1317 dnl ***********************
1318 dnl Gnome keyring support
1319 dnl ***********************
1320 AC_ARG_ENABLE([gnome-keyring],
1321 AS_HELP_STRING([--enable-gnome-keyring],
1322 [Attempt to use Gnome Keyring for storing passwords @<:@default=yes@:>@]),
1323 [enable_gnome_keyring="$enableval"],[enable_gnome_keyring="yes"])
1325 if test "x${enable_gnome_keyring}" = "xyes"; then
1326 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= gnome_keyring_minimum_version, have_gnome_keyring="yes", have_gnome_keyring="no");
1327 if test "x${have_gnome_keyring}" = "xyes"; then
1328 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Gnome Keyring available])
1329 GNOME_KEYRING_REQUIREMENT="gnome-keyring-1"
1331 AC_MSG_ERROR([gnome-keyring >= gnome_keyring_minimum_version is required for gnome keyring support. Use --disable-gnome-keyring if you want to disable gnome-keyring support.])
1335 dnl ******************************
1336 dnl Utility macro to set compiler flags for a specific lib.
1337 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1338 dnl ******************************
1339 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1340 PKG_CHECK_MODULES([$1], [$2])
1341 $1_CFLAGS="[$]$1_CFLAGS $3 "
1342 $1_LIBS="[$]$1_LIBS $4 "
1345 dnl ******************************
1346 dnl libedataserver flags
1347 dnl ******************************
1348 E_DATA_SERVER_DEPS="libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1350 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
1351 AC_SUBST(E_DATA_SERVER_CFLAGS)
1352 AC_SUBST(E_DATA_SERVER_LIBS)
1354 dnl ******************************
1355 dnl libedataserverui
1356 dnl ******************************
1357 E_DATA_SERVER_UI_DEPS="gtk+-2.0 libxml-2.0 gobject-2.0 gthread-2.0 gconf-2.0 $GNOME_KEYRING_REQUIREMENT"
1359 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, $THREADS_CFLAGS, $THREADS_LIBS)
1360 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1361 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1363 E_BACKEND_DEPS="gobject-2.0 libxml-2.0 gmodule-2.0 gconf-2.0"
1365 dnl ******************************
1366 dnl libebackend flags
1367 dnl ******************************
1368 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1369 AC_SUBST(E_BACKEND_CFLAGS)
1370 AC_SUBST(E_BACKEND_LIBS)
1372 dnl ******************************
1373 dnl evolution-addressbook flags
1374 dnl ******************************
1375 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 dbus-glib-1 gobject-2.0 gthread-2.0 gconf-2.0"
1377 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1378 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1379 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1381 dnl ******************************
1382 dnl evolution-calendar flags
1383 dnl ******************************
1384 if test "x${enable_calendar}" = "xyes"; then
1385 EVOLUTION_CALENDAR_DEPS="libical >= libical_minimum_version libxml-2.0 dbus-glib-1 gio-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
1388 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1389 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1390 dnl to differentiate between <libical/ical.h> and <ical.h>
1391 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1392 dnl libical is fixed, we have to work-around the buggy CFlags.
1394 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1395 LIBICAL_EXTRA_LIBS=""
1396 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1397 AC_SUBST(LIBICAL_EXTRA_LIBS)
1399 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1400 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1401 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1404 dnl ******************************
1406 dnl ******************************
1407 GDATA_DEPS="libsoup-2.4 libxml-2.0"
1408 EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
1409 AC_SUBST(GDATA_CFLAGS)
1410 AC_SUBST(GDATA_LIBS)
1412 dnl ******************************
1414 dnl ******************************
1415 LIBSOUP_REQUIRED=libsoup_minimum_version
1416 AC_SUBST(LIBSOUP_REQUIRED)
1418 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1419 AC_SUBST(SOUP_CFLAGS)
1422 dnl ******************************
1424 dnl ******************************
1425 SQLITE_REQUIRED=sqlite_minimum_version
1426 AC_SUBST(SQLITE_REQUIRED)
1429 dnl deflateInit is a #define, use deflateEnd instead
1430 AC_CHECK_LIB(z, deflateEnd,
1431 [AC_CHECK_HEADER(zlib.h, zlib_found=true)])
1432 if test "x$zlib_found" = "xfalse"; then
1433 AC_MSG_ERROR([*** zlib is required])
1436 dnl ******************************
1437 dnl Checks for large file support
1438 dnl ******************************
1439 AC_ARG_ENABLE([largefile],
1440 AS_HELP_STRING([--enable-largefile],
1441 [enable support for large files [[default=no]]]),
1442 [],[enable_largefile="no"])
1444 if test "x$enable_largefile" != "xno"; then
1446 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1447 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1448 [[ #include <sys/types.h>
1449 #include <sys/stat.h>
1452 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1453 )],[ac_cv_largefile64_source="no"],
1454 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1455 [[ #define _LARGEFILE64_SOURCE
1456 #include <sys/types.h>
1457 #include <sys/stat.h>
1460 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1461 [ac_cv_largefile64_source="unknown"])])
1464 enable_largefile="no"
1466 if test "x$ac_cv_largefile64_source" = "xyes"; then
1467 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1468 enable_largefile="yes"
1469 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1470 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1473 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1474 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1475 enable_largefile="yes"
1478 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1479 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1480 enable_largefile="yes"
1483 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1487 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1489 EVO_SET_COMPILE_FLAGS(CAMEL, $mozilla_nss gio-2.0 sqlite3 >= sqlite_minimum_version gthread-2.0, $THREADS_CFLAGS $KRB4_CFLAGS $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS, -lz $THREADS_LIBS $KRB4_LIBS $KRB5_LIBS $MANUAL_NSS_LIBS)
1490 AC_SUBST(CAMEL_CFLAGS)
1491 AC_SUBST(CAMEL_LIBS)
1492 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1493 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1495 dnl ******************************
1496 dnl Special directories
1497 dnl ******************************
1499 dnl If you add something here, consider whether or not you also
1500 dnl need to add it to one or more .pc.in files (for Connector,
1503 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1504 AC_SUBST(privdatadir)
1506 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1507 AC_SUBST(privincludedir)
1509 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1510 AC_SUBST(privlibdir)
1512 imagesdir='${datadir}'/pixmaps/evolution-data-server
1515 extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
1516 AC_SUBST(extensiondir)
1518 uidir="$privdatadir/ui"
1521 if test $use_gweather = yes; then
1522 weatherdatadir="$privdatadir/weather"
1523 AC_SUBST(weatherdatadir)
1526 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1527 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
1528 AC_SUBST(camel_providerdir)
1530 dnl ******************************
1531 dnl IDL/Component Versioning
1532 dnl ******************************
1533 INTERFACE_VERSION="$BASE_VERSION"
1534 AC_SUBST(INTERFACE_VERSION)
1535 AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "$INTERFACE_VERSION", [IDL interface version (Major.Minor)])
1537 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)|" $< > $@'
1538 EVO_NAME_SERVER_RULE='%_$(API_VERSION).server: %.server ; mv $< $@'
1539 AC_SUBST(EVO_SUBST_SERVER_RULE)
1540 AC_SUBST(EVO_NAME_SERVER_RULE)
1542 dnl *******************
1543 dnl D-BUS service stuff
1544 dnl *******************
1545 EVO_SUBST_SERVICE_RULE='%.service: %.service.in Makefile ; sed -e "s|\@BINDIR\@|$(bindir)|" -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@COMPONENTDIR\@|$(componentdir)|" -e "s|\@IMPORTERSDIR\@|$(importersdir)|" -e "s|\@VERSION\@|$(BASE_VERSION)|" -e "s|\@INTERFACE_VERSION\@|$(INTERFACE_VERSION)|" $< > $@'
1546 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1548 dnl ******************************
1550 dnl ******************************
1551 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1554 dnl ******************************
1556 dnl ******************************
1559 dnl ******************************
1561 dnl ******************************
1563 export privincludedir
1568 evolution-data-server-zip
1569 evolution-data-server.pc
1570 addressbook/Makefile
1571 addressbook/libebook/Makefile
1572 addressbook/libebook/libebook.pc
1573 addressbook/libedata-book/Makefile
1574 addressbook/libedata-book/libedata-book.pc
1575 addressbook/backends/Makefile
1576 addressbook/backends/file/Makefile
1577 addressbook/backends/vcf/Makefile
1578 addressbook/backends/ldap/Makefile
1579 addressbook/backends/google/Makefile
1580 addressbook/backends/groupwise/Makefile
1581 addressbook/backends/webdav/Makefile
1582 addressbook/tests/Makefile
1583 addressbook/tests/ebook/Makefile
1584 addressbook/tests/vcard/Makefile
1587 calendar/libecal/Makefile
1588 calendar/libecal/libecal.pc
1589 calendar/libedata-cal/Makefile
1590 calendar/libedata-cal/libedata-cal.pc
1591 calendar/backends/Makefile
1592 calendar/backends/caldav/Makefile
1593 calendar/backends/file/Makefile
1594 calendar/backends/groupwise/Makefile
1595 calendar/backends/http/Makefile
1596 calendar/backends/contacts/Makefile
1597 calendar/backends/weather/Makefile
1598 calendar/backends/google/Makefile
1599 calendar/tests/Makefile
1600 calendar/tests/ecal/Makefile
1602 camel/providers/Makefile
1603 camel/providers/groupwise/Makefile
1604 camel/providers/hula/Makefile
1605 camel/providers/imap/Makefile
1606 camel/providers/imapx/Makefile
1607 camel/providers/imap4/Makefile
1608 camel/providers/local/Makefile
1609 camel/providers/nntp/Makefile
1610 camel/providers/pop3/Makefile
1611 camel/providers/sendmail/Makefile
1612 camel/providers/smtp/Makefile
1613 camel/tests/Makefile
1614 camel/tests/folder/Makefile
1615 camel/tests/lib/Makefile
1616 camel/tests/message/Makefile
1617 camel/tests/mime-filter/Makefile
1618 camel/tests/misc/Makefile
1619 camel/tests/smime/Makefile
1620 camel/tests/stream/Makefile
1622 camel/camel-provider.pc
1623 libebackend/Makefile
1624 libebackend/libebackend.pc
1625 libedataserver/Makefile
1626 libedataserver/eds-version.h
1627 libedataserver/libedataserver.pc
1628 libedataserverui/Makefile
1629 libedataserverui/libedataserverui.pc
1631 servers/groupwise/Makefile
1632 servers/groupwise/libegroupwise.pc
1633 servers/exchange/Makefile
1634 servers/exchange/xntlm/Makefile
1635 servers/exchange/lib/Makefile
1636 servers/exchange/storage/Makefile
1637 servers/exchange/storage/libexchange-storage.pc
1638 servers/google/Makefile
1639 servers/google/libgdata/Makefile
1640 servers/google/libgdata/libgdata.pc
1641 servers/google/libgdata-google/Makefile
1642 servers/google/libgdata-google/libgdata-google.pc
1645 docs/reference/Makefile
1646 docs/reference/addressbook/Makefile
1647 docs/reference/addressbook/libebook/Makefile
1648 docs/reference/addressbook/libedata-book/Makefile
1649 docs/reference/calendar/Makefile
1650 docs/reference/calendar/libecal/Makefile
1651 docs/reference/calendar/libedata-cal/Makefile
1652 docs/reference/camel/Makefile
1653 docs/reference/libedataserver/Makefile
1654 docs/reference/libedataserverui/Makefile
1655 docs/reference/libebackend/Makefile
1661 evolution-data-server has been configured as follows:
1662 Calendar: $msg_calendar
1663 Weather calendar: $use_gweather
1664 Mail Directory: $system_mail_dir, $system_mail_perm
1665 LDAP support: $msg_ldap
1666 NNTP support: $msg_nntp
1667 Kerberos 5: $msg_krb5
1668 Gnome Keyring: $enable_gnome_keyring
1669 SSL support: $msg_ssl
1670 SMIME support: $msg_smime
1671 IPv6 support: $msg_ipv6
1672 Exchange support: $msg_exchange
1673 Dot Locking: $msg_dot
1674 File Locking: $msg_file
1675 Large files: $enable_largefile
1676 Gtk Doc: $enable_gtk_doc
1678 if test "$msg_hula" = "yes"; then
1679 echo "Hula support: $msg_hula"
1682 if test "$msg_imapx" = "yes"; then
1684 IMAPX support: $msg_imapx
1688 if test "$msg_no_ntlm" != "no" ; then
1691 No NTLM support in OpenLDAP; Plaintext password authentication will be
1692 used when connecting to the Exchange Global Catalog server. Consider
1693 installing the evo-openldap package, or building OpenLDAP with the
1694 patch in servers/exchange/docs/openldap-ntlm.diff