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], [90])
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.40.3])
47 m4_define([soup_encoded_version], [SOUP_VERSION_2_40])
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])
59 m4_define([libaccounts_glib_minimum_version], [1.4])
60 m4_define([libsignon_glib_minimum_version], [1.8])
62 AC_SUBST([BASE_VERSION],[base_version])
63 AC_SUBST([API_VERSION],[api_version])
64 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
65 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
67 EDS_MAJOR_VERSION=eds_major_version
68 EDS_MINOR_VERSION=eds_minor_version
69 EDS_MICRO_VERSION=eds_micro_version
73 dnl ******************************
75 dnl ******************************
76 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook5"
77 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar4"
78 SOURCES_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Sources1"
79 USER_PROMPTER_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.UserPrompter0"
82 ADDRESS_BOOK_DBUS_SERVICE_NAME,
83 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
84 [D-Bus service name for the address book factory])
87 CALENDAR_DBUS_SERVICE_NAME,
88 ["$CALENDAR_DBUS_SERVICE_NAME"],
89 [D-Bus service name for the calendar factory])
92 SOURCES_DBUS_SERVICE_NAME,
93 ["$SOURCES_DBUS_SERVICE_NAME"],
94 [D-Bus service name for the source registry])
97 USER_PROMPTER_DBUS_SERVICE_NAME,
98 ["$USER_PROMPTER_DBUS_SERVICE_NAME"],
99 [D-Bus service name for the user prompter])
101 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
102 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
103 AC_SUBST(SOURCES_DBUS_SERVICE_NAME)
104 AC_SUBST(USER_PROMPTER_DBUS_SERVICE_NAME)
106 dnl ******************************
107 dnl Libtool versioning
108 dnl ******************************
109 LIBEDATASERVER_CURRENT=17
110 LIBEDATASERVER_REVISION=0
117 LIBEDATACAL_CURRENT=20
118 LIBEDATACAL_REVISION=0
121 LIBEDATABOOK_CURRENT=16
122 LIBEDATABOOK_REVISION=0
129 LIBEBOOK_CONTACTS_CURRENT=0
130 LIBEBOOK_CONTACTS_REVISION=0
131 LIBEBOOK_CONTACTS_AGE=0
137 LIBEBACKEND_CURRENT=6
138 LIBEBACKEND_REVISION=0
141 AC_SUBST(EDS_MAJOR_VERSION)
142 AC_SUBST(EDS_MINOR_VERSION)
143 AC_SUBST(EDS_MICRO_VERSION)
144 AC_SUBST(LIBEDATASERVER_CURRENT)
145 AC_SUBST(LIBEDATASERVER_REVISION)
146 AC_SUBST(LIBEDATASERVER_AGE)
147 AC_SUBST(LIBECAL_CURRENT)
148 AC_SUBST(LIBECAL_REVISION)
149 AC_SUBST(LIBECAL_AGE)
150 AC_SUBST(LIBEDATACAL_CURRENT)
151 AC_SUBST(LIBEDATACAL_REVISION)
152 AC_SUBST(LIBEDATACAL_AGE)
153 AC_SUBST(LIBEBOOK_CURRENT)
154 AC_SUBST(LIBEBOOK_REVISION)
155 AC_SUBST(LIBEBOOK_AGE)
156 AC_SUBST(LIBEBOOK_CONTACTS_CURRENT)
157 AC_SUBST(LIBEBOOK_CONTACTS_REVISION)
158 AC_SUBST(LIBEBOOK_CONTACTS_AGE)
159 AC_SUBST(LIBEDATABOOK_CURRENT)
160 AC_SUBST(LIBEDATABOOK_REVISION)
161 AC_SUBST(LIBEDATABOOK_AGE)
162 AC_SUBST(LIBCAMEL_CURRENT)
163 AC_SUBST(LIBCAMEL_REVISION)
164 AC_SUBST(LIBCAMEL_AGE)
165 AC_SUBST(LIBEBACKEND_CURRENT)
166 AC_SUBST(LIBEBACKEND_REVISION)
167 AC_SUBST(LIBEBACKEND_AGE)
169 dnl **************************************
170 dnl Put the ACLOCAL flags in the Makefile
171 dnl **************************************
172 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
174 dnl *********************************************
175 dnl Figure out early if we'll need a C++ compiler
176 dnl *********************************************
181 dnl ******************************
182 dnl Compiler Warning Flags
183 dnl ******************************
184 proposed_warning_flags="-Wall -Wextra
185 -Wdeprecated-declarations
186 -Werror-implicit-function-declaration
187 -Wformat-security -Winit-self
188 -Wmissing-declarations -Wmissing-include-dirs
189 -Wmissing-noreturn -Wpointer-arith
190 -Wredundant-decls -Wundef -Wwrite-strings"
192 proposed_c_warning_flags="$proposed_warning_flags
193 -Wdeclaration-after-statement
194 -Wno-missing-field-initializers
196 -Wno-unused-parameter
199 proposed_cxx_warning_flags="$proposed_warning_flags
202 AS_COMPILER_FLAGS(WARNING_FLAGS, [$proposed_c_warning_flags])
203 AC_SUBST(WARNING_FLAGS)
205 dnl Other useful compiler warnings for test builds only.
206 dnl These may produce warnings we have no control over,
207 dnl or false positives we don't always want to see.
209 dnl -Wformat-nonliteral
210 dnl -Wmissing-format-attribute
212 dnl -Wstrict-aliasing=2
214 AM_CFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
217 if test "x$evo_with_cxx" = xyes; then
221 AS_COMPILER_FLAGS(CXX_WARNING_FLAGS, [$proposed_cxx_warning_flags])
222 AC_SUBST(CXX_WARNING_FLAGS)
223 AM_CXXFLAGS="$CXX_WARNING_FLAGS"
224 AC_SUBST(AM_CXXFLAGS)
228 dnl *******************************
229 dnl Check for --enable-strict
230 dnl *******************************
231 AC_ARG_ENABLE([strict],
232 [AS_HELP_STRING([--enable-strict],
233 [enable strict building, like without deprecated symbols (default=auto); auto enables strict building only if .git subdirectory exists])],
234 [enable_strict=$enableval], [enable_strict=auto])
236 AC_MSG_CHECKING([if strict building is enabled])
237 if test "x$enable_strict" = xauto; then
238 dnl Be strict when compiling with .git subdirectory
239 if test -d .git ; then
245 AC_MSG_RESULT([$enable_strict])
249 if test "x$enable_strict" = xyes; then
250 AM_CPPFLAGS="$AM_CPPFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
253 dnl Warn about API usage that violates our minimum requirements.
254 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
255 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MAX_ALLOWED=gdk_encoded_version"
256 AM_CPPFLAGS="$AM_CPPFLAGS -DSOUP_VERSION_MAX_ALLOWED=soup_encoded_version"
258 dnl These will suppress warnings about newly-deprecated symbols. Ideally
259 dnl these settings should match our minimum requirements and we will clean
260 dnl up any new deprecation warnings after bumping our minimum requirements.
261 dnl But if the warnings get to be overwhelming, use fixed versions instead.
262 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MIN_REQUIRED=glib_encoded_version"
263 AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MIN_REQUIRED=gdk_encoded_version"
264 AM_CPPFLAGS="$AM_CPPFLAGS -DSOUP_VERSION_MIN_REQUIRED=soup_encoded_version"
266 AC_SUBST(AM_CPPFLAGS)
268 dnl ******************************
269 dnl Initialize maintainer mode
270 dnl ******************************
271 AM_MAINTAINER_MODE([enable])
273 if test "x$enable_maintainer_mode" = "xyes" ; then
274 AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
285 dnl For gen-western-table.py
288 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
289 dnl behavior that -- according to the C99 standard -- is supposed to be
290 dnl undefined. We may still have aliasing abuses lying around that rely
291 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
292 dnl optimization until we can find and fix all the abuses.
293 dnl (AC_PROG_CC must run first to set the GCC variable.)
294 dnl XXX This really belongs in AM_CFLAGS.
295 if test "x${GCC}" = "xyes"; then
296 CFLAGS="$CFLAGS -fno-strict-aliasing"
299 dnl ******************************
301 dnl ******************************
302 IT_PROG_INTLTOOL([0.35.5])
304 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
305 AC_SUBST(GETTEXT_PACKAGE)
306 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
308 localedir='$(prefix)/$(DATADIRNAME)/locale'
311 dnl ******************************
312 dnl Initialize libtool
313 dnl ******************************
315 LT_INIT(disable-static win32-dll)
319 dnl This relies on $SED, which is defined in ltmain.sh, which
320 dnl is invoked by LT_INIT (at least I think that's how it works).
323 dnl ******************************
325 dnl ******************************
326 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
328 dnl The private D-Bus documentation is for developers only.
329 AC_ARG_WITH([private-docs],
330 AS_HELP_STRING([--with-private-docs],
331 [Build documentation for private libraries ]
332 [(requires --enable-gtk-doc) [default=no]],),
333 [with_private_docs="$withval"],[with_private_docs="no"])
334 AM_CONDITIONAL(WITH_PRIVATE_DOCS, [test x$with_private_docs = xyes])
336 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
339 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
342 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
346 dnl ******************************
348 dnl ******************************
349 AC_MSG_CHECKING([for Win32])
353 NO_UNDEFINED='-no-undefined'
354 SOCKET_LIBS='-lws2_32 -ldnsapi'
356 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
357 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
358 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
365 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
372 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
375 AC_MSG_RESULT([$os_win32])
376 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
377 AC_SUBST(NO_UNDEFINED)
378 AC_SUBST(SOCKET_LIBS)
379 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
381 dnl **************************************
382 dnl Check for posix compatible sys/wait.h
383 dnl **************************************
386 dnl ************************************
387 dnl Check for posix compatible alloca()
388 dnl ************************************
391 dnl ******************************
392 dnl Checks for functions
393 dnl ******************************
394 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
396 dnl ***********************************
397 dnl Check for base dependencies early.
398 dnl ***********************************
399 PKG_CHECK_MODULES(GNOME_PLATFORM,
400 [gio-2.0 >= glib_minimum_version
401 gmodule-2.0 >= glib_minimum_version
402 libxml-2.0 >= libxml_minimum_version
403 libsoup-2.4 >= soup_minimum_version])
405 if test x$os_win32 = xno; then
406 PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
409 dnl ******************************
410 dnl Check for libphonenumber
411 dnl ******************************
413 EVO_PHONENUMBER_SUPPORT
415 dnl *************************
417 dnl *************************
419 [AS_HELP_STRING([--enable-gtk],
420 [enable GTK+ (default=yes)])],
421 [enable_gtk=$enableval], [enable_gtk=yes])
422 AC_MSG_CHECKING([if GTK+ support is enabled])
423 AC_MSG_RESULT([$enable_gtk])
424 if test "x$enable_gtk" = xyes; then
425 PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= gdk_minimum_version],,
428 gtk+-3.0 not found (or version < gdk_minimum_version)
430 If you want to disable GTK+ support,
431 please append --disable-gtk to configure.
434 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if you have the gtk+-3.0 package.])
436 AM_CONDITIONAL(HAVE_GTK, [test x$enable_gtk = xyes])
438 dnl *******************************
439 dnl Check for GNOME Online Accounts
440 dnl *******************************
442 [AS_HELP_STRING([--enable-goa],
443 [enable GNOME Online Accounts support (default=yes)])],
444 [enable_goa=$enableval], [enable_goa=yes])
445 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
446 AC_MSG_RESULT([$enable_goa])
447 if test "x$enable_goa" = xyes; then
448 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
451 goa-1.0 not found (or version < goa_minimum_version)
453 If you want to disable GNOME Online Accounts support,
454 please append --disable-goa to configure.
457 AC_DEFINE(HAVE_GOA, 1, [Define to 1 if you have the goa-1.0 package.])
459 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
461 dnl GoaPasswordBased was introduced in version 3.5.
462 if `$PKG_CONFIG --atleast-version=3.5 goa-1.0`; then
463 AC_DEFINE(HAVE_GOA_PASSWORD_BASED,1,[Have GoaPasswordBased in goa-1.0])
466 dnl ********************************
467 dnl Check for Ubuntu Online Accounts
468 dnl ********************************
470 [AS_HELP_STRING([--enable-uoa],
471 [enable Ubuntu Online Accounts support (default=yes)])],
472 [enable_uoa=$enableval], [enable_uoa=yes])
473 AC_MSG_CHECKING([if Ubuntu Online Accounts support is enabled])
474 AC_MSG_RESULT([$enable_uoa])
475 if test "x$enable_uoa" = xyes; then
476 PKG_CHECK_MODULES([LIBACCOUNTS_GLIB],
477 [libaccounts-glib >= libaccounts_glib_minimum_version],,
480 libaccounts-glib not found (or version < libaccounts_glib_minimum_version)
482 If you want to disable Ubuntu Online Accounts support,
483 please append --disable-uoa to configure.
486 PKG_CHECK_MODULES([LIBSIGNON_GLIB],
487 [libsignon-glib >= libsignon_glib_minimum_version],,
490 libsignon-glib not found (or version < libsignon_glib_minimum_version)
492 If you want to disable Ubuntu Online Accounts support,
493 please append --disable-uoa to configure.
496 PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0],,
499 json-glib-1.0 not found
501 If you want to disable Ubuntu Online Accounts support,
502 please append --disable-uoa to configure.
505 PKG_CHECK_MODULES([REST], [rest-0.7],,
508 librest-0.7 not found
510 If you want to disable Ubuntu Online Accounts support,
511 please append --disable-uoa to configure.
514 AC_DEFINE(HAVE_UOA, 1, [Have libaccounts-glib])
516 AM_CONDITIONAL(HAVE_UOA, [test x$enable_uoa = xyes])
518 dnl ***********************************
519 dnl Check for GNOME Keyring.
520 dnl ***********************************
521 if test x$os_win32 = xno; then
522 PKG_CHECK_MODULES(LIBSECRET,
523 [libsecret-unstable >= libsecret_minimum_version])
525 AC_SUBST(LIBSECRET_CFLAGS)
526 AC_SUBST(LIBSECRET_LIBS)
528 dnl **********************************************************
529 dnl gcr-base is needed for secure password exchange over D-Bus
530 dnl **********************************************************
531 PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
532 AC_SUBST(GCR_BASE_CFLAGS)
533 AC_SUBST(GCR_BASE_LIBS)
535 LIBICAL_REQUIRED=libical_minimum_version
536 AC_SUBST(LIBICAL_REQUIRED)
538 dnl ******************************
540 dnl ******************************
541 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
543 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
544 [AC_MSG_ERROR([No regex library found])])])
547 dnl ******************************
549 dnl ******************************
551 AS_HELP_STRING([--with-libdb=PREFIX],
552 [Prefix where libdb is installed]),
553 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
555 DB_CFLAGS="-I$libdb_prefix/include"
556 DB_LIBS="-L$libdb_prefix/lib -ldb"
558 AC_MSG_CHECKING([Berkeley DB])
559 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
560 save_libs=$LIBS; LIBS="$DB_LIBS"
561 AC_LINK_IFELSE([AC_LANG_PROGRAM(
563 [[db_create(NULL, NULL, 0)]])],
564 [AC_MSG_RESULT([yes])],
565 [AC_MSG_ERROR([Cannot find libdb])])
571 dnl ******************************
573 dnl ******************************
577 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
578 AC_LINK_IFELSE([AC_LANG_PROGRAM(
585 cd = iconv_open ("UTF-8", "ISO-8859-1");
587 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
589 if test "x$ac_cv_libiconv" = "xyes"; then
591 if test "x$os_win32" = "xyes"; then
592 dnl Don't pointlessly auto-export the global symbols
593 dnl from a potentially static libiconv.a
594 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
599 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
602 if test "x$have_iconv" = "xyes"; then
603 if test "x$ac_cv_libiconv" = "xno"; then
604 AC_CHECK_FUNCS(gnu_get_libc_version)
606 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
607 AC_RUN_IFELSE([AC_LANG_SOURCE([[
611 #ifdef HAVE_GNU_GET_LIBC_VERSION
612 #include <gnu/libc-version.h>
615 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
616 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
617 char *transbuf = malloc (10), *trans = transbuf;
619 size_t jp_len = strlen (jp), utf8_len = 10;
620 size_t utf8_real_len = strlen (utf8);
622 #ifdef HAVE_GNU_GET_LIBC_VERSION
623 /* glibc 2.1.2's iconv is broken in hard to test ways. */
624 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
628 cd = iconv_open ("UTF-8", "ISO-2022-JP");
629 if (cd == (iconv_t) -1)
631 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
633 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
637 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
640 if test "x$have_iconv" = "xno"; then
641 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
645 CFLAGS="$CFLAGS -I$srcdir"
647 AC_MSG_CHECKING([preferred charset name formats for system iconv])
648 AC_RUN_IFELSE([AC_LANG_SOURCE([[
650 #include "iconv-detect.c"
652 [AC_MSG_RESULT([found])],
653 [AC_MSG_RESULT([not found])
655 *** The iconv-detect program was unable to determine the
656 *** preferred charset name formats recognized by your
657 *** iconv library. It is suggested that you install a
658 *** working iconv library such as the one found at
659 *** ftp://ftp.gnu.org/pub/gnu/libiconv
661 [if test "x$os_win32" = xyes; then
662 AC_MSG_RESULT([using known win32 result])
663 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
664 echo >>iconv-detect.h
665 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
666 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
667 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
669 AC_MSG_RESULT([unknown])
671 *** We can't determine the preferred charset name formats
672 *** recognized by your iconv library. You are
673 *** cross-compiling and supposed to know what you are doing.
674 *** Please construct the iconv-detect.h file manually.
679 CFLAGS="$save_CFLAGS"
682 AC_ARG_ENABLE([backtraces],
683 [AS_HELP_STRING([--enable-backtraces],
684 [enable backtraces for camel_pointer_tracker (default=no)])],
685 [enable_backtraces=$enableval], [enable_backtraces=no])
687 if test "x$enable_backtraces" = xyes; then
688 dnl ****************************
689 dnl Check for backtrace_symbols function and dwfl from elfutils
690 dnl ****************************
691 AC_MSG_CHECKING([libc backtrace_symbols function])
692 AC_LINK_IFELSE([AC_LANG_PROGRAM(
693 [[#include <execinfo.h>]],
694 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
695 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
696 AC_MSG_RESULT([$ac_cv_have_bsf])
698 if test "x$ac_cv_have_bsf" = xyes; then
701 AC_MSG_CHECKING([elfutils/libdwfl])
702 AC_LINK_IFELSE([AC_LANG_PROGRAM(
703 [[#include <elfutils/libdwfl.h>]],
707 Dwarf_Addr module_low_addr;
710 dwfl_standard_find_debuginfo;
711 dwfl_linux_proc_find_elf;
713 dwfl_linux_proc_report (NULL, 1);
714 dwfl_report_end (NULL, NULL, NULL);
716 dwfl_module_addrname (NULL, NULL);
717 dwfl_module_getsrc (NULL, NULL);
718 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
719 DWARF_CB_ABORT; DWARF_CB_OK;
720 dwfl_getmodules (NULL, NULL, NULL, 0);
722 [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
723 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
727 if test "x$ac_cv_have_elfdwfl" = xyes; then
729 AC_SUBST(LIBDWFL_LIBS)
734 dnl ******************************
735 dnl Check for nl_langinfo features
736 dnl ******************************
737 EVO_CHECK_LANGINFO([CODESET])
738 EVO_CHECK_LANGINFO([_NL_ADDRESS_COUNTRY_AB2])
740 dnl *******************************************************
741 dnl Check to see if strftime supports the use of %l and %k
742 dnl *******************************************************
743 AC_MSG_CHECKING([for %l and %k support in strftime])
744 AC_RUN_IFELSE([AC_LANG_SOURCE(
745 [[ #include <stdlib.h>
748 int main(int argc, char **argv) {
754 timeinfo=localtime(&rawtime);
756 strftime(buf, 10, "%lx%k", timeinfo);
758 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
765 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
766 AC_MSG_RESULT([$ac_cv_lkstrftime])
768 dnl ********************************************************************************
769 dnl security extension support (SSL and S/MIME)
771 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
772 dnl needed by Camel (SSL and S/MIME).
774 dnl The Evolution security extensions are only built if these libraries are found
775 dnl ********************************************************************************
778 AC_ARG_ENABLE([smime],
779 AS_HELP_STRING([--enable-smime],
780 [Enable SMIME support through Mozilla nss @<:@default=yes@:>@ ]),
781 [enable_smime="$enableval"],[enable_smime="yes"])
783 AC_ARG_WITH([nspr-includes],
784 AS_HELP_STRING([--with-nspr-includes],
785 [Prefix of Mozilla nspr4 includes.]),
786 [with_nspr_includes="$withval"])
788 AC_ARG_WITH([nspr-libs],
789 AS_HELP_STRING([--with-nspr-libs],
790 [Prefix of Mozilla nspr4 libs.]),
791 [with_nspr_libs="$withval"])
793 AC_ARG_WITH([nss-includes],
794 AS_HELP_STRING([--with-nss-includes],
795 [Prefix of Mozilla nss3 includes.]),
796 [with_nss_includes="$withval"])
798 AC_ARG_WITH([nss-libs],
799 AS_HELP_STRING([--with-nss-libs],
800 [Prefix of Mozilla nss3 libs.]),
801 [with_nss_libs="$withval"])
803 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
809 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
810 if test "x${check_manually}" = "xno"; then
811 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
812 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
813 for pc in $mozilla_nspr_pcs; do
814 if $PKG_CONFIG --exists $pc; then
821 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
822 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
823 for pc in $mozilla_nss_pcs; do
824 if $PKG_CONFIG --exists $pc; then
831 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
832 if test "x$enable_smime" = "xyes"; then
833 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
836 MANUAL_NSPR_CFLAGS=""
847 if test "x${check_manually}" = "xyes"; then
848 dnl ******************
850 dnl ******************
851 AC_MSG_CHECKING([for Mozilla nspr4 includes])
852 CPPFLAGS_save="$CPPFLAGS"
853 if test -n "$with_nspr_includes"; then
854 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
857 AC_CHECK_HEADERS(nspr.h prio.h,
858 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
859 CPPFLAGS="$CPPFLAGS_save"
861 if test "x${moz_nspr_includes}" = "xyes"; then
862 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
864 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
866 AC_MSG_RESULT([$moz_nspr_includes])
868 AC_MSG_CHECKING([for Mozilla nspr libraries])
869 CFLAGS_save="$CFLAGS"
870 LDFLAGS_save="$LDFLAGS"
872 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
874 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
876 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
877 if test -n "${with_nspr_libs}"; then
878 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
883 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
884 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
886 CFLAGS="$CFLAGS_save"
887 LDFLAGS="$LDFLAGS_save"
890 if test "x${moz_nspr_libs}" = "xyes"; then
891 if test -n "${with_nspr_libs}"; then
892 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
894 MANUAL_NSPR_LIBS="$nsprlibs"
897 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
899 AC_MSG_RESULT([$moz_nspr_libs])
901 dnl *****************
903 dnl *****************
904 AC_MSG_CHECKING([for Mozilla nss3 includes])
905 CPPFLAGS_save="$CPPFLAGS"
906 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
908 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
909 [moz_nss_includes="yes"],[moz_nss_includes="no"])
910 CPPFLAGS="$CPPFLAGS_save"
912 if test "x${moz_nss_includes}" = "xyes"; then
913 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
915 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
917 AC_MSG_RESULT($moz_nss_includes)
919 AC_MSG_CHECKING([for Mozilla nss libraries])
920 LDFLAGS_save="$LDFLAGS"
922 nsslibs="-lssl3 -lsmime3 -lnss3"
924 LIBS="$nsslibs $nsprlibs"
925 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
926 if test -n "${with_nss_libs}"; then
927 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
929 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
932 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
933 [moz_nss_libs="yes"],[moz_nss_libs="no"])
934 LDFLAGS="$LDFLAGS_save"
937 if test "x${moz_nss_libs}" = "xyes"; then
938 if test "x${enable_smime}" = "xyes"; then
939 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
942 if test -n "${with_nss_libs}"; then
943 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
945 MANUAL_NSS_LIBS="$nsslibs"
948 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
950 AC_MSG_RESULT([$moz_nss_libs])
952 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
953 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
956 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
958 dnl For pkgconfig files.
959 AC_SUBST(mozilla_nss)
960 AC_SUBST(mozilla_nspr)
962 AC_SUBST(MANUAL_NSPR_CFLAGS)
963 AC_SUBST(MANUAL_NSPR_LIBS)
964 AC_SUBST(MANUAL_NSS_CFLAGS)
965 AC_SUBST(MANUAL_NSS_LIBS)
967 dnl ******************************
968 dnl system mail stuff
969 dnl ******************************
970 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
971 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
973 AC_MSG_CHECKING([system mail directory])
974 if test -d /var/mail -a '!' -h /var/mail ; then
975 system_mail_dir="/var/mail"
977 system_mail_dir="/var/spool/mail"
979 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
981 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
983 CAMEL_LOCK_HELPER_USER=""
984 CAMEL_LOCK_HELPER_GROUP=""
985 system_mail_perm="world writable"
988 CAMEL_LOCK_HELPER_USER=""
989 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
990 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
993 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
994 CAMEL_LOCK_HELPER_GROUP=""
995 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
998 CAMEL_LOCK_HELPER_USER=""
999 CAMEL_LOCK_HELPER_GROUP=""
1000 system_mail_perm="???"
1004 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
1005 AC_SUBST(CAMEL_LOCK_HELPER_USER)
1006 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
1008 dnl ******************************
1010 dnl ******************************
1011 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
1012 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1013 [[ #include <time.h> ]],
1018 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
1019 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
1020 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
1022 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
1023 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1024 [[ #include <time.h> ]],
1026 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
1027 if test "x$ac_cv_var_timezone" = "xyes"; then
1028 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
1029 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
1030 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1031 [[ #include <time.h> ]],
1033 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
1034 if test "x$ac_cv_var_altzone" = "xyes"; then
1035 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
1038 AC_MSG_ERROR([unable to find a way to determine timezone])
1042 dnl ******************************
1043 dnl ctime_r prototype
1044 dnl ******************************
1045 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
1047 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1048 [[ #include <time.h> ]],
1051 ctime_r (&date, buf, 100); ]]
1052 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
1055 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
1056 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
1059 dnl ******************************
1060 dnl gethostbyname_r prototype
1061 dnl ******************************
1062 AC_CHECK_FUNCS(gethostbyname_r,[
1063 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
1065 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1067 #include "confdefs.h"
1068 #include <sys/types.h>
1069 #include <sys/socket.h>
1070 #include <netinet/in.h>
1072 #define BUFSIZE (sizeof(struct hostent)+10)
1075 struct hostent hent;
1076 char buffer[BUFSIZE];
1077 int bufsize=BUFSIZE;
1079 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
1081 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
1084 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
1085 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
1088 dnl ******************************
1089 dnl gethostbyaddr_r prototype
1090 dnl ******************************
1091 AC_CHECK_FUNCS(gethostbyaddr_r,[
1092 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
1094 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1096 #include "confdefs.h"
1097 #include <sys/types.h>
1098 #include <sys/socket.h>
1099 #include <netinet/in.h>
1101 #define BUFSIZE (sizeof(struct hostent)+10)
1104 struct hostent hent;
1105 char buffer[BUFSIZE];
1106 int bufsize=BUFSIZE;
1108 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
1109 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
1112 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
1113 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
1116 dnl ******************************
1117 dnl stat(v)fs location/type
1118 dnl ******************************
1119 AC_CHECK_HEADER([sys/statvfs.h],
1120 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
1121 [[ #if HAVE_SYS_STATVFS_H
1122 #include <sys/statvfs.h>
1125 AC_CHECK_FUNCS(statvfs)
1127 AC_CHECK_HEADER([sys/param.h],
1128 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1129 [[ #if HAVE_SYS_PARAM_H
1130 #include <sys/param.h>
1133 AC_CHECK_HEADER([sys/mount.h],
1134 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1135 [[ #if HAVE_SYS_MOUNT_H
1136 #include <sys/mount.h>
1139 AC_CHECK_FUNCS(statfs)
1141 dnl ******************************
1142 dnl IPv6 support and getaddrinfo calls
1143 dnl ******************************
1144 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1146 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1147 [[ #include "confdefs.h"
1148 #include <sys/types.h>
1149 #include <sys/socket.h>
1150 #include <netinet/in.h>
1154 [[ #ifndef NI_MAXHOST
1155 #define NI_MAXHOST 1025
1159 #define NI_MAXSERV 32
1162 struct addrinfo hints, *res;
1163 struct sockaddr_in6 sin6;
1165 char host[NI_MAXHOST];
1166 char serv[NI_MAXSERV];
1168 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1170 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1171 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1174 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1175 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1176 if test "x$enable_ipv6" = "xyes" ; then
1177 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1181 AC_ARG_ENABLE([ipv6],
1182 AS_HELP_STRING([--enable-ipv6=no/yes],
1183 [Enable support for resolving IPv6 addresses.]),
1184 [enable_ipv6=$enableval],[enable_ipv6=yes])
1185 if test "x$enable_ipv6" = "xyes"; then
1187 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1188 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1189 [[ #include "confdefs.h"
1190 #include <sys/types.h>
1191 #include <sys/socket.h>
1192 #include <netinet/in.h>
1195 [[ struct addrinfo hints;
1196 hints.ai_flags = AI_ADDRCONFIG;
1198 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1204 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1206 AC_CHECK_HEADER([wspiapi.h],
1207 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1209 dnl **********************************
1210 dnl Weather calendar backend support
1211 dnl **********************************
1212 AC_MSG_CHECKING([if we should build the weather calendar backend])
1213 AC_ARG_ENABLE([weather],
1214 [AS_HELP_STRING([--enable-weather],
1215 [Build the weather calendar backend (default=yes)])],
1216 [use_gweather=$enableval], [use_gweather=yes])
1218 AC_MSG_RESULT([$use_gweather])
1219 if test "x$use_gweather" = "xyes"; then
1220 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1221 [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.])])
1223 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1225 dnl ******************************
1227 dnl ******************************
1228 AC_ARG_ENABLE([nntp],
1229 AS_HELP_STRING([--enable-nntp],
1230 [Build Usenet news (NNTP) backend]),
1231 [enable_nntp=$enableval],[enable_nntp=yes])
1232 if test "x$enable_nntp" = "xyes"; then
1233 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1238 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1240 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1242 dnl ******************************
1244 dnl ******************************
1245 AC_ARG_ENABLE([dot-locking],
1246 AS_HELP_STRING([--enable-dot-locking=yes/no],
1247 [Enable support for locking mail files with dot locking]),
1248 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1250 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1251 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1257 AC_ARG_ENABLE([file-locking],
1258 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1259 [Enable support for locking mail files with file locking]),
1260 [],[enable_file_locking=fcntl])
1262 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1263 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1266 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1267 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1274 dnl ******************************
1275 dnl sendmail operation
1276 dnl ******************************
1277 AC_MSG_CHECKING([for SunOS broken spool format])
1278 if test "x$host_os" = "xsunos" ; then
1279 with_broken_spool="yes"
1282 AC_ARG_WITH([broken-spool],
1283 AS_HELP_STRING([--with-broken-spool=yes/no],
1284 [Using SunOS/Solaris sendmail which has a broken spool format]),
1285 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1287 if test "x$with_broken_spool" = "xyes"; then
1288 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1291 AC_MSG_RESULT([$with_broken_spool])
1296 EVO_KRB5_SUPPORT(no)
1298 dnl ******************************
1300 dnl ******************************
1303 dnl ******************************
1305 dnl ******************************
1306 if test "x$os_win32" != "xyes"; then
1308 case $with_openldap in
1313 case $with_static_ldap in
1315 msg_ldap="$with_openldap (static)"
1318 msg_ldap="$with_openldap (dynamic)"
1323 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1324 if test "x$with_openldap" = "xno" ; then
1325 EVO_SUNLDAP_CHECK(no)
1326 case $with_sunldap in
1331 case $with_static_sunldap in
1333 msg_ldap="$with_sunldap (static)"
1336 msg_ldap="$with_sunldap (dynamic)"
1343 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1345 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1347 dnl Win32 LDAP support
1348 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1349 LDAP_LIBS="-lwldap32"
1350 AC_SUBST(LDAP_CFLAGS)
1352 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1353 AM_CONDITIONAL(ENABLE_LDAP, true)
1354 AM_CONDITIONAL(SUNLDAP, false)
1358 dnl ******************************
1359 dnl GObject marshalling
1360 dnl ******************************
1363 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1364 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1365 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1367 dnl ******************************
1368 dnl Utility macro to set compiler flags for a specific lib.
1369 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1370 dnl ******************************
1371 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1372 PKG_CHECK_MODULES([$1], [$2])
1373 $1_CFLAGS="[$]$1_CFLAGS $3 "
1374 $1_LIBS="[$]$1_LIBS $4 "
1377 dnl ******************************
1379 dnl ******************************
1380 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1382 if test "x$enable_maintainer_mode" = "xyes" ; then
1383 EVO_SET_COMPILE_FLAGS(FACTORY_GTK, "gtk+-3.0")
1384 AC_SUBST(FACTORY_GTK_CFLAGS)
1385 AC_SUBST(FACTORY_GTK_LIBS)
1388 dnl ******************************
1389 dnl libedataserver flags
1390 dnl ******************************
1391 E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 $mozilla_nspr"
1393 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1394 AC_SUBST(E_DATA_SERVER_CFLAGS)
1395 AC_SUBST(E_DATA_SERVER_LIBS)
1397 dnl ******************************
1398 dnl libebackend flags
1399 dnl ******************************
1400 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0"
1402 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1403 AC_SUBST(E_BACKEND_CFLAGS)
1404 AC_SUBST(E_BACKEND_LIBS)
1406 dnl ******************************
1407 dnl evolution-addressbook flags
1408 dnl ******************************
1409 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 libsecret-1"
1411 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1412 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1413 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1415 dnl ******************************
1416 dnl evolution-calendar flags
1417 dnl ******************************
1418 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 libsecret-1"
1421 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1422 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1423 dnl to differentiate between <libical/ical.h> and <ical.h>
1424 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1425 dnl libical is fixed, we have to work-around the buggy CFlags.
1427 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1428 LIBICAL_EXTRA_LIBS=""
1429 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1430 AC_SUBST(LIBICAL_EXTRA_LIBS)
1432 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1433 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1434 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1436 dnl ****************************
1437 dnl Check for ical_set_unknown_token_handling_setting function
1438 dnl ****************************
1439 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1440 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1441 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1442 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1443 [[#include <libical/ical.h>]],
1444 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1445 [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])
1448 AC_MSG_RESULT([$ac_cv_have_iuth])
1450 dnl ******************************
1452 dnl ******************************
1453 LIBGDATA_REQUIRED=libgdata_minimum_version
1454 AC_SUBST(LIBGDATA_REQUIRED)
1455 AC_ARG_ENABLE([google],
1456 [AS_HELP_STRING([--enable-google],
1457 [enable Google Contacts support (default=yes)])],
1458 [enable_google=$enableval], [enable_google=yes])
1459 AC_MSG_CHECKING([if Google Contacts support is enabled])
1460 AC_MSG_RESULT([$enable_google])
1461 if test "x$enable_google" = xyes; then
1462 EVO_SET_COMPILE_FLAGS(GDATA, libgdata >= libgdata_minimum_version)
1463 AC_SUBST(GDATA_CFLAGS)
1464 AC_SUBST(GDATA_LIBS)
1466 AC_DEFINE(HAVE_GOOGLE, 1, [Define to 1 if you have the google-1.0 package.])
1468 AM_CONDITIONAL(HAVE_GOOGLE, [test x$enable_google = xyes])
1470 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1471 AC_SUBST(SOUP_CFLAGS)
1474 dnl ******************************
1476 dnl ******************************
1477 SQLITE_REQUIRED=sqlite_minimum_version
1478 AC_SUBST(SQLITE_REQUIRED)
1481 dnl deflateInit is a #define, use deflateEnd instead
1482 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1484 if test "x$zlib_found" = "xfalse"; then
1485 AC_MSG_ERROR([*** zlib is required])
1488 dnl ******************************
1489 dnl Checks for large file support
1490 dnl ******************************
1491 AC_ARG_ENABLE([largefile],
1492 AS_HELP_STRING([--enable-largefile],
1493 [enable support for large files [[default=no]]]),
1494 [],[enable_largefile="yes"])
1496 if test "x$enable_largefile" != "xno"; then
1498 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1499 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1500 [[ #include <sys/types.h>
1501 #include <sys/stat.h>
1504 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1505 )],[ac_cv_largefile64_source="no"],
1506 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1507 [[ #define _LARGEFILE64_SOURCE
1508 #include <sys/types.h>
1509 #include <sys/stat.h>
1512 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1513 [ac_cv_largefile64_source="unknown"])])
1516 enable_largefile="no"
1518 if test "x$ac_cv_largefile64_source" = "xyes"; then
1519 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1520 enable_largefile="yes"
1521 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1522 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1525 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1526 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1527 enable_largefile="yes"
1530 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1531 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1532 enable_largefile="yes"
1535 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1539 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1541 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)
1542 AC_SUBST(CAMEL_CFLAGS)
1543 AC_SUBST(CAMEL_LIBS)
1545 dnl ******************************
1546 dnl Special directories
1547 dnl ******************************
1549 dnl If you add something here, consider whether or not you also
1550 dnl need to add it to one or more .pc.in files (for Connector,
1553 privdatadir='${datadir}'/evolution-data-server
1554 AC_SUBST(privdatadir)
1556 privincludedir='${includedir}'/evolution-data-server
1557 AC_SUBST(privincludedir)
1559 privlibdir='${libdir}'/evolution-data-server
1560 AC_SUBST(privlibdir)
1562 imagesdir='${datadir}'/pixmaps/evolution-data-server
1565 moduledir='${privlibdir}'/registry-modules
1568 ebook_backenddir='${privlibdir}'/addressbook-backends
1569 AC_SUBST(ebook_backenddir)
1571 ecal_backenddir='${privlibdir}'/calendar-backends
1572 AC_SUBST(ecal_backenddir)
1574 ro_sourcesdir='${privdatadir}'/ro-sources
1575 AC_SUBST(ro_sourcesdir)
1577 rw_sourcesdir='${privdatadir}'/rw-sources
1578 AC_SUBST(rw_sourcesdir)
1580 if test "x$use_gweather" = "xyes"; then
1581 weatherdatadir="$privdatadir/weather"
1582 AC_SUBST(weatherdatadir)
1585 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1586 camel_providerdir='${privlibdir}'/camel-providers
1587 AC_SUBST(camel_providerdir)
1589 dnl *******************
1590 dnl D-BUS service stuff
1591 dnl *******************
1592 m4_pattern_allow([AM_V_GEN])
1593 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)|" $< > $@'
1594 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1596 dnl ******************************
1598 dnl ******************************
1602 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1603 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1604 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1606 dnl ******************************
1608 dnl ******************************
1609 AC_PATH_PROG(GPERF, gperf, [no])
1610 if test "x$GPERF" = "xno"; then
1611 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1614 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1616 dnl ******************************
1618 dnl ******************************
1619 AC_ARG_ENABLE(vala-bindings,
1620 AC_HELP_STRING([--enable-vala-bindings],
1621 [build the EXPERIMENTAL Vala bindings]),
1622 enable_vala_bindings=$enableval,
1623 enable_vala_bindings=no)
1625 if test x$enable_vala_bindings = xyes; then
1626 if test "x$INTROSPECTION_SCANNER" = x; then
1627 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1630 AM_PROG_VALAC([0.13.0])
1633 AC_PATH_PROG(VALAC, valac, valac)
1637 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1639 if test "x$VAPIGEN" = "xfalse"; then
1640 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1646 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1649 dnl ******************************
1651 dnl ******************************
1653 export privincludedir
1658 evolution-data-server-zip
1659 evolution-data-server.pc
1660 addressbook/Makefile
1661 addressbook/libebook/Makefile
1662 addressbook/libebook/libebook.pc
1663 addressbook/libebook-contacts/Makefile
1664 addressbook/libebook-contacts/libebook-contacts.pc
1665 addressbook/libedata-book/Makefile
1666 addressbook/libedata-book/libedata-book.pc
1667 addressbook/libegdbus/Makefile
1668 addressbook/backends/Makefile
1669 addressbook/backends/file/Makefile
1670 addressbook/backends/ldap/Makefile
1671 addressbook/backends/google/Makefile
1672 addressbook/backends/google/tests/Makefile
1673 addressbook/backends/webdav/Makefile
1676 calendar/libecal/Makefile
1677 calendar/libecal/libecal.pc
1678 calendar/libedata-cal/Makefile
1679 calendar/libedata-cal/libedata-cal.pc
1680 calendar/libegdbus/Makefile
1681 calendar/backends/Makefile
1682 calendar/backends/caldav/Makefile
1683 calendar/backends/file/Makefile
1684 calendar/backends/http/Makefile
1685 calendar/backends/contacts/Makefile
1686 calendar/backends/weather/Makefile
1688 camel/providers/Makefile
1689 camel/providers/imapx/Makefile
1690 camel/providers/local/Makefile
1691 camel/providers/nntp/Makefile
1692 camel/providers/pop3/Makefile
1693 camel/providers/sendmail/Makefile
1694 camel/providers/smtp/Makefile
1695 camel/tests/Makefile
1696 camel/tests/folder/Makefile
1697 camel/tests/lib/Makefile
1698 camel/tests/message/Makefile
1699 camel/tests/mime-filter/Makefile
1700 camel/tests/misc/Makefile
1701 camel/tests/smime/Makefile
1704 libebackend/Makefile
1705 libebackend/libebackend.pc
1706 libedataserver/Makefile
1707 libedataserver/eds-version.h
1708 libedataserver/libedataserver.pc
1710 modules/cache-reaper/Makefile
1711 modules/gnome-online-accounts/Makefile
1712 modules/google-backend/Makefile
1713 modules/owncloud-backend/Makefile
1714 modules/ubuntu-online-accounts/Makefile
1715 modules/ubuntu-online-accounts/calendar.service-type.in
1716 modules/ubuntu-online-accounts/contacts.service-type.in
1717 modules/ubuntu-online-accounts/evolution-data-server.application.in
1718 modules/ubuntu-online-accounts/google-calendar.service.in
1719 modules/ubuntu-online-accounts/google-contacts.service.in
1720 modules/ubuntu-online-accounts/google-gmail.service.in
1721 modules/ubuntu-online-accounts/mail.service-type.in
1722 modules/ubuntu-online-accounts/yahoo-calendar.service.in
1723 modules/ubuntu-online-accounts/yahoo-mail.service.in
1724 modules/trust-prompt/Makefile
1725 modules/yahoo-backend/Makefile
1728 services/evolution-addressbook-factory/Makefile
1729 services/evolution-calendar-factory/Makefile
1730 services/evolution-source-registry/Makefile
1731 services/evolution-user-prompter/Makefile
1733 tests/libebook/Makefile
1734 tests/libebook/client/Makefile
1735 tests/libebook/vcard/Makefile
1736 tests/libecal/Makefile
1737 tests/libecal/client/Makefile
1738 tests/libedata-cal/Makefile
1739 tests/libedataserver/Makefile
1740 tests/test-server-utils/Makefile
1741 tests/test-server-utils/services/Makefile
1742 tests/test-server-utils/services/org.gnome.evolution.dataserver.AddressBook.service
1743 tests/test-server-utils/services/org.gnome.evolution.dataserver.Calendar.service
1744 tests/test-server-utils/services/org.gnome.evolution.dataserver.Sources.service
1746 docs/reference/Makefile
1747 docs/reference/addressbook/Makefile
1748 docs/reference/addressbook/libebook/Makefile
1749 docs/reference/addressbook/libedata-book/Makefile
1750 docs/reference/calendar/Makefile
1751 docs/reference/calendar/libecal/Makefile
1752 docs/reference/calendar/libedata-cal/Makefile
1753 docs/reference/camel/Makefile
1754 docs/reference/libedataserver/Makefile
1755 docs/reference/libebackend/Makefile
1756 docs/reference/private/Makefile
1763 evolution-data-server has been configured as follows:
1764 Weather calendar: $use_gweather
1765 Mail Directory: $system_mail_dir, $system_mail_perm
1766 LDAP support: $msg_ldap
1767 NNTP support: $msg_nntp
1768 Kerberos 5: $msg_krb5
1769 SMIME support: $msg_smime
1770 IPv6 support: $msg_ipv6
1771 Phone number support: $msg_phonenumber
1772 Dot Locking: $msg_dot
1773 File Locking: $msg_file
1774 Large files: $enable_largefile
1775 Gtk Doc: $enable_gtk_doc
1776 Introspection: $enable_introspection
1777 Vala bindings: $enable_vala_bindings
1778 GNOME Online Accounts $enable_goa
1779 Ubuntu Online Accounts $enable_uoa
1780 Google Contacts $enable_google
1782 Code coverage (gcov): $enable_code_coverage
1783 Strict building: $enable_strict