Call gtk_init_check() in factories with enabled maintainer mode
[platform/upstream/evolution-data-server.git] / configure.ac
1
2 dnl Evolution-Data-Server version
3 m4_define([eds_major_version], [3])
4 m4_define([eds_minor_version], [1])
5 m4_define([eds_micro_version], [5])
6
7 m4_define([eds_version],
8         [eds_major_version.eds_minor_version.eds_micro_version])
9
10 dnl Base Version: This is for API/version tracking for things like
11 dnl Bonobo server files.  This should always be the major/minor of
12 dnl the stable version or stable version to be.  Note, this is set
13 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
14 BASE_VERSION=3.2
15 m4_define([base_version], [3.2])
16
17 dnl This number is meaningless, but we're now stuck with it in our
18 dnl library names for backward compatibility.
19 m4_define([api_version], [1.2])
20
21 dnl Autoconf / Automake Initialization
22 AC_PREREQ(2.62)
23 AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
24 AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Wno-portability -Werror foreign])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CONFIG_SRCDIR(README)
27 AC_CONFIG_HEADERS(config.h)
28
29 dnl This is for the autoconf tests only - it set's the language we use
30 AC_LANG(C)
31
32 dnl Automake 1.11 - Silent Build Rules
33 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34
35 dnl Required Package Versions
36 m4_define([glib_minimum_version], [2.28])
37 m4_define([gtk_minimum_version], [3.0])
38 m4_define([gconf_minimum_version], [2.0.0])             dnl XXX Just a Guess
39 m4_define([gnome_keyring_minimum_version], [2.20.1])
40 m4_define([goa_minimum_version], [3.1.1])
41 m4_define([libxml_minimum_version], [2.0.0])            dnl XXX Just a Guess
42 m4_define([libsoup_minimum_version], [2.31.2])
43 m4_define([libgdata_minimum_version], [0.7.0])
44 m4_define([oauth_minimum_version], [0.9.4])
45 m4_define([sqlite_minimum_version], [3.5])
46 m4_define([libical_minimum_version], [0.43])
47 m4_define([gweather_minimum_version], [2.90.0])
48
49 AC_SUBST([BASE_VERSION],[base_version])
50 AC_SUBST([API_VERSION],[api_version])
51 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
52 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
53
54 EDS_MAJOR_VERSION=eds_major_version
55 EDS_MINOR_VERSION=eds_minor_version
56 EDS_MICRO_VERSION=eds_micro_version
57
58 dnl ******************************
59 dnl D-Bus versioning
60 dnl ******************************
61 ADDRESS_BOOK_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.AddressBook1"
62 CALENDAR_DBUS_SERVICE_NAME="org.gnome.evolution.dataserver.Calendar1"
63
64 AC_DEFINE_UNQUOTED(
65        ADDRESS_BOOK_DBUS_SERVICE_NAME,
66        ["$ADDRESS_BOOK_DBUS_SERVICE_NAME"],
67        [D-Bus service name for the address book factory])
68
69 AC_DEFINE_UNQUOTED(
70        CALENDAR_DBUS_SERVICE_NAME,
71        ["$CALENDAR_DBUS_SERVICE_NAME"],
72        [D-Bus service name for the calendar factory])
73
74 AC_SUBST(ADDRESS_BOOK_DBUS_SERVICE_NAME)
75 AC_SUBST(CALENDAR_DBUS_SERVICE_NAME)
76
77 dnl ******************************
78 dnl Libtool versioning
79 dnl ******************************
80 LIBEDATASERVER_CURRENT=15
81 LIBEDATASERVER_REVISION=0
82 LIBEDATASERVER_AGE=0
83
84 LIBEDATASERVERUI_CURRENT=1
85 LIBEDATASERVERUI_REVISION=0
86 LIBEDATASERVERUI_AGE=0
87
88 LIBECAL_CURRENT=12
89 LIBECAL_REVISION=2
90 LIBECAL_AGE=2
91
92 LIBEDATACAL_CURRENT=13
93 LIBEDATACAL_REVISION=0
94 LIBEDATACAL_AGE=0
95
96 LIBEDATABOOK_CURRENT=11
97 LIBEDATABOOK_REVISION=0
98 LIBEDATABOOK_AGE=0
99
100 LIBEBOOK_CURRENT=15
101 LIBEBOOK_REVISION=1
102 LIBEBOOK_AGE=3
103
104 LIBEGROUPWISE_CURRENT=13
105 LIBEGROUPWISE_REVISION=1
106 LIBEGROUPWISE_AGE=0
107
108 LIBCAMEL_CURRENT=28
109 LIBCAMEL_REVISION=0
110 LIBCAMEL_AGE=0
111
112 LIBEBACKEND_CURRENT=1
113 LIBEBACKEND_REVISION=0
114 LIBEBACKEND_AGE=0
115
116 AC_SUBST(EDS_MAJOR_VERSION)
117 AC_SUBST(EDS_MINOR_VERSION)
118 AC_SUBST(EDS_MICRO_VERSION)
119 AC_SUBST(LIBEDATASERVER_CURRENT)
120 AC_SUBST(LIBEDATASERVER_REVISION)
121 AC_SUBST(LIBEDATASERVER_AGE)
122 AC_SUBST(LIBEDATASERVERUI_CURRENT)
123 AC_SUBST(LIBEDATASERVERUI_REVISION)
124 AC_SUBST(LIBEDATASERVERUI_AGE)
125 AC_SUBST(LIBECAL_CURRENT)
126 AC_SUBST(LIBECAL_REVISION)
127 AC_SUBST(LIBECAL_AGE)
128 AC_SUBST(LIBEDATACAL_CURRENT)
129 AC_SUBST(LIBEDATACAL_REVISION)
130 AC_SUBST(LIBEDATACAL_AGE)
131 AC_SUBST(LIBEBOOK_CURRENT)
132 AC_SUBST(LIBEBOOK_REVISION)
133 AC_SUBST(LIBEBOOK_AGE)
134 AC_SUBST(LIBEDATABOOK_CURRENT)
135 AC_SUBST(LIBEDATABOOK_REVISION)
136 AC_SUBST(LIBEDATABOOK_AGE)
137 AC_SUBST(LIBEGROUPWISE_CURRENT)
138 AC_SUBST(LIBEGROUPWISE_REVISION)
139 AC_SUBST(LIBEGROUPWISE_AGE)
140 AC_SUBST(LIBCAMEL_CURRENT)
141 AC_SUBST(LIBCAMEL_REVISION)
142 AC_SUBST(LIBCAMEL_AGE)
143 AC_SUBST(LIBEBACKEND_CURRENT)
144 AC_SUBST(LIBEBACKEND_REVISION)
145 AC_SUBST(LIBEBACKEND_AGE)
146
147 dnl **************************************
148 dnl Put the ACLOCAL flags in the Makefile
149 dnl **************************************
150 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
151
152 dnl ******************************
153 dnl Compiler Warning Flags
154 dnl ******************************
155 AS_COMPILER_FLAGS(WARNING_FLAGS,
156         "-DPANGO_DISABLE_DEPRECATED
157         -DGDK_PIXBUF_DISABLE_DEPRECATED
158         -DG_DISABLE_SINGLE_INCLUDES
159         -DGTK_DISABLE_SINGLE_INCLUDES
160         -DGSEAL_ENABLE
161         -Wall -Wextra
162         -Wno-missing-field-initializers
163         -Wno-sign-compare
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)
172
173 dnl     More depracation from EBook/ECal:
174 dnl     -DE_BOOK_DISABLE_DEPRECATED
175 dnl     -DE_CAL_DISABLE_DEPRECATED
176 dnl
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.
180 dnl
181 dnl     -Wformat-nonliteral
182 dnl     -Wmissing-format-attribute
183 dnl     -Wshadow
184 dnl     -Wstrict-aliasing=2
185
186 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
187 AC_SUBST(AM_CPPFLAGS)
188
189
190 dnl define disable deprecated for EBook and ECal .am files
191 case "$WARNING_FLAGS" in
192 *E_BOOK_DISABLE_DEPRECATED*)
193         AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 1 == 1 ])
194         ;;
195 *)
196         AM_CONDITIONAL(HAVE_E_BOOK_DISABLE_DEPRECATED, [ test 0 == 1 ])
197         ;;
198 esac
199
200 case "$WARNING_FLAGS" in
201 *E_CAL_DISABLE_DEPRECATED*)
202         AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 1 == 1 ])
203         ;;
204 *)
205         AM_CONDITIONAL(HAVE_E_CAL_DISABLE_DEPRECATED, [ test 0 == 1 ])
206         ;;
207 esac
208
209 dnl ******************************
210 dnl Initialize maintainer mode
211 dnl ******************************
212 AM_MAINTAINER_MODE
213
214 if test "x$enable_maintainer_mode" = "xyes" ; then
215         AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
216 fi
217
218 AC_PROG_CC
219 AC_PROG_CPP
220 AC_C_INLINE
221 AM_PROG_CC_C_O
222 AC_PROG_INSTALL
223 AC_PROG_LN_S
224 AC_PROG_MAKE_SET
225 AM_PROG_LEX
226 AC_PROG_YACC
227 case $YACC in
228 *yacc*)
229         AC_MSG_ERROR([You need bison to build evolution-data-server])
230         ;;
231 esac
232
233 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
234 dnl behavior that -- according to the C99 standard -- is supposed to be
235 dnl undefined.  We may still have aliasing abuses lying around that rely
236 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
237 dnl optimization until we can find and fix all the abuses.
238 dnl (AC_PROG_CC must run first to set the GCC variable.)
239 dnl XXX This really belongs in AM_CFLAGS.
240 if test "x${GCC}" = "xyes"; then
241         CFLAGS="$CFLAGS -fno-strict-aliasing"
242 fi
243
244 dnl ******************************
245 dnl Test whether jw is installed
246 dnl ******************************
247 AC_PATH_PROG(JW,jw,no)
248 if test "x$JW" = "xno"; then
249         HAVE_JW="no"
250 else
251         HAVE_JW="yes"
252 fi
253 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
254 AC_SUBST(HAVE_JW)
255
256 dnl ******************************
257 dnl I18N stuff
258 dnl ******************************
259 IT_PROG_INTLTOOL([0.35.5])
260
261 AM_GNU_GETTEXT_VERSION([0.17])
262 AM_GNU_GETTEXT([external])
263
264 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
265 AC_SUBST(GETTEXT_PACKAGE)
266 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
267
268 localedir='$(prefix)/$(DATADIRNAME)/locale'
269 AC_SUBST(localedir)
270
271 dnl ******************************
272 dnl Initialize libtool
273 dnl ******************************
274 LT_PREREQ(2.2)
275 LT_INIT(disable-static win32-dll)
276
277 PKG_PROG_PKG_CONFIG
278
279 dnl ******************************
280 dnl Gtk Doc stuff
281 dnl ******************************
282 GTK_DOC_CHECK(1.9)
283
284 dnl This must appear after AC_CANONICAL_HOST, which defines $host.
285 case "$host" in
286 *openbsd*|*freebsd*)
287         dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
288         ;;
289 *)
290         LDFLAGS="$LDFLAGS -Wl,--no-undefined"
291         ;;
292 esac
293
294 dnl ******************************
295 dnl Check for Win32
296 dnl ******************************
297 AC_MSG_CHECKING([for Win32])
298 case "$host" in
299 *-mingw*)
300         os_win32='yes'
301         NO_UNDEFINED='-no-undefined'
302         SOCKET_LIBS='-lws2_32 -ldnsapi'
303         DL_LIB=''
304         LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
305         AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
306         AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
307         ;;
308 *openbsd*|*freebsd*)
309         os_win32='no'
310         NO_UNDEFINED=''
311         SOCKET_LIBS=''
312         DL_LIB=''
313         LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
314         ;;
315 *)
316         os_win32='no'
317         NO_UNDEFINED=''
318         SOCKET_LIBS=''
319         DL_LIB='-ldl'
320         LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
321         ;;
322 esac
323 AC_MSG_RESULT([$os_win32])
324 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
325 AC_SUBST(NO_UNDEFINED)
326 AC_SUBST(SOCKET_LIBS)
327 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
328
329 dnl **************************************
330 dnl Check for posix compatible sys/wait.h
331 dnl **************************************
332 AC_HEADER_SYS_WAIT
333
334 dnl ************************************
335 dnl Check for posix compatible alloca()
336 dnl ************************************
337 AC_FUNC_ALLOCA
338
339 dnl ******************************
340 dnl Checks for functions
341 dnl ******************************
342 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
343
344 dnl ***********************************
345 dnl Check for base dependencies early.
346 dnl ***********************************
347 PKG_CHECK_MODULES(GNOME_PLATFORM,
348         [gio-2.0 >= glib_minimum_version
349         gtk+-3.0 >= gtk_minimum_version
350         gconf-2.0 >= gconf_minimum_version
351         libxml-2.0 >= libxml_minimum_version
352         libsoup-2.4 >= libsoup_minimum_version
353         libgdata >= libgdata_minimum_version])
354
355 if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
356         AC_DEFINE(HAVE_LIBGDATA_0_9, 1, [libgdata is 0.9.1 or higher])
357 fi
358
359 dnl *******************************
360 dnl Check for GNOME Online Accounts
361 dnl *******************************
362 AC_ARG_ENABLE([goa],
363         [AS_HELP_STRING([--enable-goa],
364         [enable GNOME Online Accounts support (default=yes)])],
365         [enable_goa=$enableval], [enable_goa=yes])
366 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
367 AC_MSG_RESULT([$enable_goa])
368 if test "x$enable_goa" = xyes; then
369         PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
370         [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
371         If you want to disable GNOME Online Accounts support,
372         please append --disable-goa to configure.])])
373
374         PKG_CHECK_MODULES([OAUTH], [oauth >= oauth_minimum_version],,
375         [AC_MSG_ERROR([oauth not found (or version < oauth_minimum_version),
376         If you want to disable GNOME Online Accounts support,
377         please append --disable-goa to configure.])])
378
379         if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
380                 AC_DEFINE(HAVE_GOA,1,[Have goa-1.0 and libgdata >= 0.9.1])
381         else
382                 AC_MSG_ERROR([
383         libgdata >= 0.9.1 is required for GNOME Online Accounts support.
384         If you want to disable GNOME Online Accounts support, please
385         append --disable-goa to configure.])
386         fi
387 fi
388 AM_CONDITIONAL(HAVE_GOA, [test x$enable_goa = xyes])
389
390 if test x$os_win32 = xno; then
391   dnl ***********************************
392   dnl Check for GNOME Keyring.
393   dnl ***********************************
394   PKG_CHECK_MODULES(GNOME_KEYRING,
395         [gnome-keyring-1 >= gnome_keyring_minimum_version])
396 fi
397
398
399 LIBICAL_REQUIRED=libical_minimum_version
400 AC_SUBST(LIBICAL_REQUIRED)
401
402 dnl ******************************
403 dnl regex check
404 dnl ******************************
405 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
406                         [REGEX_LIBS=-lregex
407                         AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
408                         [AC_MSG_ERROR([No regex library found])])])
409 AC_SUBST(REGEX_LIBS)
410
411 dnl ******************************
412 dnl libdb checking
413 dnl ******************************
414 AC_ARG_WITH([libdb],
415         AS_HELP_STRING([--with-libdb=PREFIX],
416         [Prefix where libdb is installed]),
417         [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
418
419 DB_CFLAGS="-I$libdb_prefix/include"
420 DB_LIBS="-L$libdb_prefix/lib -ldb"
421
422 AC_MSG_CHECKING([Berkeley DB])
423 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
424 save_libs=$LIBS; LIBS="$DB_LIBS"
425 AC_LINK_IFELSE([AC_LANG_PROGRAM(
426         [[#include <db.h>]],
427         [[db_create(NULL, NULL, 0)]])],
428         [AC_MSG_RESULT([yes])],
429         [AC_MSG_ERROR([Cannot find libdb])])
430 CFLAGS=$save_cflags
431 LIBS=$save_libs
432 AC_SUBST(DB_CFLAGS)
433 AC_SUBST(DB_LIBS)
434
435 dnl ******************************
436 dnl iconv checking
437 dnl ******************************
438 have_iconv="no"
439 save_LIBS="$LIBS"
440 LIBS="$LIBS -liconv"
441 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
442         AC_LINK_IFELSE([AC_LANG_PROGRAM(
443         [[
444                 #include <iconv.h>
445                 #include <stdlib.h>
446         ]],
447         [[
448                 iconv_t cd;
449                 cd = iconv_open ("UTF-8", "ISO-8859-1");
450         ]]
451         )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
452
453 if test "x$ac_cv_libiconv" = "xyes"; then
454         ICONV_LIBS="-liconv"
455         if test "x$os_win32" = "xyes"; then
456                 dnl Don't pointlessly auto-export the global symbols
457                 dnl from a potentially static libiconv.a
458                 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
459         fi
460         have_iconv="yes"
461 else
462         LIBS="$save_LIBS"
463         AC_CHECK_FUNC(iconv, [have_iconv=yes], [have_iconv=no])
464 fi
465
466 if test "x$have_iconv" = "xyes"; then
467         if test "x$ac_cv_libiconv" = "xno"; then
468                 AC_CHECK_FUNCS(gnu_get_libc_version)
469         fi
470 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
471         AC_RUN_IFELSE([AC_LANG_SOURCE([[
472                 #include <iconv.h>
473                 #include <stdlib.h>
474                 #include <string.h>
475                 #ifdef HAVE_GNU_GET_LIBC_VERSION
476                 #include <gnu/libc-version.h>
477                 #endif
478                 int main() {
479                         char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
480                         char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
481                         char *transbuf = malloc (10), *trans = transbuf;
482                         iconv_t cd;
483                         size_t jp_len = strlen (jp), utf8_len = 10;
484                         size_t utf8_real_len = strlen (utf8);
485
486                         #ifdef HAVE_GNU_GET_LIBC_VERSION
487                         /* glibc 2.1.2's iconv is broken in hard to test ways. */
488                         if (!strcmp (gnu_get_libc_version (), "2.1.2"))
489                                 exit (1);
490                         #endif
491
492                         cd = iconv_open ("UTF-8", "ISO-2022-JP");
493                         if (cd == (iconv_t) -1)
494                                 exit (1);
495                         if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
496                                 exit (1);
497                         if (memcmp (utf8, transbuf, utf8_real_len) != 0)
498                                 exit (1);
499                         return (0);}
500                 ]])
501         ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
502 fi
503
504 if test "x$have_iconv" = "xno"; then
505         AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
506 fi
507 AC_SUBST(ICONV_LIBS)
508
509 CFLAGS="$CFLAGS -I$srcdir"
510
511 AC_MSG_CHECKING([preferred charset name formats for system iconv])
512 AC_RUN_IFELSE([AC_LANG_SOURCE([[
513         #define CONFIGURE_IN
514         #include "iconv-detect.c"
515         ]])],
516         [AC_MSG_RESULT([found])],
517         [AC_MSG_RESULT([not found])
518                 AC_MSG_WARN([
519                 *** The iconv-detect program was unable to determine the
520                 *** preferred charset name formats recognized by your
521                 *** iconv library. It is suggested that you install a
522                 *** working iconv library such as the one found at
523                 *** ftp://ftp.gnu.org/pub/gnu/libiconv
524         ])],
525         [if test "x$os_win32" = xyes; then
526                 AC_MSG_RESULT([using known win32 result])
527                 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
528                 echo  >>iconv-detect.h
529                 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
530                 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
531                 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
532         else
533                 AC_MSG_RESULT([unknown])
534                 AC_MSG_WARN([
535                 *** We can't determine the preferred charset name formats
536                 *** recognized by your iconv library. You are
537                 *** cross-compiling and supposed to know what you are doing.
538                 *** Please construct the iconv-detect.h file manually.
539                 ])
540         fi
541 ])
542
543 CFLAGS="$save_CFLAGS"
544 LIBS="$save_LIBS"
545
546 AC_ARG_ENABLE([backtraces],
547         [AS_HELP_STRING([--enable-backtraces],
548         [enable backtraces for e_pointer_tracker (default=no)])],
549         [enable_backtraces=$enableval], [enable_backtraces=no])
550
551 if test "x$enable_backtraces" = xyes; then
552         dnl ****************************
553         dnl Check for backtrace_symbols function and dwfl from elfutils
554         dnl ****************************
555         AC_MSG_CHECKING([libc backtrace_symbols function])
556         AC_LINK_IFELSE([AC_LANG_PROGRAM(
557                 [[#include <execinfo.h>]],
558                 [[{ void *bt[1]; backtrace_symbols (bt, backtrace(bt, 1)); }]])],
559                 [AC_DEFINE(HAVE_BACKTRACE_SYMBOLS, 1, [libc provides backtrace_symbols function]) ac_cv_have_bsf=yes],[ac_cv_have_bsf=no])
560         AC_MSG_RESULT([$ac_cv_have_bsf])
561
562         if test "x$ac_cv_have_bsf" = xyes; then
563                 LIBS="$LIBS -ldw"
564
565                 AC_MSG_CHECKING([elfutils/libdwfl])
566                 AC_LINK_IFELSE([AC_LANG_PROGRAM(
567                         [[#include <elfutils/libdwfl.h>]],
568                         [[{
569                                 Dwfl *dwfl;
570                                 Dwfl_Module *module;
571                                 Dwarf_Addr module_low_addr;
572                                 Dwfl_Line *line;
573
574                                 dwfl_standard_find_debuginfo;
575                                 dwfl_linux_proc_find_elf;
576                                 dwfl_begin (NULL);
577                                 dwfl_linux_proc_report (NULL, 1);
578                                 dwfl_report_end (NULL, NULL, NULL);
579                                 dwfl_end (NULL);
580                                 dwfl_module_addrname (NULL, NULL);
581                                 dwfl_module_getsrc (NULL, NULL);
582                                 dwfl_lineinfo (NULL, NULL, NULL, NULL, NULL, NULL);
583                                 DWARF_CB_ABORT; DWARF_CB_OK;
584                                 dwfl_getmodules (NULL, NULL, NULL, 0);
585                         }]])],
586                         [AC_DEFINE(HAVE_ELFUTILS_LIBDWFL, 1, [have elfutils/libdwfl.h functions]) ac_cv_have_elfdwfl=yes],[ac_cv_have_elfdwfl=no])
587                 AC_MSG_RESULT([$ac_cv_have_elfdwfl])
588
589                 LIBS="$save_LIBS"
590
591                 if test "x$ac_cv_have_elfdwfl" = xyes; then
592                         LIBDWFL_LIBS="-ldw"
593                         AC_SUBST(LIBDWFL_LIBS)
594                 fi
595         fi
596 fi
597
598 dnl **********************************
599 dnl Check for nl_langinfo and CODESET
600 dnl **********************************
601 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
602 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
603         [[#include <langinfo.h>]],
604         [[char *codeset = nl_langinfo (CODESET);]]
605         )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
606 if test "x$ac_cv_langinfo_codeset" = "xyes"; then
607         AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
608 fi
609 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
610
611 dnl *******************************************************
612 dnl Check to see if strftime supports the use of %l and %k
613 dnl *******************************************************
614 AC_MSG_CHECKING([for %l and %k support in strftime])
615 AC_RUN_IFELSE([AC_LANG_SOURCE(
616         [[      #include <stdlib.h>
617                 #include <string.h>
618                 #include <time.h>
619                 int main(int argc, char **argv) {
620                 char buf[10];
621                 time_t rawtime;
622                 struct tm *timeinfo;
623
624                 time(&rawtime);
625                 timeinfo=localtime(&rawtime);
626                 buf[0] = '\0';
627                 strftime(buf, 10, "%lx%k", timeinfo);
628
629                 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
630                         exit(1);
631                 else
632                         exit(0);
633                 return 0;
634                 }
635         ]]
636         )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
637 AC_MSG_RESULT([$ac_cv_lkstrftime])
638
639 dnl ********************************************************************************
640 dnl security extension support (SSL and S/MIME)
641 dnl
642 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
643 dnl needed by Camel (SSL and S/MIME).
644 dnl
645 dnl The Evolution security extensions are only built if these libraries are found
646 dnl ********************************************************************************
647 msg_ssl="no"
648 msg_smime="no"
649
650 AC_ARG_ENABLE([ssl],
651         AS_HELP_STRING([--enable-ssl],
652         [Enable SSL support through Mozilla nss @<:@default=yes@:>@]),
653         [enable_ssl="$enableval"],[enable_ssl="yes"])
654
655 AC_ARG_ENABLE([smime],
656         AS_HELP_STRING([--enable-smime],
657         [Enable SMIME support through Mozilla nss @<:@default=yes,requires --enable-ssl@:>@ ]),
658         [enable_smime="$enableval"],[enable_smime="yes"])
659
660 AC_ARG_WITH([nspr-includes],
661         AS_HELP_STRING([--with-nspr-includes],
662         [Prefix of Mozilla nspr4 includes.]),
663         [with_nspr_includes="$withval"])
664
665 AC_ARG_WITH([nspr-libs],
666         AS_HELP_STRING([--with-nspr-libs],
667         [Prefix of Mozilla nspr4 libs.]),
668         [with_nspr_libs="$withval"])
669
670 AC_ARG_WITH([nss-includes],
671         AS_HELP_STRING([--with-nss-includes],
672         [Prefix of Mozilla nss3 includes.]),
673         [with_nss_includes="$withval"])
674
675 AC_ARG_WITH([nss-libs],
676         AS_HELP_STRING([--with-nss-libs],
677         [Prefix of Mozilla nss3 libs.]),
678         [with_nss_libs="$withval"])
679
680 if test "x${enable_ssl}" = "xyes"; then
681         if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
682                 check_manually="yes"
683         else
684                 check_manually="no"
685         fi
686
687 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
688         if test "x${check_manually}" = "xno"; then
689                 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
690                 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
691                 for pc in $mozilla_nspr_pcs; do
692                         if $PKG_CONFIG --exists $pc; then
693                                 AC_MSG_RESULT($pc)
694                                 mozilla_nspr=$pc
695                                 break;
696                         fi
697                 done
698
699                 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
700                 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
701                 for pc in $mozilla_nss_pcs; do
702                         if $PKG_CONFIG --exists $pc; then
703                                 AC_MSG_RESULT($pc)
704                                 mozilla_nss=$pc
705                                 break;
706                         fi
707                 done
708
709                 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
710                         msg_ssl="yes"
711                         if test "x$enable_smime" = "xyes"; then
712                                 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
713                                 msg_smime="yes"
714                         fi
715                         AC_DEFINE(CAMEL_HAVE_NSS,1,[Define if you have NSS])
716                         AC_DEFINE(CAMEL_HAVE_SSL,1,[Define if you have a supported SSL library])
717                         MANUAL_NSPR_CFLAGS=""
718                         MANUAL_NSPR_LIBS=""
719                         MANUAL_NSS_CFLAGS=""
720                         MANUAL_NSS_LIBS=""
721                 else
722                         check_manually="yes"
723                         mozilla_nspr=""
724                         mozilla_nss=""
725                 fi
726         fi
727
728         if test "x${check_manually}" = "xyes"; then
729         dnl ******************
730         dnl Check for NSPR 4
731         dnl ******************
732                 AC_MSG_CHECKING([for Mozilla nspr4 includes])
733                         CPPFLAGS_save="$CPPFLAGS"
734                         if test -n "$with_nspr_includes"; then
735                                 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
736                         fi
737
738                         AC_CHECK_HEADERS(nspr.h prio.h,
739                         [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
740                         CPPFLAGS="$CPPFLAGS_save"
741
742                         if test "x${moz_nspr_includes}" = "xyes"; then
743                                 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
744                         else
745                                 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
746                         fi
747                 AC_MSG_RESULT([$moz_nspr_includes])
748
749                 AC_MSG_CHECKING([for Mozilla nspr libraries])
750                         CFLAGS_save="$CFLAGS"
751                         LDFLAGS_save="$LDFLAGS"
752                         LIBS_save="$LIBS"
753                         nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
754
755                         CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
756                         LIBS="$nsprlibs"
757                         dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
758                         if test -n "${with_nspr_libs}"; then
759                                 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
760                         else
761                                 LDFLAGS="$LDFLAGS"
762                         fi
763
764                         AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
765                         [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
766
767                         CFLAGS="$CFLAGS_save"
768                         LDFLAGS="$LDFLAGS_save"
769                         LIBS="$LIBS_save"
770
771                         if test "x${moz_nspr_libs}" = "xyes"; then
772                                 if test -n "${with_nspr_libs}"; then
773                                         MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
774                                 else
775                                         MANUAL_NSPR_LIBS="$nsprlibs"
776                                 fi
777                         else
778                                 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
779                         fi
780                 AC_MSG_RESULT([$moz_nspr_libs])
781
782         dnl *****************
783         dnl Check for NSS 3
784         dnl *****************
785                 AC_MSG_CHECKING([for Mozilla nss3 includes])
786                         CPPFLAGS_save="$CPPFLAGS"
787                         CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
788
789                         AC_CHECK_HEADERS(nss.h ssl.h smime.h,
790                         [moz_nss_includes="yes"],[moz_nss_includes="no"])
791                         CPPFLAGS="$CPPFLAGS_save"
792
793                         if test "x${moz_nss_includes}" = "xyes"; then
794                                 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
795                         else
796                                 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
797                         fi
798                 AC_MSG_RESULT($moz_nss_includes)
799
800                 AC_MSG_CHECKING([for Mozilla nss libraries])
801                         LDFLAGS_save="$LDFLAGS"
802                         LIBS_save="$LIBS"
803                         nsslibs="-lssl3 -lsmime3 -lnss3"
804
805                         LIBS="$nsslibs $nsprlibs"
806                         dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
807                         if test -n "${with_nss_libs}"; then
808                                 LDFLAGS="$LDFLAGS -L$with_nss_libs $MANUAL_NSPR_LIBS"
809                         else
810                                 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR $MANUAL_NSPR_LIBS"
811                         fi
812
813                         AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
814                         [moz_nss_libs="yes"],[moz_nss_libs="no"])
815                         LDFLAGS="$LDFLAGS_save"
816                         LIBS="$LIBS_save"
817
818                         if test "x${moz_nss_libs}" = "xyes"; then
819                                 AC_DEFINE(CAMEL_HAVE_NSS)
820                                 AC_DEFINE(CAMEL_HAVE_SSL)
821                                 msg_ssl="yes"
822                                 if test "x${enable_smime}" = "xyes"; then
823                                         AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
824                                         msg_smime="yes"
825                                 fi
826                                 if test -n "${with_nss_libs}"; then
827                                         MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
828                                 else
829                                         MANUAL_NSS_LIBS="$nsslibs"
830                                 fi
831                         else
832                                 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
833                         fi
834                 AC_MSG_RESULT([$moz_nss_libs])
835
836                 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
837                 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
838         fi
839 fi
840
841 dnl These flags are used in camel.pc.in.
842 if test "x${msg_ssl}" = "xyes"; then
843         CAMEL_SSL_DEFINES="-DCAMEL_HAVE_NSS -DCAMEL_HAVE_SSL"
844 else
845         CAMEL_SSL_DEFINES=""
846 fi
847
848 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
849
850 dnl For pkgconfig files.
851 AC_SUBST(mozilla_nss)
852 AC_SUBST(mozilla_nspr)
853
854 AC_SUBST(CAMEL_SSL_DEFINES)
855 AC_SUBST(MANUAL_NSPR_CFLAGS)
856 AC_SUBST(MANUAL_NSPR_LIBS)
857 AC_SUBST(MANUAL_NSS_CFLAGS)
858 AC_SUBST(MANUAL_NSS_LIBS)
859
860 dnl ******************************
861 dnl system mail stuff
862 dnl ******************************
863 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
864 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
865
866 AC_MSG_CHECKING([system mail directory])
867 if test -d /var/mail -a '!' -h /var/mail ; then
868         system_mail_dir="/var/mail"
869 else
870         system_mail_dir="/var/spool/mail"
871 fi
872 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
873
874 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
875         d??????rw?)
876                 CAMEL_LOCK_HELPER_USER=""
877                 CAMEL_LOCK_HELPER_GROUP=""
878                 system_mail_perm="world writable"
879         ;;
880         d???rw????)
881                 CAMEL_LOCK_HELPER_USER=""
882                 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
883                 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
884         ;;
885         drw???????)
886                 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
887                 CAMEL_LOCK_HELPER_GROUP=""
888                 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
889         ;;
890         *)
891                 CAMEL_LOCK_HELPER_USER=""
892                 CAMEL_LOCK_HELPER_GROUP=""
893                 system_mail_perm="???"
894         ;;
895 esac
896
897 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
898 AC_SUBST(CAMEL_LOCK_HELPER_USER)
899 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
900
901 dnl ******************************
902 dnl Timezone checks
903 dnl ******************************
904 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
905         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
906         [[      #include <time.h>       ]],
907         [[
908                 struct tm tm;
909                 tm.tm_gmtoff = 1;
910         ]]
911         )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
912 if test "x$ac_cv_struct_tm_gmtoff" = "xyes"; then
913         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
914 else
915         AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
916                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
917                 [[      #include <time.h> ]],
918                 [[      timezone = 1;   ]]
919                 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
920         if test "x$ac_cv_var_timezone" = "xyes"; then
921                 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
922                 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
923                         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
924                         [[      #include <time.h>       ]],
925                         [[      altzone = 1; ]]
926                         )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
927                 if test "x$ac_cv_var_altzone" = "xyes"; then
928                         AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
929                 fi
930         else
931                 AC_MSG_ERROR([unable to find a way to determine timezone])
932         fi
933 fi
934
935 dnl ******************************
936 dnl ctime_r prototype
937 dnl ******************************
938 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
939 [
940         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
941         [[      #include <time.h> ]],
942         [[      char *buf;
943                 time_t date;
944                 ctime_r (&date, buf, 100); ]]
945         )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
946 ])
947
948 if test "x$ac_cv_ctime_r_three_args" = "xyes" ; then
949         AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
950 fi
951
952 dnl ******************************
953 dnl gethostbyname_r prototype
954 dnl ******************************
955 AC_CHECK_FUNCS(gethostbyname_r,[
956 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
957 [
958         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
959         [[
960                 #include "confdefs.h"
961                 #include <sys/types.h>
962                 #include <sys/socket.h>
963                 #include <netinet/in.h>
964                 #include <netdb.h>
965                 #define BUFSIZE (sizeof(struct hostent)+10)
966         ]],
967         [[
968                 struct hostent hent;
969                 char buffer[BUFSIZE];
970                 int bufsize=BUFSIZE;
971                 int h_errno;
972                 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
973         ]]
974         )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
975 ])])
976
977 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
978         AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
979 fi
980
981 dnl ******************************
982 dnl gethostbyaddr_r prototype
983 dnl ******************************
984 AC_CHECK_FUNCS(gethostbyaddr_r,[
985 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
986 [
987         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
988         [[
989                 #include "confdefs.h"
990                 #include <sys/types.h>
991                 #include <sys/socket.h>
992                 #include <netinet/in.h>
993                 #include <netdb.h>
994                 #define BUFSIZE (sizeof(struct hostent)+10)
995         ]],
996         [[
997                 struct hostent hent;
998                 char buffer[BUFSIZE];
999                 int bufsize=BUFSIZE;
1000                 int h_errno;
1001                 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
1002         )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
1003 ])])
1004
1005 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
1006         AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
1007 fi
1008
1009 dnl ******************************
1010 dnl stat(v)fs location/type
1011 dnl ******************************
1012 AC_CHECK_HEADER([sys/statvfs.h],
1013         [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
1014         [[      #if HAVE_SYS_STATVFS_H
1015                 #include <sys/statvfs.h>
1016                 #endif
1017         ]])
1018 AC_CHECK_FUNCS(statvfs)
1019
1020 AC_CHECK_HEADER([sys/param.h],
1021         [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
1022         [[      #if HAVE_SYS_PARAM_H
1023                 #include <sys/param.h>
1024                 #endif
1025         ]])
1026 AC_CHECK_HEADER([sys/mount.h],
1027         [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
1028         [[      #if HAVE_SYS_MOUNT_H
1029                 #include <sys/mount.h>
1030                 #endif
1031         ]])
1032 AC_CHECK_FUNCS(statfs)
1033
1034 dnl ******************************
1035 dnl IPv6 support and getaddrinfo calls
1036 dnl ******************************
1037 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
1038 [
1039         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1040         [[      #include "confdefs.h"
1041                 #include <sys/types.h>
1042                 #include <sys/socket.h>
1043                 #include <netinet/in.h>
1044                 #include <netdb.h>
1045                 #include <stddef.h>
1046         ]],
1047         [[      #ifndef NI_MAXHOST
1048                 #define NI_MAXHOST      1025
1049                 #endif
1050
1051                 #ifndef NI_MAXSERV
1052                 #define NI_MAXSERV      32
1053                 #endif
1054
1055                 struct addrinfo hints, *res;
1056                 struct sockaddr_in6 sin6;
1057                 int af = AF_INET6;
1058                 char host[NI_MAXHOST];
1059                 char serv[NI_MAXSERV];
1060
1061                 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
1062                 freeaddrinfo (res);
1063                 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
1064         )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
1065 ])
1066
1067 if test "x$ac_cv_have_addrinfo" = "xno" ; then
1068         AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
1069         if test "x$enable_ipv6" = "xyes" ; then
1070                 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
1071         fi
1072         msg_ipv6="no"
1073 else
1074         AC_ARG_ENABLE([ipv6],
1075         AS_HELP_STRING([--enable-ipv6=no/yes],
1076         [Enable support for resolving IPv6 addresses.]),
1077         [enable_ipv6=$enableval],[enable_ipv6=yes])
1078         if test "x$enable_ipv6" = "xyes"; then
1079                 msg_ipv6="yes"
1080                 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
1081                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1082                 [[      #include "confdefs.h"
1083                         #include <sys/types.h>
1084                         #include <sys/socket.h>
1085                         #include <netinet/in.h>
1086                         #include <netdb.h>
1087                 ]],
1088                 [[      struct addrinfo hints;
1089                         hints.ai_flags = AI_ADDRCONFIG;
1090                 ]]
1091                 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
1092         else
1093                 msg_ipv6="no"
1094         fi
1095 fi
1096
1097 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
1098
1099 AC_CHECK_HEADER([wspiapi.h],
1100         [AC_DEFINE([HAVE_WSPIAPI_H], 1, [Have <wspiapi.h>])],,)
1101
1102 dnl ******************************
1103 dnl Calendar support
1104 dnl ******************************
1105 AC_MSG_CHECKING([if we should build the calendar])
1106 AC_ARG_ENABLE([calendar],
1107         AS_HELP_STRING([--enable-calendar=yes/no],
1108         [Enable the calendar components (default yes)]),
1109         [enable_calendar=$enableval], [enable_calendar=yes])
1110
1111 if test "x${enable_calendar}" != "xno"; then
1112         AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
1113 fi
1114 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
1115 AC_MSG_RESULT([$enable_calendar])
1116 msg_calendar=$enable_calendar
1117
1118 dnl **********************************
1119 dnl Weather calendar backend support
1120 dnl **********************************
1121 AC_MSG_CHECKING([if we should build the weather calendar backend])
1122 AC_ARG_ENABLE([weather],
1123         [AS_HELP_STRING([--enable-weather],
1124         [Build the weather calendar backend (default=yes)])],
1125         [use_gweather=$enableval], [use_gweather=yes])
1126 if test "$enable_calendar" = "no"; then
1127         use_gweather="no (calendar support is disabled)"
1128 fi
1129
1130 AC_MSG_RESULT([$use_gweather])
1131 if test "x$use_gweather" = "xyes"; then
1132         PKG_CHECK_MODULES([LIBGWEATHER], [gweather-3.0 >= gweather_minimum_version],[],
1133         [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.])])
1134 fi
1135 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
1136
1137 dnl ******************************
1138 dnl NNTP support.
1139 dnl ******************************
1140 AC_ARG_ENABLE([nntp],
1141         AS_HELP_STRING([--enable-nntp],
1142         [Build Usenet news (NNTP) backend]),
1143         [enable_nntp=$enableval],[enable_nntp=yes])
1144 if test "x$enable_nntp" = "xyes"; then
1145         AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
1146         msg_nntp="yes"
1147 else
1148         msg_nntp="no"
1149 fi
1150 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
1151
1152 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
1153
1154 dnl ******************************
1155 dnl File locking
1156 dnl ******************************
1157 AC_ARG_ENABLE([dot-locking],
1158         AS_HELP_STRING([--enable-dot-locking=yes/no],
1159         [Enable support for locking mail files with dot locking]),
1160         [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1161
1162 if test "x$os_win32" != "xyes" -a "x$enable_dot_locking" = "xyes"; then
1163         AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1164         msg_dot="yes"
1165 else
1166         msg_dot="no"
1167 fi
1168
1169 AC_ARG_ENABLE([file-locking],
1170         AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1171         [Enable support for locking mail files with file locking]),
1172         [],[enable_file_locking=fcntl])
1173
1174 if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xfcntl"; then
1175         AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1176         msg_file="fcntl"
1177 else
1178         if test "x$os_win32" != "xyes" -a "x$enable_file_locking" = "xflock"; then
1179                 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1180                 msg_file="flock"
1181         else
1182                 msg_file="no"
1183         fi
1184 fi
1185
1186 dnl ******************************
1187 dnl sendmail operation
1188 dnl ******************************
1189 AC_MSG_CHECKING([for SunOS broken spool format])
1190 if test "x$host_os" = "xsunos" ; then
1191         with_broken_spool="yes"
1192 fi
1193
1194 AC_ARG_WITH([broken-spool],
1195         AS_HELP_STRING([--with-broken-spool=yes/no],
1196         [Using SunOS/Solaris sendmail which has a broken spool format]),
1197         [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1198
1199 if test "x$with_broken_spool" = "xyes"; then
1200         AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1201 fi
1202
1203 AC_MSG_RESULT([$with_broken_spool])
1204
1205 dnl ******************************
1206 dnl DBus call timeout
1207 dnl ******************************
1208
1209 AC_ARG_WITH([dbus-call-timeout],
1210         AS_HELP_STRING([--with-dbus-call-timeout=miliseconds],
1211         [Default timeout used when invoking g_dbus_proxy_call() family functions in EBook and ECal library (default=-1)]),
1212         [ac_cv_dbus_call_timeout=$withval],[ac_cv_dbus_call_timeout=-1])
1213
1214 DEFAULT_EDS_DBUS_TIMEOUT=$ac_cv_dbus_call_timeout
1215 AC_SUBST(DEFAULT_EDS_DBUS_TIMEOUT)
1216
1217 dnl ***********
1218 dnl Kerberos 5
1219 dnl ***********
1220 EVO_KRB5_SUPPORT(no)
1221
1222 dnl ******************************
1223 dnl Purify support
1224 dnl ******************************
1225 EVO_PURIFY_SUPPORT
1226
1227 dnl ******************************
1228 dnl LDAP support.
1229 dnl ******************************
1230 if test "x$os_win32" != "xyes"; then
1231         EVO_LDAP_CHECK(no)
1232         case $with_openldap in
1233         no)
1234                 msg_ldap="no"
1235         ;;
1236         *)
1237                 case $with_static_ldap in
1238                 yes)
1239                         msg_ldap="$with_openldap (static)"
1240                         ;;
1241                 *)
1242                         msg_ldap="$with_openldap (dynamic)"
1243                         ;;
1244                 esac
1245         esac
1246
1247 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1248         if test "x$with_openldap" = "xno" ; then
1249                 EVO_SUNLDAP_CHECK(no)
1250                 case $with_sunldap in
1251                 no)
1252                         msg_ldap="no"
1253                         ;;
1254                 *)
1255                         case $with_static_sunldap in
1256                         yes)
1257                                 msg_ldap="$with_sunldap (static)"
1258                                 ;;
1259                         *)
1260                                 msg_ldap="$with_sunldap (dynamic)"
1261                                 ;;
1262                 esac
1263         esac
1264         else
1265                 with_sunldap="no"
1266         fi
1267         AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1268
1269         LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1270 else
1271         dnl Win32 LDAP support
1272         LDAP_CFLAGS="-DLDAP_DEPRECATED"
1273         LDAP_LIBS="-lwldap32"
1274         AC_SUBST(LDAP_CFLAGS)
1275         AC_SUBST(LDAP_LIBS)
1276         AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1277         AM_CONDITIONAL(ENABLE_LDAP, true)
1278         AM_CONDITIONAL(SUNLDAP, false)
1279         msg_ldap="yes"
1280 fi
1281
1282 dnl ******************************
1283 dnl GObject marshalling
1284 dnl ******************************
1285 AM_PATH_GLIB_2_0
1286
1287 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1288 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1289 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1290
1291 dnl ******************************
1292 dnl Utility macro to set compiler flags for a specific lib.
1293 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1294 dnl ******************************
1295 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1296         PKG_CHECK_MODULES([$1], [$2])
1297         $1_CFLAGS="[$]$1_CFLAGS $3 "
1298         $1_LIBS="[$]$1_LIBS $4 "
1299 ])
1300
1301 dnl ******************************
1302 dnl sqlite3 flags
1303 dnl ******************************
1304 PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= sqlite_minimum_version])
1305
1306 dnl ******************************
1307 dnl libedataserver flags
1308 dnl ******************************
1309 E_DATA_SERVER_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1310
1311 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
1312 AC_SUBST(E_DATA_SERVER_CFLAGS)
1313 AC_SUBST(E_DATA_SERVER_LIBS)
1314
1315 dnl ******************************
1316 dnl libedataserverui
1317 dnl ******************************
1318 E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 gconf-2.0"
1319
1320 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
1321 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1322 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1323
1324 if test "x$enable_maintainer_mode" = "xyes" ; then
1325         FACTORY_GTK_CFLAGS=$E_DATA_SERVER_UI_CFLAGS
1326         FACTORY_GTK_LIBS=$E_DATA_SERVER_UI_LIBS
1327         AC_SUBST(FACTORY_GTK_CFLAGS)
1328         AC_SUBST(FACTORY_GTK_LIBS)
1329 fi
1330
1331 E_BACKEND_DEPS="gio-2.0 libxml-2.0 gconf-2.0"
1332
1333 dnl ******************************
1334 dnl libebackend flags
1335 dnl ******************************
1336 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1337 AC_SUBST(E_BACKEND_CFLAGS)
1338 AC_SUBST(E_BACKEND_LIBS)
1339
1340 dnl ******************************
1341 dnl evolution-addressbook flags
1342 dnl ******************************
1343 EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 gconf-2.0"
1344
1345 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1346 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1347 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1348
1349 dnl ******************************
1350 dnl evolution-calendar flags
1351 dnl ******************************
1352 if test "x${enable_calendar}" = "xyes"; then
1353         EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libxml-2.0 gconf-2.0"
1354
1355 dnl *****
1356 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1357 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1358 dnl to differentiate between <libical/ical.h> and <ical.h>
1359 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1360 dnl libical is fixed, we have to work-around the buggy CFlags.
1361 dnl *****
1362         LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1363         LIBICAL_EXTRA_LIBS=""
1364         AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1365         AC_SUBST(LIBICAL_EXTRA_LIBS)
1366
1367         EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1368         AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1369         AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1370
1371         dnl ****************************
1372         dnl Check for ical_set_unknown_token_handling_setting function
1373         dnl ****************************
1374         AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1375         save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1376         save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1377         AC_LINK_IFELSE([AC_LANG_PROGRAM(
1378                 [[#include <libical/ical.h>]],
1379                 [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1380                 [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])
1381         CFLAGS=$save_cflags
1382         LIBS=$save_libs
1383         AC_MSG_RESULT([$ac_cv_have_iuth])
1384
1385 fi
1386
1387 dnl ******************************
1388 dnl Google flags
1389 dnl ******************************
1390 LIBGDATA_REQUIRED=libgdata_minimum_version
1391 AC_SUBST(LIBGDATA_REQUIRED)
1392
1393 EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
1394 AC_SUBST(GDATA_CFLAGS)
1395 AC_SUBST(GDATA_LIBS)
1396
1397 dnl ******************************
1398 dnl Groupwise flags
1399 dnl ******************************
1400 LIBSOUP_REQUIRED=libsoup_minimum_version
1401 AC_SUBST(LIBSOUP_REQUIRED)
1402
1403 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1404 AC_SUBST(SOUP_CFLAGS)
1405 AC_SUBST(SOUP_LIBS)
1406
1407 dnl ******************************
1408 dnl Camel flags
1409 dnl ******************************
1410 SQLITE_REQUIRED=sqlite_minimum_version
1411 AC_SUBST(SQLITE_REQUIRED)
1412
1413 zlib_found="false"
1414 dnl deflateInit is a #define, use deflateEnd instead
1415 AC_CHECK_LIB([z], [deflateEnd], [AC_CHECK_HEADER(zlib.h, [zlib_found=true])])
1416
1417 if test "x$zlib_found" = "xfalse"; then
1418         AC_MSG_ERROR([*** zlib is required])
1419 fi
1420
1421 dnl ******************************
1422 dnl Checks for large file support
1423 dnl ******************************
1424 AC_ARG_ENABLE([largefile],
1425         AS_HELP_STRING([--enable-largefile],
1426         [enable support for large files [[default=no]]]),
1427         [],[enable_largefile="yes"])
1428
1429 if test "x$enable_largefile" != "xno"; then
1430         AC_SYS_LARGEFILE
1431         AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1432         [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1433         [[      #include <sys/types.h>
1434                 #include <sys/stat.h>
1435                 #include <fcntl.h>
1436         ]],
1437         [[      int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644);  ]]
1438         )],[ac_cv_largefile64_source="no"],
1439                 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1440                 [[      #define _LARGEFILE64_SOURCE
1441                         #include <sys/types.h>
1442                         #include <sys/stat.h>
1443                         #include <fcntl.h>
1444                 ]],
1445                 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1446                 [ac_cv_largefile64_source="unknown"])])
1447         ])
1448
1449         enable_largefile="no"
1450
1451         if test "x$ac_cv_largefile64_source" = "xyes"; then
1452                 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1453                 enable_largefile="yes"
1454         elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1455                 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1456         fi
1457
1458         if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1459                 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1460                 enable_largefile="yes"
1461         fi
1462
1463         if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1464                 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1465                 enable_largefile="yes"
1466         fi
1467 else
1468         AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1469         LARGEFILE_CFLAGS=""
1470 fi
1471
1472 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1473
1474 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)
1475 AC_SUBST(CAMEL_CFLAGS)
1476 AC_SUBST(CAMEL_LIBS)
1477 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1478 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1479
1480 dnl ******************************
1481 dnl Special directories
1482 dnl ******************************
1483
1484 dnl If you add something here, consider whether or not you also
1485 dnl need to add it to one or more .pc.in files (for Connector,
1486 dnl etc)
1487
1488 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1489 AC_SUBST(privdatadir)
1490
1491 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1492 AC_SUBST(privincludedir)
1493
1494 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1495 AC_SUBST(privlibdir)
1496
1497 imagesdir='${datadir}'/pixmaps/evolution-data-server
1498 AC_SUBST(imagesdir)
1499
1500 ebook_backenddir='${libdir}'/evolution-data-server/addressbook-backends
1501 AC_SUBST(ebook_backenddir)
1502
1503 ecal_backenddir='${libdir}'/evolution-data-server/calendar-backends
1504 AC_SUBST(ecal_backenddir)
1505
1506 if test "x$use_gweather" = "xyes"; then
1507         weatherdatadir="$privdatadir/weather"
1508         AC_SUBST(weatherdatadir)
1509 fi
1510
1511 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1512 camel_providerdir='${libdir}'/evolution-data-server/camel-providers
1513 AC_SUBST(camel_providerdir)
1514
1515 dnl *******************
1516 dnl D-BUS service stuff
1517 dnl *******************
1518 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)|" $< > $@'
1519 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1520
1521 dnl ******************************
1522 dnl GConf stuff
1523 dnl ******************************
1524 AC_PATH_PROG(GCONFTOOL, gconftool-2, [no])
1525 AM_GCONF_SOURCE_2
1526
1527 dnl ******************************
1528 dnl gperf stuff
1529 dnl ******************************
1530 AC_PATH_PROG(GPERF, gperf, [no])
1531 if test "x$GPERF" = "xno"; then
1532   AC_MSG_ERROR([You need gperf to build evolution-data-server])
1533 fi
1534
1535 GOBJECT_INTROSPECTION_CHECK([0.9.12])
1536
1537 dnl ******************************
1538 dnl Vala binding
1539 dnl ******************************
1540 AC_ARG_ENABLE(vala-bindings,
1541         AC_HELP_STRING([--enable-vala-bindings],
1542         [build the EXPERIMENTAL Vala bindings]),
1543         enable_vala_bindings=$enableval,
1544         enable_vala_bindings=no)
1545
1546 if test x$enable_vala_bindings = xyes; then
1547   if test "x$INTROSPECTION_SCANNER" = x; then
1548     AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
1549   fi
1550
1551   AM_PROG_VALAC([0.13.0])
1552   have_vala=yes
1553
1554   AC_PATH_PROG(VALAC, valac, valac)
1555   AC_SUBST(VALAC)
1556   AC_SUBST(VALAFLAGS)
1557
1558   AC_PATH_PROG([VAPIGEN], [vapigen], [false])
1559
1560   if test "x$VAPIGEN" = "xfalse"; then
1561     AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
1562   fi
1563
1564   AC_SUBST(VAPIGEN)
1565 fi
1566
1567 AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
1568 AC_SUBST(HAVE_VALA)
1569
1570 dnl ******************************
1571 dnl Makefiles
1572 dnl ******************************
1573 export privlibdir
1574 export privincludedir
1575 export privdatadir
1576
1577 AC_CONFIG_FILES([
1578 Makefile
1579 evolution-data-server-zip
1580 evolution-data-server.pc
1581 addressbook/Makefile
1582 addressbook/libebook/Makefile
1583 addressbook/libebook/libebook.pc
1584 addressbook/libedata-book/Makefile
1585 addressbook/libedata-book/libedata-book.pc
1586 addressbook/libegdbus/Makefile
1587 addressbook/backends/Makefile
1588 addressbook/backends/file/Makefile
1589 addressbook/backends/vcf/Makefile
1590 addressbook/backends/ldap/Makefile
1591 addressbook/backends/google/Makefile
1592 addressbook/backends/webdav/Makefile
1593 art/Makefile
1594 calendar/Makefile
1595 calendar/libecal/Makefile
1596 calendar/libecal/libecal.pc
1597 calendar/libedata-cal/Makefile
1598 calendar/libedata-cal/libedata-cal.pc
1599 calendar/libegdbus/Makefile
1600 calendar/backends/Makefile
1601 calendar/backends/caldav/Makefile
1602 calendar/backends/file/Makefile
1603 calendar/backends/http/Makefile
1604 calendar/backends/contacts/Makefile
1605 calendar/backends/weather/Makefile
1606 camel/Makefile
1607 camel/providers/Makefile
1608 camel/providers/imap/Makefile
1609 camel/providers/imapx/Makefile
1610 camel/providers/local/Makefile
1611 camel/providers/nntp/Makefile
1612 camel/providers/pop3/Makefile
1613 camel/providers/sendmail/Makefile
1614 camel/providers/smtp/Makefile
1615 camel/tests/Makefile
1616 camel/tests/folder/Makefile
1617 camel/tests/lib/Makefile
1618 camel/tests/message/Makefile
1619 camel/tests/mime-filter/Makefile
1620 camel/tests/misc/Makefile
1621 camel/tests/smime/Makefile
1622 camel/camel.pc
1623 camel/camel-provider.pc
1624 libebackend/Makefile
1625 libebackend/libebackend.pc
1626 libedataserver/Makefile
1627 libedataserver/eds-version.h
1628 libedataserver/libedataserver.pc
1629 libedataserverui/Makefile
1630 libedataserverui/libedataserverui.pc
1631 tests/Makefile
1632 tests/libebook/Makefile
1633 tests/libebook/client/Makefile
1634 tests/libebook/vcard/Makefile
1635 tests/libecal/Makefile
1636 tests/libecal/client/Makefile
1637 tests/libedata-cal/Makefile
1638 tests/libedataserver/Makefile
1639 tests/libedataserverui/Makefile
1640 docs/Makefile
1641 docs/reference/Makefile
1642 docs/reference/addressbook/Makefile
1643 docs/reference/addressbook/libebook/Makefile
1644 docs/reference/addressbook/libedata-book/Makefile
1645 docs/reference/calendar/Makefile
1646 docs/reference/calendar/libecal/Makefile
1647 docs/reference/calendar/libedata-cal/Makefile
1648 docs/reference/camel/Makefile
1649 docs/reference/libedataserver/Makefile
1650 docs/reference/libedataserverui/Makefile
1651 docs/reference/libebackend/Makefile
1652 po/Makefile.in
1653 vala/Makefile
1654 ])
1655 AC_OUTPUT
1656
1657 echo "
1658         evolution-data-server has been configured as follows:
1659         Calendar:               $msg_calendar
1660         Weather calendar:       $use_gweather
1661         Mail Directory:         $system_mail_dir, $system_mail_perm
1662         LDAP support:           $msg_ldap
1663         NNTP support:           $msg_nntp
1664         Kerberos 5:             $msg_krb5
1665         SSL support:            $msg_ssl
1666         SMIME support:          $msg_smime
1667         IPv6 support:           $msg_ipv6
1668         Dot Locking:            $msg_dot
1669         File Locking:           $msg_file
1670         Large files:            $enable_largefile
1671         Gtk Doc:                $enable_gtk_doc
1672         Introspection:          $enable_introspection
1673         Vala bindings:          $enable_vala_bindings
1674         GNOME Online Accounts   $enable_goa
1675 "