1 dnl Evolution-Data-Server version
2 m4_define([eds_major_version], [3])
3 m4_define([eds_minor_version], [1])
4 m4_define([eds_micro_version], [4])
6 m4_define([eds_version],
7 [eds_major_version.eds_minor_version.eds_micro_version])
9 dnl Base Version: This is for API/version tracking for things like
10 dnl Bonobo server files. This should always be the major/minor of
11 dnl the stable version or stable version to be. Note, this is set
12 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
14 m4_define([base_version], [3.2])
16 dnl This number is meaningless, but we're now stuck with it in our
17 dnl library names for backward compatibility.
18 m4_define([api_version], [1.2])
20 dnl Autoconf / Automake Initialization
22 AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
23 AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Wno-portability -Werror foreign])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_SRCDIR(README)
26 AC_CONFIG_HEADERS(config.h)
28 dnl This is for the autoconf tests only - it set's the language we use
31 dnl Automake 1.11 - Silent Build Rules
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 dnl Required Package Versions
35 m4_define([glib_minimum_version], [2.28])
36 m4_define([gtk_minimum_version], [3.0])
37 m4_define([gconf_minimum_version], [2.0.0]) dnl XXX Just a Guess
38 m4_define([gnome_keyring_minimum_version], [2.20.1])
39 m4_define([goa_minimum_version], [3.1.1])
40 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
41 m4_define([libsoup_minimum_version], [2.31.2])
42 m4_define([libgdata_minimum_version], [0.7.0])
43 m4_define([oauth_minimum_version], [0.9.4])
44 m4_define([sqlite_minimum_version], [3.5])
45 m4_define([libical_minimum_version], [0.43])
46 m4_define([gweather_minimum_version], [2.90.0])
48 AC_SUBST([BASE_VERSION],[base_version])
49 AC_SUBST([API_VERSION],[api_version])
50 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
51 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
53 EDS_MAJOR_VERSION=eds_major_version
54 EDS_MINOR_VERSION=eds_minor_version
55 EDS_MICRO_VERSION=eds_micro_version
57 dnl ******************************
59 dnl ******************************
60 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook1"
61 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar1"
64 ADDRESS_BOOK_DBUS_SERVICE_NAME,
65 ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
66 [D-Bus service name for the address book factory])
69 CALENDAR_DBUS_SERVICE_NAME,
70 ["$CALENDAR_DBUS_SERVICE_NAME"],
71 [D-Bus service name for the calendar factory])
73 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
74 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
76 dnl ******************************
77 dnl Libtool versioning
78 dnl ******************************
79 LIBEDATASERVER_CURRENT=14
80 LIBEDATASERVER_REVISION=0
83 LIBEDATASERVERUI_CURRENT=1
84 LIBEDATASERVERUI_REVISION=0
85 LIBEDATASERVERUI_AGE=0
91 LIBEDATACAL_CURRENT=12
92 LIBEDATACAL_REVISION=0
95 LIBEDATABOOK_CURRENT=10
96 LIBEDATABOOK_REVISION=0
103 LIBEGROUPWISE_CURRENT=13
104 LIBEGROUPWISE_REVISION=1
111 LIBEBACKEND_CURRENT=1
112 LIBEBACKEND_REVISION=0
115 AC_SUBST(EDS_MAJOR_VERSION)
116 AC_SUBST(EDS_MINOR_VERSION)
117 AC_SUBST(EDS_MICRO_VERSION)
118 AC_SUBST(LIBEDATASERVER_CURRENT)
119 AC_SUBST(LIBEDATASERVER_REVISION)
120 AC_SUBST(LIBEDATASERVER_AGE)
121 AC_SUBST(LIBEDATASERVERUI_CURRENT)
122 AC_SUBST(LIBEDATASERVERUI_REVISION)
123 AC_SUBST(LIBEDATASERVERUI_AGE)
124 AC_SUBST(LIBECAL_CURRENT)
125 AC_SUBST(LIBECAL_REVISION)
126 AC_SUBST(LIBECAL_AGE)
127 AC_SUBST(LIBEDATACAL_CURRENT)
128 AC_SUBST(LIBEDATACAL_REVISION)
129 AC_SUBST(LIBEDATACAL_AGE)
130 AC_SUBST(LIBEBOOK_CURRENT)
131 AC_SUBST(LIBEBOOK_REVISION)
132 AC_SUBST(LIBEBOOK_AGE)
133 AC_SUBST(LIBEDATABOOK_CURRENT)
134 AC_SUBST(LIBEDATABOOK_REVISION)
135 AC_SUBST(LIBEDATABOOK_AGE)
136 AC_SUBST(LIBEGROUPWISE_CURRENT)
137 AC_SUBST(LIBEGROUPWISE_REVISION)
138 AC_SUBST(LIBEGROUPWISE_AGE)
139 AC_SUBST(LIBCAMEL_CURRENT)
140 AC_SUBST(LIBCAMEL_REVISION)
141 AC_SUBST(LIBCAMEL_AGE)
142 AC_SUBST(LIBEBACKEND_CURRENT)
143 AC_SUBST(LIBEBACKEND_REVISION)
144 AC_SUBST(LIBEBACKEND_AGE)
146 dnl **************************************
147 dnl Put the ACLOCAL flags in the Makefile
148 dnl **************************************
149 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
151 dnl ******************************
152 dnl Compiler Warning Flags
153 dnl ******************************
154 AS_COMPILER_FLAGS(WARNING_FLAGS,
155 "-DG_DISABLE_DEPRECATED
156 -DPANGO_DISABLE_DEPRECATED
157 -DGDK_PIXBUF_DISABLE_DEPRECATED
158 -DG_DISABLE_SINGLE_INCLUDES
159 -DGTK_DISABLE_SINGLE_INCLUDES
162 -Wno-missing-field-initializers
164 -Wno-unused-parameter
165 -Wdeclaration-after-statement
166 -Werror-implicit-function-declaration
167 -Wformat-security -Winit-self
168 -Wmissing-declarations -Wmissing-include-dirs
169 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
170 -Wredundant-decls -Wundef -Wwrite-strings")
171 AC_SUBST(WARNING_FLAGS)
173 dnl More depracation from EBook/ECal:
174 dnl -DE_BOOK_DISABLE_DEPRECATED
175 dnl -DE_CAL_DISABLE_DEPRECATED
177 dnl Other useful compiler warnings for test builds only.
178 dnl These may produce warnings we have no control over,
179 dnl or false positives we don't always want to see.
181 dnl -Wformat-nonliteral
182 dnl -Wmissing-format-attribute
184 dnl -Wstrict-aliasing=2
186 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
187 AC_SUBST(AM_CPPFLAGS)
192 dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
195 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
199 dnl define disable deprecated for EBook and ECal .am files
200 case "$WARNING_FLAGS" in
201 *E_BOOK_DISABLE_DEPRECATED*)
202 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 1 == 1 ])
205 AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 0 == 1 ])
209 case "$WARNING_FLAGS" in
210 *E_CAL_DISABLE_DEPRECATED*)
211 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 1 == 1 ])
214 AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 0 == 1 ])
218 dnl ******************************
219 dnl Initialize maintainer mode
220 dnl ******************************
234 AC_MSG_ERROR([You need bison to build evolution-data-server])
238 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
239 dnl behavior that -- according to the C99 standard -- is supposed to be
240 dnl undefined. We may still have aliasing abuses lying around that rely
241 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
242 dnl optimization until we can find and fix all the abuses.
243 dnl (AC_PROG_CC must run first to set the GCC variable.)
244 dnl XXX This really belongs in AM_CFLAGS.
245 if test "x${GCC}" = "xyes"; then
246 CFLAGS="$CFLAGS -fno-strict-aliasing"
249 dnl ******************************
250 dnl Test whether jw is installed
251 dnl ******************************
252 AC_PATH_PROG(JW,jw,no)
253 if test "x$JW" = "xno"; then
258 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
261 dnl ******************************
263 dnl ******************************
264 IT_PROG_INTLTOOL([0.35.5])
266 AM_GNU_GETTEXT_VERSION([0.17])
267 AM_GNU_GETTEXT([external])
269 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
270 AC_SUBST(GETTEXT_PACKAGE)
271 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
273 localedir='$(prefix)/$(DATADIRNAME)/locale'
276 dnl ******************************
277 dnl Initialize libtool
278 dnl ******************************
280 LT_INIT(disable-static win32-dll)
284 dnl ******************************
286 dnl ******************************
289 dnl ******************************
291 dnl ******************************
292 AC_MSG_CHECKING([for Win32])
296 NO_UNDEFINED='-no-undefined'
297 SOCKET_LIBS='-lws2_32 -ldnsapi'
299 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
300 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
301 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
308 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
311 AC_MSG_RESULT([$os_win32])
312 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
313 AC_SUBST(NO_UNDEFINED)
314 AC_SUBST(SOCKET_LIBS)
315 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
317 dnl **************************************
318 dnl Check for posix compatible sys/wait.h
319 dnl **************************************
322 dnl ************************************
323 dnl Check for posix compatible alloca()
324 dnl ************************************
327 dnl ******************************
328 dnl Checks for functions
329 dnl ******************************
330 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
332 dnl ***********************************
333 dnl Check for base dependencies early.
334 dnl ***********************************
335 PKG_CHECK_MODULES(GNOME_PLATFORM,
336 [gio-2.0 >= glib_minimum_version
337 gtk+-3.0 >= gtk_minimum_version
338 gconf-2.0 >= gconf_minimum_version
339 libxml-2.0 >= libxml_minimum_version
340 libsoup-2.4 >= libsoup_minimum_version
341 libgdata >= libgdata_minimum_version])
343 if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
344 AC_DEFINE(HAVE_LIBGDATA_0_9, 1, [libgdata is 0.9.1 or higher])
347 dnl *******************************
348 dnl Check for GNOME Online Accounts
349 dnl *******************************
351 [AS_HELP_STRING([--enable-goa],
352 [enable GNOME Online Accounts support (default=yes)])],
353 [enable_goa=$enableval], [enable_goa=yes])
354 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
355 AC_MSG_RESULT([$enable_goa])
356 if test "x$enable_goa" = xyes; then
357 PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
358 [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
359 If you want to disable GNOME Online Accounts support,
360 please append --disable-goa to configure.])])
362 PKG_CHECK_MODULES([OAUTH], [oauth >= oauth_minimum_version],,
363 [AC_MSG_ERROR([oauth not found (or version < oauth_minimum_version),
364 If you want to disable GNOME Online Accounts support,
365 please append --disable-goa to configure.])])
367 if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
368 AC_DEFINE(HAVE_GOA,1,[Have goa-1.0 and libgdata >= 0.9.1])
371 libgdata >= 0.9.1 is required for GNOME Online Accounts support.
372 If you want to disable GNOME Online Accounts support, please
373 append --disable-goa to configure.])
376 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
378 if test x$os_win32 = xno; then
379 dnl ***********************************
380 dnl Check for GNOME Keyring.
381 dnl ***********************************
382 PKG_CHECK_MODULES(GNOME_KEYRING,
383 [gnome-keyring-1 >= gnome_keyring_minimum_version])
387 LIBICAL_REQUIRED=libical_minimum_version
388 AC_SUBST(LIBICAL_REQUIRED)
390 dnl ******************************
392 dnl ******************************
393 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
395 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
396 [AC_MSG_ERROR([No regex library found])])])
399 dnl ******************************
401 dnl ******************************
403 AS_HELP_STRING([--with-libdb=PREFIX],
404 [Prefix where libdb is installed]),
405 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
407 DB_CFLAGS="-I$libdb_prefix/include"
408 DB_LIBS="-L$libdb_prefix/lib -ldb"
410 AC_MSG_CHECKING([Berkeley DB])
411 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
412 save_libs=$LIBS; LIBS="$DB_LIBS"
413 AC_LINK_IFELSE([AC_LANG_PROGRAM(
415 [[db_create(NULL, NULL, 0)]])],
416 [AC_MSG_RESULT([yes])],
417 [AC_MSG_ERROR([Cannot find libdb])])
423 dnl ******************************
425 dnl ******************************
429 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
430 AC_LINK_IFELSE([AC_LANG_PROGRAM(
437 cd = iconv_open ("UTF-8", "ISO-8859-1");
439 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
441 if test "x$ac_cv_libiconv" = "xyes"; then
443 if test "x$os_win32" = "xyes"; then
444 dnl Don't pointlessly auto-export the global symbols
445 dnl from a potentially static libiconv.a
446 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
451 AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
454 if test "x$have_iconv" = "xyes"; then
455 if test "x$ac_cv_libiconv" = "xno"; then
456 AC_CHECK_FUNCS(gnu_get_libc_version)
458 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
459 AC_RUN_IFELSE([AC_LANG_SOURCE([[
463 #ifdef HAVE_GNU_GET_LIBC_VERSION
464 #include <gnu/libc-version.h>
467 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
468 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
469 char *transbuf = malloc (10), *trans = transbuf;
471 size_t jp_len = strlen (jp), utf8_len = 10;
472 size_t utf8_real_len = strlen (utf8);
474 #ifdef HAVE_GNU_GET_LIBC_VERSION
475 /* glibc 2.1.2's iconv is broken in hard to test ways. */
476 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
480 cd = iconv_open ("UTF-8", "ISO-2022-JP");
481 if (cd == (iconv_t) -1)
483 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
485 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
489 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
492 if test "x$have_iconv" = "xno"; then
493 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
497 CFLAGS="$CFLAGS -I$srcdir"
499 AC_MSG_CHECKING([preferred charset name formats for system iconv])
500 AC_RUN_IFELSE([AC_LANG_SOURCE([[
502 #include "iconv-detect.c"
504 [AC_MSG_RESULT([found])],
505 [AC_MSG_RESULT([not found])
507 *** The iconv-detect program was unable to determine the
508 *** preferred charset name formats recognized by your
509 *** iconv library. It is suggested that you install a
510 *** working iconv library such as the one found at
511 *** ftp://ftp.gnu.org/pub/gnu/libiconv
513 [if test "x$os_win32" = xyes; then
514 AC_MSG_RESULT([using known win32 result])
515 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
516 echo >>iconv-detect.h
517 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
518 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
519 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
521 AC_MSG_RESULT([unknown])
523 *** We can't determine the preferred charset name formats
524 *** recognized by your iconv library. You are
525 *** cross-compiling and supposed to know what you are doing.
526 *** Please construct the iconv-detect.h file manually.
531 CFLAGS="$save_CFLAGS"
534 dnl **********************************
535 dnl Check for nl_langinfo and CODESET
536 dnl **********************************
537 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
538 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
539 [[#include <langinfo.h>]],
540 [[char *codeset = nl_langinfo (CODESET);]]
541 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
542 if test "x$ac_cv_langinfo_codeset" = "xyes"; then
543 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
545 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
547 dnl *******************************************************
548 dnl Check to see if strftime supports the use of %l and %k
549 dnl *******************************************************
550 AC_MSG_CHECKING([for %l and %k support in strftime])
551 AC_RUN_IFELSE([AC_LANG_SOURCE(
552 [[ #include <stdlib.h>
555 int main(int argc, char **argv) {
561 timeinfo=localtime(&rawtime);
563 strftime(buf, 10, "%lx%k", timeinfo);
565 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
572 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
573 AC_MSG_RESULT([$ac_cv_lkstrftime])
575 dnl ********************************************************************************
576 dnl security extension support (SSL and S/MIME)
578 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
579 dnl needed by Camel (SSL and S/MIME).
581 dnl The Evolution security extensions are only built if these libraries are found
582 dnl ********************************************************************************
587 AS_HELP_STRING([--enable-ssl],
588 [Enable SSL support through Mozilla nss @<:@default=yes@:>@]),
589 [enable_ssl="$enableval"],[enable_ssl="yes"])
591 AC_ARG_ENABLE([smime],
592 AS_HELP_STRING([--enable-smime],
593 [Enable SMIME support through Mozilla nss @<:@default=yes,requires --enable-ssl@:>@ ]),
594 [enable_smime="$enableval"],[enable_smime="yes"])
596 AC_ARG_WITH([nspr-includes],
597 AS_HELP_STRING([--with-nspr-includes],
598 [Prefix of Mozilla nspr4 includes.]),
599 [with_nspr_includes="$withval"])
601 AC_ARG_WITH([nspr-libs],
602 AS_HELP_STRING([--with-nspr-libs],
603 [Prefix of Mozilla nspr4 libs.]),
604 [with_nspr_libs="$withval"])
606 AC_ARG_WITH([nss-includes],
607 AS_HELP_STRING([--with-nss-includes],
608 [Prefix of Mozilla nss3 includes.]),
609 [with_nss_includes="$withval"])
611 AC_ARG_WITH([nss-libs],
612 AS_HELP_STRING([--with-nss-libs],
613 [Prefix of Mozilla nss3 libs.]),
614 [with_nss_libs="$withval"])
616 if test "x${enable_ssl}" = "xyes"; then
617 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
623 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
624 if test "x${check_manually}" = "xno"; then
625 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
626 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
627 for pc in $mozilla_nspr_pcs; do
628 if $PKG_CONFIG --exists $pc; then
635 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
636 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
637 for pc in $mozilla_nss_pcs; do
638 if $PKG_CONFIG --exists $pc; then
645 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
647 if test "x$enable_smime" = "xyes"; then
648 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
651 AC_DEFINE(CAMEL_HAVE_NSS,1,[Define if you have NSS])
652 AC_DEFINE(CAMEL_HAVE_SSL,1,[Define if you have a supported SSL library])
653 MANUAL_NSPR_CFLAGS=""
664 if test "x${check_manually}" = "xyes"; then
665 dnl ******************
667 dnl ******************
668 AC_MSG_CHECKING([for Mozilla nspr4 includes])
669 CPPFLAGS_save="$CPPFLAGS"
670 if test -n "$with_nspr_includes"; then
671 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
674 AC_CHECK_HEADERS(nspr.h prio.h,
675 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
676 CPPFLAGS="$CPPFLAGS_save"
678 if test "x${moz_nspr_includes}" = "xyes"; then
679 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
681 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
683 AC_MSG_RESULT([$moz_nspr_includes])
685 AC_MSG_CHECKING([for Mozilla nspr libraries])
686 CFLAGS_save="$CFLAGS"
687 LDFLAGS_save="$LDFLAGS"
689 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
691 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
693 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
694 if test -n "${with_nspr_libs}"; then
695 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
700 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
701 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
703 CFLAGS="$CFLAGS_save"
704 LDFLAGS="$LDFLAGS_save"
707 if test "x${moz_nspr_libs}" = "xyes"; then
708 if test -n "${with_nspr_libs}"; then
709 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
711 MANUAL_NSPR_LIBS="$nsprlibs"
714 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
716 AC_MSG_RESULT([$moz_nspr_libs])
718 dnl *****************
720 dnl *****************
721 AC_MSG_CHECKING([for Mozilla nss3 includes])
722 CPPFLAGS_save="$CPPFLAGS"
723 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
725 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
726 [moz_nss_includes="yes"],[moz_nss_includes="no"])
727 CPPFLAGS="$CPPFLAGS_save"
729 if test "x${moz_nss_includes}" = "xyes"; then
730 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
732 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
734 AC_MSG_RESULT($moz_nss_includes)
736 AC_MSG_CHECKING([for Mozilla nss libraries])
737 LDFLAGS_save="$LDFLAGS"
739 nsslibs="-lssl3 -lsmime3 -lnss3"
741 LIBS="$nsslibs $nsprlibs"
742 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
743 if test -n "${with_nss_libs}"; then
744 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
746 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
749 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
750 [moz_nss_libs="yes"],[moz_nss_libs="no"])
751 LDFLAGS="$LDFLAGS_save"
754 if test "x${moz_nss_libs}" = "xyes"; then
755 AC_DEFINE(CAMEL_HAVE_NSS)
756 AC_DEFINE(CAMEL_HAVE_SSL)
758 if test "x${enable_smime}" = "xyes"; then
759 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
762 if test -n "${with_nss_libs}"; then
763 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
765 MANUAL_NSS_LIBS="$nsslibs"
768 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
770 AC_MSG_RESULT([$moz_nss_libs])
772 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
773 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
777 dnl These flags are used in camel.pc.in.
778 if test "x${msg_ssl}" = "xyes"; then
779 CAMEL_SSL_DEFINES="-DCAMEL_HAVE_NSS -DCAMEL_HAVE_SSL"
784 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
786 dnl For pkgconfig files.
787 AC_SUBST(mozilla_nss)
788 AC_SUBST(mozilla_nspr)
790 AC_SUBST(CAMEL_SSL_DEFINES)
791 AC_SUBST(MANUAL_NSPR_CFLAGS)
792 AC_SUBST(MANUAL_NSPR_LIBS)
793 AC_SUBST(MANUAL_NSS_CFLAGS)
794 AC_SUBST(MANUAL_NSS_LIBS)
796 dnl ******************************
797 dnl system mail stuff
798 dnl ******************************
799 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
800 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
802 AC_MSG_CHECKING([system mail directory])
803 if test -d /var/mail -a '!' -h /var/mail ; then
804 system_mail_dir="/var/mail"
806 system_mail_dir="/var/spool/mail"
808 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
810 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
812 CAMEL_LOCK_HELPER_USER=""
813 CAMEL_LOCK_HELPER_GROUP=""
814 system_mail_perm="world writable"
817 CAMEL_LOCK_HELPER_USER=""
818 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
819 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
822 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
823 CAMEL_LOCK_HELPER_GROUP=""
824 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
827 CAMEL_LOCK_HELPER_USER=""
828 CAMEL_LOCK_HELPER_GROUP=""
829 system_mail_perm="???"
833 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
834 AC_SUBST(CAMEL_LOCK_HELPER_USER)
835 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
837 dnl ******************************
839 dnl ******************************
840 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
841 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
842 [[ #include <time.h> ]],
847 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
848 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
849 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
851 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
852 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
853 [[ #include <time.h> ]],
855 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
856 if test "x$ac_cv_var_timezone" = "xyes"; then
857 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
858 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
859 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
860 [[ #include <time.h> ]],
862 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
863 if test "x$ac_cv_var_altzone" = "xyes"; then
864 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
867 AC_MSG_ERROR([unable to find a way to determine timezone])
871 dnl ******************************
872 dnl ctime_r prototype
873 dnl ******************************
874 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
876 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
877 [[ #include <time.h> ]],
880 ctime_r (&date, buf, 100); ]]
881 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
884 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
885 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
888 dnl ******************************
889 dnl gethostbyname_r prototype
890 dnl ******************************
891 AC_CHECK_FUNCS(gethostbyname_r,[
892 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
894 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
896 #include "confdefs.h"
897 #include <sys/types.h>
898 #include <sys/socket.h>
899 #include <netinet/in.h>
901 #define BUFSIZE (sizeof(struct hostent)+10)
905 char buffer[BUFSIZE];
908 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
910 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
913 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
914 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
917 dnl ******************************
918 dnl gethostbyaddr_r prototype
919 dnl ******************************
920 AC_CHECK_FUNCS(gethostbyaddr_r,[
921 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
923 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
925 #include "confdefs.h"
926 #include <sys/types.h>
927 #include <sys/socket.h>
928 #include <netinet/in.h>
930 #define BUFSIZE (sizeof(struct hostent)+10)
934 char buffer[BUFSIZE];
937 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
938 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
941 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
942 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
945 dnl ******************************
946 dnl stat(v)fs location/type
947 dnl ******************************
948 AC_CHECK_HEADER([sys/statvfs.h],
949 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
950 [[ #if HAVE_SYS_STATVFS_H
951 #include <sys/statvfs.h>
954 AC_CHECK_FUNCS(statvfs)
956 AC_CHECK_HEADER([sys/param.h],
957 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
958 [[ #if HAVE_SYS_PARAM_H
959 #include <sys/param.h>
962 AC_CHECK_HEADER([sys/mount.h],
963 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
964 [[ #if HAVE_SYS_MOUNT_H
965 #include <sys/mount.h>
968 AC_CHECK_FUNCS(statfs)
970 dnl ******************************
971 dnl IPv6 support and getaddrinfo calls
972 dnl ******************************
973 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
975 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
976 [[ #include "confdefs.h"
977 #include <sys/types.h>
978 #include <sys/socket.h>
979 #include <netinet/in.h>
983 [[ #ifndef NI_MAXHOST
984 #define NI_MAXHOST 1025
988 #define NI_MAXSERV 32
991 struct addrinfo hints, *res;
992 struct sockaddr_in6 sin6;
994 char host[NI_MAXHOST];
995 char serv[NI_MAXSERV];
997 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
999 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1000 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1003 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1004 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1005 if test "x$enable_ipv6" = "xyes" ; then
1006 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1010 AC_ARG_ENABLE([ipv6],
1011 AS_HELP_STRING([--enable-ipv6=no/yes],
1012 [Enable support for resolving IPv6 addresses.]),
1013 [enable_ipv6=$enableval],[enable_ipv6=yes])
1014 if test "x$enable_ipv6" = "xyes"; then
1016 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1017 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1018 [[ #include "confdefs.h"
1019 #include <sys/types.h>
1020 #include <sys/socket.h>
1021 #include <netinet/in.h>
1024 [[ struct addrinfo hints;
1025 hints.ai_flags = AI_ADDRCONFIG;
1027 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1033 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1035 AC_CHECK_HEADER([wspiapi.h],
1036 [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1038 dnl ******************************
1039 dnl Calendar support
1040 dnl ******************************
1041 AC_MSG_CHECKING([if we should build the calendar])
1042 AC_ARG_ENABLE([calendar],
1043 AS_HELP_STRING([--enable-calendar=yes/no],
1044 [Enable the calendar components (default yes)]),
1045 [enable_calendar=$enableval], [enable_calendar=yes])
1047 if test "x${enable_calendar}" != "xno"; then
1048 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
1050 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
1051 AC_MSG_RESULT([$enable_calendar])
1052 msg_calendar=$enable_calendar
1054 dnl **********************************
1055 dnl Weather calendar backend support
1056 dnl **********************************
1057 AC_MSG_CHECKING([if we should build the weather calendar backend])
1058 AC_ARG_ENABLE([weather],
1059 [AS_HELP_STRING([--enable-weather],
1060 [Build the weather calendar backend (default=yes)])],
1061 [use_gweather=$enableval], [use_gweather=yes])
1062 if test "$enable_calendar" = "no"; then
1063 use_gweather="no (calendar support is disabled)"
1066 AC_MSG_RESULT([$use_gweather])
1067 if test "x$use_gweather" = "xyes"; then
1068 PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1069 [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.])])
1071 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1073 dnl ******************************
1075 dnl ******************************
1076 AC_ARG_ENABLE([nntp],
1077 AS_HELP_STRING([--enable-nntp],
1078 [Build Usenet news (NNTP) backend]),
1079 [enable_nntp=$enableval],[enable_nntp=yes])
1080 if test "x$enable_nntp" = "xyes"; then
1081 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1086 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1088 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1090 dnl ******************************
1092 dnl ******************************
1093 AC_ARG_ENABLE([dot-locking],
1094 AS_HELP_STRING([--enable-dot-locking=yes/no],
1095 [Enable support for locking mail files with dot locking]),
1096 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1098 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1099 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1105 AC_ARG_ENABLE([file-locking],
1106 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1107 [Enable support for locking mail files with file locking]),
1108 [],[enable_file_locking=fcntl])
1110 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1111 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1114 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1115 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1122 dnl ******************************
1123 dnl sendmail operation
1124 dnl ******************************
1125 AC_MSG_CHECKING([for SunOS broken spool format])
1126 if test "x$host_os" = "xsunos" ; then
1127 with_broken_spool="yes"
1130 AC_ARG_WITH([broken-spool],
1131 AS_HELP_STRING([--with-broken-spool=yes/no],
1132 [Using SunOS/Solaris sendmail which has a broken spool format]),
1133 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1135 if test "x$with_broken_spool" = "xyes"; then
1136 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1139 AC_MSG_RESULT([$with_broken_spool])
1141 dnl ******************************
1142 dnl DBus call timeout
1143 dnl ******************************
1145 AC_ARG_WITH([dbus-call-timeout],
1146 AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1147 [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1148 [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1150 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1151 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1156 EVO_KRB5_SUPPORT(no)
1158 dnl ******************************
1160 dnl ******************************
1163 dnl ******************************
1165 dnl ******************************
1166 if test "x$os_win32" != "xyes"; then
1168 case $with_openldap in
1173 case $with_static_ldap in
1175 msg_ldap="$with_openldap (static)"
1178 msg_ldap="$with_openldap (dynamic)"
1183 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1184 if test "x$with_openldap" = "xno" ; then
1185 EVO_SUNLDAP_CHECK(no)
1186 case $with_sunldap in
1191 case $with_static_sunldap in
1193 msg_ldap="$with_sunldap (static)"
1196 msg_ldap="$with_sunldap (dynamic)"
1203 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1205 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1207 dnl Win32 LDAP support
1208 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1209 LDAP_LIBS="-lwldap32"
1210 AC_SUBST(LDAP_CFLAGS)
1212 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1213 AM_CONDITIONAL(ENABLE_LDAP, true)
1214 AM_CONDITIONAL(SUNLDAP, false)
1218 dnl ******************************
1219 dnl GObject marshalling
1220 dnl ******************************
1223 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1224 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1225 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1227 dnl ******************************
1228 dnl Utility macro to set compiler flags for a specific lib.
1229 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1230 dnl ******************************
1231 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1232 PKG_CHECK_MODULES([$1], [$2])
1233 $1_CFLAGS="[$]$1_CFLAGS $3 "
1234 $1_LIBS="[$]$1_LIBS $4 "
1237 dnl ******************************
1239 dnl ******************************
1240 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1242 dnl ******************************
1243 dnl libedataserver flags
1244 dnl ******************************
1245 E_DATA_SERVER_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1247 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1248 AC_SUBST(E_DATA_SERVER_CFLAGS)
1249 AC_SUBST(E_DATA_SERVER_LIBS)
1251 dnl ******************************
1252 dnl libedataserverui
1253 dnl ******************************
1254 E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 gconf-2.0"
1256 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
1257 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1258 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1260 E_BACKEND_DEPS="gio-2.0 libxml-2.0 gconf-2.0"
1262 dnl ******************************
1263 dnl libebackend flags
1264 dnl ******************************
1265 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1266 AC_SUBST(E_BACKEND_CFLAGS)
1267 AC_SUBST(E_BACKEND_LIBS)
1269 dnl ******************************
1270 dnl evolution-addressbook flags
1271 dnl ******************************
1272 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 gconf-2.0"
1274 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1275 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1276 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1278 dnl ******************************
1279 dnl evolution-calendar flags
1280 dnl ******************************
1281 if test "x${enable_calendar}" = "xyes"; then
1282 EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libxml-2.0 gconf-2.0"
1285 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1286 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1287 dnl to differentiate between <libical/ical.h> and <ical.h>
1288 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1289 dnl libical is fixed, we have to work-around the buggy CFlags.
1291 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1292 LIBICAL_EXTRA_LIBS=""
1293 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1294 AC_SUBST(LIBICAL_EXTRA_LIBS)
1296 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1297 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1298 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1300 dnl ****************************
1301 dnl Check for ical_set_unknown_token_handling_setting function
1302 dnl ****************************
1303 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1304 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1305 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1306 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1307 [[#include <libical/ical.h>]],
1308 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1309 [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])
1312 AC_MSG_RESULT([$ac_cv_have_iuth])
1316 dnl ******************************
1318 dnl ******************************
1319 LIBGDATA_REQUIRED=libgdata_minimum_version
1320 AC_SUBST(LIBGDATA_REQUIRED)
1322 EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
1323 AC_SUBST(GDATA_CFLAGS)
1324 AC_SUBST(GDATA_LIBS)
1326 dnl ******************************
1328 dnl ******************************
1329 LIBSOUP_REQUIRED=libsoup_minimum_version
1330 AC_SUBST(LIBSOUP_REQUIRED)
1332 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1333 AC_SUBST(SOUP_CFLAGS)
1336 dnl ******************************
1338 dnl ******************************
1339 SQLITE_REQUIRED=sqlite_minimum_version
1340 AC_SUBST(SQLITE_REQUIRED)
1343 dnl deflateInit is a #define, use deflateEnd instead
1344 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1346 if test "x$zlib_found" = "xfalse"; then
1347 AC_MSG_ERROR([*** zlib is required])
1350 dnl ******************************
1351 dnl Checks for large file support
1352 dnl ******************************
1353 AC_ARG_ENABLE([largefile],
1354 AS_HELP_STRING([--enable-largefile],
1355 [enable support for large files [[default=no]]]),
1356 [],[enable_largefile="yes"])
1358 if test "x$enable_largefile" != "xno"; then
1360 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1361 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1362 [[ #include <sys/types.h>
1363 #include <sys/stat.h>
1366 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1367 )],[ac_cv_largefile64_source="no"],
1368 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1369 [[ #define _LARGEFILE64_SOURCE
1370 #include <sys/types.h>
1371 #include <sys/stat.h>
1374 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1375 [ac_cv_largefile64_source="unknown"])])
1378 enable_largefile="no"
1380 if test "x$ac_cv_largefile64_source" = "xyes"; then
1381 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1382 enable_largefile="yes"
1383 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1384 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1387 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1388 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1389 enable_largefile="yes"
1392 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1393 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1394 enable_largefile="yes"
1397 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1401 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1403 EVO_SET_COMPILE_FLAGS(CAMEL, gio-2.0 $mozilla_nss sqlite3 >= sqlite_minimum_version, $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS, -lz $KRB5_LIBS $MANUAL_NSS_LIBS)
1404 AC_SUBST(CAMEL_CFLAGS)
1405 AC_SUBST(CAMEL_LIBS)
1406 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1407 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1409 dnl ******************************
1410 dnl Special directories
1411 dnl ******************************
1413 dnl If you add something here, consider whether or not you also
1414 dnl need to add it to one or more .pc.in files (for Connector,
1417 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1418 AC_SUBST(privdatadir)
1420 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1421 AC_SUBST(privincludedir)
1423 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1424 AC_SUBST(privlibdir)
1426 imagesdir='${datadir}'/pixmaps/evolution-data-server
1429 ebook_backenddir='${libdir}'/evolution-data-server/addressbook-backends
1430 AC_SUBST(ebook_backenddir)
1432 ecal_backenddir='${libdir}'/evolution-data-server/calendar-backends
1433 AC_SUBST(ecal_backenddir)
1435 if test "x$use_gweather" = "xyes"; then
1436 weatherdatadir="$privdatadir/weather"
1437 AC_SUBST(weatherdatadir)
1440 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1441 camel_providerdir='${libdir}'/evolution-data-server/camel-providers
1442 AC_SUBST(camel_providerdir)
1444 dnl *******************
1445 dnl D-BUS service stuff
1446 dnl *******************
1447 EVO_SUBST_SERVICE_RULE='%.service: %.service.in Makefile ; 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)|" $< > $@'
1448 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1450 dnl ******************************
1452 dnl ******************************
1453 AC_PATH_PROG(GCONFTOOL, gconftool-2, [no])
1456 dnl ******************************
1458 dnl ******************************
1459 AC_PATH_PROG(GPERF, gperf, [no])
1460 if test "x$GPERF" = "xno"; then
1461 AC_MSG_ERROR([You need gperf to build evolution-data-server])
1464 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1466 dnl ******************************
1468 dnl ******************************
1469 AC_ARG_ENABLE(vala-bindings,
1470 AC_HELP_STRING([--enable-vala-bindings],
1471 [build the EXPERIMENTAL Vala bindings]),
1472 enable_vala_bindings=$enableval,
1473 enable_vala_bindings=no)
1475 if test x$enable_vala_bindings = xyes; then
1476 if test "x$INTROSPECTION_SCANNER" = x; then
1477 AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1480 AM_PROG_VALAC([0.13.0])
1483 AC_PATH_PROG(VALAC, valac, valac)
1487 AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1489 if test "x$VAPIGEN" = "xfalse"; then
1490 AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1496 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1499 dnl ******************************
1501 dnl ******************************
1503 export privincludedir
1508 evolution-data-server-zip
1509 evolution-data-server.pc
1510 addressbook/Makefile
1511 addressbook/libebook/Makefile
1512 addressbook/libebook/libebook.pc
1513 addressbook/libedata-book/Makefile
1514 addressbook/libedata-book/libedata-book.pc
1515 addressbook/libegdbus/Makefile
1516 addressbook/backends/Makefile
1517 addressbook/backends/file/Makefile
1518 addressbook/backends/vcf/Makefile
1519 addressbook/backends/ldap/Makefile
1520 addressbook/backends/google/Makefile
1521 addressbook/backends/webdav/Makefile
1524 calendar/libecal/Makefile
1525 calendar/libecal/libecal.pc
1526 calendar/libedata-cal/Makefile
1527 calendar/libedata-cal/libedata-cal.pc
1528 calendar/libegdbus/Makefile
1529 calendar/backends/Makefile
1530 calendar/backends/caldav/Makefile
1531 calendar/backends/file/Makefile
1532 calendar/backends/http/Makefile
1533 calendar/backends/contacts/Makefile
1534 calendar/backends/weather/Makefile
1536 camel/providers/Makefile
1537 camel/providers/imap/Makefile
1538 camel/providers/imapx/Makefile
1539 camel/providers/local/Makefile
1540 camel/providers/nntp/Makefile
1541 camel/providers/pop3/Makefile
1542 camel/providers/sendmail/Makefile
1543 camel/providers/smtp/Makefile
1544 camel/tests/Makefile
1545 camel/tests/folder/Makefile
1546 camel/tests/lib/Makefile
1547 camel/tests/message/Makefile
1548 camel/tests/mime-filter/Makefile
1549 camel/tests/misc/Makefile
1550 camel/tests/smime/Makefile
1552 camel/camel-provider.pc
1553 libebackend/Makefile
1554 libebackend/libebackend.pc
1555 libedataserver/Makefile
1556 libedataserver/eds-version.h
1557 libedataserver/libedataserver.pc
1558 libedataserverui/Makefile
1559 libedataserverui/libedataserverui.pc
1561 tests/libebook/Makefile
1562 tests/libebook/client/Makefile
1563 tests/libebook/vcard/Makefile
1564 tests/libecal/Makefile
1565 tests/libecal/client/Makefile
1566 tests/libedata-cal/Makefile
1567 tests/libedataserver/Makefile
1568 tests/libedataserverui/Makefile
1570 docs/reference/Makefile
1571 docs/reference/addressbook/Makefile
1572 docs/reference/addressbook/libebook/Makefile
1573 docs/reference/addressbook/libedata-book/Makefile
1574 docs/reference/calendar/Makefile
1575 docs/reference/calendar/libecal/Makefile
1576 docs/reference/calendar/libedata-cal/Makefile
1577 docs/reference/camel/Makefile
1578 docs/reference/libedataserver/Makefile
1579 docs/reference/libedataserverui/Makefile
1580 docs/reference/libebackend/Makefile
1587 evolution-data-server has been configured as follows:
1588 Calendar: $msg_calendar
1589 Weather calendar: $use_gweather
1590 Mail Directory: $system_mail_dir, $system_mail_perm
1591 LDAP support: $msg_ldap
1592 NNTP support: $msg_nntp
1593 Kerberos 5: $msg_krb5
1594 SSL support: $msg_ssl
1595 SMIME support: $msg_smime
1596 IPv6 support: $msg_ipv6
1597 Dot Locking: $msg_dot
1598 File Locking: $msg_file
1599 Large files: $enable_largefile
1600 Gtk Doc: $enable_gtk_doc
1601 Introspection: $enable_introspection
1602 Vala bindings: $enable_vala_bindings
1603 GNOME Online Accounts $enable_goa