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], [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.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 dnl Keep these two definitions in agreement.
46 m4_define([soup_minimum_version], [2.38.1])
47 m4_define([soup_encoded_version], [SOUP_VERSION_2_38])
49 m4_define([gcr_minimum_version], [3.4])
50 m4_define([libsecret_minimum_version], [0.5])
51 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
52 m4_define([libgdata_minimum_version], [0.10])
53 m4_define([sqlite_minimum_version], [3.5])
54 m4_define([libical_minimum_version], [0.43])
57 m4_define([goa_minimum_version], [3.2])
58 m4_define([gweather_minimum_version], [3.5.0])
60 AC_SUBST([BASE_VERSION],[base_version])
61 AC_SUBST([API_VERSION],[api_version])
62 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
63 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
65 EDS_MAJOR_VERSION=eds_major_version
66 EDS_MINOR_VERSION=eds_minor_version
67 EDS_MICRO_VERSION=eds_micro_version
71 dnl ******************************
73 dnl ******************************
74 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook4"
75 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar3"
76 SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources1"
77 USER_PROMPTER_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.UserPrompter0"
80 ADDRESS_BOOK_DBUS_SERVICE_NAME,
81 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
82 [D-Bus service name for the address book factory])
85 CALENDAR_DBUS_SERVICE_NAME,
86 ["$CALENDAR_DBUS_SERVICE_NAME"],
87 [D-Bus service name for the calendar factory])
90 SOURCES_DBUS_SERVICE_NAME,
91 ["$SOURCES_DBUS_SERVICE_NAME"],
92 [D-Bus service name for the source registry])
95 USER_PROMPTER_DBUS_SERVICE_NAME,
96 ["$USER_PROMPTER_DBUS_SERVICE_NAME"],
97 [D-Bus service name for the user prompter])
99 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
100 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
101 AC_SUBST(SOURCES_DBUS_SERVICE_NAME)
102 AC_SUBST(USER_PROMPTER_DBUS_SERVICE_NAME)
104 dnl ******************************
105 dnl Libtool versioning
106 dnl ******************************
107 LIBEDATASERVER_CURRENT=17
108 LIBEDATASERVER_REVISION=0
115 LIBEDATACAL_CURRENT=20
116 LIBEDATACAL_REVISION=0
119 LIBEDATABOOK_CURRENT=16
120 LIBEDATABOOK_REVISION=0
131 LIBEBACKEND_CURRENT=6
132 LIBEBACKEND_REVISION=0
135 AC_SUBST(EDS_MAJOR_VERSION)
136 AC_SUBST(EDS_MINOR_VERSION)
137 AC_SUBST(EDS_MICRO_VERSION)
138 AC_SUBST(LIBEDATASERVER_CURRENT)
139 AC_SUBST(LIBEDATASERVER_REVISION)
140 AC_SUBST(LIBEDATASERVER_AGE)
141 AC_SUBST(LIBECAL_CURRENT)
142 AC_SUBST(LIBECAL_REVISION)
143 AC_SUBST(LIBECAL_AGE)
144 AC_SUBST(LIBEDATACAL_CURRENT)
145 AC_SUBST(LIBEDATACAL_REVISION)
146 AC_SUBST(LIBEDATACAL_AGE)
147 AC_SUBST(LIBEBOOK_CURRENT)
148 AC_SUBST(LIBEBOOK_REVISION)
149 AC_SUBST(LIBEBOOK_AGE)
150 AC_SUBST(LIBEDATABOOK_CURRENT)
151 AC_SUBST(LIBEDATABOOK_REVISION)
152 AC_SUBST(LIBEDATABOOK_AGE)
153 AC_SUBST(LIBCAMEL_CURRENT)
154 AC_SUBST(LIBCAMEL_REVISION)
155 AC_SUBST(LIBCAMEL_AGE)
156 AC_SUBST(LIBEBACKEND_CURRENT)
157 AC_SUBST(LIBEBACKEND_REVISION)
158 AC_SUBST(LIBEBACKEND_AGE)
160 dnl **************************************
161 dnl Put the ACLOCAL flags in the Makefile
162 dnl **************************************
163 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
165 dnl ******************************
166 dnl Compiler Warning Flags
167 dnl ******************************
168 AS_COMPILER_FLAGS(WARNING_FLAGS,
170 -Wdeprecated-declarations
171 -Wno-missing-field-initializers
173 -Wno-unused-parameter
174 -Wdeclaration-after-statement
175 -Werror-implicit-function-declaration
176 -Wformat-security -Winit-self
177 -Wmissing-declarations -Wmissing-include-dirs
178 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
179 -Wredundant-decls -Wundef -Wwrite-strings")
180 AC_SUBST(WARNING_FLAGS)
182 dnl Other useful compiler warnings for test builds only.
183 dnl These may produce warnings we have no control over,
184 dnl or false positives we don't always want to see.
186 dnl -Wformat-nonliteral
187 dnl -Wmissing-format-attribute
189 dnl -Wstrict-aliasing=2
191 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
193 dnl *******************************
194 dnl Check for --enable-strict
195 dnl *******************************
196 AC_ARG_ENABLE([strict],
197 [AS_HELP_STRING([--enable-strict],
198 [enable strict building, like without deprecated symbols (default=auto); auto enables strict building only if .git subdirectory exists])],
199 [enable_strict=$enableval], [enable_strict=auto])
201 AC_MSG_CHECKING([if strict building is enabled])
202 if test "x$enable_strict" = xauto; then
203 dnl Be strict when compiling with .git subdirectory
204 if test -d .git ; then
210 AC_MSG_RESULT([$enable_strict])
212 if test "x$enable_strict" = xyes; then
213 AM_CPPFLAGS="$AM_CPPFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
216 dnl Warn about API usage that violates our minimum requirements.
217 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
218 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MAX_ALLOWED=gdk_encoded_version"
219 AM_CPPFLAGS="$AM_CPPFLAGS -DSOUP_VERSION_MAX_ALLOWED=soup_encoded_version"
221 dnl These will suppress warnings about newly-deprecated symbols. Ideally
222 dnl these settings should match our minimum requirements and we will clean
223 dnl up any new deprecation warnings after bumping our minimum requirements.
224 dnl But if the warnings get to be overwhelming, use fixed versions instead.
225 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MIN_REQUIRED=glib_encoded_version"
226 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MIN_REQUIRED=gdk_encoded_version"
227 AM_CPPFLAGS="$AM_CPPFLAGS -DSOUP_VERSION_MIN_REQUIRED=soup_encoded_version"
229 AC_SUBST(AM_CPPFLAGS)
231 dnl ******************************
232 dnl Initialize maintainer mode
233 dnl ******************************
234 AM_MAINTAINER_MODE([enable])
236 if test "x$enable_maintainer_mode" = "xyes" ; then
237 AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
248 dnl For gen-western-table.py
251 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
252 dnl behavior that -- according to the C99 standard -- is supposed to be
253 dnl undefined. We may still have aliasing abuses lying around that rely
254 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
255 dnl optimization until we can find and fix all the abuses.
256 dnl (AC_PROG_CC must run first to set the GCC variable.)
257 dnl XXX This really belongs in AM_CFLAGS.
258 if test "x${GCC}" = "xyes"; then
259 CFLAGS="$CFLAGS -fno-strict-aliasing"
262 dnl ******************************
264 dnl ******************************
265 IT_PROG_INTLTOOL([0.35.5])
267 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
268 AC_SUBST(GETTEXT_PACKAGE)
269 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
271 localedir='$(prefix)/$(DATADIRNAME)/locale'
274 dnl ******************************
275 dnl Initialize libtool
276 dnl ******************************
278 LT_INIT(disable-static win32-dll)
282 dnl This relies on $SED, which is defined in ltmain.sh, which
283 dnl is invoked by LT_INIT (at least I think that's how it works).
286 dnl ******************************
288 dnl ******************************
289 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
291 dnl The private D-Bus documentation is for developers only.
292 AC_ARG_WITH([private-docs],
293 AS_HELP_STRING([--with-private-docs],
294 [Build documentation for private libraries ]
295 [(requires --enable-gtk-doc) [default=no]],),
296 [with_private_docs="$withval"],[with_private_docs="no"])
297 AM_CONDITIONAL(WITH_PRIVATE_DOCS, [test x$with_private_docs = xyes])
299 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
302 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
305 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
309 dnl ******************************
311 dnl ******************************
312 AC_MSG_CHECKING([for Win32])
316 NO_UNDEFINED='-no-undefined'
317 SOCKET_LIBS='-lws2_32 -ldnsapi'
319 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
320 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
321 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
328 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
335 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
338 AC_MSG_RESULT([$os_win32])
339 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
340 AC_SUBST(NO_UNDEFINED)
341 AC_SUBST(SOCKET_LIBS)
342 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
344 dnl **************************************
345 dnl Check for posix compatible sys/wait.h
346 dnl **************************************
349 dnl ************************************
350 dnl Check for posix compatible alloca()
351 dnl ************************************
354 dnl ******************************
355 dnl Checks for functions
356 dnl ******************************
357 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
359 dnl ***********************************
360 dnl Check for base dependencies early.
361 dnl ***********************************
362 PKG_CHECK_MODULES(GNOME_PLATFORM,
363 [gio-2.0 >= glib_minimum_version
364 gmodule-2.0 >= glib_minimum_version
365 gtk+-3.0 >= gdk_minimum_version
366 libxml-2.0 >= libxml_minimum_version
367 libsoup-2.4 >= soup_minimum_version])
369 if test x$os_win32 = xno; then
370 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
373 dnl *******************************
374 dnl Check for GNOME Online Accounts
375 dnl *******************************
377 [AS_HELP_STRING([--enable-goa],
378 [enable GNOME Online Accounts support (default=yes)])],
379 [enable_goa=$enableval], [enable_goa=yes])
380 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
381 AC_MSG_RESULT([$enable_goa])
382 if test "x$enable_goa" = xyes; then
383 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
386 goa-1.0 not found (or version < goa_minimum_version)
388 If you want to disable GNOME Online Accounts support,
389 please append --disable-goa to configure.
392 AC_DEFINE(HAVE_GOA, 1, [Define to 1 if you have the goa-1.0 package.])
394 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
396 dnl GoaPasswordBased was introduced in version 3.5.
397 if `$PKG_CONFIG --atleast-version=3.5 goa-1.0`; then
398 AC_DEFINE(HAVE_GOA_PASSWORD_BASED,1,[Have GoaPasswordBased in goa-1.0])
401 dnl ***********************************
402 dnl Check for GNOME Keyring.
403 dnl ***********************************
404 if test x$os_win32 = xno; then
405 PKG_CHECK_MODULES(LIBSECRET,
406 [libsecret-unstable >= libsecret_minimum_version])
408 AC_SUBST(LIBSECRET_CFLAGS)
409 AC_SUBST(LIBSECRET_LIBS)
411 dnl **********************************************************
412 dnl gcr-base is needed for secure password exchange over D-Bus
413 dnl **********************************************************
414 PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
415 AC_SUBST(GCR_BASE_CFLAGS)
416 AC_SUBST(GCR_BASE_LIBS)
418 LIBICAL_REQUIRED=libical_minimum_version
419 AC_SUBST(LIBICAL_REQUIRED)
421 dnl ******************************
423 dnl ******************************
424 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
426 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
427 [AC_MSG_ERROR([No regex library found])])])
430 dnl ******************************
432 dnl ******************************
434 AS_HELP_STRING([--with-libdb=PREFIX],
435 [Prefix where libdb is installed]),
436 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
438 DB_CFLAGS="-I$libdb_prefix/include"
439 DB_LIBS="-L$libdb_prefix/lib -ldb"
441 AC_MSG_CHECKING([Berkeley DB])
442 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
443 save_libs=$LIBS; LIBS="$DB_LIBS"
444 AC_LINK_IFELSE([AC_LANG_PROGRAM(
446 [[db_create(NULL, NULL, 0)]])],
447 [AC_MSG_RESULT([yes])],
448 [AC_MSG_ERROR([Cannot find libdb])])
454 dnl ******************************
456 dnl ******************************
460 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
461 AC_LINK_IFELSE([AC_LANG_PROGRAM(
468 cd = iconv_open ("UTF-8", "ISO-8859-1");
470 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
472 if test "x$ac_cv_libiconv" = "xyes"; then
474 if test "x$os_win32" = "xyes"; then
475 dnl Don't pointlessly auto-export the global symbols
476 dnl from a potentially static libiconv.a
477 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
482 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
485 if test "x$have_iconv" = "xyes"; then
486 if test "x$ac_cv_libiconv" = "xno"; then
487 AC_CHECK_FUNCS(gnu_get_libc_version)
489 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
490 AC_RUN_IFELSE([AC_LANG_SOURCE([[
494 #ifdef HAVE_GNU_GET_LIBC_VERSION
495 #include <gnu/libc-version.h>
498 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
499 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
500 char *transbuf = malloc (10), *trans = transbuf;
502 size_t jp_len = strlen (jp), utf8_len = 10;
503 size_t utf8_real_len = strlen (utf8);
505 #ifdef HAVE_GNU_GET_LIBC_VERSION
506 /* glibc 2.1.2's iconv is broken in hard to test ways. */
507 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
511 cd = iconv_open ("UTF-8", "ISO-2022-JP");
512 if (cd == (iconv_t) -1)
514 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
516 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
520 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
523 if test "x$have_iconv" = "xno"; then
524 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
528 CFLAGS="$CFLAGS -I$srcdir"
530 AC_MSG_CHECKING([preferred charset name formats for system iconv])
531 AC_RUN_IFELSE([AC_LANG_SOURCE([[
533 #include "iconv-detect.c"
535 [AC_MSG_RESULT([found])],
536 [AC_MSG_RESULT([not found])
538 *** The iconv-detect program was unable to determine the
539 *** preferred charset name formats recognized by your
540 *** iconv library. It is suggested that you install a
541 *** working iconv library such as the one found at
542 *** ftp://ftp.gnu.org/pub/gnu/libiconv
544 [if test "x$os_win32" = xyes; then
545 AC_MSG_RESULT([using known win32 result])
546 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
547 echo >>iconv-detect.h
548 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
549 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
550 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
552 AC_MSG_RESULT([unknown])
554 *** We can't determine the preferred charset name formats
555 *** recognized by your iconv library. You are
556 *** cross-compiling and supposed to know what you are doing.
557 *** Please construct the iconv-detect.h file manually.
562 CFLAGS="$save_CFLAGS"
565 AC_ARG_ENABLE([backtraces],
566 [AS_HELP_STRING([--enable-backtraces],
567 [enable backtraces for camel_pointer_tracker (default=no)])],
568 [enable_backtraces=$enableval], [enable_backtraces=no])
570 if test "x$enable_backtraces" = xyes; then
571 dnl ****************************
572 dnl Check for backtrace_symbols function and dwfl from elfutils
573 dnl ****************************
574 AC_MSG_CHECKING([libc backtrace_symbols function])
575 AC_LINK_IFELSE([AC_LANG_PROGRAM(
576 [[#include <execinfo.h>]],
577 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
578 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
579 AC_MSG_RESULT([$ac_cv_have_bsf])
581 if test "x$ac_cv_have_bsf" = xyes; then
584 AC_MSG_CHECKING([elfutils/libdwfl])
585 AC_LINK_IFELSE([AC_LANG_PROGRAM(
586 [[#include <elfutils/libdwfl.h>]],
590 Dwarf_Addr module_low_addr;
593 dwfl_standard_find_debuginfo;
594 dwfl_linux_proc_find_elf;
596 dwfl_linux_proc_report (NULL, 1);
597 dwfl_report_end (NULL, NULL, NULL);
599 dwfl_module_addrname (NULL, NULL);
600 dwfl_module_getsrc (NULL, NULL);
601 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
602 DWARF_CB_ABORT; DWARF_CB_OK;
603 dwfl_getmodules (NULL, NULL, NULL, 0);
605 [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
606 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
610 if test "x$ac_cv_have_elfdwfl" = xyes; then
612 AC_SUBST(LIBDWFL_LIBS)
617 dnl ******************************
618 dnl Check for nl_langinfo features
619 dnl ******************************
620 EVO_CHECK_LANGINFO([CODESET])
621 EVO_CHECK_LANGINFO([_NL_ADDRESS_COUNTRY_AB2])
623 dnl *******************************************************
624 dnl Check to see if strftime supports the use of %l and %k
625 dnl *******************************************************
626 AC_MSG_CHECKING([for %l and %k support in strftime])
627 AC_RUN_IFELSE([AC_LANG_SOURCE(
628 [[ #include <stdlib.h>
631 int main(int argc, char **argv) {
637 timeinfo=localtime(&rawtime);
639 strftime(buf, 10, "%lx%k", timeinfo);
641 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
648 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
649 AC_MSG_RESULT([$ac_cv_lkstrftime])
651 dnl ********************************************************************************
652 dnl security extension support (SSL and S/MIME)
654 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
655 dnl needed by Camel (SSL and S/MIME).
657 dnl The Evolution security extensions are only built if these libraries are found
658 dnl ********************************************************************************
661 AC_ARG_ENABLE([smime],
662 AS_HELP_STRING([--enable-smime],
663 [Enable SMIME support through Mozilla nss @<:@default=yes@:>@ ]),
664 [enable_smime="$enableval"],[enable_smime="yes"])
666 AC_ARG_WITH([nspr-includes],
667 AS_HELP_STRING([--with-nspr-includes],
668 [Prefix of Mozilla nspr4 includes.]),
669 [with_nspr_includes="$withval"])
671 AC_ARG_WITH([nspr-libs],
672 AS_HELP_STRING([--with-nspr-libs],
673 [Prefix of Mozilla nspr4 libs.]),
674 [with_nspr_libs="$withval"])
676 AC_ARG_WITH([nss-includes],
677 AS_HELP_STRING([--with-nss-includes],
678 [Prefix of Mozilla nss3 includes.]),
679 [with_nss_includes="$withval"])
681 AC_ARG_WITH([nss-libs],
682 AS_HELP_STRING([--with-nss-libs],
683 [Prefix of Mozilla nss3 libs.]),
684 [with_nss_libs="$withval"])
686 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
692 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
693 if test "x${check_manually}" = "xno"; then
694 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
695 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
696 for pc in $mozilla_nspr_pcs; do
697 if $PKG_CONFIG --exists $pc; then
704 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
705 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
706 for pc in $mozilla_nss_pcs; do
707 if $PKG_CONFIG --exists $pc; then
714 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
715 if test "x$enable_smime" = "xyes"; then
716 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
719 MANUAL_NSPR_CFLAGS=""
730 if test "x${check_manually}" = "xyes"; then
731 dnl ******************
733 dnl ******************
734 AC_MSG_CHECKING([for Mozilla nspr4 includes])
735 CPPFLAGS_save="$CPPFLAGS"
736 if test -n "$with_nspr_includes"; then
737 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
740 AC_CHECK_HEADERS(nspr.h prio.h,
741 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
742 CPPFLAGS="$CPPFLAGS_save"
744 if test "x${moz_nspr_includes}" = "xyes"; then
745 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
747 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
749 AC_MSG_RESULT([$moz_nspr_includes])
751 AC_MSG_CHECKING([for Mozilla nspr libraries])
752 CFLAGS_save="$CFLAGS"
753 LDFLAGS_save="$LDFLAGS"
755 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
757 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
759 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
760 if test -n "${with_nspr_libs}"; then
761 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
766 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
767 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
769 CFLAGS="$CFLAGS_save"
770 LDFLAGS="$LDFLAGS_save"
773 if test "x${moz_nspr_libs}" = "xyes"; then
774 if test -n "${with_nspr_libs}"; then
775 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
777 MANUAL_NSPR_LIBS="$nsprlibs"
780 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
782 AC_MSG_RESULT([$moz_nspr_libs])
784 dnl *****************
786 dnl *****************
787 AC_MSG_CHECKING([for Mozilla nss3 includes])
788 CPPFLAGS_save="$CPPFLAGS"
789 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
791 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
792 [moz_nss_includes="yes"],[moz_nss_includes="no"])
793 CPPFLAGS="$CPPFLAGS_save"
795 if test "x${moz_nss_includes}" = "xyes"; then
796 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
798 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
800 AC_MSG_RESULT($moz_nss_includes)
802 AC_MSG_CHECKING([for Mozilla nss libraries])
803 LDFLAGS_save="$LDFLAGS"
805 nsslibs="-lssl3 -lsmime3 -lnss3"
807 LIBS="$nsslibs $nsprlibs"
808 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
809 if test -n "${with_nss_libs}"; then
810 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
812 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
815 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
816 [moz_nss_libs="yes"],[moz_nss_libs="no"])
817 LDFLAGS="$LDFLAGS_save"
820 if test "x${moz_nss_libs}" = "xyes"; then
821 if test "x${enable_smime}" = "xyes"; then
822 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
825 if test -n "${with_nss_libs}"; then
826 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
828 MANUAL_NSS_LIBS="$nsslibs"
831 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
833 AC_MSG_RESULT([$moz_nss_libs])
835 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
836 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
839 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
841 dnl For pkgconfig files.
842 AC_SUBST(mozilla_nss)
843 AC_SUBST(mozilla_nspr)
845 AC_SUBST(MANUAL_NSPR_CFLAGS)
846 AC_SUBST(MANUAL_NSPR_LIBS)
847 AC_SUBST(MANUAL_NSS_CFLAGS)
848 AC_SUBST(MANUAL_NSS_LIBS)
850 dnl ******************************
851 dnl system mail stuff
852 dnl ******************************
853 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
854 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
856 AC_MSG_CHECKING([system mail directory])
857 if test -d /var/mail -a '!' -h /var/mail ; then
858 system_mail_dir="/var/mail"
860 system_mail_dir="/var/spool/mail"
862 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
864 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
866 CAMEL_LOCK_HELPER_USER=""
867 CAMEL_LOCK_HELPER_GROUP=""
868 system_mail_perm="world writable"
871 CAMEL_LOCK_HELPER_USER=""
872 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
873 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
876 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
877 CAMEL_LOCK_HELPER_GROUP=""
878 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
881 CAMEL_LOCK_HELPER_USER=""
882 CAMEL_LOCK_HELPER_GROUP=""
883 system_mail_perm="???"
887 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
888 AC_SUBST(CAMEL_LOCK_HELPER_USER)
889 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
891 dnl ******************************
893 dnl ******************************
894 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
895 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
896 [[ #include <time.h> ]],
901 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
902 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
903 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
905 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
906 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
907 [[ #include <time.h> ]],
909 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
910 if test "x$ac_cv_var_timezone" = "xyes"; then
911 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
912 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
913 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
914 [[ #include <time.h> ]],
916 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
917 if test "x$ac_cv_var_altzone" = "xyes"; then
918 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
921 AC_MSG_ERROR([unable to find a way to determine timezone])
925 dnl ******************************
926 dnl ctime_r prototype
927 dnl ******************************
928 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
930 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
931 [[ #include <time.h> ]],
934 ctime_r (&date, buf, 100); ]]
935 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
938 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
939 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
942 dnl ******************************
943 dnl gethostbyname_r prototype
944 dnl ******************************
945 AC_CHECK_FUNCS(gethostbyname_r,[
946 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
948 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
950 #include "confdefs.h"
951 #include <sys/types.h>
952 #include <sys/socket.h>
953 #include <netinet/in.h>
955 #define BUFSIZE (sizeof(struct hostent)+10)
959 char buffer[BUFSIZE];
962 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
964 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
967 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
968 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
971 dnl ******************************
972 dnl gethostbyaddr_r prototype
973 dnl ******************************
974 AC_CHECK_FUNCS(gethostbyaddr_r,[
975 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
977 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
979 #include "confdefs.h"
980 #include <sys/types.h>
981 #include <sys/socket.h>
982 #include <netinet/in.h>
984 #define BUFSIZE (sizeof(struct hostent)+10)
988 char buffer[BUFSIZE];
991 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
992 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
995 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
996 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
999 dnl ******************************
1000 dnl stat(v)fs location/type
1001 dnl ******************************
1002 AC_CHECK_HEADER([sys/statvfs.h],
1003 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
1004 [[ #if HAVE_SYS_STATVFS_H
1005 #include <sys/statvfs.h>
1008 AC_CHECK_FUNCS(statvfs)
1010 AC_CHECK_HEADER([sys/param.h],
1011 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1012 [[ #if HAVE_SYS_PARAM_H
1013 #include <sys/param.h>
1016 AC_CHECK_HEADER([sys/mount.h],
1017 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1018 [[ #if HAVE_SYS_MOUNT_H
1019 #include <sys/mount.h>
1022 AC_CHECK_FUNCS(statfs)
1024 dnl ******************************
1025 dnl IPv6 support and getaddrinfo calls
1026 dnl ******************************
1027 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1029 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1030 [[ #include "confdefs.h"
1031 #include <sys/types.h>
1032 #include <sys/socket.h>
1033 #include <netinet/in.h>
1037 [[ #ifndef NI_MAXHOST
1038 #define NI_MAXHOST 1025
1042 #define NI_MAXSERV 32
1045 struct addrinfo hints, *res;
1046 struct sockaddr_in6 sin6;
1048 char host[NI_MAXHOST];
1049 char serv[NI_MAXSERV];
1051 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1053 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1054 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1057 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1058 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1059 if test "x$enable_ipv6" = "xyes" ; then
1060 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1064 AC_ARG_ENABLE([ipv6],
1065 AS_HELP_STRING([--enable-ipv6=no/yes],
1066 [Enable support for resolving IPv6 addresses.]),
1067 [enable_ipv6=$enableval],[enable_ipv6=yes])
1068 if test "x$enable_ipv6" = "xyes"; then
1070 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1071 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1072 [[ #include "confdefs.h"
1073 #include <sys/types.h>
1074 #include <sys/socket.h>
1075 #include <netinet/in.h>
1078 [[ struct addrinfo hints;
1079 hints.ai_flags = AI_ADDRCONFIG;
1081 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1087 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1089 AC_CHECK_HEADER([wspiapi.h],
1090 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1092 dnl **********************************
1093 dnl Weather calendar backend support
1094 dnl **********************************
1095 AC_MSG_CHECKING([if we should build the weather calendar backend])
1096 AC_ARG_ENABLE([weather],
1097 [AS_HELP_STRING([--enable-weather],
1098 [Build the weather calendar backend (default=yes)])],
1099 [use_gweather=$enableval], [use_gweather=yes])
1101 AC_MSG_RESULT([$use_gweather])
1102 if test "x$use_gweather" = "xyes"; then
1103 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1104 [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.])])
1106 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1108 dnl ******************************
1110 dnl ******************************
1111 AC_ARG_ENABLE([nntp],
1112 AS_HELP_STRING([--enable-nntp],
1113 [Build Usenet news (NNTP) backend]),
1114 [enable_nntp=$enableval],[enable_nntp=yes])
1115 if test "x$enable_nntp" = "xyes"; then
1116 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1121 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1123 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1125 dnl ******************************
1127 dnl ******************************
1128 AC_ARG_ENABLE([dot-locking],
1129 AS_HELP_STRING([--enable-dot-locking=yes/no],
1130 [Enable support for locking mail files with dot locking]),
1131 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1133 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1134 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1140 AC_ARG_ENABLE([file-locking],
1141 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1142 [Enable support for locking mail files with file locking]),
1143 [],[enable_file_locking=fcntl])
1145 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1146 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1149 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1150 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1157 dnl ******************************
1158 dnl sendmail operation
1159 dnl ******************************
1160 AC_MSG_CHECKING([for SunOS broken spool format])
1161 if test "x$host_os" = "xsunos" ; then
1162 with_broken_spool="yes"
1165 AC_ARG_WITH([broken-spool],
1166 AS_HELP_STRING([--with-broken-spool=yes/no],
1167 [Using SunOS/Solaris sendmail which has a broken spool format]),
1168 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1170 if test "x$with_broken_spool" = "xyes"; then
1171 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1174 AC_MSG_RESULT([$with_broken_spool])
1176 dnl ******************************
1177 dnl DBus call timeout
1178 dnl ******************************
1180 AC_ARG_WITH([dbus-call-timeout],
1181 AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1182 [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1183 [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1185 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1186 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1191 EVO_KRB5_SUPPORT(no)
1193 dnl ******************************
1195 dnl ******************************
1198 dnl ******************************
1200 dnl ******************************
1201 if test "x$os_win32" != "xyes"; then
1203 case $with_openldap in
1208 case $with_static_ldap in
1210 msg_ldap="$with_openldap (static)"
1213 msg_ldap="$with_openldap (dynamic)"
1218 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1219 if test "x$with_openldap" = "xno" ; then
1220 EVO_SUNLDAP_CHECK(no)
1221 case $with_sunldap in
1226 case $with_static_sunldap in
1228 msg_ldap="$with_sunldap (static)"
1231 msg_ldap="$with_sunldap (dynamic)"
1238 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1240 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1242 dnl Win32 LDAP support
1243 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1244 LDAP_LIBS="-lwldap32"
1245 AC_SUBST(LDAP_CFLAGS)
1247 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1248 AM_CONDITIONAL(ENABLE_LDAP, true)
1249 AM_CONDITIONAL(SUNLDAP, false)
1253 dnl ******************************
1254 dnl GObject marshalling
1255 dnl ******************************
1258 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1259 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1260 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1262 dnl ******************************
1263 dnl Utility macro to set compiler flags for a specific lib.
1264 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1265 dnl ******************************
1266 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1267 PKG_CHECK_MODULES([$1], [$2])
1268 $1_CFLAGS="[$]$1_CFLAGS $3 "
1269 $1_LIBS="[$]$1_LIBS $4 "
1272 dnl ******************************
1274 dnl ******************************
1275 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1277 if test "x$enable_maintainer_mode" = "xyes" ; then
1278 EVO_SET_COMPILE_FLAGS(FACTORY_GTK, "gtk+-3.0")
1279 AC_SUBST(FACTORY_GTK_CFLAGS)
1280 AC_SUBST(FACTORY_GTK_LIBS)
1283 dnl ******************************
1284 dnl libedataserver flags
1285 dnl ******************************
1286 E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 $mozilla_nspr"
1288 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1289 AC_SUBST(E_DATA_SERVER_CFLAGS)
1290 AC_SUBST(E_DATA_SERVER_LIBS)
1292 dnl ******************************
1293 dnl libebackend flags
1294 dnl ******************************
1295 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0"
1297 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1298 AC_SUBST(E_BACKEND_CFLAGS)
1299 AC_SUBST(E_BACKEND_LIBS)
1301 dnl ******************************
1302 dnl evolution-addressbook flags
1303 dnl ******************************
1304 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 libsecret-1"
1306 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1307 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1308 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1310 dnl ******************************
1311 dnl evolution-calendar flags
1312 dnl ******************************
1313 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 libsecret-1"
1316 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1317 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1318 dnl to differentiate between <libical/ical.h> and <ical.h>
1319 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1320 dnl libical is fixed, we have to work-around the buggy CFlags.
1322 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1323 LIBICAL_EXTRA_LIBS=""
1324 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1325 AC_SUBST(LIBICAL_EXTRA_LIBS)
1327 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1328 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1329 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1331 dnl ****************************
1332 dnl Check for ical_set_unknown_token_handling_setting function
1333 dnl ****************************
1334 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1335 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1336 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1337 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1338 [[#include <libical/ical.h>]],
1339 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1340 [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])
1343 AC_MSG_RESULT([$ac_cv_have_iuth])
1345 dnl ******************************
1347 dnl ******************************
1348 LIBGDATA_REQUIRED=libgdata_minimum_version
1349 AC_SUBST(LIBGDATA_REQUIRED)
1350 AC_ARG_ENABLE([google],
1351 [AS_HELP_STRING([--enable-google],
1352 [enable Google Contacts support (default=yes)])],
1353 [enable_google=$enableval], [enable_google=yes])
1354 AC_MSG_CHECKING([if Google Contacts support is enabled])
1355 AC_MSG_RESULT([$enable_google])
1356 if test "x$enable_google" = xyes; then
1357 EVO_SET_COMPILE_FLAGS(GDATA, libgdata >= libgdata_minimum_version)
1358 AC_SUBST(GDATA_CFLAGS)
1359 AC_SUBST(GDATA_LIBS)
1361 AC_DEFINE(HAVE_GOOGLE, 1, [Define to 1 if you have the google-1.0 package.])
1363 AM_CONDITIONAL(HAVE_GOOGLE, [test x$enable_google = xyes])
1365 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1366 AC_SUBST(SOUP_CFLAGS)
1369 dnl ******************************
1371 dnl ******************************
1372 SQLITE_REQUIRED=sqlite_minimum_version
1373 AC_SUBST(SQLITE_REQUIRED)
1376 dnl deflateInit is a #define, use deflateEnd instead
1377 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1379 if test "x$zlib_found" = "xfalse"; then
1380 AC_MSG_ERROR([*** zlib is required])
1383 dnl ******************************
1384 dnl Checks for large file support
1385 dnl ******************************
1386 AC_ARG_ENABLE([largefile],
1387 AS_HELP_STRING([--enable-largefile],
1388 [enable support for large files [[default=no]]]),
1389 [],[enable_largefile="yes"])
1391 if test "x$enable_largefile" != "xno"; then
1393 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1394 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1395 [[ #include <sys/types.h>
1396 #include <sys/stat.h>
1399 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1400 )],[ac_cv_largefile64_source="no"],
1401 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1402 [[ #define _LARGEFILE64_SOURCE
1403 #include <sys/types.h>
1404 #include <sys/stat.h>
1407 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1408 [ac_cv_largefile64_source="unknown"])])
1411 enable_largefile="no"
1413 if test "x$ac_cv_largefile64_source" = "xyes"; then
1414 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1415 enable_largefile="yes"
1416 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1417 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1420 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1421 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1422 enable_largefile="yes"
1425 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1426 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1427 enable_largefile="yes"
1430 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1434 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1436 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)
1437 AC_SUBST(CAMEL_CFLAGS)
1438 AC_SUBST(CAMEL_LIBS)
1440 dnl ******************************
1441 dnl Special directories
1442 dnl ******************************
1444 dnl If you add something here, consider whether or not you also
1445 dnl need to add it to one or more .pc.in files (for Connector,
1448 privdatadir='${datadir}'/evolution-data-server
1449 AC_SUBST(privdatadir)
1451 privincludedir='${includedir}'/evolution-data-server
1452 AC_SUBST(privincludedir)
1454 privlibdir='${libdir}'/evolution-data-server
1455 AC_SUBST(privlibdir)
1457 imagesdir='${datadir}'/pixmaps/evolution-data-server
1460 moduledir='${privlibdir}'/registry-modules
1463 ebook_backenddir='${privlibdir}'/addressbook-backends
1464 AC_SUBST(ebook_backenddir)
1466 ecal_backenddir='${privlibdir}'/calendar-backends
1467 AC_SUBST(ecal_backenddir)
1469 ro_sourcesdir='${privdatadir}'/ro-sources
1470 AC_SUBST(ro_sourcesdir)
1472 rw_sourcesdir='${privdatadir}'/rw-sources
1473 AC_SUBST(rw_sourcesdir)
1475 if test "x$use_gweather" = "xyes"; then
1476 weatherdatadir="$privdatadir/weather"
1477 AC_SUBST(weatherdatadir)
1480 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1481 camel_providerdir='${privlibdir}'/camel-providers
1482 AC_SUBST(camel_providerdir)
1484 dnl *******************
1485 dnl D-BUS service stuff
1486 dnl *******************
1487 m4_pattern_allow([AM_V_GEN])
1488 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)|" $< > $@'
1489 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1491 dnl ******************************
1493 dnl ******************************
1497 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1498 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1499 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1501 dnl ******************************
1503 dnl ******************************
1504 AC_PATH_PROG(GPERF, gperf, [no])
1505 if test "x$GPERF" = "xno"; then
1506 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1509 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1511 dnl ******************************
1513 dnl ******************************
1514 AC_ARG_ENABLE(vala-bindings,
1515 AC_HELP_STRING([--enable-vala-bindings],
1516 [build the EXPERIMENTAL Vala bindings]),
1517 enable_vala_bindings=$enableval,
1518 enable_vala_bindings=no)
1520 if test x$enable_vala_bindings = xyes; then
1521 if test "x$INTROSPECTION_SCANNER" = x; then
1522 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1525 AM_PROG_VALAC([0.13.0])
1528 AC_PATH_PROG(VALAC, valac, valac)
1532 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1534 if test "x$VAPIGEN" = "xfalse"; then
1535 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1541 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1544 dnl ******************************
1546 dnl ******************************
1548 export privincludedir
1553 evolution-data-server-zip
1554 evolution-data-server.pc
1555 addressbook/Makefile
1556 addressbook/libebook/Makefile
1557 addressbook/libebook/libebook.pc
1558 addressbook/libedata-book/Makefile
1559 addressbook/libedata-book/libedata-book.pc
1560 addressbook/libegdbus/Makefile
1561 addressbook/backends/Makefile
1562 addressbook/backends/file/Makefile
1563 addressbook/backends/ldap/Makefile
1564 addressbook/backends/google/Makefile
1565 addressbook/backends/google/tests/Makefile
1566 addressbook/backends/webdav/Makefile
1569 calendar/libecal/Makefile
1570 calendar/libecal/libecal.pc
1571 calendar/libedata-cal/Makefile
1572 calendar/libedata-cal/libedata-cal.pc
1573 calendar/libegdbus/Makefile
1574 calendar/backends/Makefile
1575 calendar/backends/caldav/Makefile
1576 calendar/backends/file/Makefile
1577 calendar/backends/http/Makefile
1578 calendar/backends/contacts/Makefile
1579 calendar/backends/weather/Makefile
1581 camel/providers/Makefile
1582 camel/providers/imapx/Makefile
1583 camel/providers/local/Makefile
1584 camel/providers/nntp/Makefile
1585 camel/providers/pop3/Makefile
1586 camel/providers/sendmail/Makefile
1587 camel/providers/smtp/Makefile
1588 camel/tests/Makefile
1589 camel/tests/folder/Makefile
1590 camel/tests/lib/Makefile
1591 camel/tests/message/Makefile
1592 camel/tests/mime-filter/Makefile
1593 camel/tests/misc/Makefile
1594 camel/tests/smime/Makefile
1597 data/sources/Makefile
1598 libebackend/Makefile
1599 libebackend/libebackend.pc
1600 libedataserver/Makefile
1601 libedataserver/eds-version.h
1602 libedataserver/libedataserver.pc
1604 modules/cache-reaper/Makefile
1605 modules/gnome-online-accounts/Makefile
1606 modules/google-backend/Makefile
1607 modules/trust-prompt/Makefile
1608 modules/yahoo-backend/Makefile
1611 services/evolution-addressbook-factory/Makefile
1612 services/evolution-calendar-factory/Makefile
1613 services/evolution-source-registry/Makefile
1614 services/evolution-user-prompter/Makefile
1616 tests/libebook/Makefile
1617 tests/libebook/client/Makefile
1618 tests/libebook/vcard/Makefile
1619 tests/libecal/Makefile
1620 tests/libecal/client/Makefile
1621 tests/libedata-cal/Makefile
1622 tests/libedataserver/Makefile
1623 tests/test-server-utils/Makefile
1624 tests/test-server-utils/services/Makefile
1625 tests/test-server-utils/services/org.gnome.evolution.dataserver.AddressBook.service
1626 tests/test-server-utils/services/org.gnome.evolution.dataserver.Calendar.service
1627 tests/test-server-utils/services/org.gnome.evolution.dataserver.Sources.service
1629 docs/reference/Makefile
1630 docs/reference/addressbook/Makefile
1631 docs/reference/addressbook/libebook/Makefile
1632 docs/reference/addressbook/libedata-book/Makefile
1633 docs/reference/calendar/Makefile
1634 docs/reference/calendar/libecal/Makefile
1635 docs/reference/calendar/libedata-cal/Makefile
1636 docs/reference/camel/Makefile
1637 docs/reference/libedataserver/Makefile
1638 docs/reference/libebackend/Makefile
1639 docs/reference/private/Makefile
1646 evolution-data-server has been configured as follows:
1647 Weather calendar: $use_gweather
1648 Mail Directory: $system_mail_dir, $system_mail_perm
1649 LDAP support: $msg_ldap
1650 NNTP support: $msg_nntp
1651 Kerberos 5: $msg_krb5
1652 SMIME support: $msg_smime
1653 IPv6 support: $msg_ipv6
1654 Dot Locking: $msg_dot
1655 File Locking: $msg_file
1656 Large files: $enable_largefile
1657 Gtk Doc: $enable_gtk_doc
1658 Introspection: $enable_introspection
1659 Vala bindings: $enable_vala_bindings
1660 GNOME Online Accounts $enable_goa
1661 Google Contacts $enable_google
1662 Code coverage (gcov): $enable_code_coverage
1663 Strict building: $enable_strict