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
94 LIBGDATA_GOOGLE_CURRENT=1
95 LIBGDATA_GOOGLE_REVISION=0
99 LIBEBACKEND_REVISION=1
102 AC_SUBST(EDS_MAJOR_VERSION)
103 AC_SUBST(EDS_MINOR_VERSION)
104 AC_SUBST(EDS_MICRO_VERSION)
105 AC_SUBST(LIBEDATASERVER_CURRENT)
106 AC_SUBST(LIBEDATASERVER_REVISION)
107 AC_SUBST(LIBEDATASERVER_AGE)
108 AC_SUBST(LIBEDATASERVERUI_CURRENT)
109 AC_SUBST(LIBEDATASERVERUI_REVISION)
110 AC_SUBST(LIBEDATASERVERUI_AGE)
111 AC_SUBST(LIBECAL_CURRENT)
112 AC_SUBST(LIBECAL_REVISION)
113 AC_SUBST(LIBECAL_AGE)
114 AC_SUBST(LIBEDATACAL_CURRENT)
115 AC_SUBST(LIBEDATACAL_REVISION)
116 AC_SUBST(LIBEDATACAL_AGE)
117 AC_SUBST(LIBEBOOK_CURRENT)
118 AC_SUBST(LIBEBOOK_REVISION)
119 AC_SUBST(LIBEBOOK_AGE)
120 AC_SUBST(LIBEDATABOOK_CURRENT)
121 AC_SUBST(LIBEDATABOOK_REVISION)
122 AC_SUBST(LIBEDATABOOK_AGE)
123 AC_SUBST(LIBEGROUPWISE_CURRENT)
124 AC_SUBST(LIBEGROUPWISE_REVISION)
125 AC_SUBST(LIBEGROUPWISE_AGE)
126 AC_SUBST(LIBCAMEL_CURRENT)
127 AC_SUBST(LIBCAMEL_REVISION)
128 AC_SUBST(LIBCAMEL_AGE)
129 AC_SUBST(LIBGDATA_CURRENT)
130 AC_SUBST(LIBGDATA_REVISION)
131 AC_SUBST(LIBGDATA_AGE)
132 AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
133 AC_SUBST(LIBGDATA_GOOGLE_REVISION)
134 AC_SUBST(LIBGDATA_GOOGLE_AGE)
135 AC_SUBST(LIBEBACKEND_CURRENT)
136 AC_SUBST(LIBEBACKEND_REVISION)
137 AC_SUBST(LIBEBACKEND_AGE)
139 dnl **************************************
140 dnl Put the ACLOCAL flags in the Makefile
141 dnl **************************************
142 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
144 dnl ******************************
145 dnl Compiler Warning Flags
146 dnl ******************************
147 AS_COMPILER_FLAGS(WARNING_FLAGS,
148 "-DG_DISABLE_DEPRECATED
149 -DPANGO_DISABLE_DEPRECATED
150 -DGDK_DISABLE_DEPRECATED
151 -DGDK_PIXBUF_DISABLE_DEPRECATED
152 -DG_DISABLE_SINGLE_INCLUDES
153 -DGTK_DISABLE_SINGLE_INCLUDES
155 -Wno-missing-field-initializers
157 -Wno-unused-parameter
158 -Wdeclaration-after-statement
159 -Werror-implicit-function-declaration
160 -Wformat-security -Winit-self
161 -Wmissing-declarations -Wmissing-include-dirs
162 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
163 -Wredundant-decls -Wundef -Wwrite-strings")
164 AC_SUBST(WARNING_FLAGS)
166 dnl Other useful compiler warnings for test builds only.
167 dnl These may produce warnings we have no control over.
169 dnl -Wformat-nonliteral
170 dnl -Wmissing-format-attribute
172 CFLAGS="$CFLAGS $WARNING_FLAGS"
174 dnl ******************************
175 dnl Initialize maintainer mode
176 dnl ******************************
190 AC_MSG_ERROR([You need bison to build evolution-data-server])
194 dnl ******************************
195 dnl Test whether jw is installed
196 dnl ******************************
197 AC_PATH_PROG(JW,jw,no)
198 if test x$JW = xno; then
203 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
206 dnl ******************************
208 dnl ******************************
209 IT_PROG_INTLTOOL([0.35.5])
213 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
214 AC_SUBST(GETTEXT_PACKAGE)
215 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
217 localedir='$(prefix)/$(DATADIRNAME)/locale'
220 dnl ******************************
221 dnl Initialize libtool
222 dnl ******************************
224 LT_INIT(disable-static win32-dll)
228 dnl ******************************
230 dnl ******************************
231 AC_MSG_CHECKING([for Win32])
235 NO_UNDEFINED='-no-undefined'
236 SOCKET_LIBS='-lws2_32 -ldnsapi'
239 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
240 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
241 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
248 SOFTOKN3_LIB='-lsoftokn3'
249 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
252 AC_MSG_RESULT([$os_win32])
253 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
254 AC_SUBST(NO_UNDEFINED)
255 AC_SUBST(SOCKET_LIBS)
256 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
258 dnl **************************************
259 dnl Check for posix compatible sys/wait.h
260 dnl **************************************
263 dnl ************************************
264 dnl Check for posix compatible alloca()
265 dnl ************************************
268 dnl ******************************
269 dnl Checks for functions
270 dnl ******************************
271 AC_CHECK_FUNCS(fsync strptime strtok_r)
273 dnl ***********************************
274 dnl Check for base dependencies early.
275 dnl ***********************************
276 PKG_CHECK_MODULES(GNOME_PLATFORM,
277 [glib-2.0 >= glib_minimum_version
278 gtk+-2.0 >= gtk_minimum_version
279 gconf-2.0 >= gconf_minimum_version
280 libxml-2.0 >= libxml_minimum_version
281 libsoup-2.4 >= libsoup_minimum_version])
283 LIBICAL_REQUIRED=libical_minimum_version
284 AC_SUBST(LIBICAL_REQUIRED)
286 dnl ******************************
288 dnl ******************************
289 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
291 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
292 [AC_MSG_ERROR([No regex library found])])])
295 dnl ******************************
297 dnl ******************************
299 AS_HELP_STRING([--with-libdb=PREFIX],
300 [Prefix where libdb is installed]),
301 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
303 DB_CFLAGS="-I$libdb_prefix/include"
304 DB_LIBS="-L$libdb_prefix/lib -ldb"
306 AC_MSG_CHECKING([Berkeley DB])
307 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
308 save_libs=$LIBS; LIBS="$DB_LIBS"
309 AC_LINK_IFELSE([AC_LANG_PROGRAM(
311 [[db_create(NULL, NULL, 0)]])],
312 [AC_MSG_RESULT([yes])],
313 [AC_MSG_ERROR([Cannot find libdb])])
319 dnl ******************************
321 dnl ******************************
325 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
326 AC_LINK_IFELSE([AC_LANG_PROGRAM(
333 cd = iconv_open ("UTF-8", "ISO-8859-1");
335 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
337 if test $ac_cv_libiconv = yes; then
339 if test $os_win32 = yes; then
340 dnl Don't pointlessly auto-export the global symbols
341 dnl from a potentially static libiconv.a
342 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
347 AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
350 if test $have_iconv = yes; then
351 if test $ac_cv_libiconv = no; then
352 AC_CHECK_FUNCS(gnu_get_libc_version)
354 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
355 AC_RUN_IFELSE([AC_LANG_SOURCE([[
359 #ifdef HAVE_GNU_GET_LIBC_VERSION
360 #include <gnu/libc-version.h>
363 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
364 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
365 char *transbuf = malloc (10), *trans = transbuf;
367 size_t jp_len = strlen (jp), utf8_len = 10;
368 size_t utf8_real_len = strlen (utf8);
370 #ifdef HAVE_GNU_GET_LIBC_VERSION
371 /* glibc 2.1.2's iconv is broken in hard to test ways. */
372 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
376 cd = iconv_open ("UTF-8", "ISO-2022-JP");
377 if (cd == (iconv_t) -1)
379 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
381 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
385 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
388 if test "$have_iconv" = no; then
389 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
393 CFLAGS="$CFLAGS -I$srcdir"
395 AC_MSG_CHECKING([preferred charset name formats for system iconv])
396 AC_RUN_IFELSE([AC_LANG_SOURCE([[
398 #include "iconv-detect.c"
400 [AC_MSG_RESULT([found])],
401 [AC_MSG_RESULT([not found])
403 *** The iconv-detect program was unable to determine the
404 *** preferred charset name formats recognized by your
405 *** iconv library. It is suggested that you install a
406 *** working iconv library such as the one found at
407 *** ftp://ftp.gnu.org/pub/gnu/libiconv
409 [if test x$os_win32 = xyes; then
410 AC_MSG_RESULT([using known win32 result])
411 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
412 echo >>iconv-detect.h
413 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
414 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
415 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
417 AC_MSG_RESULT([unknown])
419 *** We can't determine the preferred charset name formats
420 *** recognized by your iconv library. You are
421 *** cross-compiling and supposed to know what you are doing.
422 *** Please construct the iconv-detect.h file manually.
427 CFLAGS="$save_CFLAGS"
430 dnl **********************************
431 dnl Check for nl_langinfo and CODESET
432 dnl **********************************
433 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
434 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
435 [[#include <langinfo.h>]],
436 [[char *codeset = nl_langinfo (CODESET);]]
437 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
438 if test x$ac_cv_langinfo_codeset = xyes; then
439 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
441 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
443 dnl *******************************************************
444 dnl Check to see if strftime supports the use of %l and %k
445 dnl *******************************************************
446 AC_MSG_CHECKING([for %l and %k support in strftime])
447 AC_RUN_IFELSE([AC_LANG_SOURCE(
448 [[ #include <stdlib.h>
451 int main(int argc, char **argv) {
457 timeinfo=localtime(&rawtime);
459 strftime(buf, 10, "%lx%k", timeinfo);
461 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
468 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
469 AC_MSG_RESULT([$ac_cv_lkstrftime])
471 dnl ********************************************************************************
472 dnl security extension support (SSL and S/MIME)
474 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
475 dnl needed by Camel (SSL and S/MIME).
477 dnl The Evolution security extensions are only built if these libraries are found
478 dnl ********************************************************************************
483 AS_HELP_STRING([--enable-ssl],
484 [Enable SSL support through Mozilla nss @<:@default=yes@:>@]),
485 [enable_ssl="$enableval"],[enable_ssl="yes"])
487 AC_ARG_ENABLE([smime],
488 AS_HELP_STRING([--enable-smime],
489 [Enable SMIME support through Mozilla nss @<:@default=yes,requires --enable-ssl@:>@ ]),
490 [enable_smime="$enableval"],[enable_smime="yes"])
492 AC_ARG_WITH([nspr-includes],
493 AS_HELP_STRING([--with-nspr-includes],
494 [Prefix of Mozilla nspr4 includes.]),
495 [with_nspr_includes="$withval"])
497 AC_ARG_WITH([nspr-libs],
498 AS_HELP_STRING([--with-nspr-libs],
499 [Prefix of Mozilla nspr4 libs.]),
500 [with_nspr_libs="$withval"])
502 AC_ARG_WITH([nss-includes],
503 AS_HELP_STRING([--with-nss-includes],
504 [Prefix of Mozilla nss3 includes.]),
505 [with_nss_includes="$withval"])
507 AC_ARG_WITH([nss-libs],
508 AS_HELP_STRING([--with-nss-libs],
509 [Prefix of Mozilla nss3 libs.]),
510 [with_nss_libs="$withval"])
512 if test "x${enable_ssl}" = "xyes"; then
513 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
519 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
520 if test "x${check_manually}" = "xno"; then
521 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
522 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
523 for pc in $mozilla_nspr_pcs; do
524 if $PKG_CONFIG --exists $pc; then
531 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
532 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
533 for pc in $mozilla_nss_pcs; do
534 if $PKG_CONFIG --exists $pc; then
541 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
543 if test "x$enable_smime" = "xyes"; then
544 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
547 AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
548 AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
549 MANUAL_NSPR_CFLAGS=""
560 if test "x${check_manually}" = "xyes"; then
561 dnl ******************
563 dnl ******************
564 AC_MSG_CHECKING([for Mozilla nspr4 includes])
565 CPPFLAGS_save="$CPPFLAGS"
566 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
568 AC_CHECK_HEADERS(nspr.h prio.h,
569 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
570 CPPFLAGS="$CPPFLAGS_save"
572 if test "x${moz_nspr_includes}" = "xyes"; then
573 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
575 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
577 AC_MSG_RESULT([$moz_nspr_includes])
579 AC_MSG_CHECKING([for Mozilla nspr libraries])
580 CFLAGS_save="$CFLAGS"
581 LDFLAGS_save="$LDFLAGS"
583 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
585 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
587 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
588 if test -n "${with_nspr_libs}"; then
589 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
594 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
595 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
597 CFLAGS="$CFLAGS_save"
598 LDFLAGS="$LDFLAGS_save"
601 if test "x${moz_nspr_libs}" = "xyes"; then
602 if test -n "${with_nspr_libs}"; then
603 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
605 MANUAL_NSPR_LIBS="$nsprlibs"
608 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
610 AC_MSG_RESULT([$moz_nspr_libs])
612 dnl *****************
614 dnl *****************
615 AC_MSG_CHECKING([for Mozilla nss3 includes])
616 CPPFLAGS_save="$CPPFLAGS"
617 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
619 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
620 [moz_nss_includes="yes"],[moz_nss_includes="no"])
621 CPPFLAGS="$CPPFLAGS_save"
623 if test "x${moz_nss_includes}" = "xyes"; then
624 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
626 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
628 AC_MSG_RESULT($moz_nss_includes)
630 AC_MSG_CHECKING([for Mozilla nss libraries])
631 LDFLAGS_save="$LDFLAGS"
633 nsslibs="-lssl3 -lsmime3 -lnss3"
635 LIBS="$nsslibs $nsprlibs"
636 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
637 if test -n "${with_nss_libs}"; then
638 LDFLAGS="$LDFLAGS -L$with_nss_libs"
640 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR"
643 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
644 [moz_nss_libs="yes"],[moz_nss_libs="no"])
645 LDFLAGS="$LDFLAGS_save"
648 if test "x${moz_nss_libs}" = "xyes"; then
652 if test "x${enable_smime}" = "xyes"; then
653 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
656 if test -n "${with_nss_libs}"; then
657 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
659 MANUAL_NSS_LIBS="$nsslibs"
662 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
664 AC_MSG_RESULT([$moz_nss_libs])
666 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
667 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
671 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
673 AC_SUBST(MANUAL_NSPR_CFLAGS)
674 AC_SUBST(MANUAL_NSPR_LIBS)
675 AC_SUBST(MANUAL_NSS_CFLAGS)
676 AC_SUBST(MANUAL_NSS_LIBS)
678 dnl ******************************
679 dnl system mail stuff
680 dnl ******************************
681 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
682 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
684 AC_MSG_CHECKING([system mail directory])
685 if test -d /var/mail -a '!' -h /var/mail ; then
686 system_mail_dir="/var/mail"
688 system_mail_dir="/var/spool/mail"
690 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
692 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
694 CAMEL_LOCK_HELPER_USER=""
695 CAMEL_LOCK_HELPER_GROUP=""
696 system_mail_perm="world writable"
699 CAMEL_LOCK_HELPER_USER=""
700 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
701 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
704 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
705 CAMEL_LOCK_HELPER_GROUP=""
706 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
709 CAMEL_LOCK_HELPER_USER=""
710 CAMEL_LOCK_HELPER_GROUP=""
711 system_mail_perm="???"
715 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
716 AC_SUBST(CAMEL_LOCK_HELPER_USER)
717 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
719 dnl ******************************
721 dnl ******************************
722 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
723 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
724 [[ #include <time.h> ]],
729 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
730 if test $ac_cv_struct_tm_gmtoff = yes; then
731 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
733 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
734 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
735 [[ #include <time.h> ]],
737 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
738 if test $ac_cv_var_timezone = yes; then
739 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
740 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
741 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
742 [[ #include <time.h> ]],
744 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
745 if test $ac_cv_var_altzone = yes; then
746 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
749 AC_MSG_ERROR([unable to find a way to determine timezone])
753 dnl ******************************
754 dnl ctime_r prototype
755 dnl ******************************
756 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
758 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
759 [[ #include <time.h> ]],
762 ctime_r (&date, buf, 100); ]]
763 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
766 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
767 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
770 dnl ******************************
771 dnl gethostbyname_r prototype
772 dnl ******************************
773 AC_CHECK_FUNCS(gethostbyname_r,[
774 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
776 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
778 #include "confdefs.h"
779 #include <sys/types.h>
780 #include <sys/socket.h>
781 #include <netinet/in.h>
783 #define BUFSIZE (sizeof(struct hostent)+10)
787 char buffer[BUFSIZE];
790 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
792 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
795 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
796 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
799 dnl ******************************
800 dnl gethostbyaddr_r prototype
801 dnl ******************************
802 AC_CHECK_FUNCS(gethostbyaddr_r,[
803 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
805 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
807 #include "confdefs.h"
808 #include <sys/types.h>
809 #include <sys/socket.h>
810 #include <netinet/in.h>
812 #define BUFSIZE (sizeof(struct hostent)+10)
816 char buffer[BUFSIZE];
819 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
820 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
823 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
824 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
827 dnl ******************************
828 dnl stat(v)fs location/type
829 dnl ******************************
830 AC_CHECK_HEADER([sys/statvfs.h],
831 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
832 [[ #if HAVE_SYS_STATVFS_H
833 #include <sys/statvfs.h>
836 AC_CHECK_FUNCS(statvfs)
838 AC_CHECK_HEADER([sys/param.h],
839 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
840 [[ #if HAVE_SYS_PARAM_H
841 #include <sys/param.h>
844 AC_CHECK_HEADER([sys/mount.h],
845 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
846 [[ #if HAVE_SYS_MOUNT_H
847 #include <sys/mount.h>
850 AC_CHECK_FUNCS(statfs)
852 dnl ******************************
853 dnl IPv6 support and getaddrinfo calls
854 dnl ******************************
855 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
857 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
858 [[ #include "confdefs.h"
859 #include <sys/types.h>
860 #include <sys/socket.h>
861 #include <netinet/in.h>
865 [[ #ifndef NI_MAXHOST
866 #define NI_MAXHOST 1025
870 #define NI_MAXSERV 32
873 struct addrinfo hints, *res;
874 struct sockaddr_in6 sin6;
876 char host[NI_MAXHOST];
877 char serv[NI_MAXSERV];
879 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
881 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
882 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
885 if test x"$ac_cv_have_addrinfo" = "xno" ; then
886 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
887 if test x"$enable_ipv6" = "xyes" ; then
888 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
892 AC_ARG_ENABLE([ipv6],
893 AS_HELP_STRING([--enable-ipv6=no/yes],
894 [Enable support for resolving IPv6 addresses.]),
895 [enable_ipv6=$enableval],[enable_ipv6=yes])
896 if test x"$enable_ipv6" = "xyes"; then
898 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
899 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
900 [[ #include "confdefs.h"
901 #include <sys/types.h>
902 #include <sys/socket.h>
903 #include <netinet/in.h>
906 [[ struct addrinfo hints;
907 hints.ai_flags = AI_ADDRCONFIG;
909 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
915 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
917 dnl ******************************
919 dnl ******************************
920 AC_MSG_CHECKING([if we should build the calendar])
921 AC_ARG_ENABLE([calendar],
922 AS_HELP_STRING([--enable-calendar=yes/no],
923 [Enable the calendar components (default yes)]),
924 [enable_calendar=$enableval], [enable_calendar=yes])
926 if test "x${enable_calendar}" != "xno"; then
927 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
929 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
930 AC_MSG_RESULT([$enable_calendar])
931 msg_calendar=$enable_calendar
933 dnl **********************************
934 dnl Weather calendar backend support
935 dnl **********************************
936 AC_MSG_CHECKING([if we should build the weather calendar backend])
937 AC_ARG_WITH([weather],
938 [AS_HELP_STRING([--with-weather],
939 [Build the weather calendar backend (default=yes)])],
940 [use_gweather=$withval], [use_gweather=yes])
941 if test "$enable_calendar" = "no"; then
942 use_gweather="no (calendar support is disabled)"
945 AC_MSG_RESULT([$use_gweather])
946 if test "$use_gweather" = "yes"; then
947 PKG_CHECK_MODULES([LIBGWEATHER], [gweather >= gweather_minimum_version],[],
948 [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.])])
950 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
952 dnl ******************************
954 dnl ******************************
955 AC_ARG_ENABLE([nntp],
956 AS_HELP_STRING([--enable-nntp],
957 [Build Usenet news (NNTP) backend]),
958 [enable_nntp=$enableval],[enable_nntp=yes])
959 if test "x$enable_nntp" = "xyes"; then
960 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
965 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
967 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
969 dnl ******************************
970 dnl IMAP4rev1 code support.
971 dnl ******************************
973 AS_HELP_STRING([--enable-imap4=no/yes],
974 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
975 [],[enable_imap4=no])
977 if test "x$enable_imap4" = "xyes"; then
978 AC_DEFINE(ENABLE_IMAP4,1,[Really don't try this at home])
983 AM_CONDITIONAL(ENABLE_IMAP4, [test x$enable_imap4 = xyes])
985 dnl ******************************
986 dnl IMAPX code support.
987 dnl ******************************
989 AS_HELP_STRING([--enable-imapx=no/yes],
990 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
991 [],[enable_imapx=no])
993 if test "x$enable_imapx" = "xyes"; then
994 AC_DEFINE(ENABLE_IMAPX,1,[Really don't try this at home])
995 AC_PATH_PROG(GPERF, gperf)
996 if test -z "$GPERF" ; then
997 AC_MSG_ERROR([You need gperf to compile imapx provider])
1003 AM_CONDITIONAL(ENABLE_IMAPX, [test x$enable_imapx = xyes])
1005 dnl ******************************
1007 dnl ******************************
1008 AC_ARG_ENABLE([hula],
1009 AS_HELP_STRING([--enable-hula=no/yes],
1010 [Enable support for the now-defunct Hula project]),
1011 [],[enable_hula=no])
1013 if test "x$enable_hula" = "xyes"; then
1014 AC_DEFINE(ENABLE_HULA,1,[Build Hula backend])
1019 AM_CONDITIONAL(ENABLE_HULA, [test x$enable_hula = xyes])
1021 dnl ******************************
1023 dnl ******************************
1024 AC_ARG_ENABLE([dot-locking],
1025 AS_HELP_STRING([--enable-dot-locking=yes/no],
1026 [Enable support for locking mail files with dot locking]),
1027 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1029 if test $os_win32 != yes -a "x$enable_dot_locking" = "xyes"; then
1030 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1036 AC_ARG_ENABLE([file-locking],
1037 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1038 [Enable support for locking mail files with file locking]),
1039 [],[enable_file_locking=fcntl])
1041 if test $os_win32 != yes -a "x$enable_file_locking" = "xfcntl"; then
1042 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1045 if test $os_win32 != yes -a "x$enable_file_locking" = "xflock"; then
1046 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1053 dnl ******************************
1054 dnl sendmail operation
1055 dnl ******************************
1056 AC_MSG_CHECKING([for SunOS broken spool format])
1057 if test "x$host_os" = "xsunos" ; then
1058 with_broken_spool="yes"
1061 AC_ARG_WITH([broken-spool],
1062 AS_HELP_STRING([--with-broken-spool=yes/no],
1063 [Using SunOS/Solaris sendmail which has a broken spool format]),
1064 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1066 if test "x$with_broken_spool" = "xyes"; then
1067 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1070 AC_MSG_RESULT([$with_broken_spool])
1072 dnl ******************************
1074 dnl ******************************
1076 AS_HELP_STRING([--with-krb5=PATH],
1077 [Location of Kerberos 5 install dir]),
1078 [with_krb5="$withval"], [with_krb5="no"])
1080 AC_ARG_WITH([krb5-libs],
1081 AS_HELP_STRING([--with-krb5-libs=PATH],
1082 [Location of Kerberos 5 libraries]),
1083 [with_krb5_libs="$withval"], [with_krb5_libs="$with_krb5/lib"])
1085 AC_ARG_WITH([krb5-includes],
1086 AS_HELP_STRING([--with-krb5-includes=PATH],
1087 [Location of Kerberos 5 headers]),
1088 [with_krb5_includes="$withval"], [with_krb5_includes="$with_krb5/include"])
1090 dnl ******************************
1092 dnl ******************************
1094 if test "x${with_krb5}" != "xno"; then
1097 mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
1098 heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
1099 sunlibs="-lkrb5 -lgss"
1100 AC_CACHE_CHECK([for Kerberos 5], [ac_cv_lib_kerberos5],
1102 LIBS="$LIBS -L$with_krb5_libs $mitlibs"
1103 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1104 [ac_cv_lib_kerberos5="$mitlibs"],
1106 LIBS="$LIBS_save -L$with_krb5_libs $heimlibs"
1107 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1108 [ac_cv_lib_kerberos5="$heimlibs"],
1110 LIBS="$LIBS_save -L$with_krb5_libs $sunlibs"
1111 AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])],
1112 [ac_cv_lib_kerberos5="$sunlibs"], [ac_cv_lib_kerberos5="no"])
1117 if test "$ac_cv_lib_kerberos5" != "no"; then
1118 AC_DEFINE(HAVE_KRB5,1,[Define if you have Krb5])
1119 if test "$ac_cv_lib_kerberos5" = "$mitlibs"; then
1120 AC_DEFINE(HAVE_MIT_KRB5,1,[Define if you have MIT Krb5])
1121 if test -z "$with_krb5_includes"; then
1122 KRB5_CFLAGS="-I$with_krb5/include"
1124 KRB5_CFLAGS="-I$with_krb5_includes"
1126 msg_krb5="yes (MIT)"
1128 if test "$ac_cv_lib_kerberos5" = "$heimlibs"; then
1129 AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal])
1130 if test -z "$with_krb5_includes"; then
1131 KRB5_CFLAGS="-I$with_krb5/include/heimdal"
1133 KRB5_CFLAGS="-I$with_krb5_includes"
1135 msg_krb5="yes (Heimdal)"
1137 AC_DEFINE(HAVE_SUN_KRB5,1,[Define if you have Sun Kerberosv5])
1138 if test -z "$with_krb5_includes"; then
1139 KRB5_CFLAGS="-I$with_krb5/include/kerberosv5"
1141 KRB5_CFLAGS="-I$with_krb5_includes"
1143 msg_krb5="yes (Sun)"
1146 KRB5_LIBS="-L$with_krb5_libs $ac_cv_lib_kerberos5"
1147 AC_MSG_RESULT([msg_krb5])
1149 dnl AC_MSG_CHECKING([for Kerberos 5])
1151 AC_MSG_ERROR([You specified with krb5, but it was not found.])
1154 AC_MSG_WARN([krb5 support disabled])
1157 AM_CONDITIONAL(ENABLE_KRB5, [test x$with_krb5 != xno])
1159 AC_CHECK_HEADER([et/com_err.h],
1160 [AC_DEFINE([HAVE_ET_COM_ERR_H], 1, [Have <et/comm_err.h>])],,
1161 [[ #if HAVE_ET_COM_ERR_H
1162 #include <com_err.h>
1165 AC_CHECK_HEADER([com_err.h],
1166 [AC_DEFINE([HAVE_COM_ERR_H], 1, [Have <comm_err.h>])],,
1167 [[ #if HAVE_COM_ERR_H
1168 #include <com_err.h>
1172 AC_SUBST(KRB5_CFLAGS)
1175 dnl ******************************
1177 dnl ******************************
1180 dnl ******************************
1182 dnl ******************************
1183 if test "$os_win32" != yes; then
1185 case $with_openldap in
1190 case $with_static_ldap in
1192 msg_ldap="$with_openldap (static)"
1195 msg_ldap="$with_openldap (dynamic)"
1200 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1201 if test "$with_openldap" = no ; then
1202 EVO_SUNLDAP_CHECK(no)
1203 case $with_sunldap in
1208 case $with_static_sunldap in
1210 msg_ldap="$with_sunldap (static)"
1213 msg_ldap="$with_sunldap (dynamic)"
1220 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1223 dnl Win32 LDAP support
1224 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1225 LDAP_LIBS="-lwldap32"
1226 AC_SUBST(LDAP_CFLAGS)
1228 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1229 AM_CONDITIONAL(ENABLE_LDAP, true)
1230 AM_CONDITIONAL(SUNLDAP, false)
1234 DBUS_GLIB_REQUIRED=dbus_glib_minimum_version
1235 AC_SUBST(DBUS_GLIB_REQUIRED)
1237 dnl ******************************
1238 dnl GObject marshalling
1239 dnl ******************************
1242 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1243 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1244 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1246 dnl ******************************
1247 dnl Posix thread support
1248 dnl ******************************
1250 dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
1251 dnl GNOME_PTHREAD_CHECK
1253 dnl if test "x$PTHREAD_LIB" = "x" ; then
1254 dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
1257 dnl Notice that this is a hack, and we wont be able to use this forever, but
1258 dnl at least for some time
1262 THREADS_LIBS="$PTHREAD_LIB"
1263 THREADS_CFLAGS="$PTHREAD_CFLAGS"
1265 AC_SUBST(THREADS_LIBS)
1266 AC_SUBST(THREADS_CFLAGS)
1267 AC_DEFINE(ENABLE_THREADS,1,[Required])
1269 dnl ******************************
1271 dnl ******************************
1272 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_minimum_version)
1273 AC_SUBST(DBUS_GLIB_CFLAGS)
1274 AC_SUBST(DBUS_GLIB_LIBS)
1276 dnl ***********************
1277 dnl Gnome keyring support
1278 dnl ***********************
1279 AC_ARG_ENABLE([gnome-keyring],
1280 AS_HELP_STRING([--enable-gnome-keyring],
1281 [Attempt to use Gnome Keyring for storing passwords @<:@default=yes@:>@]),
1282 [enable_gnome_keyring="$enableval"],[enable_gnome_keyring="yes"])
1284 if test "x${enable_gnome_keyring}" = "xyes"; then
1285 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= gnome_keyring_minimum_version, have_gnome_keyring="yes", have_gnome_keyring="no");
1286 if test "x${have_gnome_keyring}" = "xyes"; then
1287 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Gnome Keyring available])
1288 GNOME_KEYRING_REQUIREMENT="gnome-keyring-1"
1290 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.])
1294 dnl ******************************
1295 dnl Utility macro to set compiler flags for a specific lib.
1296 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1297 dnl ******************************
1298 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1299 PKG_CHECK_MODULES([$1], [$2])
1300 $1_CFLAGS="[$]$1_CFLAGS $3 "
1301 $1_LIBS="[$]$1_LIBS $4 "
1304 dnl ******************************
1305 dnl libedataserver flags
1306 dnl ******************************
1307 E_DATA_SERVER_DEPS="libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1309 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
1310 AC_SUBST(E_DATA_SERVER_CFLAGS)
1311 AC_SUBST(E_DATA_SERVER_LIBS)
1313 dnl ******************************
1314 dnl libedataserverui
1315 dnl ******************************
1316 E_DATA_SERVER_UI_DEPS="gtk+-2.0 libxml-2.0 gobject-2.0 gthread-2.0 gconf-2.0 $GNOME_KEYRING_REQUIREMENT"
1318 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, $THREADS_CFLAGS, $THREADS_LIBS)
1319 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1320 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1322 E_BACKEND_DEPS="gobject-2.0 libxml-2.0 gmodule-2.0 gconf-2.0"
1324 dnl ******************************
1325 dnl libebackend flags
1326 dnl ******************************
1327 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1328 AC_SUBST(E_BACKEND_CFLAGS)
1329 AC_SUBST(E_BACKEND_LIBS)
1331 dnl ******************************
1332 dnl evolution-addressbook flags
1333 dnl ******************************
1334 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 dbus-glib-1 gobject-2.0 gthread-2.0 gconf-2.0"
1336 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1337 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1338 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1340 dnl ******************************
1341 dnl evolution-calendar flags
1342 dnl ******************************
1343 if test "x${enable_calendar}" = "xyes"; then
1344 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"
1347 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1348 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1349 dnl to differentiate between <libical/ical.h> and <ical.h>
1350 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1351 dnl libical is fixed, we have to work-around the buggy CFlags.
1353 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1354 LIBICAL_EXTRA_LIBS=""
1355 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1356 AC_SUBST(LIBICAL_EXTRA_LIBS)
1358 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1359 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1360 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1363 dnl ******************************
1365 dnl ******************************
1366 GDATA_DEPS="libsoup-2.4 libxml-2.0"
1367 EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
1368 AC_SUBST(GDATA_CFLAGS)
1369 AC_SUBST(GDATA_LIBS)
1371 dnl ******************************
1373 dnl ******************************
1374 LIBSOUP_REQUIRED=libsoup_minimum_version
1375 AC_SUBST(LIBSOUP_REQUIRED)
1377 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1378 AC_SUBST(SOUP_CFLAGS)
1381 dnl ******************************
1383 dnl ******************************
1384 SQLITE_REQUIRED=sqlite_minimum_version
1385 AC_SUBST(SQLITE_REQUIRED)
1388 dnl deflateInit is a #define, use deflateEnd instead
1389 AC_CHECK_LIB(z, deflateEnd,
1390 [AC_CHECK_HEADER(zlib.h, zlib_found=true)])
1391 if test "x$zlib_found" = "xfalse"; then
1392 AC_MSG_ERROR([*** zlib is required])
1395 dnl ******************************
1396 dnl Checks for large file support
1397 dnl ******************************
1398 AC_ARG_ENABLE([largefile],
1399 AS_HELP_STRING([--enable-largefile],
1400 [enable support for large files [[default=no]]]),
1401 [],[enable_largefile="no"])
1403 if test "x$enable_largefile" != "xno"; then
1405 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1406 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1407 [[ #include <sys/types.h>
1408 #include <sys/stat.h>
1411 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1412 )],[ac_cv_largefile64_source="no"],
1413 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1414 [[ #define _LARGEFILE64_SOURCE
1415 #include <sys/types.h>
1416 #include <sys/stat.h>
1419 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1420 [ac_cv_largefile64_source="unknown"])])
1423 enable_largefile="no"
1425 if test "x$ac_cv_largefile64_source" = "xyes"; then
1426 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1427 enable_largefile="yes"
1428 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1429 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1432 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1433 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1434 enable_largefile="yes"
1437 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1438 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1439 enable_largefile="yes"
1442 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1446 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1448 EVO_SET_COMPILE_FLAGS(CAMEL, $mozilla_nss gio-2.0 sqlite3 >= sqlite_minimum_version gthread-2.0, $THREADS_CFLAGS $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS, -lz $THREADS_LIBS $KRB5_LIBS $MANUAL_NSS_LIBS)
1449 AC_SUBST(CAMEL_CFLAGS)
1450 AC_SUBST(CAMEL_LIBS)
1451 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1452 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1454 dnl ******************************
1455 dnl Special directories
1456 dnl ******************************
1458 dnl If you add something here, consider whether or not you also
1459 dnl need to add it to one or more .pc.in files (for Connector,
1462 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1463 AC_SUBST(privdatadir)
1465 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1466 AC_SUBST(privincludedir)
1468 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1469 AC_SUBST(privlibdir)
1471 imagesdir='${datadir}'/pixmaps/evolution-data-server
1474 extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
1475 AC_SUBST(extensiondir)
1477 uidir="$privdatadir/ui"
1480 if test $use_gweather = yes; then
1481 weatherdatadir="$privdatadir/weather"
1482 AC_SUBST(weatherdatadir)
1485 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1486 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
1487 AC_SUBST(camel_providerdir)
1489 dnl ******************************
1490 dnl IDL/Component Versioning
1491 dnl ******************************
1492 INTERFACE_VERSION="$BASE_VERSION"
1493 AC_SUBST(INTERFACE_VERSION)
1494 AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "$INTERFACE_VERSION", [IDL interface version (Major.Minor)])
1496 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)|" $< > $@'
1497 EVO_NAME_SERVER_RULE='%_$(API_VERSION).server: %.server ; mv $< $@'
1498 AC_SUBST(EVO_SUBST_SERVER_RULE)
1499 AC_SUBST(EVO_NAME_SERVER_RULE)
1501 dnl *******************
1502 dnl D-BUS service stuff
1503 dnl *******************
1504 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)|" $< > $@'
1505 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1507 dnl ******************************
1509 dnl ******************************
1510 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1513 dnl ******************************
1515 dnl ******************************
1518 dnl ******************************
1520 dnl ******************************
1522 export privincludedir
1527 evolution-data-server-zip
1528 evolution-data-server.pc
1529 addressbook/Makefile
1530 addressbook/libebook/Makefile
1531 addressbook/libebook/libebook.pc
1532 addressbook/libedata-book/Makefile
1533 addressbook/libedata-book/libedata-book.pc
1534 addressbook/backends/Makefile
1535 addressbook/backends/file/Makefile
1536 addressbook/backends/vcf/Makefile
1537 addressbook/backends/ldap/Makefile
1538 addressbook/backends/google/Makefile
1539 addressbook/backends/groupwise/Makefile
1540 addressbook/backends/webdav/Makefile
1541 addressbook/tests/Makefile
1542 addressbook/tests/ebook/Makefile
1543 addressbook/tests/vcard/Makefile
1546 calendar/libecal/Makefile
1547 calendar/libecal/libecal.pc
1548 calendar/libedata-cal/Makefile
1549 calendar/libedata-cal/libedata-cal.pc
1550 calendar/backends/Makefile
1551 calendar/backends/caldav/Makefile
1552 calendar/backends/file/Makefile
1553 calendar/backends/groupwise/Makefile
1554 calendar/backends/http/Makefile
1555 calendar/backends/contacts/Makefile
1556 calendar/backends/weather/Makefile
1557 calendar/backends/google/Makefile
1558 calendar/tests/Makefile
1559 calendar/tests/ecal/Makefile
1561 camel/providers/Makefile
1562 camel/providers/groupwise/Makefile
1563 camel/providers/hula/Makefile
1564 camel/providers/imap/Makefile
1565 camel/providers/imapx/Makefile
1566 camel/providers/imap4/Makefile
1567 camel/providers/local/Makefile
1568 camel/providers/nntp/Makefile
1569 camel/providers/pop3/Makefile
1570 camel/providers/sendmail/Makefile
1571 camel/providers/smtp/Makefile
1572 camel/tests/Makefile
1573 camel/tests/folder/Makefile
1574 camel/tests/lib/Makefile
1575 camel/tests/message/Makefile
1576 camel/tests/mime-filter/Makefile
1577 camel/tests/misc/Makefile
1578 camel/tests/smime/Makefile
1579 camel/tests/stream/Makefile
1581 camel/camel-provider.pc
1582 libebackend/Makefile
1583 libebackend/libebackend.pc
1584 libedataserver/Makefile
1585 libedataserver/eds-version.h
1586 libedataserver/libedataserver.pc
1587 libedataserverui/Makefile
1588 libedataserverui/libedataserverui.pc
1590 servers/groupwise/Makefile
1591 servers/groupwise/libegroupwise.pc
1592 servers/google/Makefile
1593 servers/google/libgdata/Makefile
1594 servers/google/libgdata/libgdata.pc
1595 servers/google/libgdata-google/Makefile
1596 servers/google/libgdata-google/libgdata-google.pc
1599 docs/reference/Makefile
1600 docs/reference/addressbook/Makefile
1601 docs/reference/addressbook/libebook/Makefile
1602 docs/reference/addressbook/libedata-book/Makefile
1603 docs/reference/calendar/Makefile
1604 docs/reference/calendar/libecal/Makefile
1605 docs/reference/calendar/libedata-cal/Makefile
1606 docs/reference/camel/Makefile
1607 docs/reference/libedataserver/Makefile
1608 docs/reference/libedataserverui/Makefile
1609 docs/reference/libebackend/Makefile
1615 evolution-data-server has been configured as follows:
1616 Calendar: $msg_calendar
1617 Weather calendar: $use_gweather
1618 Mail Directory: $system_mail_dir, $system_mail_perm
1619 LDAP support: $msg_ldap
1620 NNTP support: $msg_nntp
1621 Kerberos 5: $msg_krb5
1622 Gnome Keyring: $enable_gnome_keyring
1623 SSL support: $msg_ssl
1624 SMIME support: $msg_smime
1625 IPv6 support: $msg_ipv6
1626 Dot Locking: $msg_dot
1627 File Locking: $msg_file
1628 Large files: $enable_largefile
1629 Gtk Doc: $enable_gtk_doc
1631 if test "$msg_hula" = "yes"; then
1632 echo "Hula support: $msg_hula"
1635 if test "$msg_imapx" = "yes"; then
1637 IMAPX support: $msg_imapx