2 dnl Evolution-Data-Server version
3 m4_define([eds_major_version], [3])
4 m4_define([eds_minor_version], [5])
5 m4_define([eds_micro_version], [2])
7 m4_define([eds_version],
8 [eds_major_version.eds_minor_version.eds_micro_version])
10 dnl Base Version: This is for API/version tracking for things like
11 dnl Bonobo server files. This should always be the major/minor of
12 dnl the stable version or stable version to be. Note, this is set
13 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
15 m4_define([base_version], [3.6])
17 dnl This number is meaningless, but we're now stuck with it in our
18 dnl library names for backward compatibility.
19 m4_define([api_version], [1.2])
21 dnl Autoconf / Automake Initialization
23 AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
24 AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar dist-xz no-dist-gzip -Wall -Wno-portability -Werror foreign])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CONFIG_SRCDIR(README)
27 AC_CONFIG_HEADERS(config.h)
29 dnl This is for the autoconf tests only - it set's the language we use
32 dnl Automake 1.11 - Silent Build Rules
33 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
35 dnl Required Package Versions
36 m4_define([glib_minimum_version], [2.32])
37 m4_define([gtk_minimum_version], [3.2])
38 m4_define([gconf_minimum_version], [2.0.0]) dnl XXX Just a Guess
39 m4_define([gnome_keyring_minimum_version], [2.20.1])
40 m4_define([goa_minimum_version], [3.2])
41 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
42 m4_define([libsoup_minimum_version], [2.38.1])
43 m4_define([libgdata_minimum_version], [0.10])
44 m4_define([oauth_minimum_version], [0.9.4])
45 m4_define([sqlite_minimum_version], [3.5])
46 m4_define([libical_minimum_version], [0.43])
47 m4_define([gweather_minimum_version], [2.90.0])
49 AC_SUBST([BASE_VERSION],[base_version])
50 AC_SUBST([API_VERSION],[api_version])
51 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
52 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
54 EDS_MAJOR_VERSION=eds_major_version
55 EDS_MINOR_VERSION=eds_minor_version
56 EDS_MICRO_VERSION=eds_micro_version
60 dnl ******************************
62 dnl ******************************
63 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook3"
64 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar2"
67 ADDRESS_BOOK_DBUS_SERVICE_NAME,
68 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
69 [D-Bus service name for the address book factory])
72 CALENDAR_DBUS_SERVICE_NAME,
73 ["$CALENDAR_DBUS_SERVICE_NAME"],
74 [D-Bus service name for the calendar factory])
76 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
77 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
79 dnl ******************************
80 dnl Libtool versioning
81 dnl ******************************
82 LIBEDATASERVER_CURRENT=16
83 LIBEDATASERVER_REVISION=0
86 LIBEDATASERVERUI_CURRENT=3
87 LIBEDATASERVERUI_REVISION=0
88 LIBEDATASERVERUI_AGE=0
94 LIBEDATACAL_CURRENT=17
95 LIBEDATACAL_REVISION=0
98 LIBEDATABOOK_CURRENT=14
99 LIBEDATABOOK_REVISION=0
110 LIBEBACKEND_CURRENT=3
111 LIBEBACKEND_REVISION=0
114 AC_SUBST(EDS_MAJOR_VERSION)
115 AC_SUBST(EDS_MINOR_VERSION)
116 AC_SUBST(EDS_MICRO_VERSION)
117 AC_SUBST(LIBEDATASERVER_CURRENT)
118 AC_SUBST(LIBEDATASERVER_REVISION)
119 AC_SUBST(LIBEDATASERVER_AGE)
120 AC_SUBST(LIBEDATASERVERUI_CURRENT)
121 AC_SUBST(LIBEDATASERVERUI_REVISION)
122 AC_SUBST(LIBEDATASERVERUI_AGE)
123 AC_SUBST(LIBECAL_CURRENT)
124 AC_SUBST(LIBECAL_REVISION)
125 AC_SUBST(LIBECAL_AGE)
126 AC_SUBST(LIBEDATACAL_CURRENT)
127 AC_SUBST(LIBEDATACAL_REVISION)
128 AC_SUBST(LIBEDATACAL_AGE)
129 AC_SUBST(LIBEBOOK_CURRENT)
130 AC_SUBST(LIBEBOOK_REVISION)
131 AC_SUBST(LIBEBOOK_AGE)
132 AC_SUBST(LIBEDATABOOK_CURRENT)
133 AC_SUBST(LIBEDATABOOK_REVISION)
134 AC_SUBST(LIBEDATABOOK_AGE)
135 AC_SUBST(LIBCAMEL_CURRENT)
136 AC_SUBST(LIBCAMEL_REVISION)
137 AC_SUBST(LIBCAMEL_AGE)
138 AC_SUBST(LIBEBACKEND_CURRENT)
139 AC_SUBST(LIBEBACKEND_REVISION)
140 AC_SUBST(LIBEBACKEND_AGE)
142 dnl **************************************
143 dnl Put the ACLOCAL flags in the Makefile
144 dnl **************************************
145 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
147 dnl ******************************
148 dnl Compiler Warning Flags
149 dnl ******************************
150 AS_COMPILER_FLAGS(WARNING_FLAGS,
152 -Wno-missing-field-initializers
154 -Wno-unused-parameter
155 -Wno-deprecated-declarations
156 -Wdeclaration-after-statement
157 -Werror-implicit-function-declaration
158 -Wformat-security -Winit-self
159 -Wmissing-declarations -Wmissing-include-dirs
160 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
161 -Wredundant-decls -Wundef -Wwrite-strings")
162 AC_SUBST(WARNING_FLAGS)
164 dnl More depracation from EBook/ECal:
165 dnl -DE_BOOK_DISABLE_DEPRECATED
166 dnl -DE_CAL_DISABLE_DEPRECATED
168 dnl Other useful compiler warnings for test builds only.
169 dnl These may produce warnings we have no control over,
170 dnl or false positives we don't always want to see.
172 dnl -Wformat-nonliteral
173 dnl -Wmissing-format-attribute
175 dnl -Wstrict-aliasing=2
177 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
178 AC_SUBST(AM_CPPFLAGS)
181 dnl define disable deprecated for EBook and ECal .am files
182 case "$WARNING_FLAGS" in
183 *E_BOOK_DISABLE_DEPRECATED*)
184 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 1 == 1 ])
187 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 0 == 1 ])
191 case "$WARNING_FLAGS" in
192 *E_CAL_DISABLE_DEPRECATED*)
193 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 1 == 1 ])
196 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 0 == 1 ])
200 dnl ******************************
201 dnl Initialize maintainer mode
202 dnl ******************************
203 AM_MAINTAINER_MODE([enable])
205 if test "x$enable_maintainer_mode" = "xyes" ; then
206 AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
220 AC_MSG_ERROR([You need bison to build evolution-data-server])
224 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
225 dnl behavior that -- according to the C99 standard -- is supposed to be
226 dnl undefined. We may still have aliasing abuses lying around that rely
227 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
228 dnl optimization until we can find and fix all the abuses.
229 dnl (AC_PROG_CC must run first to set the GCC variable.)
230 dnl XXX This really belongs in AM_CFLAGS.
231 if test "x${GCC}" = "xyes"; then
232 CFLAGS="$CFLAGS -fno-strict-aliasing"
235 dnl ******************************
236 dnl Test whether jw is installed
237 dnl ******************************
238 AC_PATH_PROG(JW,jw,no)
239 if test "x$JW" = "xno"; then
244 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
247 dnl ******************************
249 dnl ******************************
250 IT_PROG_INTLTOOL([0.35.5])
252 AM_GNU_GETTEXT_VERSION([0.17])
253 AM_GNU_GETTEXT([external])
255 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
256 AC_SUBST(GETTEXT_PACKAGE)
257 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
259 localedir='$(prefix)/$(DATADIRNAME)/locale'
262 dnl ******************************
263 dnl Initialize libtool
264 dnl ******************************
266 LT_INIT(disable-static win32-dll)
270 dnl ******************************
272 dnl ******************************
273 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
275 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
278 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
281 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
285 dnl ******************************
287 dnl ******************************
288 AC_MSG_CHECKING([for Win32])
292 NO_UNDEFINED='-no-undefined'
293 SOCKET_LIBS='-lws2_32 -ldnsapi'
295 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
296 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
297 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
304 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
311 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
314 AC_MSG_RESULT([$os_win32])
315 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
316 AC_SUBST(NO_UNDEFINED)
317 AC_SUBST(SOCKET_LIBS)
318 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
320 dnl **************************************
321 dnl Check for posix compatible sys/wait.h
322 dnl **************************************
325 dnl ************************************
326 dnl Check for posix compatible alloca()
327 dnl ************************************
330 dnl ******************************
331 dnl Checks for functions
332 dnl ******************************
333 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
335 dnl ***********************************
336 dnl Check for base dependencies early.
337 dnl ***********************************
338 PKG_CHECK_MODULES(GNOME_PLATFORM,
339 [gio-2.0 >= glib_minimum_version
340 gmodule-2.0 >= glib_minimum_version
341 gtk+-3.0 >= gtk_minimum_version
342 gconf-2.0 >= gconf_minimum_version
343 libxml-2.0 >= libxml_minimum_version
344 libsoup-2.4 >= libsoup_minimum_version
345 libgdata >= libgdata_minimum_version])
347 if test x$os_win32 = xno; then
348 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
351 dnl ******************************
352 dnl DBus-glib stuff, to initialize thread for GConf, which is using it
353 dnl this is returned back only temporarily and wil lbe removed as soon
354 dnl as eds will stop using GConf completely
355 dnl ******************************
356 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.6)
357 AC_SUBST(DBUS_GLIB_CFLAGS)
358 AC_SUBST(DBUS_GLIB_LIBS)
360 dnl *******************************
361 dnl Check for GNOME Online Accounts
362 dnl *******************************
364 [AS_HELP_STRING([--enable-goa],
365 [enable GNOME Online Accounts support (default=yes)])],
366 [enable_goa=$enableval], [enable_goa=yes])
367 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
368 AC_MSG_RESULT([$enable_goa])
369 if test "x$enable_goa" = xyes; then
370 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
371 [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
372 If you want to disable GNOME Online Accounts support,
373 please append --disable-goa to configure.])])
375 PKG_CHECK_MODULES([OAUTH], [oauth >= oauth_minimum_version],,
376 [AC_MSG_ERROR([oauth not found (or version < oauth_minimum_version),
377 If you want to disable GNOME Online Accounts support,
378 please append --disable-goa to configure.])])
380 if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
381 AC_DEFINE(HAVE_GOA,1,[Have goa-1.0 and libgdata >= 0.9.1])
384 libgdata >= 0.9.1 is required for GNOME Online Accounts support.
385 If you want to disable GNOME Online Accounts support, please
386 append --disable-goa to configure.])
389 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
391 if test x$os_win32 = xno; then
392 dnl ***********************************
393 dnl Check for GNOME Keyring.
394 dnl ***********************************
395 PKG_CHECK_MODULES(GNOME_KEYRING,
396 [gnome-keyring-1 >= gnome_keyring_minimum_version])
400 LIBICAL_REQUIRED=libical_minimum_version
401 AC_SUBST(LIBICAL_REQUIRED)
403 dnl ******************************
405 dnl ******************************
406 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
408 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
409 [AC_MSG_ERROR([No regex library found])])])
412 dnl ******************************
414 dnl ******************************
416 AS_HELP_STRING([--with-libdb=PREFIX],
417 [Prefix where libdb is installed]),
418 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
420 DB_CFLAGS="-I$libdb_prefix/include"
421 DB_LIBS="-L$libdb_prefix/lib -ldb"
423 AC_MSG_CHECKING([Berkeley DB])
424 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
425 save_libs=$LIBS; LIBS="$DB_LIBS"
426 AC_LINK_IFELSE([AC_LANG_PROGRAM(
428 [[db_create(NULL, NULL, 0)]])],
429 [AC_MSG_RESULT([yes])],
430 [AC_MSG_ERROR([Cannot find libdb])])
436 dnl ******************************
438 dnl ******************************
442 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
443 AC_LINK_IFELSE([AC_LANG_PROGRAM(
450 cd = iconv_open ("UTF-8", "ISO-8859-1");
452 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
454 if test "x$ac_cv_libiconv" = "xyes"; then
456 if test "x$os_win32" = "xyes"; then
457 dnl Don't pointlessly auto-export the global symbols
458 dnl from a potentially static libiconv.a
459 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
464 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
467 if test "x$have_iconv" = "xyes"; then
468 if test "x$ac_cv_libiconv" = "xno"; then
469 AC_CHECK_FUNCS(gnu_get_libc_version)
471 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
472 AC_RUN_IFELSE([AC_LANG_SOURCE([[
476 #ifdef HAVE_GNU_GET_LIBC_VERSION
477 #include <gnu/libc-version.h>
480 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
481 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
482 char *transbuf = malloc (10), *trans = transbuf;
484 size_t jp_len = strlen (jp), utf8_len = 10;
485 size_t utf8_real_len = strlen (utf8);
487 #ifdef HAVE_GNU_GET_LIBC_VERSION
488 /* glibc 2.1.2's iconv is broken in hard to test ways. */
489 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
493 cd = iconv_open ("UTF-8", "ISO-2022-JP");
494 if (cd == (iconv_t) -1)
496 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
498 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
502 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
505 if test "x$have_iconv" = "xno"; then
506 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
510 CFLAGS="$CFLAGS -I$srcdir"
512 AC_MSG_CHECKING([preferred charset name formats for system iconv])
513 AC_RUN_IFELSE([AC_LANG_SOURCE([[
515 #include "iconv-detect.c"
517 [AC_MSG_RESULT([found])],
518 [AC_MSG_RESULT([not found])
520 *** The iconv-detect program was unable to determine the
521 *** preferred charset name formats recognized by your
522 *** iconv library. It is suggested that you install a
523 *** working iconv library such as the one found at
524 *** ftp://ftp.gnu.org/pub/gnu/libiconv
526 [if test "x$os_win32" = xyes; then
527 AC_MSG_RESULT([using known win32 result])
528 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
529 echo >>iconv-detect.h
530 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
531 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
532 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
534 AC_MSG_RESULT([unknown])
536 *** We can't determine the preferred charset name formats
537 *** recognized by your iconv library. You are
538 *** cross-compiling and supposed to know what you are doing.
539 *** Please construct the iconv-detect.h file manually.
544 CFLAGS="$save_CFLAGS"
547 AC_ARG_ENABLE([backtraces],
548 [AS_HELP_STRING([--enable-backtraces],
549 [enable backtraces for e_pointer_tracker (default=no)])],
550 [enable_backtraces=$enableval], [enable_backtraces=no])
552 if test "x$enable_backtraces" = xyes; then
553 dnl ****************************
554 dnl Check for backtrace_symbols function and dwfl from elfutils
555 dnl ****************************
556 AC_MSG_CHECKING([libc backtrace_symbols function])
557 AC_LINK_IFELSE([AC_LANG_PROGRAM(
558 [[#include <execinfo.h>]],
559 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
560 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
561 AC_MSG_RESULT([$ac_cv_have_bsf])
563 if test "x$ac_cv_have_bsf" = xyes; then
566 AC_MSG_CHECKING([elfutils/libdwfl])
567 AC_LINK_IFELSE([AC_LANG_PROGRAM(
568 [[#include <elfutils/libdwfl.h>]],
572 Dwarf_Addr module_low_addr;
575 dwfl_standard_find_debuginfo;
576 dwfl_linux_proc_find_elf;
578 dwfl_linux_proc_report (NULL, 1);
579 dwfl_report_end (NULL, NULL, NULL);
581 dwfl_module_addrname (NULL, NULL);
582 dwfl_module_getsrc (NULL, NULL);
583 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
584 DWARF_CB_ABORT; DWARF_CB_OK;
585 dwfl_getmodules (NULL, NULL, NULL, 0);
587 [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
588 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
592 if test "x$ac_cv_have_elfdwfl" = xyes; then
594 AC_SUBST(LIBDWFL_LIBS)
599 dnl **********************************
600 dnl Check for nl_langinfo and CODESET
601 dnl **********************************
602 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
603 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
604 [[#include <langinfo.h>]],
605 [[char *codeset = nl_langinfo (CODESET);]]
606 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
607 if test "x$ac_cv_langinfo_codeset" = "xyes"; then
608 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
610 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
612 dnl *******************************************************
613 dnl Check to see if strftime supports the use of %l and %k
614 dnl *******************************************************
615 AC_MSG_CHECKING([for %l and %k support in strftime])
616 AC_RUN_IFELSE([AC_LANG_SOURCE(
617 [[ #include <stdlib.h>
620 int main(int argc, char **argv) {
626 timeinfo=localtime(&rawtime);
628 strftime(buf, 10, "%lx%k", timeinfo);
630 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
637 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
638 AC_MSG_RESULT([$ac_cv_lkstrftime])
640 dnl ********************************************************************************
641 dnl security extension support (SSL and S/MIME)
643 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
644 dnl needed by Camel (SSL and S/MIME).
646 dnl The Evolution security extensions are only built if these libraries are found
647 dnl ********************************************************************************
650 AC_ARG_ENABLE([smime],
651 AS_HELP_STRING([--enable-smime],
652 [Enable SMIME support through Mozilla nss @<:@default=yes@:>@ ]),
653 [enable_smime="$enableval"],[enable_smime="yes"])
655 AC_ARG_WITH([nspr-includes],
656 AS_HELP_STRING([--with-nspr-includes],
657 [Prefix of Mozilla nspr4 includes.]),
658 [with_nspr_includes="$withval"])
660 AC_ARG_WITH([nspr-libs],
661 AS_HELP_STRING([--with-nspr-libs],
662 [Prefix of Mozilla nspr4 libs.]),
663 [with_nspr_libs="$withval"])
665 AC_ARG_WITH([nss-includes],
666 AS_HELP_STRING([--with-nss-includes],
667 [Prefix of Mozilla nss3 includes.]),
668 [with_nss_includes="$withval"])
670 AC_ARG_WITH([nss-libs],
671 AS_HELP_STRING([--with-nss-libs],
672 [Prefix of Mozilla nss3 libs.]),
673 [with_nss_libs="$withval"])
675 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
681 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
682 if test "x${check_manually}" = "xno"; then
683 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
684 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
685 for pc in $mozilla_nspr_pcs; do
686 if $PKG_CONFIG --exists $pc; then
693 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
694 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
695 for pc in $mozilla_nss_pcs; do
696 if $PKG_CONFIG --exists $pc; then
703 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
704 if test "x$enable_smime" = "xyes"; then
705 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
708 MANUAL_NSPR_CFLAGS=""
719 if test "x${check_manually}" = "xyes"; then
720 dnl ******************
722 dnl ******************
723 AC_MSG_CHECKING([for Mozilla nspr4 includes])
724 CPPFLAGS_save="$CPPFLAGS"
725 if test -n "$with_nspr_includes"; then
726 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
729 AC_CHECK_HEADERS(nspr.h prio.h,
730 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
731 CPPFLAGS="$CPPFLAGS_save"
733 if test "x${moz_nspr_includes}" = "xyes"; then
734 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
736 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
738 AC_MSG_RESULT([$moz_nspr_includes])
740 AC_MSG_CHECKING([for Mozilla nspr libraries])
741 CFLAGS_save="$CFLAGS"
742 LDFLAGS_save="$LDFLAGS"
744 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
746 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
748 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
749 if test -n "${with_nspr_libs}"; then
750 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
755 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
756 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
758 CFLAGS="$CFLAGS_save"
759 LDFLAGS="$LDFLAGS_save"
762 if test "x${moz_nspr_libs}" = "xyes"; then
763 if test -n "${with_nspr_libs}"; then
764 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
766 MANUAL_NSPR_LIBS="$nsprlibs"
769 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
771 AC_MSG_RESULT([$moz_nspr_libs])
773 dnl *****************
775 dnl *****************
776 AC_MSG_CHECKING([for Mozilla nss3 includes])
777 CPPFLAGS_save="$CPPFLAGS"
778 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
780 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
781 [moz_nss_includes="yes"],[moz_nss_includes="no"])
782 CPPFLAGS="$CPPFLAGS_save"
784 if test "x${moz_nss_includes}" = "xyes"; then
785 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
787 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
789 AC_MSG_RESULT($moz_nss_includes)
791 AC_MSG_CHECKING([for Mozilla nss libraries])
792 LDFLAGS_save="$LDFLAGS"
794 nsslibs="-lssl3 -lsmime3 -lnss3"
796 LIBS="$nsslibs $nsprlibs"
797 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
798 if test -n "${with_nss_libs}"; then
799 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
801 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
804 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
805 [moz_nss_libs="yes"],[moz_nss_libs="no"])
806 LDFLAGS="$LDFLAGS_save"
809 if test "x${moz_nss_libs}" = "xyes"; then
810 if test "x${enable_smime}" = "xyes"; then
811 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
814 if test -n "${with_nss_libs}"; then
815 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
817 MANUAL_NSS_LIBS="$nsslibs"
820 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
822 AC_MSG_RESULT([$moz_nss_libs])
824 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
825 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
828 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
830 dnl For pkgconfig files.
831 AC_SUBST(mozilla_nss)
832 AC_SUBST(mozilla_nspr)
834 AC_SUBST(MANUAL_NSPR_CFLAGS)
835 AC_SUBST(MANUAL_NSPR_LIBS)
836 AC_SUBST(MANUAL_NSS_CFLAGS)
837 AC_SUBST(MANUAL_NSS_LIBS)
839 dnl ******************************
840 dnl system mail stuff
841 dnl ******************************
842 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
843 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
845 AC_MSG_CHECKING([system mail directory])
846 if test -d /var/mail -a '!' -h /var/mail ; then
847 system_mail_dir="/var/mail"
849 system_mail_dir="/var/spool/mail"
851 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
853 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
855 CAMEL_LOCK_HELPER_USER=""
856 CAMEL_LOCK_HELPER_GROUP=""
857 system_mail_perm="world writable"
860 CAMEL_LOCK_HELPER_USER=""
861 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
862 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
865 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
866 CAMEL_LOCK_HELPER_GROUP=""
867 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
870 CAMEL_LOCK_HELPER_USER=""
871 CAMEL_LOCK_HELPER_GROUP=""
872 system_mail_perm="???"
876 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
877 AC_SUBST(CAMEL_LOCK_HELPER_USER)
878 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
880 dnl ******************************
882 dnl ******************************
883 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
884 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
885 [[ #include <time.h> ]],
890 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
891 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
892 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
894 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
895 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
896 [[ #include <time.h> ]],
898 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
899 if test "x$ac_cv_var_timezone" = "xyes"; then
900 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
901 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
902 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
903 [[ #include <time.h> ]],
905 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
906 if test "x$ac_cv_var_altzone" = "xyes"; then
907 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
910 AC_MSG_ERROR([unable to find a way to determine timezone])
914 dnl ******************************
915 dnl ctime_r prototype
916 dnl ******************************
917 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
919 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
920 [[ #include <time.h> ]],
923 ctime_r (&date, buf, 100); ]]
924 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
927 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
928 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
931 dnl ******************************
932 dnl gethostbyname_r prototype
933 dnl ******************************
934 AC_CHECK_FUNCS(gethostbyname_r,[
935 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
937 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
939 #include "confdefs.h"
940 #include <sys/types.h>
941 #include <sys/socket.h>
942 #include <netinet/in.h>
944 #define BUFSIZE (sizeof(struct hostent)+10)
948 char buffer[BUFSIZE];
951 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
953 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
956 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
957 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
960 dnl ******************************
961 dnl gethostbyaddr_r prototype
962 dnl ******************************
963 AC_CHECK_FUNCS(gethostbyaddr_r,[
964 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
966 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
968 #include "confdefs.h"
969 #include <sys/types.h>
970 #include <sys/socket.h>
971 #include <netinet/in.h>
973 #define BUFSIZE (sizeof(struct hostent)+10)
977 char buffer[BUFSIZE];
980 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
981 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
984 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
985 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
988 dnl ******************************
989 dnl stat(v)fs location/type
990 dnl ******************************
991 AC_CHECK_HEADER([sys/statvfs.h],
992 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
993 [[ #if HAVE_SYS_STATVFS_H
994 #include <sys/statvfs.h>
997 AC_CHECK_FUNCS(statvfs)
999 AC_CHECK_HEADER([sys/param.h],
1000 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1001 [[ #if HAVE_SYS_PARAM_H
1002 #include <sys/param.h>
1005 AC_CHECK_HEADER([sys/mount.h],
1006 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1007 [[ #if HAVE_SYS_MOUNT_H
1008 #include <sys/mount.h>
1011 AC_CHECK_FUNCS(statfs)
1013 dnl ******************************
1014 dnl IPv6 support and getaddrinfo calls
1015 dnl ******************************
1016 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1018 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1019 [[ #include "confdefs.h"
1020 #include <sys/types.h>
1021 #include <sys/socket.h>
1022 #include <netinet/in.h>
1026 [[ #ifndef NI_MAXHOST
1027 #define NI_MAXHOST 1025
1031 #define NI_MAXSERV 32
1034 struct addrinfo hints, *res;
1035 struct sockaddr_in6 sin6;
1037 char host[NI_MAXHOST];
1038 char serv[NI_MAXSERV];
1040 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1042 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1043 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1046 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1047 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1048 if test "x$enable_ipv6" = "xyes" ; then
1049 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1053 AC_ARG_ENABLE([ipv6],
1054 AS_HELP_STRING([--enable-ipv6=no/yes],
1055 [Enable support for resolving IPv6 addresses.]),
1056 [enable_ipv6=$enableval],[enable_ipv6=yes])
1057 if test "x$enable_ipv6" = "xyes"; then
1059 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1060 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1061 [[ #include "confdefs.h"
1062 #include <sys/types.h>
1063 #include <sys/socket.h>
1064 #include <netinet/in.h>
1067 [[ struct addrinfo hints;
1068 hints.ai_flags = AI_ADDRCONFIG;
1070 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1076 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1078 AC_CHECK_HEADER([wspiapi.h],
1079 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1081 dnl **********************************
1082 dnl Weather calendar backend support
1083 dnl **********************************
1084 AC_MSG_CHECKING([if we should build the weather calendar backend])
1085 AC_ARG_ENABLE([weather],
1086 [AS_HELP_STRING([--enable-weather],
1087 [Build the weather calendar backend (default=yes)])],
1088 [use_gweather=$enableval], [use_gweather=yes])
1090 AC_MSG_RESULT([$use_gweather])
1091 if test "x$use_gweather" = "xyes"; then
1092 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1093 [AC_MSG_ERROR([The weather calendar backend requires GWeather >= gweather_minimum_version. Alternatively, you may specify --disable-weather as a configure option to avoid building the backend.])])
1095 dnl gweather-3.5 introduces API changes we do not yet support.
1096 if `$PKG_CONFIG --atleast-version=3.5 gweather-3.0`; then
1097 AC_MSG_ERROR([gweather-3.5 is not yet supported. Install gweather-3.4 or specify --disable-weather as a configure option to avoid building the backend.])
1100 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1102 dnl ******************************
1104 dnl ******************************
1105 AC_ARG_ENABLE([nntp],
1106 AS_HELP_STRING([--enable-nntp],
1107 [Build Usenet news (NNTP) backend]),
1108 [enable_nntp=$enableval],[enable_nntp=yes])
1109 if test "x$enable_nntp" = "xyes"; then
1110 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1115 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1117 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1119 dnl ******************************
1121 dnl ******************************
1122 AC_ARG_ENABLE([dot-locking],
1123 AS_HELP_STRING([--enable-dot-locking=yes/no],
1124 [Enable support for locking mail files with dot locking]),
1125 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1127 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1128 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1134 AC_ARG_ENABLE([file-locking],
1135 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1136 [Enable support for locking mail files with file locking]),
1137 [],[enable_file_locking=fcntl])
1139 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1140 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1143 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1144 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1151 dnl ******************************
1152 dnl sendmail operation
1153 dnl ******************************
1154 AC_MSG_CHECKING([for SunOS broken spool format])
1155 if test "x$host_os" = "xsunos" ; then
1156 with_broken_spool="yes"
1159 AC_ARG_WITH([broken-spool],
1160 AS_HELP_STRING([--with-broken-spool=yes/no],
1161 [Using SunOS/Solaris sendmail which has a broken spool format]),
1162 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1164 if test "x$with_broken_spool" = "xyes"; then
1165 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1168 AC_MSG_RESULT([$with_broken_spool])
1170 dnl ******************************
1171 dnl DBus call timeout
1172 dnl ******************************
1174 AC_ARG_WITH([dbus-call-timeout],
1175 AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1176 [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1177 [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1179 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1180 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1185 EVO_KRB5_SUPPORT(no)
1187 dnl ******************************
1189 dnl ******************************
1192 dnl ******************************
1194 dnl ******************************
1195 if test "x$os_win32" != "xyes"; then
1197 case $with_openldap in
1202 case $with_static_ldap in
1204 msg_ldap="$with_openldap (static)"
1207 msg_ldap="$with_openldap (dynamic)"
1212 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1213 if test "x$with_openldap" = "xno" ; then
1214 EVO_SUNLDAP_CHECK(no)
1215 case $with_sunldap in
1220 case $with_static_sunldap in
1222 msg_ldap="$with_sunldap (static)"
1225 msg_ldap="$with_sunldap (dynamic)"
1232 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1234 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1236 dnl Win32 LDAP support
1237 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1238 LDAP_LIBS="-lwldap32"
1239 AC_SUBST(LDAP_CFLAGS)
1241 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1242 AM_CONDITIONAL(ENABLE_LDAP, true)
1243 AM_CONDITIONAL(SUNLDAP, false)
1247 dnl ******************************
1248 dnl GObject marshalling
1249 dnl ******************************
1252 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1253 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1254 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1256 dnl ******************************
1257 dnl Code coverage flags
1258 dnl ******************************
1260 AC_ARG_ENABLE([code-coverage],
1261 AS_HELP_STRING([--enable-code-coverage], [compile with code coverage code]),
1262 [enable_code_coverage=$enableval], [enable_code_coverage=no])
1264 if test "x$GCC" = "xyes"; then
1265 if test "x$enable_code_coverage" = "xyes"; then
1266 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
1267 CODE_COVERAGE_LDFLAGS="-lgcov"
1271 AC_SUBST([CODE_COVERAGE_CFLAGS])
1272 AC_SUBST([CODE_COVERAGE_LDFLAGS])
1274 dnl ******************************
1275 dnl Utility macro to set compiler flags for a specific lib.
1276 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1277 dnl ******************************
1278 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1279 PKG_CHECK_MODULES([$1], [$2])
1280 $1_CFLAGS="[$]$1_CFLAGS $3 "
1281 $1_LIBS="[$]$1_LIBS $4 "
1284 dnl ******************************
1286 dnl ******************************
1287 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1289 dnl ******************************
1290 dnl libedataserver flags
1291 dnl ******************************
1292 E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1294 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1295 AC_SUBST(E_DATA_SERVER_CFLAGS)
1296 AC_SUBST(E_DATA_SERVER_LIBS)
1298 dnl ******************************
1299 dnl libedataserverui
1300 dnl ******************************
1301 E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 gconf-2.0"
1303 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
1304 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1305 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1307 if test "x$enable_maintainer_mode" = "xyes" ; then
1308 FACTORY_GTK_CFLAGS=$E_DATA_SERVER_UI_CFLAGS
1309 FACTORY_GTK_LIBS=$E_DATA_SERVER_UI_LIBS
1310 AC_SUBST(FACTORY_GTK_CFLAGS)
1311 AC_SUBST(FACTORY_GTK_LIBS)
1314 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libxml-2.0 gconf-2.0"
1316 dnl ******************************
1317 dnl libebackend flags
1318 dnl ******************************
1319 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1320 AC_SUBST(E_BACKEND_CFLAGS)
1321 AC_SUBST(E_BACKEND_LIBS)
1323 dnl ******************************
1324 dnl evolution-addressbook flags
1325 dnl ******************************
1326 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 gconf-2.0"
1328 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1329 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1330 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1332 dnl ******************************
1333 dnl evolution-calendar flags
1334 dnl ******************************
1335 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libxml-2.0 gconf-2.0"
1338 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1339 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1340 dnl to differentiate between <libical/ical.h> and <ical.h>
1341 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1342 dnl libical is fixed, we have to work-around the buggy CFlags.
1344 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1345 LIBICAL_EXTRA_LIBS=""
1346 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1347 AC_SUBST(LIBICAL_EXTRA_LIBS)
1349 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1350 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1351 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1353 dnl ****************************
1354 dnl Check for ical_set_unknown_token_handling_setting function
1355 dnl ****************************
1356 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1357 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1358 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1359 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1360 [[#include <libical/ical.h>]],
1361 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1362 [AC_DEFINE(HAVE_ICAL_UNKNOWN_TOKEN_HANDLING, 1, [libical provides ical_set_unknown_token_handling_setting function]) ac_cv_have_iuth=yes],[ac_cv_have_iuth=no])
1365 AC_MSG_RESULT([$ac_cv_have_iuth])
1367 dnl ******************************
1369 dnl ******************************
1370 LIBGDATA_REQUIRED=libgdata_minimum_version
1371 AC_SUBST(LIBGDATA_REQUIRED)
1373 EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
1374 AC_SUBST(GDATA_CFLAGS)
1375 AC_SUBST(GDATA_LIBS)
1377 dnl ******************************
1379 dnl ******************************
1380 LIBSOUP_REQUIRED=libsoup_minimum_version
1381 AC_SUBST(LIBSOUP_REQUIRED)
1383 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1384 AC_SUBST(SOUP_CFLAGS)
1387 dnl ******************************
1389 dnl ******************************
1390 SQLITE_REQUIRED=sqlite_minimum_version
1391 AC_SUBST(SQLITE_REQUIRED)
1394 dnl deflateInit is a #define, use deflateEnd instead
1395 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1397 if test "x$zlib_found" = "xfalse"; then
1398 AC_MSG_ERROR([*** zlib is required])
1401 dnl ******************************
1402 dnl Checks for large file support
1403 dnl ******************************
1404 AC_ARG_ENABLE([largefile],
1405 AS_HELP_STRING([--enable-largefile],
1406 [enable support for large files [[default=no]]]),
1407 [],[enable_largefile="yes"])
1409 if test "x$enable_largefile" != "xno"; then
1411 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1412 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1413 [[ #include <sys/types.h>
1414 #include <sys/stat.h>
1417 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1418 )],[ac_cv_largefile64_source="no"],
1419 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1420 [[ #define _LARGEFILE64_SOURCE
1421 #include <sys/types.h>
1422 #include <sys/stat.h>
1425 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1426 [ac_cv_largefile64_source="unknown"])])
1429 enable_largefile="no"
1431 if test "x$ac_cv_largefile64_source" = "xyes"; then
1432 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1433 enable_largefile="yes"
1434 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1435 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1438 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1439 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1440 enable_largefile="yes"
1443 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1444 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1445 enable_largefile="yes"
1448 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1452 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1454 EVO_SET_COMPILE_FLAGS(CAMEL, gio-2.0 gmodule-2.0 $mozilla_nss sqlite3 >= sqlite_minimum_version, $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS, -lz $KRB5_LIBS $MANUAL_NSS_LIBS)
1455 AC_SUBST(CAMEL_CFLAGS)
1456 AC_SUBST(CAMEL_LIBS)
1458 dnl ******************************
1459 dnl Special directories
1460 dnl ******************************
1462 dnl If you add something here, consider whether or not you also
1463 dnl need to add it to one or more .pc.in files (for Connector,
1466 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1467 AC_SUBST(privdatadir)
1469 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1470 AC_SUBST(privincludedir)
1472 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1473 AC_SUBST(privlibdir)
1475 imagesdir='${datadir}'/pixmaps/evolution-data-server
1478 ebook_backenddir='${libdir}'/evolution-data-server/addressbook-backends
1479 AC_SUBST(ebook_backenddir)
1481 ecal_backenddir='${libdir}'/evolution-data-server/calendar-backends
1482 AC_SUBST(ecal_backenddir)
1484 if test "x$use_gweather" = "xyes"; then
1485 weatherdatadir="$privdatadir/weather"
1486 AC_SUBST(weatherdatadir)
1489 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1490 camel_providerdir='${libdir}'/evolution-data-server/camel-providers
1491 AC_SUBST(camel_providerdir)
1493 dnl *******************
1494 dnl D-BUS service stuff
1495 dnl *******************
1496 m4_pattern_allow([AM_V_GEN])
1497 EVO_SUBST_SERVICE_RULE='%.service: %.service.in Makefile ; $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" -e s"|\@ADDRESS_BOOK_DBUS_SERVICE_NAME\@|$(ADDRESS_BOOK_DBUS_SERVICE_NAME)|" -e "s|\@CALENDAR_DBUS_SERVICE_NAME\@|$(CALENDAR_DBUS_SERVICE_NAME)|" $< > $@'
1498 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1500 dnl ******************************
1502 dnl ******************************
1503 AC_PATH_PROG(GCONFTOOL, gconftool-2, [no])
1506 dnl ******************************
1508 dnl ******************************
1509 AC_PATH_PROG(GPERF, gperf, [no])
1510 if test "x$GPERF" = "xno"; then
1511 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1514 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1516 dnl ******************************
1518 dnl ******************************
1519 AC_ARG_ENABLE(vala-bindings,
1520 AC_HELP_STRING([--enable-vala-bindings],
1521 [build the EXPERIMENTAL Vala bindings]),
1522 enable_vala_bindings=$enableval,
1523 enable_vala_bindings=no)
1525 if test x$enable_vala_bindings = xyes; then
1526 if test "x$INTROSPECTION_SCANNER" = x; then
1527 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1530 AM_PROG_VALAC([0.13.0])
1533 AC_PATH_PROG(VALAC, valac, valac)
1537 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1539 if test "x$VAPIGEN" = "xfalse"; then
1540 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1546 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1549 dnl ******************************
1551 dnl ******************************
1553 export privincludedir
1558 evolution-data-server-zip
1559 evolution-data-server.pc
1560 addressbook/Makefile
1561 addressbook/libebook/Makefile
1562 addressbook/libebook/libebook.pc
1563 addressbook/libedata-book/Makefile
1564 addressbook/libedata-book/libedata-book.pc
1565 addressbook/libegdbus/Makefile
1566 addressbook/backends/Makefile
1567 addressbook/backends/file/Makefile
1568 addressbook/backends/vcf/Makefile
1569 addressbook/backends/ldap/Makefile
1570 addressbook/backends/google/Makefile
1571 addressbook/backends/webdav/Makefile
1574 calendar/libecal/Makefile
1575 calendar/libecal/libecal.pc
1576 calendar/libedata-cal/Makefile
1577 calendar/libedata-cal/libedata-cal.pc
1578 calendar/libegdbus/Makefile
1579 calendar/backends/Makefile
1580 calendar/backends/caldav/Makefile
1581 calendar/backends/file/Makefile
1582 calendar/backends/http/Makefile
1583 calendar/backends/contacts/Makefile
1584 calendar/backends/weather/Makefile
1586 camel/providers/Makefile
1587 camel/providers/imap/Makefile
1588 camel/providers/imapx/Makefile
1589 camel/providers/local/Makefile
1590 camel/providers/nntp/Makefile
1591 camel/providers/pop3/Makefile
1592 camel/providers/sendmail/Makefile
1593 camel/providers/smtp/Makefile
1594 camel/tests/Makefile
1595 camel/tests/folder/Makefile
1596 camel/tests/lib/Makefile
1597 camel/tests/message/Makefile
1598 camel/tests/mime-filter/Makefile
1599 camel/tests/misc/Makefile
1600 camel/tests/smime/Makefile
1602 libebackend/Makefile
1603 libebackend/libebackend.pc
1604 libedataserver/Makefile
1605 libedataserver/eds-version.h
1606 libedataserver/libedataserver.pc
1607 libedataserverui/Makefile
1608 libedataserverui/libedataserverui.pc
1610 services/evolution-addressbook-factory/Makefile
1611 services/evolution-calendar-factory/Makefile
1613 tests/libebook/Makefile
1614 tests/libebook/client/Makefile
1615 tests/libebook/vcard/Makefile
1616 tests/libecal/Makefile
1617 tests/libecal/client/Makefile
1618 tests/libedata-cal/Makefile
1619 tests/libedataserver/Makefile
1620 tests/libedataserverui/Makefile
1622 docs/reference/Makefile
1623 docs/reference/addressbook/Makefile
1624 docs/reference/addressbook/libebook/Makefile
1625 docs/reference/addressbook/libedata-book/Makefile
1626 docs/reference/calendar/Makefile
1627 docs/reference/calendar/libecal/Makefile
1628 docs/reference/calendar/libedata-cal/Makefile
1629 docs/reference/camel/Makefile
1630 docs/reference/libedataserver/Makefile
1631 docs/reference/libedataserverui/Makefile
1632 docs/reference/libebackend/Makefile
1639 evolution-data-server has been configured as follows:
1640 Weather calendar: $use_gweather
1641 Mail Directory: $system_mail_dir, $system_mail_perm
1642 LDAP support: $msg_ldap
1643 NNTP support: $msg_nntp
1644 Kerberos 5: $msg_krb5
1645 SMIME support: $msg_smime
1646 IPv6 support: $msg_ipv6
1647 Dot Locking: $msg_dot
1648 File Locking: $msg_file
1649 Large files: $enable_largefile
1650 Gtk Doc: $enable_gtk_doc
1651 Introspection: $enable_introspection
1652 Vala bindings: $enable_vala_bindings
1653 GNOME Online Accounts $enable_goa
1654 Code coverage (gcov): $enable_code_coverage