2 m4_define([evo_major_version], [3])
3 m4_define([evo_minor_version], [5])
4 m4_define([evo_micro_version], [4])
5 m4_define([evo_version],
6 [evo_major_version.evo_minor_version.evo_micro_version])
7 m4_define([evo_stable_version],
8 [m4_if(m4_eval(evo_minor_version % 2), [1],
9 [evo_major_version.m4_eval(evo_minor_version - 1)],
12 dnl Base Version: This is for API/version tracking for things like
13 dnl Bonobo server files. This should always be the major/minor of
14 dnl the stable version or stable version to be. Note, this is set
15 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
17 m4_define([base_version], [3.6])
19 dnl Autoconf / Automake Initialization
21 AC_INIT([evolution],[evo_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution],[evolution],[http://www.gnome.org/projects/evolution/])
22 AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip -Wall -Wno-portability foreign])
23 AC_CONFIG_MACRO_DIR([m4])
24 AC_CONFIG_HEADERS(config.h)
25 AC_CONFIG_SRCDIR(README)
27 dnl This is for the autoconf tests only - it set's the language we use
30 dnl Automake 1.11 - Silent Build Rules
31 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 m4_define([glib_minimum_version], [2.32.0])
35 m4_define([gtk_minimum_version], [3.2.0])
36 m4_define([eds_minimum_version], [evo_version])
37 m4_define([gtkhtml_minimum_version], [4.5.2])
38 m4_define([gnome_desktop_minimum_version], [2.91.3])
39 m4_define([gnome_icon_theme_minimum_version], [2.30.2.1])
40 m4_define([gsettings_desktop_schemas_minimum_version], [2.91.92])
41 m4_define([webkitgtk_minimum_version], [1.8.0])
42 m4_define([javascriptcoregtk_minimum_version], [1.8.0])
43 m4_define([libgdata_minimum_version], [0.10])
44 m4_define([libsoup_minimum_version], [2.38.1])
45 m4_define([libxml_minimum_version], [2.7.3])
46 m4_define([shared_mime_info_minimum_version], [0.22])
47 m4_define([libpst_minimum_version], [0.6.54])
50 m4_define([champlain_minimum_version], [0.12])
51 m4_define([clutter_gtk_minimum_version], [0.90])
52 m4_define([geoclue_minimum_version], [0.12.0])
53 m4_define([gladeui_minimum_version], [3.10.0])
54 m4_define([goa_minimum_version], [3.2])
55 m4_define([gweather_minimum_version], [2.90.0])
56 m4_define([libcanberra_gtk_minimum_version], [0.25])
57 m4_define([libnotify_minimum_version], [0.7])
58 m4_define([nm_minimum_version], [0.7])
60 dnl XXX These versions don't yet exist. The latest releases
61 dnl link to gtk+-2.0 so we've bumped the versions to some
62 dnl bogus value to force some plugins to be disabled.
63 m4_define([gtkimageview_minimum_version], [2.0])
65 dnl ******************************
66 dnl Compiler Warning Flags
67 dnl ******************************
68 AS_COMPILER_FLAGS(WARNING_FLAGS,
69 "-DE_BOOK_DISABLE_DEPRECATED
70 -DE_CAL_DISABLE_DEPRECATED
72 -Wno-missing-field-initializers
75 -Wno-deprecated-declarations
76 -Wdeclaration-after-statement
77 -Werror-implicit-function-declaration
78 -Wformat-security -Winit-self
79 -Wmissing-declarations -Wmissing-include-dirs
80 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
81 -Wredundant-decls -Wundef -Wwrite-strings")
82 AC_SUBST(WARNING_FLAGS)
84 dnl Need to stop using e-passwords.h before we can restore
85 dnl -DEDS_DISABLE_DEPRECATED
87 dnl Other useful compiler warnings for test builds only.
88 dnl These may produce warnings we have no control over,
89 dnl or false positives we don't always want to see.
91 dnl -Wmissing-format-attribute
93 dnl -Wformat-nonliteral
94 dnl -Wstrict-aliasing=2
95 dnl -DE_BOOK_DISABLE_DEPRECATED
96 dnl -DE_CAL_DISABLE_DEPRECATED
98 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
102 AC_DEFINE_UNQUOTED(VERSION_COMMENT, "", [Define if you want a comment appended to the version number])
104 dnl This must stay after AC_CANONICAL_HOST, which defines $host.
107 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
110 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
115 dnl *************************************
116 dnl Put the ACLOCAL flags in the Makefile
117 dnl *************************************
118 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
120 dnl ******************************
121 dnl Initialize maintainer mode
122 dnl ******************************
123 AM_MAINTAINER_MODE([enable])
125 if test "$evo_version" != "$evo_stable_version"; then
126 AC_DEFINE(STABLE_VERSION, ["evo_stable_version"],
127 [Define to the latest stable version if this version is unstable])
130 AC_SUBST([BASE_VERSION], [base_version])
131 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
133 AC_SUBST([EVO_MAJOR_VERSION], [evo_major_version])
134 AC_SUBST([EVO_MINOR_VERSION], [evo_minor_version])
135 AC_SUBST([EVO_MICRO_VERSION], [evo_micro_version])
145 AC_PATH_PROG([PERL], [perl])
150 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
151 dnl behavior that -- according to the C99 standard -- is supposed to be
152 dnl undefined. We may still have aliasing abuses lying around that rely
153 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
154 dnl optimzation until we can find and fix all the abuses.
155 dnl (AC_PROG_CC must run first to set the GCC variable.)
156 dnl XXX This really belongs in AM_CFLAGS.
157 if test "x${GCC}" = "xyes"; then
158 CFLAGS="$CFLAGS -fno-strict-aliasing"
163 dnl ******************************
165 dnl ******************************
166 IT_PROG_INTLTOOL([0.40.0])
168 AM_GNU_GETTEXT_VERSION([0.17])
169 AM_GNU_GETTEXT([external])
171 GETTEXT_PACKAGE=evolution-$BASE_VERSION
172 AC_SUBST(GETTEXT_PACKAGE)
173 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
175 localedir='$(prefix)/$(DATADIRNAME)/locale'
178 dnl ******************************
179 dnl Initialize libtool
180 dnl ******************************
182 LT_INIT(disable-static win32-dll)
186 dnl ********************************************
187 dnl User / Developer Documentation
188 dnl ********************************************
189 dnl gnome-doc-utils-0.20.10 fixes bug 672826
190 GNOME_DOC_INIT(0.20.10)
191 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
193 dnl ******************************
195 dnl ******************************
196 AC_MSG_CHECKING([for Win32])
200 NO_UNDEFINED='-no-undefined'
204 CHAMPLAIN_REQUIREMENT=''
205 GEOCLUE_REQUIREMENT=''
211 SA_JUNK_PLUGIN=sa-junk-plugin
212 BF_JUNK_PLUGIN=bogo-junk-plugin
214 SOFTOKN3_LIB='-lsoftokn3'
218 NO_UNDEFINED='-no-undefined'
221 SOFTOKN3_LIB='-lsoftokn3'
224 AC_MSG_RESULT([$os_win32])
225 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
226 AC_SUBST(NO_UNDEFINED)
232 if test "$os_win32" = "yes"; then
233 AC_CHECK_TOOL(WINDRES, windres, :)
238 AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
242 dnl **********************************
243 dnl Check for base dependencies early.
244 dnl **********************************
245 PKG_CHECK_MODULES([GNOME_PLATFORM],
246 [gio-2.0 >= glib_minimum_version
247 gmodule-2.0 >= glib_minimum_version
249 gtk+-3.0 >= gtk_minimum_version
250 gail-3.0 >= gtk_minimum_version
251 libxml-2.0 >= libxml_minimum_version
252 shared-mime-info >= shared_mime_info_minimum_version
253 gnome-desktop-3.0 >= gnome_desktop_minimum_version
254 gsettings-desktop-schemas >= gsettings_desktop_schemas_minimum_version
255 webkitgtk-3.0 >= webkitgtk_minimum_version
256 javascriptcoregtk-3.0 >= javascriptcoregtk_minimum_version])
257 AC_SUBST(GNOME_PLATFORM_CFLAGS)
258 AC_SUBST(GNOME_PLATFORM_LIBS)
260 PKG_CHECK_MODULES([EVOLUTION_DATA_SERVER],
261 [camel-1.2 >= eds_minimum_version
262 libebook-1.2 >= eds_minimum_version
263 libecal-1.2 >= eds_minimum_version
264 libedataserver-1.2 >= eds_minimum_version
265 libedataserverui-3.0 >= eds_minimum_version
266 libebackend-1.2 >= eds_minimum_version])
267 AC_SUBST(EVOLUTION_DATA_SERVER_CFLAGS)
268 AC_SUBST(EVOLUTION_DATA_SERVER_LIBS)
270 dnl ******************************
271 dnl Canberra / Canberra-GTK Sound
272 dnl ******************************
273 AC_ARG_ENABLE([canberra],
274 [AS_HELP_STRING([--enable-canberra],
275 [Enable Canberra and Canberra-GTK sound @<:@default=yes@:>@])],
276 [enable_canberra="$enableval"], [enable_canberra=yes])
278 if test $enable_canberra = yes; then
279 PKG_CHECK_MODULES([CANBERRA],[libcanberra-gtk3 >= libcanberra_gtk_minimum_version],,
280 [AC_MSG_ERROR([libcanberra-gtk3 not found (or version < libcanberra_gtk_minimum_version),
281 If you want to disable support for event sounds,
282 please append --disable-canberra to configure.])])
283 AC_DEFINE(HAVE_CANBERRA, 1, [Define if using Canberra and Canberra-GTK for sound])
285 AC_SUBST(CANBERRA_CFLAGS)
286 AC_SUBST(CANBERRA_LIBS)
288 dnl ******************
289 dnl User Documentation
290 dnl ******************
291 AC_MSG_CHECKING([whether to build user documentation])
293 [AS_HELP_STRING([--with-help],
294 [Build user documentation [default=yes]])],
295 [with_help="$withval"],[with_help="yes"])
296 AM_CONDITIONAL(WITH_HELP, test "x$with_help" != "xno")
297 AC_MSG_RESULT([$with_help])
302 AC_MSG_CHECKING([whether to build the settings capplet])
303 AC_ARG_WITH([capplet],
304 [AS_HELP_STRING([--with-capplet],
305 [Build the account settings capplet [default=no]])],
306 [with_capplet="$withval"],[with_capplet="no"])
307 if test "x$with_capplet" = "xyes"; then
308 AC_DEFINE(WITH_CAPPLET, 1, [Define if building the settings capplet])
310 AM_CONDITIONAL(WITH_CAPPLET, test "x$with_capplet" = "xyes")
311 AC_MSG_RESULT([$with_capplet])
313 dnl ******************************
315 dnl ******************************
319 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
320 AC_LINK_IFELSE([AC_LANG_PROGRAM(
326 cd = iconv_open ("UTF-8", "ISO-8859-1");
328 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
330 if test $ac_cv_libiconv = yes; then
332 if test $os_win32 = yes; then
333 dnl Don't pointlessly auto-export the global symbols
334 dnl from a potentially static libiconv.a
335 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
340 AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
343 if test $have_iconv = yes; then
344 if test $ac_cv_libiconv = no; then
345 AC_CHECK_FUNCS(gnu_get_libc_version)
347 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
348 AC_RUN_IFELSE([AC_LANG_SOURCE([[
352 #ifdef HAVE_GNU_GET_LIBC_VERSION
353 #include <gnu/libc-version.h>
356 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
357 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
358 char *transbuf = malloc (10), *trans = transbuf;
360 size_t jp_len = strlen (jp), utf8_len = 10;
361 size_t utf8_real_len = strlen (utf8);
363 #ifdef HAVE_GNU_GET_LIBC_VERSION
364 /* glibc 2.1.2's iconv is broken in hard to test ways. */
365 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
369 cd = iconv_open ("UTF-8", "ISO-2022-JP");
370 if (cd == (iconv_t) -1)
372 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
374 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
378 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
381 if test "$have_iconv" = no; then
382 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
386 save_CFLAGS="$CFLAGS"
387 CFLAGS="$CFLAGS -I$srcdir"
389 AC_MSG_CHECKING([preferred charset name formats for system iconv])
390 AC_RUN_IFELSE([AC_LANG_SOURCE([[
392 #include "iconv-detect.c"
394 [AC_MSG_RESULT([found])],
395 [AC_MSG_RESULT([not found])
397 *** The iconv-detect program was unable to determine the
398 *** preferred charset name formats recognized by your
399 *** iconv library. It is suggested that you install a
400 *** working iconv library such as the one found at
401 *** ftp://ftp.gnu.org/pub/gnu/libiconv
403 [if test x$os_win32 = xyes; then
404 AC_MSG_RESULT([using known win32 result])
405 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
406 echo >>iconv-detect.h
407 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
408 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
409 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
411 AC_MSG_RESULT([unknown])
413 *** We can't determine the preferred charset name formats
414 *** recognized by your iconv library. You are
415 *** cross-compiling and supposed to know what you are doing.
416 *** Please construct the iconv-detect.h file manually.
421 CFLAGS="$save_CFLAGS"
437 AC_ARG_ENABLE([test-component],
438 AS_HELP_STRING([--enable-test-component],
439 [Enable test component.]),
440 [enable_test_comp=$enableval],[enable_test_comp=no])
442 AM_CONDITIONAL(ENABLE_TEST_COMPONENT, [test x$enable_test_comp = xyes])
447 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
448 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
449 [[ #include <time.h> ]],
454 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
455 if test $ac_cv_struct_tm_gmtoff = yes; then
456 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
458 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
459 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
460 [[ #include <time.h> ]],
462 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
463 if test $ac_cv_var_timezone = yes; then
464 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
465 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
466 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
467 [[ #include <time.h> ]],
469 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
470 if test $ac_cv_var_altzone = yes; then
471 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
474 AC_MSG_ERROR([unable to find a way to determine timezone])
479 AC_CHECK_FUNCS(mkstemp mkdtemp isblank)
481 dnl **************************************************
482 dnl ctime_r prototype
483 dnl **************************************************
485 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
487 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
488 [[ #include <time.h> ]],
491 ctime_r (&date, buf, 100); ]]
492 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
495 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
496 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
499 dnl **************************************************
500 dnl gethostbyname_r prototype
501 dnl **************************************************
503 AC_CHECK_FUNCS(gethostbyname_r,[
504 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
506 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
508 #include "confdefs.h"
509 #include <sys/types.h>
510 #include <sys/socket.h>
511 #include <netinet/in.h>
514 #define BUFSIZE (sizeof(struct hostent)+10)
518 char buffer[BUFSIZE];
521 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
523 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
526 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
527 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
530 dnl **************************************************
531 dnl gethostbyaddr_r prototype
532 dnl **************************************************
534 AC_CHECK_FUNCS(gethostbyaddr_r,[
535 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
537 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
539 #include "confdefs.h"
540 #include <sys/types.h>
541 #include <sys/socket.h>
542 #include <netinet/in.h>
544 #define BUFSIZE (sizeof(struct hostent)+10)
548 char buffer[BUFSIZE];
551 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
552 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
555 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
556 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
559 dnl **************************************************
560 dnl stat(v)fs location/type
561 dnl **************************************************
563 AC_CHECK_HEADER([sys/statvfs.h],
564 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
565 [[ #if HAVE_SYS_STATVFS_H
566 #include <sys/statvfs.h>
569 AC_CHECK_FUNCS(statvfs)
571 AC_CHECK_HEADER([sys/param.h],
572 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
573 [[ #if HAVE_SYS_PARAM_H
574 #include <sys/param.h>
577 AC_CHECK_HEADER([sys/mount.h],
578 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
579 [[ #if HAVE_SYS_MOUNT_H
580 #include <sys/mount.h>
583 AC_CHECK_FUNCS(statfs)
585 dnl **************************************************
587 dnl **************************************************
588 PKG_CHECK_MODULES([GIT], [gnome-icon-theme >= gnome_icon_theme_minimum_version])
590 dnl **************************************************
591 dnl Accessibility support
592 dnl **************************************************
593 PKG_CHECK_MODULES([A11Y], [atk])
594 AC_SUBST(A11Y_CFLAGS)
597 dnl **************************************************
598 dnl XF86 multimedia keys support
599 dnl **************************************************
601 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
602 [[ #include <X11/XF86keysym.h> ]],[[]])],
605 AC_MSG_CHECKING([for X11 XFree86 headers])
606 AC_MSG_RESULT([$have_xfree])
607 if test x"$have_xfree" = "xyes" ; then
608 AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
611 dnl **************************************************
613 dnl **************************************************
614 AC_MSG_CHECKING([whether to build with Clutter])
615 AC_ARG_WITH([clutter],
616 [AC_HELP_STRING([--with-clutter],
617 [Build with Clutter [default=no]])],
618 with_clutter="$withval", with_clutter="no")
619 AC_MSG_RESULT($with_clutter)
621 if test "x$with_clutter" = "xyes"; then
622 PKG_CHECK_MODULES(CLUTTER, [clutter-gtk-1.0 >= clutter_gtk_minimum_version mx-1.0 clutter-1.0 >= 1.0.0])
624 AC_DEFINE(HAVE_CLUTTER, 1, [Clutter available])
625 AM_CONDITIONAL(ENABLE_CLUTTER, true)
627 AC_DEFINE(HAVE_CLUTTER, 0, [Clutter not available])
628 AM_CONDITIONAL(ENABLE_CLUTTER, false)
632 dnl **************************************************
634 dnl **************************************************
635 if test "$os_win32" != yes; then
637 case $with_openldap in
642 case $with_static_ldap in
644 msg_ldap="yes (static)"
647 msg_ldap="yes (dynamic)"
652 SAVE_CFLAGS="$CFLAGS"
654 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
655 CFLAGS="$CFLAGS $LDAP_CFLAGS"
656 LIBS="$LIBS $LDAP_LIBS"
657 AC_CHECK_FUNCS(ldap_ntlm_bind)
658 CFLAGS="$SAVE_CFLAGS"
662 LDAP_CFLAGS="-DLDAP_DEPRECATED"
663 LDAP_LIBS="-lwldap32"
664 AC_SUBST(LDAP_CFLAGS)
666 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
667 AM_CONDITIONAL(ENABLE_LDAP, true)
671 dnl **************************************************
672 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
673 dnl **************************************************
674 if test "$with_openldap" = no ; then
675 EVO_SUNLDAP_CHECK(no)
676 case $with_sunldap in
681 case $with_static_sunldap in
683 msg_ldap="$with_sunldap (static)"
686 msg_ldap="$with_sunldap (dynamic)"
693 AM_CONDITIONAL(SUNLDAP, [test x$with_sunldap != xno])
695 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
700 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
702 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
703 [AC_MSG_ERROR([No regex library found])])])
706 dnl *************************
708 dnl XXX Drop the version from the package name?
709 dnl *************************
710 PKG_CHECK_MODULES([GTKHTML],
711 [libgtkhtml-4.0 >= gtkhtml_minimum_version
713 AC_SUBST(GTKHTML_CFLAGS)
714 AC_SUBST(GTKHTML_LIBS)
721 dnl ********************************************************************************
722 dnl security extension support (SSL and S/MIME)
724 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
725 dnl needed by Camel (SSL and S/MIME).
727 dnl The Evolution security extensions are only built if these libraries are found
728 dnl ********************************************************************************
732 dnl these 2 enable's are inverses of each other
735 AS_HELP_STRING([--enable-nss=@<:@yes/no/static@:>@],
736 [Attempt to use Mozilla libnss for SSL support.]),
737 [enable_nss=$enableval],[enable_nss=yes])
739 AC_ARG_ENABLE([smime],
740 AS_HELP_STRING([--enable-smime],
741 [Attempt to use Mozilla libnss for SMIME support (this requires --enable-nss)]),
742 [enable_smime=$enableval],[enable_smime=yes])
744 AC_ARG_WITH([nspr-includes],
745 AS_HELP_STRING([--with-nspr-includes=PATH],
746 [Location of Mozilla nspr4 includes.]))
748 AC_ARG_WITH([nspr-libs],
749 AS_HELP_STRING([--with-nspr-libs=PATH],
750 [Location of Mozilla nspr4 libs.]))
752 AC_ARG_WITH([nss-includes],
753 AS_HELP_STRING([--with-nss-includes=PATH],
754 [Location of Mozilla nss3 includes.]))
756 AC_ARG_WITH([nss-libs],
757 AS_HELP_STRING([--with-nss-libs=PATH],
758 [Location of Mozilla nss3 libs.]))
760 if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
761 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}" || test "x${enable_nss}" = "xstatic"; then
767 if test "x${check_manually}" = "xno"; then
768 AC_MSG_CHECKING([Mozilla NSPR pkg-config module name])
769 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
770 for pc in $mozilla_nspr_pcs; do
771 if $PKG_CONFIG --exists $pc; then
778 AC_MSG_CHECKING([Mozilla NSS pkg-config module name])
779 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
780 for pc in $mozilla_nss_pcs; do
781 if $PKG_CONFIG --exists $pc; then
788 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
789 msg_ssl="yes (Mozilla NSS)"
790 if test "x$enable_smime" = "xyes"; then
791 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
792 msg_smime="yes (Mozilla NSS)"
794 AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
795 AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
796 AC_DEFINE_UNQUOTED(MOZILLA_NSS_LIB_DIR,"`$PKG_CONFIG --variable=libdir $mozilla_nss`",[Define to the full path of mozilla nss library])
797 MANUAL_NSPR_CFLAGS=""
808 if test "x${check_manually}" = "xyes"; then
810 have_nspr_includes="no"
811 if test "x${with_nspr_includes}" != "xno"; then
812 CPPFLAGS_save="$CPPFLAGS"
814 AC_MSG_CHECKING([for Mozilla nspr4 includes in $with_nspr_includes])
817 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
818 AC_CHECK_HEADERS([nspr.h prio.h],[ moz_nspr_includes="yes" ],,
825 CPPFLAGS="$CPPFLAGS_save"
827 if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
828 have_nspr_includes="yes"
829 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
832 AC_MSG_CHECKING([for Mozilla nspr4 includes])
837 if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
838 CFLAGS_save="$CFLAGS"
839 LDFLAGS_save="$LDFLAGS"
841 if test "$enable_nss" = "static"; then
842 if test -z "${with_nspr_libs}"; then
843 AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set.]
844 [Please specify the path to libnspr4.a]
845 [Example: --with-nspr-libs=/usr/lib])
847 nsprlibs="$DL_LIB $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a"
850 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
853 AC_CACHE_CHECK([for Mozilla nspr libraries], [ac_cv_moz_nspr_libs],
856 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
858 if test "x${with_nspr_libs}" != "x"; then
860 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
866 AC_LINK_IFELSE([AC_LANG_CALL([], [PR_Init])],
867 [ac_cv_moz_nspr_libs="yes"], [ac_cv_moz_nspr_libs="no"])
868 CFLAGS="$CFLAGS_save"
869 LDFLAGS="$LDFLAGS_save"
872 if test "x$ac_cv_moz_nspr_libs" != "xno"; then
874 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
876 MANUAL_NSPR_CLFAGS=""
879 AC_MSG_CHECKING([for Mozilla nspr4 libraries])
883 if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
884 CPPFLAGS_save="$CPPFLAGS"
886 AC_MSG_CHECKING([for Mozilla nss3 includes in $with_nss_includes])
889 if test "x${with_nspr_includes}" != "x"; then
890 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
892 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
895 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
896 [ have_nss_includes="yes" ],
897 [ have_nss_includes="no" ],
906 CPPFLAGS="$CPPFLAGS_save"
908 if test "x${have_nss_includes}" = "xyes"; then
909 have_nss_includes="yes"
910 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
912 MANUAL_NSPR_CFLAGS=""
916 AC_MSG_CHECKING([for Mozilla nss3 includes])
920 if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
921 LDFLAGS_save="$LDFLAGS"
923 if test "$enable_nss" = "static"; then
924 if test -z "${with_nss_libs}"; then
925 AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set.]
926 [Please specify the path to libnss3.a]
927 [Example: --with-nspr-libs=/usr/lib/mozilla])
929 nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
932 nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
937 nsslibs="-lssl3 -lsmime3 -lnss3"
940 AC_CACHE_CHECK([for Mozilla nss libraries], [ac_cv_moz_nss_libs],
943 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
944 LIBS="$nsslibs $nsprlibs"
945 AC_LINK_IFELSE([AC_LANG_CALL([], [NSS_Init])],
946 [ac_cv_moz_nss_libs="yes"], [ac_cv_moz_nss_libs="no"])
947 if test "$ac_cv_moz_nss_libs" = no; then
948 nsslibs="-lssl3 -lsmime3 -lnss3"
949 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
950 AC_LINK_IFELSE([AC_LANG_CALL([], [NSS_Init])],
951 [ac_cv_moz_nss_libs="yes"], [ac_cv_moz_nss_libs="no"])
953 LDFLAGS="$LDFLAGS_save"
956 if test "$ac_cv_moz_nss_libs" != no; then
959 AC_DEFINE_UNQUOTED(MOZILLA_NSS_LIB_DIR,"$with_nss_libs", [Define to the full path of mozilla nss library])
960 if test "$enable_nss" = "static"; then
961 msg_ssl="yes (Mozilla NSS:static)"
963 msg_ssl="yes (Mozilla NSS)"
966 if test "$enable_smime" = "yes"; then
967 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
968 msg_smime="yes (Mozilla NSS)"
970 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
973 MANUAL_NSPR_CFLAGS=""
977 AC_MSG_CHECKING([for Mozilla nss libraries])
981 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
982 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
986 AM_CONDITIONAL(ENABLE_SMIME, [test "x$msg_smime" != "xno"])
988 AC_SUBST(MANUAL_NSPR_CFLAGS)
989 AC_SUBST(MANUAL_NSPR_LIBS)
990 AC_SUBST(MANUAL_NSS_CFLAGS)
991 AC_SUBST(MANUAL_NSS_LIBS)
993 dnl *****************
994 dnl killall or pkill?
995 dnl *****************
999 KILL_PROCESS_CMD="/usr/bin/pkill -x"
1002 AC_PATH_PROGS(KILL_PROCESS_CMD, killall pkill)
1005 if test -z "$KILL_PROCESS_CMD"; then
1006 AC_MSG_WARN([Could not find a command to kill a process by name])
1008 AC_DEFINE_UNQUOTED([KILL_PROCESS_CMD], "$KILL_PROCESS_CMD",
1009 [Command to kill processes by name])
1012 dnl *******************
1013 dnl GObject marshalling
1014 dnl *******************
1017 dnl *****************************************************************
1018 dnl Utility macro to set compiler flags for a specific lib.
1019 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1020 dnl *****************************************************************
1021 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1022 PKG_CHECK_MODULES([$1], [$2])
1023 $1_CFLAGS="[$]$1_CFLAGS $3"
1024 $1_LIBS="[$]$1_LIBS $4"
1027 dnl ******************************
1028 dnl TNEF implementation
1029 dnl ******************************
1030 AC_MSG_CHECKING([for yTNEF])
1031 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1036 [[ TNEFStruct *tnef; ]]
1037 )], [tnef_ok=yes], [tnef_ok=no])
1038 if test "$tnef_ok" = "yes"; then
1039 AC_MSG_RESULT([yes])
1040 TNEF_CFLAGS="-DHAVE_YTNEF_H"
1041 AC_DEFINE(ENABLE_TNEF,1,[Define if TNEF attachments parser should be built])
1044 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1047 #include <libytnef/ytnef.h>
1049 [[ TNEFStruct *tnef; ]]
1050 )], [tnef_ok=yes], [tnef_ok=no])
1051 if test "$tnef_ok" = "yes"; then
1052 AC_MSG_RESULT([yes])
1053 TNEF_CFLAGS="-DHAVE_LIBYTNEF_YTNEF_H"
1054 AC_DEFINE(ENABLE_TNEF,1,[Define if TNEF attachments parser should be built])
1060 AM_CONDITIONAL([ENABLE_TNEF], [test "$tnef_ok" = "yes"])
1061 AC_SUBST(TNEF_CFLAGS)
1063 dnl *******************************
1064 dnl Check for GNOME Online Accounts
1065 dnl *******************************
1066 AC_ARG_ENABLE([goa],
1067 [AS_HELP_STRING([--enable-goa],
1068 [enable GNOME Online Accounts support (default=yes)])],
1069 [enable_goa=$enableval], [enable_goa=yes])
1070 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
1071 AC_MSG_RESULT([$enable_goa])
1072 if test "x$enable_goa" = xyes; then
1073 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
1074 [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
1075 If you want to disable GNOME Online Accounts support,
1076 please append --disable-goa to configure.])])
1078 AM_CONDITIONAL([ENABLE_ONLINE_ACCOUNTS], [test "x$enable_goa" = xyes])
1080 if test "x$mozilla_nss" != "x"; then
1081 EVO_SET_COMPILE_FLAGS(MOZILLA_NSS, $mozilla_nss)
1082 MOZILLA_L_DIR=`${PKG_CONFIG} --libs-only-L $mozilla_nss`
1084 if test "x$MOZILLA_MANUAL_LIBS" != "x"; then
1085 MOZILLA_L_DIR="-L$with_nss_lib"
1089 dnl ******************************
1091 dnl ******************************
1093 dnl Here we want the Mozilla flags to go *before* the other ones,
1094 dnl especially the mozilla-nss -I flags to go before the gnutls ones
1095 dnl (which are dragged in through libedataserverui), as both
1096 dnl gnutls and mozilla-nss have a header called "pkcs12.h" which is
1097 dnl included in smime/lib/e-pkcs12.c. It wants the Mozilla NSS one.
1099 CERT_UI_CFLAGS="$MANUAL_NSS_CFLAGS $MOZILLA_NSS_CFLAGS"
1100 CERT_UI_LIBS="$MOZILLA_L_DIR $MANUAL_NSS_LIBS $MOZILLA_NSS_LIBS"
1101 AC_SUBST(CERT_UI_CFLAGS)
1102 AC_SUBST(CERT_UI_LIBS)
1109 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= libnotify_minimum_version], [HAVE_LIBNOTIFY="yes"], [HAVE_LIBNOTIFY="no"])
1110 if test "x$HAVE_LIBNOTIFY" = "xyes"; then
1111 AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if you have libnotify])
1112 libnotify="libnotify"
1116 AC_SUBST(LIBNOTIFY_CFLAGS)
1117 AC_SUBST(LIBNOTIFY_LIBS)
1122 PKG_CHECK_MODULES([LIBSOUP], [libsoup-gnome-2.4 >= libsoup_minimum_version])
1123 AC_SUBST(LIBSOUP_CFLAGS)
1124 AC_SUBST(LIBSOUP_LIBS)
1126 PKG_CHECK_MODULES([GDATA], [libgdata >= libgdata_minimum_version])
1127 AC_SUBST(GDATA_CFLAGS)
1128 AC_SUBST(GDATA_LIBS)
1130 dnl ****************************
1131 dnl Check for ical_set_unknown_token_handling_setting function
1132 dnl ****************************
1133 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1134 save_cflags=$CFLAGS; CFLAGS="$EVOLUTION_DATA_SERVER_CFLAGS"
1135 save_libs=$LIBS; LIBS="$EVOLUTION_DATA_SERVER_LIBS"
1136 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1137 [[#include <libical/ical.h>]],
1138 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1139 [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])
1142 AC_MSG_RESULT([$ac_cv_have_iuth])
1144 dnl *****************
1145 dnl EggSMClient Flags
1146 dnl *****************
1147 if test "x$os_win32" = "xyes"; then
1148 PKG_CHECK_MODULES([EGG_SMCLIENT], [gtk+-3.0])
1150 PKG_CHECK_MODULES([EGG_SMCLIENT], [gtk+-3.0 ice sm])
1152 AC_SUBST(EGG_SMCLIENT_CFLAGS)
1153 AC_SUBST(EGG_SMCLIENT_LIBS)
1155 dnl *******************
1156 dnl Special directories
1157 dnl *******************
1159 dnl If you add something here, consider whether or not you also need to add it to one or more .pc.in
1160 dnl files (for Connector, etc)
1162 privlibdir='${libdir}'/evolution/$BASE_VERSION
1163 AC_SUBST(privlibdir)
1165 privlibexecdir='${libexecdir}'/evolution/$BASE_VERSION
1166 AC_SUBST(privlibexecdir)
1168 privdatadir='${datadir}'/evolution/$BASE_VERSION
1169 AC_SUBST(privdatadir)
1171 privincludedir='${includedir}'/evolution-$BASE_VERSION
1172 AC_SUBST(privincludedir)
1174 moduledir="$privlibdir/modules"
1177 uidir="$privdatadir/ui"
1180 evolutionhelpdir="$privdatadir/help"
1181 AC_SUBST(evolutionhelpdir)
1183 icondir="$privdatadir/icons"
1186 imagesdir="$privdatadir/images"
1189 if test "$os_win32" = yes; then
1190 dnl On Win32 there is no "rpath" mechanism. We install the private
1191 dnl shared libraries in $libdir, meaning the DLLs will actually be in
1192 dnl $bindir. This means just having $bindir in PATH will be enough. This
1193 dnl also means gnome_win32_get_prefixes() will be able to deduce the
1194 dnl installation folder correctly.
1195 privsolibdir=$libdir
1197 privsolibdir=$privlibdir
1199 AC_SUBST(privsolibdir)
1201 soundsdir="$privdatadir/sounds"
1204 etspecdir="$privdatadir/etspec"
1207 viewsdir="$privdatadir/views"
1210 dnl For evolution-alarm-notify.desktop
1211 AS_AC_EXPAND(PRIVLIBEXECDIR, "$privlibexecdir")
1213 dnl ************************
1215 dnl ************************
1217 plugindir="$privlibdir/plugins"
1220 EVO_PLUGIN_RULE=$srcdir/plugin.mk
1221 AC_SUBST_FILE(EVO_PLUGIN_RULE)
1223 AC_ARG_ENABLE([plugins],
1224 AS_HELP_STRING([--enable-plugins=[no/base/all]],
1226 [enable_plugins="$enableval"],[enable_plugins=all])
1228 dnl Add any new plugins here
1229 plugins_base_always="mark-all-read publish-calendar"
1231 plugins_base="$plugins_base_always"
1232 dist_plugins_base="$plugins_base_always"
1234 plugins_standard_always="bbdb save-calendar mail-to-task mailing-list-actions mail-notification attachment-reminder email-custom-header face templates dbx-import external-editor"
1236 plugins_standard="$plugins_standard_always"
1237 dist_plugins_standard="$plugins_standard image-inline pst-import"
1239 dnl ******************************************************************
1240 dnl The following plugins have additional library dependencies.
1241 dnl They must be explicitly disabled if the libraries are not present.
1242 dnl ******************************************************************
1244 dnl *******************************************
1245 dnl audio-inline plugin requires gstreamer-0.10
1246 dnl *******************************************
1247 AC_ARG_ENABLE([audio-inline],
1248 [AS_HELP_STRING([--enable-audio-inline],
1249 [Enable audio-inline plugin @<:@default=yes@:>@])],
1250 [enable_audio_inline="$enableval"], [enable_audio_inline=yes])
1252 if test "x$enable_audio_inline" = "xyes"; then
1253 PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, have_gst=yes, have_gst=no)
1254 AC_SUBST(GSTREAMER_CFLAGS)
1255 AC_SUBST(GSTREAMER_LIBS)
1257 if test "x$have_gst" = "xyes"; then
1258 AC_DEFINE(ENABLE_AUDIO_INLINE, 1, [Define to add support for inlining audio attachments])
1260 AC_MSG_ERROR([gstreamer-0.10 is required for the audio-inline plugin. Use --disable-audio-inline to exclude the plugin.])
1264 AM_CONDITIONAL([ENABLE_AUDIO_INLINE], [test "x$enable_audio_inline" = "xyes"])
1266 dnl **************************************
1267 dnl Weather calendars require gweather-3.0
1268 dnl **************************************
1269 AC_ARG_ENABLE([weather],
1270 [AS_HELP_STRING([--enable-weather],
1271 [Enable weather calendars @<:@default=yes@:>@])],
1272 [enable_weather="$enableval"],[enable_weather=yes])
1274 if test "x$enable_weather" != "xno"; then
1275 PKG_CHECK_MODULES([GWEATHER], gweather-3.0 >= gweather_minimum_version,
1276 have_weather="yes", have_weather="no")
1277 AC_SUBST(GWEATHER_CFLAGS)
1278 AC_SUBST(GWEATHER_LIBS)
1280 if test "x$have_weather" = "xno"; then
1281 AC_MSG_ERROR([gweather-3.0 >= gweather_minimum_version is required for configuring weather calendars. Use --disable-weather to disable this feature.])
1284 dnl gweather-3.5 introduces API changes we do not yet support.
1285 if `$PKG_CONFIG --atleast-version=3.5 gweather-3.0`; then
1286 AC_MSG_ERROR([gweather-3.5 is not yet supported. Install gweather-3.4 or specify --disable-weather as a configure option to exclude the calendar-weather plugin.])
1289 AM_CONDITIONAL(ENABLE_WEATHER, [test "x$enable_weather" != "xno"])
1291 dnl ********************************************************************
1292 dnl maps in contacts preview requires champlain-gtk, geoclue and clutter
1293 dnl ********************************************************************
1294 AC_ARG_ENABLE([contact-maps],
1295 [AS_HELP_STRING([--enable-contact-maps],
1296 [Enable contact maps @<:@default=no@:>@])],
1297 [enable_contact_maps="$enableval"], [enable_contact_maps="no"])
1299 if test "x$enable_contact_maps" = "xyes"; then
1300 if test "x$with_clutter" = "xno"; then
1301 AC_MSG_ERROR([Clutter is required for maps in contacts. Use --with-clutter=yes to enable clutter.])
1304 PKG_CHECK_MODULES([CHAMPLAIN], [champlain-gtk-0.12 >= champlain_minimum_version], [have_champlain=yes], [have_champlain=no])
1305 AC_SUBST(CHAMPLAIN_CFLAGS)
1306 AC_SUBST(CHAMPLAIN_LIBS)
1308 if test "x$have_champlain" = "xno"; then
1309 AC_MSG_ERROR([champlain-gtk-0.12 >= champlain_minimum_version is required for maps in contacts preview.])
1312 PKG_CHECK_MODULES([GEOCLUE], [geoclue >= geoclue_minimum_version], [have_geoclue=yes], [have_geoclue=no])
1313 AC_SUBST(GEOCLUE_CFLAGS)
1314 AC_SUBST(GEOCLUE_LIBS)
1316 if test "x$have_geoclue" = "xno"; then
1317 AC_MSG_ERROR([geoclue is required for maps in contacts preview.])
1320 PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= clutter_gtk_minimum_version], [have_clutter_gtk="yes"], [have_clutter_gtk="no"] )
1322 if test "x$have_clutter_gtk" = "xno"; then
1323 AC_MSG_ERROR([clutter-gtk-1.0 is required for maps in contacts preview.])
1326 AC_DEFINE(WITH_CONTACT_MAPS, 1, [When defined contacts preview will contain maps])
1329 dnl *****************************************
1330 dnl image-inline plugin requires gtkimageview
1331 dnl *****************************************
1332 AC_ARG_ENABLE([image-inline],
1333 [AS_HELP_STRING([--enable-image-inline],
1334 [Enable image-inline plugin @<:@default=no@:>@])],
1335 [enable_image_inline="$enableval"], [enable_image_inline=no])
1337 if test "x$enable_image_inline" = "xyes"; then
1338 PKG_CHECK_MODULES(GTKIMAGEVIEW, gtkimageview >= gtkimageview_minimum_version, have_imageview=yes, have_imageview=no)
1339 AC_SUBST(GTKIMAGEVIEW_CFLAGS)
1340 AC_SUBST(GTKIMAGEVIEW_LIBS)
1342 if test "x$have_imageview" = "xyes"; then
1343 plugins_standard="$plugins_standard image-inline"
1345 AC_MSG_ERROR([gtkimageview >= gtkimageview_minimum_version is required for the image-inline plugin. Use --disable-image-inline to exclude the plugin.])
1349 dnl *********************************
1350 dnl pst-import plugin requires libpst
1351 dnl *********************************
1352 AC_ARG_ENABLE([pst-import],
1353 [AS_HELP_STRING([--enable-pst-import],
1354 [Enable pst-import plugin @<:@default=yes@:>@])],
1355 [enable_pst="$enableval"], [enable_pst=yes])
1357 if test "x$enable_pst" = "xyes"; then
1358 PKG_CHECK_MODULES(LIBPST, libpst >= libpst_minimum_version, have_pst=yes, have_pst=no)
1359 AC_SUBST(LIBPST_CFLAGS)
1360 AC_SUBST(LIBPST_LIBS)
1362 if test "x$have_pst" = "xyes"; then
1363 plugins_standard="$plugins_standard pst-import"
1365 AC_MSG_ERROR([libpst >= libpst_minimum_version is required for the pst-import plugin. Use --disable-pst-import to exclude the plugin.])
1369 case x"$enable_plugins" in
1372 msg_plugins="no (some core functionality will not be available)"
1375 plugins_enabled="$plugins_base $plugins_standard"
1376 msg_plugins="yes (all)"
1379 plugins_enabled="$plugins_base"
1380 msg_plugins="yes ($plugins_base)"
1383 AC_MSG_ERROR([Invalid value for --enable-plugins.
1384 Please specify either "no", "base", or "all" (default=all)])
1388 AC_SUBST(plugins_enabled)
1389 AC_SUBST(dist_plugins_base)
1390 AC_SUBST(dist_plugins_standard)
1392 dnl ******************
1393 dnl Sub-version number
1394 dnl ******************
1395 AC_ARG_WITH([sub-version],
1396 AS_HELP_STRING([--with-sub-version=VERSION],
1397 [Specify a sub-version string]))
1399 AC_DEFINE_UNQUOTED(SUB_VERSION, "$with_sub_version", [Version substring, for packagers])
1401 dnl ********************
1402 dnl KDE applnk directory
1403 dnl ********************
1404 AC_ARG_WITH([kde-applnk-path],
1405 AS_HELP_STRING([--with-kde-applnk-path=PATH],
1406 [Location of KDE applnk files]),
1407 [with_kde_applnk_path=$withval], [with_kde_applnk_path="no"])
1409 if test x"$with_kde_applnk_path" != x"no"; then
1410 if test -z "$with_kde_applnk_path"; then
1411 with_kde_applnk_path="$datadir/applnk"
1413 KDE_APPLNK_DIR="$with_kde_applnk_path"
1417 AM_CONDITIONAL(HAVE_KDE_APPLNK, test x"$KDE_APPLNK_DIR" != x)
1418 AC_SUBST(KDE_APPLNK_DIR)
1420 dnl ********************************************
1421 dnl Glade 3 catalog files (for maintainers only)
1422 dnl ********************************************
1423 AC_ARG_WITH([glade-catalog],
1424 [AS_HELP_STRING([--with-glade-catalog],
1425 [Install the catalog files for Glade 3 ]
1426 [(for maintainers only) [default=no]])],
1427 [with_catalog="$withval"], [with_catalog="no"])
1428 if test "$with_catalog" = "yes"; then
1429 PKG_CHECK_MODULES(GLADEUI, [gladeui-2.0 >= gladeui_minimum_version])
1431 AM_CONDITIONAL(GLADE_CATALOG, test "x$with_catalog" != "xno")
1433 dnl ******************************
1435 dnl ******************************
1438 export privincludedir
1442 EVOLUTION_DIR=`(cd $srcdir; pwd)`
1443 AC_SUBST(EVOLUTION_DIR)
1445 AC_CONFIG_FILES([ po/Makefile.in
1448 addressbook/Makefile
1449 addressbook/gui/Makefile
1450 addressbook/gui/contact-editor/Makefile
1451 addressbook/gui/contact-list-editor/Makefile
1452 addressbook/gui/merging/Makefile
1453 addressbook/gui/widgets/Makefile
1454 addressbook/importers/Makefile
1455 addressbook/printing/Makefile
1456 addressbook/tools/Makefile
1457 addressbook/tools/csv2vcard
1458 addressbook/util/Makefile
1461 data/evolution.desktop.in
1462 data/evolution-alarm-notify.desktop.in
1463 data/evolution-settings.desktop.in
1466 doc/reference/Makefile
1467 doc/reference/shell/Makefile
1472 help/quickref/Makefile
1473 help/quickref/C/Makefile
1474 help/quickref/ca/Makefile
1475 help/quickref/cs/Makefile
1476 help/quickref/de/Makefile
1477 help/quickref/es/Makefile
1478 help/quickref/hu/Makefile
1479 help/quickref/it/Makefile
1480 help/quickref/fr/Makefile
1481 help/quickref/oc/Makefile
1482 help/quickref/pl/Makefile
1483 help/quickref/pt/Makefile
1484 help/quickref/sv/Makefile
1485 help/quickref/sq/Makefile
1486 libevolution-utils/Makefile
1487 libevolution-utils/libevolution-utils.pc
1488 libemail-utils/Makefile
1489 libemail-utils/libemail-utils.pc
1490 libemail-engine/Makefile
1491 libemail-engine/libemail-engine.pc
1492 libgnomecanvas/Makefile
1498 views/addressbook/Makefile
1499 views/calendar/Makefile
1501 views/tasks/Makefile
1502 views/memos/Makefile
1504 widgets/e-timezone-dialog/Makefile
1505 widgets/menus/Makefile
1506 widgets/misc/Makefile
1507 widgets/text/Makefile
1508 widgets/table/Makefile
1510 calendar/alarm-notify/Makefile
1511 calendar/importers/Makefile
1512 calendar/gui/Makefile
1513 calendar/gui/dialogs/Makefile
1517 mail/default/Makefile
1518 mail/default/C/Makefile
1519 mail/default/ca/Makefile
1520 mail/default/cs/Makefile
1521 mail/default/de/Makefile
1522 mail/default/es/Makefile
1523 mail/default/fi/Makefile
1524 mail/default/fr/Makefile
1525 mail/default/hu/Makefile
1526 mail/default/id/Makefile
1527 mail/default/it/Makefile
1528 mail/default/ja/Makefile
1529 mail/default/ko/Makefile
1530 mail/default/lt/Makefile
1531 mail/default/mk/Makefile
1532 mail/default/nl/Makefile
1533 mail/default/pl/Makefile
1534 mail/default/pt/Makefile
1535 mail/default/ro/Makefile
1536 mail/default/sr/Makefile
1537 mail/default/sr@latin/Makefile
1538 mail/default/sv/Makefile
1539 mail/default/zh_CN/Makefile
1540 mail/importers/Makefile
1543 modules/addressbook/Makefile
1544 modules/audio-inline/Makefile
1545 modules/bogofilter/Makefile
1546 modules/calendar/Makefile
1547 modules/itip-formatter/Makefile
1548 modules/itip-formatter/plugin/Makefile
1549 modules/mail/Makefile
1550 modules/backup-restore/Makefile
1551 modules/book-config-google/Makefile
1552 modules/book-config-ldap/Makefile
1553 modules/book-config-local/Makefile
1554 modules/book-config-webdav/Makefile
1555 modules/cal-config-caldav/Makefile
1556 modules/cal-config-contacts/Makefile
1557 modules/cal-config-google/Makefile
1558 modules/cal-config-local/Makefile
1559 modules/cal-config-weather/Makefile
1560 modules/cal-config-webcal/Makefile
1561 modules/composer-autosave/Makefile
1562 modules/imap-features/Makefile
1563 modules/mail-config/Makefile
1564 modules/mailto-handler/Makefile
1565 modules/mdn/Makefile
1566 modules/online-accounts/Makefile
1567 modules/offline-alert/Makefile
1568 modules/plugin-lib/Makefile
1569 modules/plugin-manager/Makefile
1570 modules/prefer-plain/Makefile
1571 modules/prefer-plain/plugin/Makefile
1572 modules/spamassassin/Makefile
1573 modules/startup-wizard/Makefile
1574 modules/text-highlight/Makefile
1575 modules/tnef-attachment/Makefile
1576 modules/vcard-inline/Makefile
1577 modules/web-inspector/Makefile
1579 plugins/attachment-reminder/Makefile
1580 plugins/bbdb/Makefile
1581 plugins/dbx-import/Makefile
1582 plugins/email-custom-header/Makefile
1583 plugins/external-editor/Makefile
1584 plugins/face/Makefile
1585 plugins/image-inline/Makefile
1586 plugins/mail-notification/Makefile
1587 plugins/mail-to-task/Makefile
1588 plugins/mailing-list-actions/Makefile
1589 plugins/mark-all-read/Makefile
1590 plugins/pst-import/Makefile
1591 plugins/publish-calendar/Makefile
1592 plugins/save-calendar/Makefile
1593 plugins/templates/Makefile
1600 capplet/settings/Makefile
1602 evolution-calendar.pc
1610 if test "x$with_sub_version" != "x"; then
1612 Evolution ($with_sub_version) has been configured as follows: "
1615 Evolution has been configured as follows: "
1619 LDAP support: $msg_ldap
1620 Clutter support: $with_clutter
1621 Contact Maps: $enable_contact_maps
1622 GNOME Online Accounts: $enable_goa
1623 Libnotify: $HAVE_LIBNOTIFY
1624 Kerberos 5: $msg_krb5
1625 SSL support: $msg_ssl
1626 SMIME support: $msg_smime
1627 Plugins: $msg_plugins
1628 User documentation: $with_help