2 dnl Evolution-Data-Server version
3 m4_define([eds_major_version], [3])
4 m4_define([eds_minor_version], [7])
5 m4_define([eds_micro_version], [3])
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.8])
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 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
37 dnl Keep these two definitions in agreement.
38 m4_define([glib_minimum_version], [2.34])
39 m4_define([glib_encoded_version], [GLIB_VERSION_2_34])
41 dnl Keep these two definitions in agreement.
42 m4_define([gdk_minimum_version], [3.2])
43 m4_define([gdk_encoded_version], [GDK_VERSION_3_2])
45 m4_define([gcr_minimum_version], [3.4])
46 m4_define([libsecret_minimum_version], [0.5])
47 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
48 m4_define([libsoup_minimum_version], [2.38.1])
49 m4_define([libgdata_minimum_version], [0.10])
50 m4_define([sqlite_minimum_version], [3.5])
51 m4_define([libical_minimum_version], [0.43])
54 m4_define([goa_minimum_version], [3.2])
55 m4_define([gweather_minimum_version], [3.5.0])
57 AC_SUBST([BASE_VERSION],[base_version])
58 AC_SUBST([API_VERSION],[api_version])
59 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
60 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
62 EDS_MAJOR_VERSION=eds_major_version
63 EDS_MINOR_VERSION=eds_minor_version
64 EDS_MICRO_VERSION=eds_micro_version
68 dnl ******************************
70 dnl ******************************
71 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook4"
72 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar3"
73 SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources1"
74 USER_PROMPTER_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.UserPrompter0"
77 ADDRESS_BOOK_DBUS_SERVICE_NAME,
78 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
79 [D-Bus service name for the address book factory])
82 CALENDAR_DBUS_SERVICE_NAME,
83 ["$CALENDAR_DBUS_SERVICE_NAME"],
84 [D-Bus service name for the calendar factory])
87 SOURCES_DBUS_SERVICE_NAME,
88 ["$SOURCES_DBUS_SERVICE_NAME"],
89 [D-Bus service name for the source registry])
92 USER_PROMPTER_DBUS_SERVICE_NAME,
93 ["$USER_PROMPTER_DBUS_SERVICE_NAME"],
94 [D-Bus service name for the user prompter])
96 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
97 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
98 AC_SUBST(SOURCES_DBUS_SERVICE_NAME)
99 AC_SUBST(USER_PROMPTER_DBUS_SERVICE_NAME)
101 dnl ******************************
102 dnl Libtool versioning
103 dnl ******************************
104 LIBEDATASERVER_CURRENT=17
105 LIBEDATASERVER_REVISION=0
108 LIBEDATASERVERUI_CURRENT=5
109 LIBEDATASERVERUI_REVISION=0
110 LIBEDATASERVERUI_AGE=0
116 LIBEDATACAL_CURRENT=19
117 LIBEDATACAL_REVISION=0
120 LIBEDATABOOK_CURRENT=16
121 LIBEDATABOOK_REVISION=0
132 LIBEBACKEND_CURRENT=5
133 LIBEBACKEND_REVISION=0
136 AC_SUBST(EDS_MAJOR_VERSION)
137 AC_SUBST(EDS_MINOR_VERSION)
138 AC_SUBST(EDS_MICRO_VERSION)
139 AC_SUBST(LIBEDATASERVER_CURRENT)
140 AC_SUBST(LIBEDATASERVER_REVISION)
141 AC_SUBST(LIBEDATASERVER_AGE)
142 AC_SUBST(LIBEDATASERVERUI_CURRENT)
143 AC_SUBST(LIBEDATASERVERUI_REVISION)
144 AC_SUBST(LIBEDATASERVERUI_AGE)
145 AC_SUBST(LIBECAL_CURRENT)
146 AC_SUBST(LIBECAL_REVISION)
147 AC_SUBST(LIBECAL_AGE)
148 AC_SUBST(LIBEDATACAL_CURRENT)
149 AC_SUBST(LIBEDATACAL_REVISION)
150 AC_SUBST(LIBEDATACAL_AGE)
151 AC_SUBST(LIBEBOOK_CURRENT)
152 AC_SUBST(LIBEBOOK_REVISION)
153 AC_SUBST(LIBEBOOK_AGE)
154 AC_SUBST(LIBEDATABOOK_CURRENT)
155 AC_SUBST(LIBEDATABOOK_REVISION)
156 AC_SUBST(LIBEDATABOOK_AGE)
157 AC_SUBST(LIBCAMEL_CURRENT)
158 AC_SUBST(LIBCAMEL_REVISION)
159 AC_SUBST(LIBCAMEL_AGE)
160 AC_SUBST(LIBEBACKEND_CURRENT)
161 AC_SUBST(LIBEBACKEND_REVISION)
162 AC_SUBST(LIBEBACKEND_AGE)
164 dnl **************************************
165 dnl Put the ACLOCAL flags in the Makefile
166 dnl **************************************
167 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
169 dnl ******************************
170 dnl Compiler Warning Flags
171 dnl ******************************
172 AS_COMPILER_FLAGS(WARNING_FLAGS,
174 -Wdeprecated-declarations
175 -Wno-missing-field-initializers
177 -Wno-unused-parameter
178 -Wdeclaration-after-statement
179 -Werror-implicit-function-declaration
180 -Wformat-security -Winit-self
181 -Wmissing-declarations -Wmissing-include-dirs
182 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
183 -Wredundant-decls -Wundef -Wwrite-strings")
184 AC_SUBST(WARNING_FLAGS)
186 dnl Other useful compiler warnings for test builds only.
187 dnl These may produce warnings we have no control over,
188 dnl or false positives we don't always want to see.
190 dnl -Wformat-nonliteral
191 dnl -Wmissing-format-attribute
193 dnl -Wstrict-aliasing=2
195 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
197 dnl *******************************
198 dnl Check for --enable-strict
199 dnl *******************************
200 AC_ARG_ENABLE([strict],
201 [AS_HELP_STRING([--enable-strict],
202 [enable strict building, like without deprecated symbols (default=auto); auto enables strict building only if .git subdirectory exists])],
203 [enable_strict=$enableval], [enable_strict=auto])
205 AC_MSG_CHECKING([if strict building is enabled])
206 if test "x$enable_strict" = xauto; then
207 dnl Be strict when compiling with .git subdirectory
208 if test -d .git ; then
214 AC_MSG_RESULT([$enable_strict])
216 if test "x$enable_strict" = xyes; then
217 AM_CPPFLAGS="$AM_CPPFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED"
220 dnl Warn about GLib/GTK+ API usage that violates our minimum requirements.
221 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
222 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MAX_ALLOWED=gdk_encoded_version"
224 dnl These will suppress warnings about newly-deprecated symbols. Ideally
225 dnl these settings should match our minimum requirements and we will clean
226 dnl up any new deprecation warnings after bumping our minimum requirements.
227 dnl But if the warnings get to be overwhelming, use fixed versions instead.
228 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MIN_REQUIRED=glib_encoded_version"
229 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MIN_REQUIRED=gdk_encoded_version"
231 AC_SUBST(AM_CPPFLAGS)
233 dnl ******************************
234 dnl Initialize maintainer mode
235 dnl ******************************
236 AM_MAINTAINER_MODE([enable])
238 if test "x$enable_maintainer_mode" = "xyes" ; then
239 AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
250 dnl For gen-western-table.py
253 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
254 dnl behavior that -- according to the C99 standard -- is supposed to be
255 dnl undefined. We may still have aliasing abuses lying around that rely
256 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
257 dnl optimization until we can find and fix all the abuses.
258 dnl (AC_PROG_CC must run first to set the GCC variable.)
259 dnl XXX This really belongs in AM_CFLAGS.
260 if test "x${GCC}" = "xyes"; then
261 CFLAGS="$CFLAGS -fno-strict-aliasing"
264 dnl ******************************
266 dnl ******************************
267 IT_PROG_INTLTOOL([0.35.5])
269 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
270 AC_SUBST(GETTEXT_PACKAGE)
271 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
273 localedir='$(prefix)/$(DATADIRNAME)/locale'
276 dnl ******************************
277 dnl Initialize libtool
278 dnl ******************************
280 LT_INIT(disable-static win32-dll)
284 dnl This relies on $SED, which is defined in ltmain.sh, which
285 dnl is invoked by LT_INIT (at least I think that's how it works).
288 dnl ******************************
290 dnl ******************************
291 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
293 dnl The private D-Bus documentation is for developers only.
294 AC_ARG_WITH([private-docs],
295 AS_HELP_STRING([--with-private-docs],
296 [Build documentation for private libraries ]
297 [(requires --enable-gtk-doc) [default=no]],),
298 [with_private_docs="$withval"],[with_private_docs="no"])
299 AM_CONDITIONAL(WITH_PRIVATE_DOCS, [test x$with_private_docs = xyes])
301 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
304 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
307 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
311 dnl ******************************
313 dnl ******************************
314 AC_MSG_CHECKING([for Win32])
318 NO_UNDEFINED='-no-undefined'
319 SOCKET_LIBS='-lws2_32 -ldnsapi'
321 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
322 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
323 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
330 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
337 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
340 AC_MSG_RESULT([$os_win32])
341 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
342 AC_SUBST(NO_UNDEFINED)
343 AC_SUBST(SOCKET_LIBS)
344 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
346 dnl **************************************
347 dnl Check for posix compatible sys/wait.h
348 dnl **************************************
351 dnl ************************************
352 dnl Check for posix compatible alloca()
353 dnl ************************************
356 dnl ******************************
357 dnl Checks for functions
358 dnl ******************************
359 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
361 dnl ***********************************
362 dnl Check for base dependencies early.
363 dnl ***********************************
364 PKG_CHECK_MODULES(GNOME_PLATFORM,
365 [gio-2.0 >= glib_minimum_version
366 gmodule-2.0 >= glib_minimum_version
367 gtk+-3.0 >= gdk_minimum_version
368 libxml-2.0 >= libxml_minimum_version
369 libsoup-2.4 >= libsoup_minimum_version
370 libgdata >= libgdata_minimum_version])
372 if test x$os_win32 = xno; then
373 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
376 dnl *******************************
377 dnl Check for GNOME Online Accounts
378 dnl *******************************
380 [AS_HELP_STRING([--enable-goa],
381 [enable GNOME Online Accounts support (default=yes)])],
382 [enable_goa=$enableval], [enable_goa=yes])
383 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
384 AC_MSG_RESULT([$enable_goa])
385 if test "x$enable_goa" = xyes; then
386 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
389 goa-1.0 not found (or version < goa_minimum_version)
391 If you want to disable GNOME Online Accounts support,
392 please append --disable-goa to configure.
395 AC_DEFINE(HAVE_GOA, 1, [Define to 1 if you have the goa-1.0 package.])
397 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
399 dnl GoaPasswordBased was introduced in version 3.5.
400 if `$PKG_CONFIG --atleast-version=3.5 goa-1.0`; then
401 AC_DEFINE(HAVE_GOA_PASSWORD_BASED,1,[Have GoaPasswordBased in goa-1.0])
404 dnl ***********************************
405 dnl Check for GNOME Keyring.
406 dnl ***********************************
407 if test x$os_win32 = xno; then
408 PKG_CHECK_MODULES(LIBSECRET,
409 [libsecret-unstable >= libsecret_minimum_version])
411 AC_SUBST(LIBSECRET_CFLAGS)
412 AC_SUBST(LIBSECRET_LIBS)
414 dnl **********************************************************
415 dnl gcr-base is needed for secure password exchange over D-Bus
416 dnl **********************************************************
417 PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
418 AC_SUBST(GCR_BASE_CFLAGS)
419 AC_SUBST(GCR_BASE_LIBS)
421 LIBICAL_REQUIRED=libical_minimum_version
422 AC_SUBST(LIBICAL_REQUIRED)
424 dnl ******************************
426 dnl ******************************
427 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
429 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
430 [AC_MSG_ERROR([No regex library found])])])
433 dnl ******************************
435 dnl ******************************
437 AS_HELP_STRING([--with-libdb=PREFIX],
438 [Prefix where libdb is installed]),
439 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
441 DB_CFLAGS="-I$libdb_prefix/include"
442 DB_LIBS="-L$libdb_prefix/lib -ldb"
444 AC_MSG_CHECKING([Berkeley DB])
445 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
446 save_libs=$LIBS; LIBS="$DB_LIBS"
447 AC_LINK_IFELSE([AC_LANG_PROGRAM(
449 [[db_create(NULL, NULL, 0)]])],
450 [AC_MSG_RESULT([yes])],
451 [AC_MSG_ERROR([Cannot find libdb])])
457 dnl ******************************
459 dnl ******************************
463 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
464 AC_LINK_IFELSE([AC_LANG_PROGRAM(
471 cd = iconv_open ("UTF-8", "ISO-8859-1");
473 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
475 if test "x$ac_cv_libiconv" = "xyes"; then
477 if test "x$os_win32" = "xyes"; then
478 dnl Don't pointlessly auto-export the global symbols
479 dnl from a potentially static libiconv.a
480 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
485 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
488 if test "x$have_iconv" = "xyes"; then
489 if test "x$ac_cv_libiconv" = "xno"; then
490 AC_CHECK_FUNCS(gnu_get_libc_version)
492 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
493 AC_RUN_IFELSE([AC_LANG_SOURCE([[
497 #ifdef HAVE_GNU_GET_LIBC_VERSION
498 #include <gnu/libc-version.h>
501 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
502 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
503 char *transbuf = malloc (10), *trans = transbuf;
505 size_t jp_len = strlen (jp), utf8_len = 10;
506 size_t utf8_real_len = strlen (utf8);
508 #ifdef HAVE_GNU_GET_LIBC_VERSION
509 /* glibc 2.1.2's iconv is broken in hard to test ways. */
510 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
514 cd = iconv_open ("UTF-8", "ISO-2022-JP");
515 if (cd == (iconv_t) -1)
517 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
519 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
523 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
526 if test "x$have_iconv" = "xno"; then
527 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
531 CFLAGS="$CFLAGS -I$srcdir"
533 AC_MSG_CHECKING([preferred charset name formats for system iconv])
534 AC_RUN_IFELSE([AC_LANG_SOURCE([[
536 #include "iconv-detect.c"
538 [AC_MSG_RESULT([found])],
539 [AC_MSG_RESULT([not found])
541 *** The iconv-detect program was unable to determine the
542 *** preferred charset name formats recognized by your
543 *** iconv library. It is suggested that you install a
544 *** working iconv library such as the one found at
545 *** ftp://ftp.gnu.org/pub/gnu/libiconv
547 [if test "x$os_win32" = xyes; then
548 AC_MSG_RESULT([using known win32 result])
549 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
550 echo >>iconv-detect.h
551 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
552 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
553 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
555 AC_MSG_RESULT([unknown])
557 *** We can't determine the preferred charset name formats
558 *** recognized by your iconv library. You are
559 *** cross-compiling and supposed to know what you are doing.
560 *** Please construct the iconv-detect.h file manually.
565 CFLAGS="$save_CFLAGS"
568 AC_ARG_ENABLE([backtraces],
569 [AS_HELP_STRING([--enable-backtraces],
570 [enable backtraces for camel_pointer_tracker (default=no)])],
571 [enable_backtraces=$enableval], [enable_backtraces=no])
573 if test "x$enable_backtraces" = xyes; then
574 dnl ****************************
575 dnl Check for backtrace_symbols function and dwfl from elfutils
576 dnl ****************************
577 AC_MSG_CHECKING([libc backtrace_symbols function])
578 AC_LINK_IFELSE([AC_LANG_PROGRAM(
579 [[#include <execinfo.h>]],
580 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
581 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
582 AC_MSG_RESULT([$ac_cv_have_bsf])
584 if test "x$ac_cv_have_bsf" = xyes; then
587 AC_MSG_CHECKING([elfutils/libdwfl])
588 AC_LINK_IFELSE([AC_LANG_PROGRAM(
589 [[#include <elfutils/libdwfl.h>]],
593 Dwarf_Addr module_low_addr;
596 dwfl_standard_find_debuginfo;
597 dwfl_linux_proc_find_elf;
599 dwfl_linux_proc_report (NULL, 1);
600 dwfl_report_end (NULL, NULL, NULL);
602 dwfl_module_addrname (NULL, NULL);
603 dwfl_module_getsrc (NULL, NULL);
604 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
605 DWARF_CB_ABORT; DWARF_CB_OK;
606 dwfl_getmodules (NULL, NULL, NULL, 0);
608 [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
609 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
613 if test "x$ac_cv_have_elfdwfl" = xyes; then
615 AC_SUBST(LIBDWFL_LIBS)
620 dnl **********************************
621 dnl Check for nl_langinfo and CODESET
622 dnl **********************************
623 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
624 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
625 [[#include <langinfo.h>]],
626 [[char *codeset = nl_langinfo (CODESET);]]
627 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
628 if test "x$ac_cv_langinfo_codeset" = "xyes"; then
629 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
631 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
633 dnl *******************************************************
634 dnl Check to see if strftime supports the use of %l and %k
635 dnl *******************************************************
636 AC_MSG_CHECKING([for %l and %k support in strftime])
637 AC_RUN_IFELSE([AC_LANG_SOURCE(
638 [[ #include <stdlib.h>
641 int main(int argc, char **argv) {
647 timeinfo=localtime(&rawtime);
649 strftime(buf, 10, "%lx%k", timeinfo);
651 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
658 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
659 AC_MSG_RESULT([$ac_cv_lkstrftime])
661 dnl ********************************************************************************
662 dnl security extension support (SSL and S/MIME)
664 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
665 dnl needed by Camel (SSL and S/MIME).
667 dnl The Evolution security extensions are only built if these libraries are found
668 dnl ********************************************************************************
671 AC_ARG_ENABLE([smime],
672 AS_HELP_STRING([--enable-smime],
673 [Enable SMIME support through Mozilla nss @<:@default=yes@:>@ ]),
674 [enable_smime="$enableval"],[enable_smime="yes"])
676 AC_ARG_WITH([nspr-includes],
677 AS_HELP_STRING([--with-nspr-includes],
678 [Prefix of Mozilla nspr4 includes.]),
679 [with_nspr_includes="$withval"])
681 AC_ARG_WITH([nspr-libs],
682 AS_HELP_STRING([--with-nspr-libs],
683 [Prefix of Mozilla nspr4 libs.]),
684 [with_nspr_libs="$withval"])
686 AC_ARG_WITH([nss-includes],
687 AS_HELP_STRING([--with-nss-includes],
688 [Prefix of Mozilla nss3 includes.]),
689 [with_nss_includes="$withval"])
691 AC_ARG_WITH([nss-libs],
692 AS_HELP_STRING([--with-nss-libs],
693 [Prefix of Mozilla nss3 libs.]),
694 [with_nss_libs="$withval"])
696 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
702 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
703 if test "x${check_manually}" = "xno"; then
704 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
705 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
706 for pc in $mozilla_nspr_pcs; do
707 if $PKG_CONFIG --exists $pc; then
714 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
715 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
716 for pc in $mozilla_nss_pcs; do
717 if $PKG_CONFIG --exists $pc; then
724 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
725 if test "x$enable_smime" = "xyes"; then
726 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
729 MANUAL_NSPR_CFLAGS=""
740 if test "x${check_manually}" = "xyes"; then
741 dnl ******************
743 dnl ******************
744 AC_MSG_CHECKING([for Mozilla nspr4 includes])
745 CPPFLAGS_save="$CPPFLAGS"
746 if test -n "$with_nspr_includes"; then
747 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
750 AC_CHECK_HEADERS(nspr.h prio.h,
751 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
752 CPPFLAGS="$CPPFLAGS_save"
754 if test "x${moz_nspr_includes}" = "xyes"; then
755 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
757 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
759 AC_MSG_RESULT([$moz_nspr_includes])
761 AC_MSG_CHECKING([for Mozilla nspr libraries])
762 CFLAGS_save="$CFLAGS"
763 LDFLAGS_save="$LDFLAGS"
765 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
767 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
769 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
770 if test -n "${with_nspr_libs}"; then
771 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
776 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
777 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
779 CFLAGS="$CFLAGS_save"
780 LDFLAGS="$LDFLAGS_save"
783 if test "x${moz_nspr_libs}" = "xyes"; then
784 if test -n "${with_nspr_libs}"; then
785 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
787 MANUAL_NSPR_LIBS="$nsprlibs"
790 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
792 AC_MSG_RESULT([$moz_nspr_libs])
794 dnl *****************
796 dnl *****************
797 AC_MSG_CHECKING([for Mozilla nss3 includes])
798 CPPFLAGS_save="$CPPFLAGS"
799 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
801 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
802 [moz_nss_includes="yes"],[moz_nss_includes="no"])
803 CPPFLAGS="$CPPFLAGS_save"
805 if test "x${moz_nss_includes}" = "xyes"; then
806 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
808 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
810 AC_MSG_RESULT($moz_nss_includes)
812 AC_MSG_CHECKING([for Mozilla nss libraries])
813 LDFLAGS_save="$LDFLAGS"
815 nsslibs="-lssl3 -lsmime3 -lnss3"
817 LIBS="$nsslibs $nsprlibs"
818 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
819 if test -n "${with_nss_libs}"; then
820 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
822 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
825 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
826 [moz_nss_libs="yes"],[moz_nss_libs="no"])
827 LDFLAGS="$LDFLAGS_save"
830 if test "x${moz_nss_libs}" = "xyes"; then
831 if test "x${enable_smime}" = "xyes"; then
832 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
835 if test -n "${with_nss_libs}"; then
836 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
838 MANUAL_NSS_LIBS="$nsslibs"
841 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
843 AC_MSG_RESULT([$moz_nss_libs])
845 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
846 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
849 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
851 dnl For pkgconfig files.
852 AC_SUBST(mozilla_nss)
853 AC_SUBST(mozilla_nspr)
855 AC_SUBST(MANUAL_NSPR_CFLAGS)
856 AC_SUBST(MANUAL_NSPR_LIBS)
857 AC_SUBST(MANUAL_NSS_CFLAGS)
858 AC_SUBST(MANUAL_NSS_LIBS)
860 dnl ******************************
861 dnl system mail stuff
862 dnl ******************************
863 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
864 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
866 AC_MSG_CHECKING([system mail directory])
867 if test -d /var/mail -a '!' -h /var/mail ; then
868 system_mail_dir="/var/mail"
870 system_mail_dir="/var/spool/mail"
872 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
874 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
876 CAMEL_LOCK_HELPER_USER=""
877 CAMEL_LOCK_HELPER_GROUP=""
878 system_mail_perm="world writable"
881 CAMEL_LOCK_HELPER_USER=""
882 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
883 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
886 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
887 CAMEL_LOCK_HELPER_GROUP=""
888 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
891 CAMEL_LOCK_HELPER_USER=""
892 CAMEL_LOCK_HELPER_GROUP=""
893 system_mail_perm="???"
897 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
898 AC_SUBST(CAMEL_LOCK_HELPER_USER)
899 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
901 dnl ******************************
903 dnl ******************************
904 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
905 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
906 [[ #include <time.h> ]],
911 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
912 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
913 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
915 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
916 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
917 [[ #include <time.h> ]],
919 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
920 if test "x$ac_cv_var_timezone" = "xyes"; then
921 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
922 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
923 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
924 [[ #include <time.h> ]],
926 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
927 if test "x$ac_cv_var_altzone" = "xyes"; then
928 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
931 AC_MSG_ERROR([unable to find a way to determine timezone])
935 dnl ******************************
936 dnl ctime_r prototype
937 dnl ******************************
938 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
940 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
941 [[ #include <time.h> ]],
944 ctime_r (&date, buf, 100); ]]
945 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
948 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
949 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
952 dnl ******************************
953 dnl gethostbyname_r prototype
954 dnl ******************************
955 AC_CHECK_FUNCS(gethostbyname_r,[
956 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
958 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
960 #include "confdefs.h"
961 #include <sys/types.h>
962 #include <sys/socket.h>
963 #include <netinet/in.h>
965 #define BUFSIZE (sizeof(struct hostent)+10)
969 char buffer[BUFSIZE];
972 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
974 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
977 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
978 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
981 dnl ******************************
982 dnl gethostbyaddr_r prototype
983 dnl ******************************
984 AC_CHECK_FUNCS(gethostbyaddr_r,[
985 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
987 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
989 #include "confdefs.h"
990 #include <sys/types.h>
991 #include <sys/socket.h>
992 #include <netinet/in.h>
994 #define BUFSIZE (sizeof(struct hostent)+10)
998 char buffer[BUFSIZE];
1001 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
1002 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
1005 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
1006 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
1009 dnl ******************************
1010 dnl stat(v)fs location/type
1011 dnl ******************************
1012 AC_CHECK_HEADER([sys/statvfs.h],
1013 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
1014 [[ #if HAVE_SYS_STATVFS_H
1015 #include <sys/statvfs.h>
1018 AC_CHECK_FUNCS(statvfs)
1020 AC_CHECK_HEADER([sys/param.h],
1021 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1022 [[ #if HAVE_SYS_PARAM_H
1023 #include <sys/param.h>
1026 AC_CHECK_HEADER([sys/mount.h],
1027 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1028 [[ #if HAVE_SYS_MOUNT_H
1029 #include <sys/mount.h>
1032 AC_CHECK_FUNCS(statfs)
1034 dnl ******************************
1035 dnl IPv6 support and getaddrinfo calls
1036 dnl ******************************
1037 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1039 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1040 [[ #include "confdefs.h"
1041 #include <sys/types.h>
1042 #include <sys/socket.h>
1043 #include <netinet/in.h>
1047 [[ #ifndef NI_MAXHOST
1048 #define NI_MAXHOST 1025
1052 #define NI_MAXSERV 32
1055 struct addrinfo hints, *res;
1056 struct sockaddr_in6 sin6;
1058 char host[NI_MAXHOST];
1059 char serv[NI_MAXSERV];
1061 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1063 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1064 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1067 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1068 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1069 if test "x$enable_ipv6" = "xyes" ; then
1070 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1074 AC_ARG_ENABLE([ipv6],
1075 AS_HELP_STRING([--enable-ipv6=no/yes],
1076 [Enable support for resolving IPv6 addresses.]),
1077 [enable_ipv6=$enableval],[enable_ipv6=yes])
1078 if test "x$enable_ipv6" = "xyes"; then
1080 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1081 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1082 [[ #include "confdefs.h"
1083 #include <sys/types.h>
1084 #include <sys/socket.h>
1085 #include <netinet/in.h>
1088 [[ struct addrinfo hints;
1089 hints.ai_flags = AI_ADDRCONFIG;
1091 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1097 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1099 AC_CHECK_HEADER([wspiapi.h],
1100 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1102 dnl **********************************
1103 dnl Weather calendar backend support
1104 dnl **********************************
1105 AC_MSG_CHECKING([if we should build the weather calendar backend])
1106 AC_ARG_ENABLE([weather],
1107 [AS_HELP_STRING([--enable-weather],
1108 [Build the weather calendar backend (default=yes)])],
1109 [use_gweather=$enableval], [use_gweather=yes])
1111 AC_MSG_RESULT([$use_gweather])
1112 if test "x$use_gweather" = "xyes"; then
1113 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1114 [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.])])
1116 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1118 dnl ******************************
1120 dnl ******************************
1121 AC_ARG_ENABLE([nntp],
1122 AS_HELP_STRING([--enable-nntp],
1123 [Build Usenet news (NNTP) backend]),
1124 [enable_nntp=$enableval],[enable_nntp=yes])
1125 if test "x$enable_nntp" = "xyes"; then
1126 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1131 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1133 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1135 dnl ******************************
1137 dnl ******************************
1138 AC_ARG_ENABLE([dot-locking],
1139 AS_HELP_STRING([--enable-dot-locking=yes/no],
1140 [Enable support for locking mail files with dot locking]),
1141 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1143 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1144 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1150 AC_ARG_ENABLE([file-locking],
1151 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1152 [Enable support for locking mail files with file locking]),
1153 [],[enable_file_locking=fcntl])
1155 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1156 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1159 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1160 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1167 dnl ******************************
1168 dnl sendmail operation
1169 dnl ******************************
1170 AC_MSG_CHECKING([for SunOS broken spool format])
1171 if test "x$host_os" = "xsunos" ; then
1172 with_broken_spool="yes"
1175 AC_ARG_WITH([broken-spool],
1176 AS_HELP_STRING([--with-broken-spool=yes/no],
1177 [Using SunOS/Solaris sendmail which has a broken spool format]),
1178 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1180 if test "x$with_broken_spool" = "xyes"; then
1181 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1184 AC_MSG_RESULT([$with_broken_spool])
1186 dnl ******************************
1187 dnl DBus call timeout
1188 dnl ******************************
1190 AC_ARG_WITH([dbus-call-timeout],
1191 AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1192 [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1193 [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1195 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1196 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1201 EVO_KRB5_SUPPORT(no)
1203 dnl ******************************
1205 dnl ******************************
1208 dnl ******************************
1210 dnl ******************************
1211 if test "x$os_win32" != "xyes"; then
1213 case $with_openldap in
1218 case $with_static_ldap in
1220 msg_ldap="$with_openldap (static)"
1223 msg_ldap="$with_openldap (dynamic)"
1228 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1229 if test "x$with_openldap" = "xno" ; then
1230 EVO_SUNLDAP_CHECK(no)
1231 case $with_sunldap in
1236 case $with_static_sunldap in
1238 msg_ldap="$with_sunldap (static)"
1241 msg_ldap="$with_sunldap (dynamic)"
1248 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1250 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1252 dnl Win32 LDAP support
1253 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1254 LDAP_LIBS="-lwldap32"
1255 AC_SUBST(LDAP_CFLAGS)
1257 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1258 AM_CONDITIONAL(ENABLE_LDAP, true)
1259 AM_CONDITIONAL(SUNLDAP, false)
1263 dnl ******************************
1264 dnl GObject marshalling
1265 dnl ******************************
1268 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1269 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1270 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1272 dnl ******************************
1273 dnl Utility macro to set compiler flags for a specific lib.
1274 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1275 dnl ******************************
1276 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1277 PKG_CHECK_MODULES([$1], [$2])
1278 $1_CFLAGS="[$]$1_CFLAGS $3 "
1279 $1_LIBS="[$]$1_LIBS $4 "
1282 dnl ******************************
1284 dnl ******************************
1285 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1287 if test "x$enable_maintainer_mode" = "xyes" ; then
1288 EVO_SET_COMPILE_FLAGS(FACTORY_GTK, "gtk+-3.0")
1289 AC_SUBST(FACTORY_GTK_CFLAGS)
1290 AC_SUBST(FACTORY_GTK_LIBS)
1293 dnl ******************************
1294 dnl libedataserver flags
1295 dnl ******************************
1296 E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 $mozilla_nspr"
1298 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1299 AC_SUBST(E_DATA_SERVER_CFLAGS)
1300 AC_SUBST(E_DATA_SERVER_LIBS)
1302 dnl ******************************
1303 dnl libebackend flags
1304 dnl ******************************
1305 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0"
1307 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1308 AC_SUBST(E_BACKEND_CFLAGS)
1309 AC_SUBST(E_BACKEND_LIBS)
1311 dnl ******************************
1312 dnl evolution-addressbook flags
1313 dnl ******************************
1314 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 libsecret-1"
1316 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1317 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1318 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1320 dnl ******************************
1321 dnl evolution-calendar flags
1322 dnl ******************************
1323 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 libsecret-1"
1326 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1327 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1328 dnl to differentiate between <libical/ical.h> and <ical.h>
1329 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1330 dnl libical is fixed, we have to work-around the buggy CFlags.
1332 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1333 LIBICAL_EXTRA_LIBS=""
1334 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1335 AC_SUBST(LIBICAL_EXTRA_LIBS)
1337 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1338 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1339 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1341 dnl ****************************
1342 dnl Check for ical_set_unknown_token_handling_setting function
1343 dnl ****************************
1344 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1345 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1346 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1347 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1348 [[#include <libical/ical.h>]],
1349 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1350 [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])
1353 AC_MSG_RESULT([$ac_cv_have_iuth])
1355 dnl ******************************
1357 dnl ******************************
1358 LIBGDATA_REQUIRED=libgdata_minimum_version
1359 AC_SUBST(LIBGDATA_REQUIRED)
1361 EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
1362 AC_SUBST(GDATA_CFLAGS)
1363 AC_SUBST(GDATA_LIBS)
1365 dnl ******************************
1367 dnl ******************************
1368 LIBSOUP_REQUIRED=libsoup_minimum_version
1369 AC_SUBST(LIBSOUP_REQUIRED)
1371 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1372 AC_SUBST(SOUP_CFLAGS)
1375 dnl ******************************
1377 dnl ******************************
1378 SQLITE_REQUIRED=sqlite_minimum_version
1379 AC_SUBST(SQLITE_REQUIRED)
1382 dnl deflateInit is a #define, use deflateEnd instead
1383 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1385 if test "x$zlib_found" = "xfalse"; then
1386 AC_MSG_ERROR([*** zlib is required])
1389 dnl ******************************
1390 dnl Checks for large file support
1391 dnl ******************************
1392 AC_ARG_ENABLE([largefile],
1393 AS_HELP_STRING([--enable-largefile],
1394 [enable support for large files [[default=no]]]),
1395 [],[enable_largefile="yes"])
1397 if test "x$enable_largefile" != "xno"; then
1399 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1400 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1401 [[ #include <sys/types.h>
1402 #include <sys/stat.h>
1405 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1406 )],[ac_cv_largefile64_source="no"],
1407 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1408 [[ #define _LARGEFILE64_SOURCE
1409 #include <sys/types.h>
1410 #include <sys/stat.h>
1413 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1414 [ac_cv_largefile64_source="unknown"])])
1417 enable_largefile="no"
1419 if test "x$ac_cv_largefile64_source" = "xyes"; then
1420 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1421 enable_largefile="yes"
1422 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1423 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1426 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1427 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1428 enable_largefile="yes"
1431 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1432 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1433 enable_largefile="yes"
1436 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1440 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1442 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)
1443 AC_SUBST(CAMEL_CFLAGS)
1444 AC_SUBST(CAMEL_LIBS)
1446 dnl ******************************
1447 dnl Special directories
1448 dnl ******************************
1450 dnl If you add something here, consider whether or not you also
1451 dnl need to add it to one or more .pc.in files (for Connector,
1454 privdatadir='${datadir}'/evolution-data-server
1455 AC_SUBST(privdatadir)
1457 privincludedir='${includedir}'/evolution-data-server
1458 AC_SUBST(privincludedir)
1460 privlibdir='${libdir}'/evolution-data-server
1461 AC_SUBST(privlibdir)
1463 imagesdir='${datadir}'/pixmaps/evolution-data-server
1466 moduledir='${privlibdir}'/registry-modules
1469 ebook_backenddir='${privlibdir}'/addressbook-backends
1470 AC_SUBST(ebook_backenddir)
1472 ecal_backenddir='${privlibdir}'/calendar-backends
1473 AC_SUBST(ecal_backenddir)
1475 ro_sourcesdir='${privdatadir}'/ro-sources
1476 AC_SUBST(ro_sourcesdir)
1478 rw_sourcesdir='${privdatadir}'/rw-sources
1479 AC_SUBST(rw_sourcesdir)
1481 if test "x$use_gweather" = "xyes"; then
1482 weatherdatadir="$privdatadir/weather"
1483 AC_SUBST(weatherdatadir)
1486 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1487 camel_providerdir='${privlibdir}'/camel-providers
1488 AC_SUBST(camel_providerdir)
1490 dnl *******************
1491 dnl D-BUS service stuff
1492 dnl *******************
1493 m4_pattern_allow([AM_V_GEN])
1494 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)|" -e "s|\@SOURCES_DBUS_SERVICE_NAME\@|$(SOURCES_DBUS_SERVICE_NAME)|" -e "s|\@USER_PROMPTER_DBUS_SERVICE_NAME\@|$(USER_PROMPTER_DBUS_SERVICE_NAME)|" $< > $@'
1495 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1497 dnl ******************************
1499 dnl ******************************
1503 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1504 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1505 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1507 dnl ******************************
1509 dnl ******************************
1510 AC_PATH_PROG(GPERF, gperf, [no])
1511 if test "x$GPERF" = "xno"; then
1512 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1515 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1517 dnl ******************************
1519 dnl ******************************
1520 AC_ARG_ENABLE(vala-bindings,
1521 AC_HELP_STRING([--enable-vala-bindings],
1522 [build the EXPERIMENTAL Vala bindings]),
1523 enable_vala_bindings=$enableval,
1524 enable_vala_bindings=no)
1526 if test x$enable_vala_bindings = xyes; then
1527 if test "x$INTROSPECTION_SCANNER" = x; then
1528 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1531 AM_PROG_VALAC([0.13.0])
1534 AC_PATH_PROG(VALAC, valac, valac)
1538 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1540 if test "x$VAPIGEN" = "xfalse"; then
1541 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1547 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1550 dnl ******************************
1552 dnl ******************************
1554 export privincludedir
1559 evolution-data-server-zip
1560 evolution-data-server.pc
1561 addressbook/Makefile
1562 addressbook/libebook/Makefile
1563 addressbook/libebook/libebook.pc
1564 addressbook/libedata-book/Makefile
1565 addressbook/libedata-book/libedata-book.pc
1566 addressbook/libegdbus/Makefile
1567 addressbook/backends/Makefile
1568 addressbook/backends/file/Makefile
1569 addressbook/backends/ldap/Makefile
1570 addressbook/backends/google/Makefile
1571 addressbook/backends/google/tests/Makefile
1572 addressbook/backends/webdav/Makefile
1575 calendar/libecal/Makefile
1576 calendar/libecal/libecal.pc
1577 calendar/libedata-cal/Makefile
1578 calendar/libedata-cal/libedata-cal.pc
1579 calendar/libegdbus/Makefile
1580 calendar/backends/Makefile
1581 calendar/backends/caldav/Makefile
1582 calendar/backends/file/Makefile
1583 calendar/backends/http/Makefile
1584 calendar/backends/contacts/Makefile
1585 calendar/backends/weather/Makefile
1587 camel/providers/Makefile
1588 camel/providers/imap/Makefile
1589 camel/providers/imapx/Makefile
1590 camel/providers/local/Makefile
1591 camel/providers/nntp/Makefile
1592 camel/providers/pop3/Makefile
1593 camel/providers/sendmail/Makefile
1594 camel/providers/smtp/Makefile
1595 camel/tests/Makefile
1596 camel/tests/folder/Makefile
1597 camel/tests/lib/Makefile
1598 camel/tests/message/Makefile
1599 camel/tests/mime-filter/Makefile
1600 camel/tests/misc/Makefile
1601 camel/tests/smime/Makefile
1604 data/sources/Makefile
1605 libebackend/Makefile
1606 libebackend/libebackend.pc
1607 libedataserver/Makefile
1608 libedataserver/eds-version.h
1609 libedataserver/libedataserver.pc
1611 modules/cache-reaper/Makefile
1612 modules/gnome-online-accounts/Makefile
1613 modules/google-backend/Makefile
1614 modules/trust-prompt/Makefile
1615 modules/yahoo-backend/Makefile
1618 services/evolution-addressbook-factory/Makefile
1619 services/evolution-calendar-factory/Makefile
1620 services/evolution-source-registry/Makefile
1621 services/evolution-user-prompter/Makefile
1623 tests/libebook/Makefile
1624 tests/libebook/client/Makefile
1625 tests/libebook/vcard/Makefile
1626 tests/libecal/Makefile
1627 tests/libecal/client/Makefile
1628 tests/libedata-cal/Makefile
1629 tests/libedataserver/Makefile
1631 docs/reference/Makefile
1632 docs/reference/addressbook/Makefile
1633 docs/reference/addressbook/libebook/Makefile
1634 docs/reference/addressbook/libedata-book/Makefile
1635 docs/reference/calendar/Makefile
1636 docs/reference/calendar/libecal/Makefile
1637 docs/reference/calendar/libedata-cal/Makefile
1638 docs/reference/camel/Makefile
1639 docs/reference/libedataserver/Makefile
1640 docs/reference/libebackend/Makefile
1641 docs/reference/private/Makefile
1648 evolution-data-server has been configured as follows:
1649 Weather calendar: $use_gweather
1650 Mail Directory: $system_mail_dir, $system_mail_perm
1651 LDAP support: $msg_ldap
1652 NNTP support: $msg_nntp
1653 Kerberos 5: $msg_krb5
1654 SMIME support: $msg_smime
1655 IPv6 support: $msg_ipv6
1656 Dot Locking: $msg_dot
1657 File Locking: $msg_file
1658 Large files: $enable_largefile
1659 Gtk Doc: $enable_gtk_doc
1660 Introspection: $enable_introspection
1661 Vala bindings: $enable_vala_bindings
1662 GNOME Online Accounts $enable_goa
1663 Code coverage (gcov): $enable_code_coverage
1664 Strict building: $enable_strict