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], [5])
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 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([gcr_minimum_version], [3.4])
39 m4_define([gnome_keyring_minimum_version], [2.20.1])
40 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
41 m4_define([libsoup_minimum_version], [2.38.1])
42 m4_define([libgdata_minimum_version], [0.10])
43 m4_define([oauth_minimum_version], [0.9.4])
44 m4_define([sqlite_minimum_version], [3.5])
45 m4_define([libical_minimum_version], [0.43])
48 m4_define([goa_minimum_version], [3.2])
49 m4_define([gweather_minimum_version], [3.5.0])
51 AC_SUBST([BASE_VERSION],[base_version])
52 AC_SUBST([API_VERSION],[api_version])
53 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
54 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
56 EDS_MAJOR_VERSION=eds_major_version
57 EDS_MINOR_VERSION=eds_minor_version
58 EDS_MICRO_VERSION=eds_micro_version
62 dnl ******************************
64 dnl ******************************
65 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook4"
66 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar3"
67 SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources0"
70 ADDRESS_BOOK_DBUS_SERVICE_NAME,
71 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
72 [D-Bus service name for the address book factory])
75 CALENDAR_DBUS_SERVICE_NAME,
76 ["$CALENDAR_DBUS_SERVICE_NAME"],
77 [D-Bus service name for the calendar factory])
80 SOURCES_DBUS_SERVICE_NAME,
81 ["$SOURCES_DBUS_SERVICE_NAME"],
82 [D-Bus service name for the source registry])
84 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
85 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
86 AC_SUBST(SOURCES_DBUS_SERVICE_NAME)
88 dnl ******************************
89 dnl Libtool versioning
90 dnl ******************************
91 LIBEDATASERVER_CURRENT=17
92 LIBEDATASERVER_REVISION=0
95 LIBEDATASERVERUI_CURRENT=4
96 LIBEDATASERVERUI_REVISION=0
97 LIBEDATASERVERUI_AGE=0
103 LIBEDATACAL_CURRENT=18
104 LIBEDATACAL_REVISION=0
107 LIBEDATABOOK_CURRENT=15
108 LIBEDATABOOK_REVISION=0
119 LIBEBACKEND_CURRENT=4
120 LIBEBACKEND_REVISION=0
123 AC_SUBST(EDS_MAJOR_VERSION)
124 AC_SUBST(EDS_MINOR_VERSION)
125 AC_SUBST(EDS_MICRO_VERSION)
126 AC_SUBST(LIBEDATASERVER_CURRENT)
127 AC_SUBST(LIBEDATASERVER_REVISION)
128 AC_SUBST(LIBEDATASERVER_AGE)
129 AC_SUBST(LIBEDATASERVERUI_CURRENT)
130 AC_SUBST(LIBEDATASERVERUI_REVISION)
131 AC_SUBST(LIBEDATASERVERUI_AGE)
132 AC_SUBST(LIBECAL_CURRENT)
133 AC_SUBST(LIBECAL_REVISION)
134 AC_SUBST(LIBECAL_AGE)
135 AC_SUBST(LIBEDATACAL_CURRENT)
136 AC_SUBST(LIBEDATACAL_REVISION)
137 AC_SUBST(LIBEDATACAL_AGE)
138 AC_SUBST(LIBEBOOK_CURRENT)
139 AC_SUBST(LIBEBOOK_REVISION)
140 AC_SUBST(LIBEBOOK_AGE)
141 AC_SUBST(LIBEDATABOOK_CURRENT)
142 AC_SUBST(LIBEDATABOOK_REVISION)
143 AC_SUBST(LIBEDATABOOK_AGE)
144 AC_SUBST(LIBCAMEL_CURRENT)
145 AC_SUBST(LIBCAMEL_REVISION)
146 AC_SUBST(LIBCAMEL_AGE)
147 AC_SUBST(LIBEBACKEND_CURRENT)
148 AC_SUBST(LIBEBACKEND_REVISION)
149 AC_SUBST(LIBEBACKEND_AGE)
151 dnl **************************************
152 dnl Put the ACLOCAL flags in the Makefile
153 dnl **************************************
154 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
156 dnl ******************************
157 dnl Compiler Warning Flags
158 dnl ******************************
159 AS_COMPILER_FLAGS(WARNING_FLAGS,
161 -Wno-missing-field-initializers
163 -Wno-unused-parameter
164 -Wno-deprecated-declarations
165 -Wdeclaration-after-statement
166 -Werror-implicit-function-declaration
167 -Wformat-security -Winit-self
168 -Wmissing-declarations -Wmissing-include-dirs
169 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
170 -Wredundant-decls -Wundef -Wwrite-strings")
171 AC_SUBST(WARNING_FLAGS)
173 dnl More depracation from EBook/ECal:
174 dnl -DE_BOOK_DISABLE_DEPRECATED
175 dnl -DE_CAL_DISABLE_DEPRECATED
177 dnl Other useful compiler warnings for test builds only.
178 dnl These may produce warnings we have no control over,
179 dnl or false positives we don't always want to see.
181 dnl -Wformat-nonliteral
182 dnl -Wmissing-format-attribute
184 dnl -Wstrict-aliasing=2
186 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
187 AC_SUBST(AM_CPPFLAGS)
190 dnl define disable deprecated for EBook and ECal .am files
191 case "$WARNING_FLAGS" in
192 *E_BOOK_DISABLE_DEPRECATED*)
193 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 1 == 1 ])
196 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 0 == 1 ])
200 case "$WARNING_FLAGS" in
201 *E_CAL_DISABLE_DEPRECATED*)
202 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 1 == 1 ])
205 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 0 == 1 ])
209 dnl ******************************
210 dnl Initialize maintainer mode
211 dnl ******************************
212 AM_MAINTAINER_MODE([enable])
214 if test "x$enable_maintainer_mode" = "xyes" ; then
215 AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
229 AC_MSG_ERROR([You need bison to build evolution-data-server])
233 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
234 dnl behavior that -- according to the C99 standard -- is supposed to be
235 dnl undefined. We may still have aliasing abuses lying around that rely
236 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
237 dnl optimization until we can find and fix all the abuses.
238 dnl (AC_PROG_CC must run first to set the GCC variable.)
239 dnl XXX This really belongs in AM_CFLAGS.
240 if test "x${GCC}" = "xyes"; then
241 CFLAGS="$CFLAGS -fno-strict-aliasing"
244 dnl ******************************
246 dnl ******************************
247 IT_PROG_INTLTOOL([0.35.5])
249 AM_GNU_GETTEXT_VERSION([0.17])
250 AM_GNU_GETTEXT([external])
252 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
253 AC_SUBST(GETTEXT_PACKAGE)
254 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
256 localedir='$(prefix)/$(DATADIRNAME)/locale'
259 dnl ******************************
260 dnl Initialize libtool
261 dnl ******************************
263 LT_INIT(disable-static win32-dll)
267 dnl ******************************
269 dnl ******************************
270 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
272 dnl The private D-Bus documentation is for developers only.
273 AC_ARG_WITH([private-docs],
274 AS_HELP_STRING([--with-private-docs],
275 [Build documentation for private libraries ]
276 [(requires --enable-gtk-doc) [default=no]],),
277 [with_private_docs="$withval"],[with_private_docs="no"])
278 AM_CONDITIONAL(WITH_PRIVATE_DOCS, [test x$with_private_docs = xyes])
280 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
283 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
286 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
290 dnl ******************************
292 dnl ******************************
293 AC_MSG_CHECKING([for Win32])
297 NO_UNDEFINED='-no-undefined'
298 SOCKET_LIBS='-lws2_32 -ldnsapi'
300 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
301 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
302 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
309 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
316 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
319 AC_MSG_RESULT([$os_win32])
320 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
321 AC_SUBST(NO_UNDEFINED)
322 AC_SUBST(SOCKET_LIBS)
323 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
325 dnl **************************************
326 dnl Check for posix compatible sys/wait.h
327 dnl **************************************
330 dnl ************************************
331 dnl Check for posix compatible alloca()
332 dnl ************************************
335 dnl ******************************
336 dnl Checks for functions
337 dnl ******************************
338 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
340 dnl ***********************************
341 dnl Check for base dependencies early.
342 dnl ***********************************
343 PKG_CHECK_MODULES(GNOME_PLATFORM,
344 [gio-2.0 >= glib_minimum_version
345 gmodule-2.0 >= glib_minimum_version
346 gtk+-3.0 >= gtk_minimum_version
347 libxml-2.0 >= libxml_minimum_version
348 libsoup-2.4 >= libsoup_minimum_version
349 libgdata >= libgdata_minimum_version])
351 if test x$os_win32 = xno; then
352 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
355 dnl *******************************
356 dnl Check for GNOME Online Accounts
357 dnl *******************************
359 [AS_HELP_STRING([--enable-goa],
360 [enable GNOME Online Accounts support (default=yes)])],
361 [enable_goa=$enableval], [enable_goa=yes])
362 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
363 AC_MSG_RESULT([$enable_goa])
364 if test "x$enable_goa" = xyes; then
365 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
366 [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
367 If you want to disable GNOME Online Accounts support,
368 please append --disable-goa to configure.])])
370 PKG_CHECK_MODULES([OAUTH], [oauth >= oauth_minimum_version],,
371 [AC_MSG_ERROR([oauth not found (or version < oauth_minimum_version),
372 If you want to disable GNOME Online Accounts support,
373 please append --disable-goa to configure.])])
375 if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
376 AC_DEFINE(HAVE_GOA,1,[Have goa-1.0 and libgdata >= 0.9.1])
379 libgdata >= 0.9.1 is required for GNOME Online Accounts support.
380 If you want to disable GNOME Online Accounts support, please
381 append --disable-goa to configure.])
384 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
386 dnl GoaPasswordBased was introduced in version 3.5.
387 if `$PKG_CONFIG --atleast-version=3.5 goa-1.0`; then
388 AC_DEFINE(HAVE_GOA_PASSWORD_BASED,1,[Have GoaPasswordBased in goa-1.0])
391 if test x$os_win32 = xno; then
392 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
395 dnl ***********************************
396 dnl Check for GNOME Keyring.
397 dnl ***********************************
398 if test x$os_win32 = xno; then
399 PKG_CHECK_MODULES(GNOME_KEYRING,
400 [gnome-keyring-1 >= gnome_keyring_minimum_version])
402 AC_SUBST(GNOME_KEYRING_CFLAGS)
403 AC_SUBST(GNOME_KEYRING_LIBS)
405 dnl **********************************************************
406 dnl gcr-base is needed for secure password exchange over D-Bus
407 dnl **********************************************************
408 PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
409 AC_SUBST(GCR_BASE_CFLAGS)
410 AC_SUBST(GCR_BASE_LIBS)
412 LIBICAL_REQUIRED=libical_minimum_version
413 AC_SUBST(LIBICAL_REQUIRED)
415 dnl ******************************
417 dnl ******************************
418 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
420 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
421 [AC_MSG_ERROR([No regex library found])])])
424 dnl ******************************
426 dnl ******************************
428 AS_HELP_STRING([--with-libdb=PREFIX],
429 [Prefix where libdb is installed]),
430 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
432 DB_CFLAGS="-I$libdb_prefix/include"
433 DB_LIBS="-L$libdb_prefix/lib -ldb"
435 AC_MSG_CHECKING([Berkeley DB])
436 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
437 save_libs=$LIBS; LIBS="$DB_LIBS"
438 AC_LINK_IFELSE([AC_LANG_PROGRAM(
440 [[db_create(NULL, NULL, 0)]])],
441 [AC_MSG_RESULT([yes])],
442 [AC_MSG_ERROR([Cannot find libdb])])
448 dnl ******************************
450 dnl ******************************
454 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
455 AC_LINK_IFELSE([AC_LANG_PROGRAM(
462 cd = iconv_open ("UTF-8", "ISO-8859-1");
464 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
466 if test "x$ac_cv_libiconv" = "xyes"; then
468 if test "x$os_win32" = "xyes"; then
469 dnl Don't pointlessly auto-export the global symbols
470 dnl from a potentially static libiconv.a
471 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
476 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
479 if test "x$have_iconv" = "xyes"; then
480 if test "x$ac_cv_libiconv" = "xno"; then
481 AC_CHECK_FUNCS(gnu_get_libc_version)
483 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
484 AC_RUN_IFELSE([AC_LANG_SOURCE([[
488 #ifdef HAVE_GNU_GET_LIBC_VERSION
489 #include <gnu/libc-version.h>
492 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
493 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
494 char *transbuf = malloc (10), *trans = transbuf;
496 size_t jp_len = strlen (jp), utf8_len = 10;
497 size_t utf8_real_len = strlen (utf8);
499 #ifdef HAVE_GNU_GET_LIBC_VERSION
500 /* glibc 2.1.2's iconv is broken in hard to test ways. */
501 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
505 cd = iconv_open ("UTF-8", "ISO-2022-JP");
506 if (cd == (iconv_t) -1)
508 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
510 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
514 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
517 if test "x$have_iconv" = "xno"; then
518 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
522 CFLAGS="$CFLAGS -I$srcdir"
524 AC_MSG_CHECKING([preferred charset name formats for system iconv])
525 AC_RUN_IFELSE([AC_LANG_SOURCE([[
527 #include "iconv-detect.c"
529 [AC_MSG_RESULT([found])],
530 [AC_MSG_RESULT([not found])
532 *** The iconv-detect program was unable to determine the
533 *** preferred charset name formats recognized by your
534 *** iconv library. It is suggested that you install a
535 *** working iconv library such as the one found at
536 *** ftp://ftp.gnu.org/pub/gnu/libiconv
538 [if test "x$os_win32" = xyes; then
539 AC_MSG_RESULT([using known win32 result])
540 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
541 echo >>iconv-detect.h
542 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
543 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
544 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
546 AC_MSG_RESULT([unknown])
548 *** We can't determine the preferred charset name formats
549 *** recognized by your iconv library. You are
550 *** cross-compiling and supposed to know what you are doing.
551 *** Please construct the iconv-detect.h file manually.
556 CFLAGS="$save_CFLAGS"
559 AC_ARG_ENABLE([backtraces],
560 [AS_HELP_STRING([--enable-backtraces],
561 [enable backtraces for e_pointer_tracker (default=no)])],
562 [enable_backtraces=$enableval], [enable_backtraces=no])
564 if test "x$enable_backtraces" = xyes; then
565 dnl ****************************
566 dnl Check for backtrace_symbols function and dwfl from elfutils
567 dnl ****************************
568 AC_MSG_CHECKING([libc backtrace_symbols function])
569 AC_LINK_IFELSE([AC_LANG_PROGRAM(
570 [[#include <execinfo.h>]],
571 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
572 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
573 AC_MSG_RESULT([$ac_cv_have_bsf])
575 if test "x$ac_cv_have_bsf" = xyes; then
578 AC_MSG_CHECKING([elfutils/libdwfl])
579 AC_LINK_IFELSE([AC_LANG_PROGRAM(
580 [[#include <elfutils/libdwfl.h>]],
584 Dwarf_Addr module_low_addr;
587 dwfl_standard_find_debuginfo;
588 dwfl_linux_proc_find_elf;
590 dwfl_linux_proc_report (NULL, 1);
591 dwfl_report_end (NULL, NULL, NULL);
593 dwfl_module_addrname (NULL, NULL);
594 dwfl_module_getsrc (NULL, NULL);
595 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
596 DWARF_CB_ABORT; DWARF_CB_OK;
597 dwfl_getmodules (NULL, NULL, NULL, 0);
599 [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
600 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
604 if test "x$ac_cv_have_elfdwfl" = xyes; then
606 AC_SUBST(LIBDWFL_LIBS)
611 dnl **********************************
612 dnl Check for nl_langinfo and CODESET
613 dnl **********************************
614 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
615 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
616 [[#include <langinfo.h>]],
617 [[char *codeset = nl_langinfo (CODESET);]]
618 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
619 if test "x$ac_cv_langinfo_codeset" = "xyes"; then
620 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
622 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
624 dnl *******************************************************
625 dnl Check to see if strftime supports the use of %l and %k
626 dnl *******************************************************
627 AC_MSG_CHECKING([for %l and %k support in strftime])
628 AC_RUN_IFELSE([AC_LANG_SOURCE(
629 [[ #include <stdlib.h>
632 int main(int argc, char **argv) {
638 timeinfo=localtime(&rawtime);
640 strftime(buf, 10, "%lx%k", timeinfo);
642 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
649 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
650 AC_MSG_RESULT([$ac_cv_lkstrftime])
652 dnl ********************************************************************************
653 dnl security extension support (SSL and S/MIME)
655 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
656 dnl needed by Camel (SSL and S/MIME).
658 dnl The Evolution security extensions are only built if these libraries are found
659 dnl ********************************************************************************
662 AC_ARG_ENABLE([smime],
663 AS_HELP_STRING([--enable-smime],
664 [Enable SMIME support through Mozilla nss @<:@default=yes@:>@ ]),
665 [enable_smime="$enableval"],[enable_smime="yes"])
667 AC_ARG_WITH([nspr-includes],
668 AS_HELP_STRING([--with-nspr-includes],
669 [Prefix of Mozilla nspr4 includes.]),
670 [with_nspr_includes="$withval"])
672 AC_ARG_WITH([nspr-libs],
673 AS_HELP_STRING([--with-nspr-libs],
674 [Prefix of Mozilla nspr4 libs.]),
675 [with_nspr_libs="$withval"])
677 AC_ARG_WITH([nss-includes],
678 AS_HELP_STRING([--with-nss-includes],
679 [Prefix of Mozilla nss3 includes.]),
680 [with_nss_includes="$withval"])
682 AC_ARG_WITH([nss-libs],
683 AS_HELP_STRING([--with-nss-libs],
684 [Prefix of Mozilla nss3 libs.]),
685 [with_nss_libs="$withval"])
687 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
693 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
694 if test "x${check_manually}" = "xno"; then
695 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
696 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
697 for pc in $mozilla_nspr_pcs; do
698 if $PKG_CONFIG --exists $pc; then
705 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
706 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
707 for pc in $mozilla_nss_pcs; do
708 if $PKG_CONFIG --exists $pc; then
715 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
716 if test "x$enable_smime" = "xyes"; then
717 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
720 MANUAL_NSPR_CFLAGS=""
731 if test "x${check_manually}" = "xyes"; then
732 dnl ******************
734 dnl ******************
735 AC_MSG_CHECKING([for Mozilla nspr4 includes])
736 CPPFLAGS_save="$CPPFLAGS"
737 if test -n "$with_nspr_includes"; then
738 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
741 AC_CHECK_HEADERS(nspr.h prio.h,
742 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
743 CPPFLAGS="$CPPFLAGS_save"
745 if test "x${moz_nspr_includes}" = "xyes"; then
746 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
748 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
750 AC_MSG_RESULT([$moz_nspr_includes])
752 AC_MSG_CHECKING([for Mozilla nspr libraries])
753 CFLAGS_save="$CFLAGS"
754 LDFLAGS_save="$LDFLAGS"
756 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
758 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
760 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
761 if test -n "${with_nspr_libs}"; then
762 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
767 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
768 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
770 CFLAGS="$CFLAGS_save"
771 LDFLAGS="$LDFLAGS_save"
774 if test "x${moz_nspr_libs}" = "xyes"; then
775 if test -n "${with_nspr_libs}"; then
776 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
778 MANUAL_NSPR_LIBS="$nsprlibs"
781 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
783 AC_MSG_RESULT([$moz_nspr_libs])
785 dnl *****************
787 dnl *****************
788 AC_MSG_CHECKING([for Mozilla nss3 includes])
789 CPPFLAGS_save="$CPPFLAGS"
790 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
792 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
793 [moz_nss_includes="yes"],[moz_nss_includes="no"])
794 CPPFLAGS="$CPPFLAGS_save"
796 if test "x${moz_nss_includes}" = "xyes"; then
797 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
799 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
801 AC_MSG_RESULT($moz_nss_includes)
803 AC_MSG_CHECKING([for Mozilla nss libraries])
804 LDFLAGS_save="$LDFLAGS"
806 nsslibs="-lssl3 -lsmime3 -lnss3"
808 LIBS="$nsslibs $nsprlibs"
809 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
810 if test -n "${with_nss_libs}"; then
811 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
813 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
816 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
817 [moz_nss_libs="yes"],[moz_nss_libs="no"])
818 LDFLAGS="$LDFLAGS_save"
821 if test "x${moz_nss_libs}" = "xyes"; then
822 if test "x${enable_smime}" = "xyes"; then
823 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
826 if test -n "${with_nss_libs}"; then
827 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
829 MANUAL_NSS_LIBS="$nsslibs"
832 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
834 AC_MSG_RESULT([$moz_nss_libs])
836 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
837 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
840 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
842 dnl For pkgconfig files.
843 AC_SUBST(mozilla_nss)
844 AC_SUBST(mozilla_nspr)
846 AC_SUBST(MANUAL_NSPR_CFLAGS)
847 AC_SUBST(MANUAL_NSPR_LIBS)
848 AC_SUBST(MANUAL_NSS_CFLAGS)
849 AC_SUBST(MANUAL_NSS_LIBS)
851 dnl ******************************
852 dnl system mail stuff
853 dnl ******************************
854 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
855 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
857 AC_MSG_CHECKING([system mail directory])
858 if test -d /var/mail -a '!' -h /var/mail ; then
859 system_mail_dir="/var/mail"
861 system_mail_dir="/var/spool/mail"
863 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
865 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
867 CAMEL_LOCK_HELPER_USER=""
868 CAMEL_LOCK_HELPER_GROUP=""
869 system_mail_perm="world writable"
872 CAMEL_LOCK_HELPER_USER=""
873 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
874 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
877 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
878 CAMEL_LOCK_HELPER_GROUP=""
879 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
882 CAMEL_LOCK_HELPER_USER=""
883 CAMEL_LOCK_HELPER_GROUP=""
884 system_mail_perm="???"
888 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
889 AC_SUBST(CAMEL_LOCK_HELPER_USER)
890 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
892 dnl ******************************
894 dnl ******************************
895 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
896 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
897 [[ #include <time.h> ]],
902 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
903 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
904 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
906 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
907 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
908 [[ #include <time.h> ]],
910 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
911 if test "x$ac_cv_var_timezone" = "xyes"; then
912 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
913 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
914 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
915 [[ #include <time.h> ]],
917 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
918 if test "x$ac_cv_var_altzone" = "xyes"; then
919 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
922 AC_MSG_ERROR([unable to find a way to determine timezone])
926 dnl ******************************
927 dnl ctime_r prototype
928 dnl ******************************
929 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
931 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
932 [[ #include <time.h> ]],
935 ctime_r (&date, buf, 100); ]]
936 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
939 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
940 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
943 dnl ******************************
944 dnl gethostbyname_r prototype
945 dnl ******************************
946 AC_CHECK_FUNCS(gethostbyname_r,[
947 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
949 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
951 #include "confdefs.h"
952 #include <sys/types.h>
953 #include <sys/socket.h>
954 #include <netinet/in.h>
956 #define BUFSIZE (sizeof(struct hostent)+10)
960 char buffer[BUFSIZE];
963 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
965 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
968 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
969 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
972 dnl ******************************
973 dnl gethostbyaddr_r prototype
974 dnl ******************************
975 AC_CHECK_FUNCS(gethostbyaddr_r,[
976 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
978 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
980 #include "confdefs.h"
981 #include <sys/types.h>
982 #include <sys/socket.h>
983 #include <netinet/in.h>
985 #define BUFSIZE (sizeof(struct hostent)+10)
989 char buffer[BUFSIZE];
992 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
993 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
996 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
997 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
1000 dnl ******************************
1001 dnl stat(v)fs location/type
1002 dnl ******************************
1003 AC_CHECK_HEADER([sys/statvfs.h],
1004 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
1005 [[ #if HAVE_SYS_STATVFS_H
1006 #include <sys/statvfs.h>
1009 AC_CHECK_FUNCS(statvfs)
1011 AC_CHECK_HEADER([sys/param.h],
1012 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1013 [[ #if HAVE_SYS_PARAM_H
1014 #include <sys/param.h>
1017 AC_CHECK_HEADER([sys/mount.h],
1018 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1019 [[ #if HAVE_SYS_MOUNT_H
1020 #include <sys/mount.h>
1023 AC_CHECK_FUNCS(statfs)
1025 dnl ******************************
1026 dnl IPv6 support and getaddrinfo calls
1027 dnl ******************************
1028 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1030 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1031 [[ #include "confdefs.h"
1032 #include <sys/types.h>
1033 #include <sys/socket.h>
1034 #include <netinet/in.h>
1038 [[ #ifndef NI_MAXHOST
1039 #define NI_MAXHOST 1025
1043 #define NI_MAXSERV 32
1046 struct addrinfo hints, *res;
1047 struct sockaddr_in6 sin6;
1049 char host[NI_MAXHOST];
1050 char serv[NI_MAXSERV];
1052 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1054 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1055 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1058 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1059 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1060 if test "x$enable_ipv6" = "xyes" ; then
1061 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1065 AC_ARG_ENABLE([ipv6],
1066 AS_HELP_STRING([--enable-ipv6=no/yes],
1067 [Enable support for resolving IPv6 addresses.]),
1068 [enable_ipv6=$enableval],[enable_ipv6=yes])
1069 if test "x$enable_ipv6" = "xyes"; then
1071 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1072 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1073 [[ #include "confdefs.h"
1074 #include <sys/types.h>
1075 #include <sys/socket.h>
1076 #include <netinet/in.h>
1079 [[ struct addrinfo hints;
1080 hints.ai_flags = AI_ADDRCONFIG;
1082 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1088 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1090 AC_CHECK_HEADER([wspiapi.h],
1091 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1093 dnl **********************************
1094 dnl Weather calendar backend support
1095 dnl **********************************
1096 AC_MSG_CHECKING([if we should build the weather calendar backend])
1097 AC_ARG_ENABLE([weather],
1098 [AS_HELP_STRING([--enable-weather],
1099 [Build the weather calendar backend (default=yes)])],
1100 [use_gweather=$enableval], [use_gweather=yes])
1102 AC_MSG_RESULT([$use_gweather])
1103 if test "x$use_gweather" = "xyes"; then
1104 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1105 [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.])])
1107 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1109 dnl ******************************
1111 dnl ******************************
1112 AC_ARG_ENABLE([nntp],
1113 AS_HELP_STRING([--enable-nntp],
1114 [Build Usenet news (NNTP) backend]),
1115 [enable_nntp=$enableval],[enable_nntp=yes])
1116 if test "x$enable_nntp" = "xyes"; then
1117 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1122 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1124 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1126 dnl ******************************
1128 dnl ******************************
1129 AC_ARG_ENABLE([dot-locking],
1130 AS_HELP_STRING([--enable-dot-locking=yes/no],
1131 [Enable support for locking mail files with dot locking]),
1132 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1134 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1135 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1141 AC_ARG_ENABLE([file-locking],
1142 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1143 [Enable support for locking mail files with file locking]),
1144 [],[enable_file_locking=fcntl])
1146 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1147 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1150 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1151 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1158 dnl ******************************
1159 dnl sendmail operation
1160 dnl ******************************
1161 AC_MSG_CHECKING([for SunOS broken spool format])
1162 if test "x$host_os" = "xsunos" ; then
1163 with_broken_spool="yes"
1166 AC_ARG_WITH([broken-spool],
1167 AS_HELP_STRING([--with-broken-spool=yes/no],
1168 [Using SunOS/Solaris sendmail which has a broken spool format]),
1169 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1171 if test "x$with_broken_spool" = "xyes"; then
1172 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1175 AC_MSG_RESULT([$with_broken_spool])
1177 dnl ******************************
1178 dnl DBus call timeout
1179 dnl ******************************
1181 AC_ARG_WITH([dbus-call-timeout],
1182 AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1183 [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1184 [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1186 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1187 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1192 EVO_KRB5_SUPPORT(no)
1194 dnl ******************************
1196 dnl ******************************
1199 dnl ******************************
1201 dnl ******************************
1202 if test "x$os_win32" != "xyes"; then
1204 case $with_openldap in
1209 case $with_static_ldap in
1211 msg_ldap="$with_openldap (static)"
1214 msg_ldap="$with_openldap (dynamic)"
1219 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1220 if test "x$with_openldap" = "xno" ; then
1221 EVO_SUNLDAP_CHECK(no)
1222 case $with_sunldap in
1227 case $with_static_sunldap in
1229 msg_ldap="$with_sunldap (static)"
1232 msg_ldap="$with_sunldap (dynamic)"
1239 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1241 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1243 dnl Win32 LDAP support
1244 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1245 LDAP_LIBS="-lwldap32"
1246 AC_SUBST(LDAP_CFLAGS)
1248 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1249 AM_CONDITIONAL(ENABLE_LDAP, true)
1250 AM_CONDITIONAL(SUNLDAP, false)
1254 dnl ******************************
1255 dnl GObject marshalling
1256 dnl ******************************
1259 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1260 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1261 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1263 dnl ******************************
1264 dnl Code coverage flags
1265 dnl ******************************
1267 AC_ARG_ENABLE([code-coverage],
1268 AS_HELP_STRING([--enable-code-coverage], [compile with code coverage code]),
1269 [enable_code_coverage=$enableval], [enable_code_coverage=no])
1271 if test "x$GCC" = "xyes"; then
1272 if test "x$enable_code_coverage" = "xyes"; then
1273 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
1274 CODE_COVERAGE_LDFLAGS="-lgcov"
1278 AC_SUBST([CODE_COVERAGE_CFLAGS])
1279 AC_SUBST([CODE_COVERAGE_LDFLAGS])
1281 dnl ******************************
1282 dnl Utility macro to set compiler flags for a specific lib.
1283 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1284 dnl ******************************
1285 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1286 PKG_CHECK_MODULES([$1], [$2])
1287 $1_CFLAGS="[$]$1_CFLAGS $3 "
1288 $1_LIBS="[$]$1_LIBS $4 "
1291 dnl ******************************
1293 dnl ******************************
1294 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1296 dnl ******************************
1297 dnl libedataserver flags
1298 dnl ******************************
1299 E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libxml-2.0 libsoup-2.4 $mozilla_nspr"
1301 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1302 AC_SUBST(E_DATA_SERVER_CFLAGS)
1303 AC_SUBST(E_DATA_SERVER_LIBS)
1305 dnl ******************************
1306 dnl libedataserverui
1307 dnl ******************************
1308 E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 libsoup-2.4"
1310 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
1311 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1312 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1314 if test "x$enable_maintainer_mode" = "xyes" ; then
1315 FACTORY_GTK_CFLAGS=$E_DATA_SERVER_UI_CFLAGS
1316 FACTORY_GTK_LIBS=$E_DATA_SERVER_UI_LIBS
1317 AC_SUBST(FACTORY_GTK_CFLAGS)
1318 AC_SUBST(FACTORY_GTK_LIBS)
1321 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libsoup-2.4 libxml-2.0"
1323 dnl ******************************
1324 dnl libebackend flags
1325 dnl ******************************
1326 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1327 AC_SUBST(E_BACKEND_CFLAGS)
1328 AC_SUBST(E_BACKEND_LIBS)
1330 dnl ******************************
1331 dnl evolution-addressbook flags
1332 dnl ******************************
1333 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 gnome-keyring-1"
1335 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1336 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1337 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1339 dnl ******************************
1340 dnl evolution-calendar flags
1341 dnl ******************************
1342 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 gnome-keyring-1"
1345 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1346 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1347 dnl to differentiate between <libical/ical.h> and <ical.h>
1348 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1349 dnl libical is fixed, we have to work-around the buggy CFlags.
1351 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1352 LIBICAL_EXTRA_LIBS=""
1353 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1354 AC_SUBST(LIBICAL_EXTRA_LIBS)
1356 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1357 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1358 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1360 dnl ****************************
1361 dnl Check for ical_set_unknown_token_handling_setting function
1362 dnl ****************************
1363 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1364 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1365 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1366 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1367 [[#include <libical/ical.h>]],
1368 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1369 [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])
1372 AC_MSG_RESULT([$ac_cv_have_iuth])
1374 dnl ******************************
1376 dnl ******************************
1377 LIBGDATA_REQUIRED=libgdata_minimum_version
1378 AC_SUBST(LIBGDATA_REQUIRED)
1380 EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
1381 AC_SUBST(GDATA_CFLAGS)
1382 AC_SUBST(GDATA_LIBS)
1384 dnl ******************************
1386 dnl ******************************
1387 LIBSOUP_REQUIRED=libsoup_minimum_version
1388 AC_SUBST(LIBSOUP_REQUIRED)
1390 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1391 AC_SUBST(SOUP_CFLAGS)
1394 dnl ******************************
1396 dnl ******************************
1397 SQLITE_REQUIRED=sqlite_minimum_version
1398 AC_SUBST(SQLITE_REQUIRED)
1401 dnl deflateInit is a #define, use deflateEnd instead
1402 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1404 if test "x$zlib_found" = "xfalse"; then
1405 AC_MSG_ERROR([*** zlib is required])
1408 dnl ******************************
1409 dnl Checks for large file support
1410 dnl ******************************
1411 AC_ARG_ENABLE([largefile],
1412 AS_HELP_STRING([--enable-largefile],
1413 [enable support for large files [[default=no]]]),
1414 [],[enable_largefile="yes"])
1416 if test "x$enable_largefile" != "xno"; then
1418 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1419 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1420 [[ #include <sys/types.h>
1421 #include <sys/stat.h>
1424 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1425 )],[ac_cv_largefile64_source="no"],
1426 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1427 [[ #define _LARGEFILE64_SOURCE
1428 #include <sys/types.h>
1429 #include <sys/stat.h>
1432 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1433 [ac_cv_largefile64_source="unknown"])])
1436 enable_largefile="no"
1438 if test "x$ac_cv_largefile64_source" = "xyes"; then
1439 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1440 enable_largefile="yes"
1441 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1442 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1445 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1446 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1447 enable_largefile="yes"
1450 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1451 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1452 enable_largefile="yes"
1455 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1459 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1461 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)
1462 AC_SUBST(CAMEL_CFLAGS)
1463 AC_SUBST(CAMEL_LIBS)
1465 dnl ******************************
1466 dnl Special directories
1467 dnl ******************************
1469 dnl If you add something here, consider whether or not you also
1470 dnl need to add it to one or more .pc.in files (for Connector,
1473 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1474 AC_SUBST(privdatadir)
1476 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1477 AC_SUBST(privincludedir)
1479 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1480 AC_SUBST(privlibdir)
1482 imagesdir='${datadir}'/pixmaps/evolution-data-server
1485 moduledir='${libdir}'/evolution-data-server/registry-modules
1488 ebook_backenddir='${libdir}'/evolution-data-server/addressbook-backends
1489 AC_SUBST(ebook_backenddir)
1491 ecal_backenddir='${libdir}'/evolution-data-server/calendar-backends
1492 AC_SUBST(ecal_backenddir)
1494 ro_sourcesdir='${datadir}'/evolution-data-server-$BASE_VERSION/ro-sources
1495 AC_SUBST(ro_sourcesdir)
1497 rw_sourcesdir='${datadir}'/evolution-data-server-$BASE_VERSION/rw-sources
1498 AC_SUBST(rw_sourcesdir)
1500 if test "x$use_gweather" = "xyes"; then
1501 weatherdatadir="$privdatadir/weather"
1502 AC_SUBST(weatherdatadir)
1505 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1506 camel_providerdir='${libdir}'/evolution-data-server/camel-providers
1507 AC_SUBST(camel_providerdir)
1509 dnl *******************
1510 dnl D-BUS service stuff
1511 dnl *******************
1512 m4_pattern_allow([AM_V_GEN])
1513 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)|" $< > $@'
1514 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1516 dnl ******************************
1518 dnl ******************************
1522 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1523 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1524 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1526 dnl ******************************
1528 dnl ******************************
1529 AC_PATH_PROG(GPERF, gperf, [no])
1530 if test "x$GPERF" = "xno"; then
1531 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1534 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1536 dnl ******************************
1538 dnl ******************************
1539 AC_ARG_ENABLE(vala-bindings,
1540 AC_HELP_STRING([--enable-vala-bindings],
1541 [build the EXPERIMENTAL Vala bindings]),
1542 enable_vala_bindings=$enableval,
1543 enable_vala_bindings=no)
1545 if test x$enable_vala_bindings = xyes; then
1546 if test "x$INTROSPECTION_SCANNER" = x; then
1547 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1550 AM_PROG_VALAC([0.13.0])
1553 AC_PATH_PROG(VALAC, valac, valac)
1557 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1559 if test "x$VAPIGEN" = "xfalse"; then
1560 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1566 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1569 dnl ******************************
1571 dnl ******************************
1573 export privincludedir
1578 evolution-data-server-zip
1579 evolution-data-server.pc
1580 addressbook/Makefile
1581 addressbook/libebook/Makefile
1582 addressbook/libebook/libebook.pc
1583 addressbook/libedata-book/Makefile
1584 addressbook/libedata-book/libedata-book.pc
1585 addressbook/libegdbus/Makefile
1586 addressbook/backends/Makefile
1587 addressbook/backends/file/Makefile
1588 addressbook/backends/vcf/Makefile
1589 addressbook/backends/ldap/Makefile
1590 addressbook/backends/google/Makefile
1591 addressbook/backends/google/tests/Makefile
1592 addressbook/backends/webdav/Makefile
1595 calendar/libecal/Makefile
1596 calendar/libecal/libecal.pc
1597 calendar/libedata-cal/Makefile
1598 calendar/libedata-cal/libedata-cal.pc
1599 calendar/libegdbus/Makefile
1600 calendar/backends/Makefile
1601 calendar/backends/caldav/Makefile
1602 calendar/backends/file/Makefile
1603 calendar/backends/http/Makefile
1604 calendar/backends/contacts/Makefile
1605 calendar/backends/weather/Makefile
1607 camel/providers/Makefile
1608 camel/providers/imap/Makefile
1609 camel/providers/imapx/Makefile
1610 camel/providers/local/Makefile
1611 camel/providers/nntp/Makefile
1612 camel/providers/pop3/Makefile
1613 camel/providers/sendmail/Makefile
1614 camel/providers/smtp/Makefile
1615 camel/tests/Makefile
1616 camel/tests/folder/Makefile
1617 camel/tests/lib/Makefile
1618 camel/tests/message/Makefile
1619 camel/tests/mime-filter/Makefile
1620 camel/tests/misc/Makefile
1621 camel/tests/smime/Makefile
1624 data/sources/Makefile
1625 libebackend/Makefile
1626 libebackend/libebackend.pc
1627 libedataserver/Makefile
1628 libedataserver/eds-version.h
1629 libedataserver/libedataserver.pc
1630 libedataserverui/Makefile
1631 libedataserverui/libedataserverui.pc
1633 modules/cache-reaper/Makefile
1634 modules/google-backend/Makefile
1635 modules/online-accounts/Makefile
1636 modules/yahoo-backend/Makefile
1639 services/evolution-addressbook-factory/Makefile
1640 services/evolution-calendar-factory/Makefile
1641 services/evolution-source-registry/Makefile
1643 tests/libebook/Makefile
1644 tests/libebook/client/Makefile
1645 tests/libebook/vcard/Makefile
1646 tests/libecal/Makefile
1647 tests/libecal/client/Makefile
1648 tests/libedata-cal/Makefile
1649 tests/libedataserver/Makefile
1650 tests/libedataserverui/Makefile
1652 docs/reference/Makefile
1653 docs/reference/addressbook/Makefile
1654 docs/reference/addressbook/libebook/Makefile
1655 docs/reference/addressbook/libedata-book/Makefile
1656 docs/reference/calendar/Makefile
1657 docs/reference/calendar/libecal/Makefile
1658 docs/reference/calendar/libedata-cal/Makefile
1659 docs/reference/camel/Makefile
1660 docs/reference/libedataserver/Makefile
1661 docs/reference/libedataserverui/Makefile
1662 docs/reference/libebackend/Makefile
1663 docs/reference/private/Makefile
1670 evolution-data-server has been configured as follows:
1671 Weather calendar: $use_gweather
1672 Mail Directory: $system_mail_dir, $system_mail_perm
1673 LDAP support: $msg_ldap
1674 NNTP support: $msg_nntp
1675 Kerberos 5: $msg_krb5
1676 SMIME support: $msg_smime
1677 IPv6 support: $msg_ipv6
1678 Dot Locking: $msg_dot
1679 File Locking: $msg_file
1680 Large files: $enable_largefile
1681 Gtk Doc: $enable_gtk_doc
1682 Introspection: $enable_introspection
1683 Vala bindings: $enable_vala_bindings
1684 GNOME Online Accounts $enable_goa
1685 Code coverage (gcov): $enable_code_coverage