1 dnl Evolution-Data-Server version
2 m4_define([eds_major_version], [2])
3 m4_define([eds_minor_version], [29])
4 m4_define([eds_micro_version], [2])
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], [2.30])
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.9 tar-ustar])
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.16.1])
36 m4_define([gtk_minimum_version], [2.14.0])
37 m4_define([gconf_minimum_version], [2.0.0]) dnl XXX Just a Guess
38 m4_define([libxml_minimum_version], [2.0.0]) dnl XXX Just a Guess
39 m4_define([libsoup_minimum_version], [2.3.0])
40 m4_define([gnome_keyring_minimum_version], [2.20.1])
41 m4_define([sqlite_minimum_version], [3.5])
42 m4_define([gweather_minimum_version], [2.25.4])
43 m4_define([libical_minimum_version], [0.43])
44 m4_define([dbus_glib_minimum_version], [0.6])
46 AC_SUBST([BASE_VERSION],[base_version])
47 AC_SUBST([API_VERSION],[api_version])
48 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
49 AC_DEFINE_UNQUOTED(API_VERSION, ["$API_VERSION"], [API version (Major.Minor)])
51 EDS_MAJOR_VERSION=eds_major_version
52 EDS_MINOR_VERSION=eds_minor_version
53 EDS_MICRO_VERSION=eds_micro_version
55 dnl ******************************
56 dnl Libtool versioning
57 dnl ******************************
58 LIBEDATASERVER_CURRENT=11
59 LIBEDATASERVER_REVISION=1
62 LIBEDATASERVERUI_CURRENT=9
63 LIBEDATASERVERUI_REVISION=1
64 LIBEDATASERVERUI_AGE=1
71 LIBEDATACAL_REVISION=2
74 LIBEDATABOOK_CURRENT=6
75 LIBEDATABOOK_REVISION=1
82 LIBEGROUPWISE_CURRENT=13
83 LIBEGROUPWISE_REVISION=1
94 LIBGDATA_GOOGLE_CURRENT=1
95 LIBGDATA_GOOGLE_REVISION=0
99 LIBEBACKEND_REVISION=1
102 AC_SUBST(EDS_MAJOR_VERSION)
103 AC_SUBST(EDS_MINOR_VERSION)
104 AC_SUBST(EDS_MICRO_VERSION)
105 AC_SUBST(LIBEDATASERVER_CURRENT)
106 AC_SUBST(LIBEDATASERVER_REVISION)
107 AC_SUBST(LIBEDATASERVER_AGE)
108 AC_SUBST(LIBEDATASERVERUI_CURRENT)
109 AC_SUBST(LIBEDATASERVERUI_REVISION)
110 AC_SUBST(LIBEDATASERVERUI_AGE)
111 AC_SUBST(LIBECAL_CURRENT)
112 AC_SUBST(LIBECAL_REVISION)
113 AC_SUBST(LIBECAL_AGE)
114 AC_SUBST(LIBEDATACAL_CURRENT)
115 AC_SUBST(LIBEDATACAL_REVISION)
116 AC_SUBST(LIBEDATACAL_AGE)
117 AC_SUBST(LIBEBOOK_CURRENT)
118 AC_SUBST(LIBEBOOK_REVISION)
119 AC_SUBST(LIBEBOOK_AGE)
120 AC_SUBST(LIBEDATABOOK_CURRENT)
121 AC_SUBST(LIBEDATABOOK_REVISION)
122 AC_SUBST(LIBEDATABOOK_AGE)
123 AC_SUBST(LIBEGROUPWISE_CURRENT)
124 AC_SUBST(LIBEGROUPWISE_REVISION)
125 AC_SUBST(LIBEGROUPWISE_AGE)
126 AC_SUBST(LIBCAMEL_CURRENT)
127 AC_SUBST(LIBCAMEL_REVISION)
128 AC_SUBST(LIBCAMEL_AGE)
129 AC_SUBST(LIBGDATA_CURRENT)
130 AC_SUBST(LIBGDATA_REVISION)
131 AC_SUBST(LIBGDATA_AGE)
132 AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
133 AC_SUBST(LIBGDATA_GOOGLE_REVISION)
134 AC_SUBST(LIBGDATA_GOOGLE_AGE)
135 AC_SUBST(LIBEBACKEND_CURRENT)
136 AC_SUBST(LIBEBACKEND_REVISION)
137 AC_SUBST(LIBEBACKEND_AGE)
139 dnl **************************************
140 dnl Put the ACLOCAL flags in the Makefile
141 dnl **************************************
142 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
144 dnl ******************************
145 dnl Compiler Warning Flags
146 dnl ******************************
147 AS_COMPILER_FLAGS(WARNING_FLAGS,
148 "-DG_DISABLE_DEPRECATED
149 -DPANGO_DISABLE_DEPRECATED
150 -DGDK_DISABLE_DEPRECATED
151 -DGDK_PIXBUF_DISABLE_DEPRECATED
152 -DG_DISABLE_SINGLE_INCLUDES
153 -DGTK_DISABLE_SINGLE_INCLUDES
155 -Wno-missing-field-initializers
157 -Wno-unused-parameter
158 -Wdeclaration-after-statement
159 -Werror-implicit-function-declaration
160 -Wformat-security -Winit-self
161 -Wmissing-declarations -Wmissing-include-dirs
162 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
163 -Wredundant-decls -Wundef -Wwrite-strings")
165 dnl Other useful compiler warnings for test builds only.
166 dnl These may produce warnings we have no control over.
168 dnl -Wformat-nonliteral
169 dnl -Wmissing-format-attribute
172 AM_CPPFLAGS="$WARNING_FLAGS"
173 AC_SUBST(AM_CPPFLAGS)
175 dnl ******************************
176 dnl Initialize maintainer mode
177 dnl ******************************
191 AC_MSG_ERROR([You need bison to build evolution-data-server])
195 dnl ******************************
196 dnl Test whether jw is installed
197 dnl ******************************
198 AC_PATH_PROG(JW,jw,no)
199 if test x$JW = xno; then
204 AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
207 dnl ******************************
209 dnl ******************************
210 IT_PROG_INTLTOOL([0.35.5])
214 GETTEXT_PACKAGE=evolution-data-server-$BASE_VERSION
215 AC_SUBST(GETTEXT_PACKAGE)
216 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
218 localedir='$(prefix)/$(DATADIRNAME)/locale'
221 dnl ******************************
222 dnl Initialize libtool
223 dnl ******************************
225 LT_INIT(disable-static win32-dll)
229 dnl ******************************
231 dnl ******************************
232 AC_MSG_CHECKING([for Win32])
236 NO_UNDEFINED='-no-undefined'
237 SOCKET_LIBS='-lws2_32 -ldnsapi'
240 LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
241 AC_CACHE_VAL(ac_cv_have_addrinfo, [ac_cv_have_addrinfo=yes])
242 AC_DEFINE(_WIN32_WINNT, 0x501, [To get getaddrinfo etc declarations])
249 SOFTOKN3_LIB='-lsoftokn3'
250 LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
253 AC_MSG_RESULT([$os_win32])
254 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
255 AC_SUBST(NO_UNDEFINED)
256 AC_SUBST(SOCKET_LIBS)
257 AC_SUBST(LIBEXECDIR_IN_SERVER_FILE)
259 dnl **************************************
260 dnl Check for posix compatible sys/wait.h
261 dnl **************************************
264 dnl ************************************
265 dnl Check for posix compatible alloca()
266 dnl ************************************
269 dnl ******************************
270 dnl Checks for functions
271 dnl ******************************
272 AC_CHECK_FUNCS(fsync strptime strtok_r)
274 dnl ***********************************
275 dnl Check for base dependencies early.
276 dnl ***********************************
277 PKG_CHECK_MODULES(GNOME_PLATFORM,
278 [glib-2.0 >= glib_minimum_version
279 gtk+-2.0 >= gtk_minimum_version
280 gconf-2.0 >= gconf_minimum_version
281 libxml-2.0 >= libxml_minimum_version
282 libsoup-2.4 >= libsoup_minimum_version])
284 LIBICAL_REQUIRED=libical_minimum_version
285 AC_SUBST(LIBICAL_REQUIRED)
287 dnl ******************************
289 dnl ******************************
290 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
292 AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
293 [AC_MSG_ERROR([No regex library found])])])
296 dnl ******************************
298 dnl ******************************
300 AS_HELP_STRING([--with-libdb=PREFIX],
301 [Prefix where libdb is installed]),
302 [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
304 DB_CFLAGS="-I$libdb_prefix/include"
305 DB_LIBS="-L$libdb_prefix/lib -ldb"
307 AC_MSG_CHECKING([Berkeley DB])
308 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS
309 save_libs=$LIBS; LIBS="$DB_LIBS"
310 AC_LINK_IFELSE([AC_LANG_PROGRAM(
312 [[db_create(NULL, NULL, 0)]])],
313 [AC_MSG_RESULT([yes])],
314 [AC_MSG_ERROR([Cannot find libdb])])
320 dnl ******************************
322 dnl ******************************
326 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
327 AC_LINK_IFELSE([AC_LANG_PROGRAM(
334 cd = iconv_open ("UTF-8", "ISO-8859-1");
336 )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
338 if test $ac_cv_libiconv = yes; then
340 if test $os_win32 = yes; then
341 dnl Don't pointlessly auto-export the global symbols
342 dnl from a potentially static libiconv.a
343 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
348 AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
351 if test $have_iconv = yes; then
352 if test $ac_cv_libiconv = no; then
353 AC_CHECK_FUNCS(gnu_get_libc_version)
355 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
356 AC_RUN_IFELSE([AC_LANG_SOURCE([[
360 #ifdef HAVE_GNU_GET_LIBC_VERSION
361 #include <gnu/libc-version.h>
364 char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
365 char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
366 char *transbuf = malloc (10), *trans = transbuf;
368 size_t jp_len = strlen (jp), utf8_len = 10;
369 size_t utf8_real_len = strlen (utf8);
371 #ifdef HAVE_GNU_GET_LIBC_VERSION
372 /* glibc 2.1.2's iconv is broken in hard to test ways. */
373 if (!strcmp (gnu_get_libc_version (), "2.1.2"))
377 cd = iconv_open ("UTF-8", "ISO-2022-JP");
378 if (cd == (iconv_t) -1)
380 if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
382 if (memcmp (utf8, transbuf, utf8_real_len) != 0)
386 ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
389 if test "$have_iconv" = no; then
390 AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
394 CFLAGS="$CFLAGS -I$srcdir"
396 AC_MSG_CHECKING([preferred charset name formats for system iconv])
397 AC_RUN_IFELSE([AC_LANG_SOURCE([[
399 #include "iconv-detect.c"
401 [AC_MSG_RESULT([found])],
402 [AC_MSG_RESULT([not found])
404 *** The iconv-detect program was unable to determine the
405 *** preferred charset name formats recognized by your
406 *** iconv library. It is suggested that you install a
407 *** working iconv library such as the one found at
408 *** ftp://ftp.gnu.org/pub/gnu/libiconv
410 [if test x$os_win32 = xyes; then
411 AC_MSG_RESULT([using known win32 result])
412 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
413 echo >>iconv-detect.h
414 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
415 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
416 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
418 AC_MSG_RESULT([unknown])
420 *** We can't determine the preferred charset name formats
421 *** recognized by your iconv library. You are
422 *** cross-compiling and supposed to know what you are doing.
423 *** Please construct the iconv-detect.h file manually.
428 CFLAGS="$save_CFLAGS"
431 dnl **********************************
432 dnl Check for nl_langinfo and CODESET
433 dnl **********************************
434 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
435 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
436 [[#include <langinfo.h>]],
437 [[char *codeset = nl_langinfo (CODESET);]]
438 )],[ac_cv_langinfo_codeset=yes],[ac_cv_langinfo_codeset=no])
439 if test x$ac_cv_langinfo_codeset = xyes; then
440 AC_DEFINE(HAVE_CODESET, 1, [Have nl_langinfo (CODESET)])
442 AC_MSG_RESULT([$ac_cv_langinfo_codeset])
444 dnl *******************************************************
445 dnl Check to see if strftime supports the use of %l and %k
446 dnl *******************************************************
447 AC_MSG_CHECKING([for %l and %k support in strftime])
448 AC_RUN_IFELSE([AC_LANG_SOURCE(
449 [[ #include <stdlib.h>
452 int main(int argc, char **argv) {
458 timeinfo=localtime(&rawtime);
460 strftime(buf, 10, "%lx%k", timeinfo);
462 if (buf[0] == '\0' || buf[0] == 'x' || strstr(buf, "l") || strstr(buf, "k"))
469 )],[AC_DEFINE(HAVE_LKSTRFTIME, 1, [strftime supports use of l and k]) ac_cv_lkstrftime=yes],[ac_cv_lkstrftime=no],[ac_cv_lkstrftime=no])
470 AC_MSG_RESULT([$ac_cv_lkstrftime])
472 dnl ********************************************************************************
473 dnl security extension support (SSL and S/MIME)
475 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
476 dnl needed by Camel (SSL and S/MIME).
478 dnl The Evolution security extensions are only built if these libraries are found
479 dnl ********************************************************************************
484 AS_HELP_STRING([--enable-ssl],
485 [Enable SSL support through Mozilla nss @<:@default=yes@:>@]),
486 [enable_ssl="$enableval"],[enable_ssl="yes"])
488 AC_ARG_ENABLE([smime],
489 AS_HELP_STRING([--enable-smime],
490 [Enable SMIME support through Mozilla nss @<:@default=yes,requires --enable-ssl@:>@ ]),
491 [enable_smime="$enableval"],[enable_smime="yes"])
493 AC_ARG_WITH([nspr-includes],
494 AS_HELP_STRING([--with-nspr-includes],
495 [Prefix of Mozilla nspr4 includes.]),
496 [with_nspr_includes="$withval"])
498 AC_ARG_WITH([nspr-libs],
499 AS_HELP_STRING([--with-nspr-libs],
500 [Prefix of Mozilla nspr4 libs.]),
501 [with_nspr_libs="$withval"])
503 AC_ARG_WITH([nss-includes],
504 AS_HELP_STRING([--with-nss-includes],
505 [Prefix of Mozilla nss3 includes.]),
506 [with_nss_includes="$withval"])
508 AC_ARG_WITH([nss-libs],
509 AS_HELP_STRING([--with-nss-libs],
510 [Prefix of Mozilla nss3 libs.]),
511 [with_nss_libs="$withval"])
513 if test "x${enable_ssl}" = "xyes"; then
514 if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}"; then
520 dnl check if pkg-config files exist (which are only shipped by distributions, not upstream)
521 if test "x${check_manually}" = "xno"; then
522 AC_MSG_CHECKING(Mozilla NSPR pkg-config module name)
523 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
524 for pc in $mozilla_nspr_pcs; do
525 if $PKG_CONFIG --exists $pc; then
532 AC_MSG_CHECKING(Mozilla NSS pkg-config module name)
533 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
534 for pc in $mozilla_nss_pcs; do
535 if $PKG_CONFIG --exists $pc; then
542 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
544 if test "x$enable_smime" = "xyes"; then
545 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
548 AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
549 AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
550 MANUAL_NSPR_CFLAGS=""
561 if test "x${check_manually}" = "xyes"; then
562 dnl ******************
564 dnl ******************
565 AC_MSG_CHECKING([for Mozilla nspr4 includes])
566 CPPFLAGS_save="$CPPFLAGS"
567 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
569 AC_CHECK_HEADERS(nspr.h prio.h,
570 [moz_nspr_includes="yes"],[moz_nspr_includes="no"])
571 CPPFLAGS="$CPPFLAGS_save"
573 if test "x${moz_nspr_includes}" = "xyes"; then
574 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
576 AC_MSG_FAILURE([NSPR headers not found. Use --with-nspr-includes to specify the include dir of NSPR.])
578 AC_MSG_RESULT([$moz_nspr_includes])
580 AC_MSG_CHECKING([for Mozilla nspr libraries])
581 CFLAGS_save="$CFLAGS"
582 LDFLAGS_save="$LDFLAGS"
584 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
586 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
588 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
589 if test -n "${with_nspr_libs}"; then
590 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
595 AC_LINK_IFELSE([AC_LANG_CALL([],[PR_Init])],
596 [moz_nspr_libs="yes"],[moz_nspr_libs="no"])
598 CFLAGS="$CFLAGS_save"
599 LDFLAGS="$LDFLAGS_save"
602 if test "x${moz_nspr_libs}" = "xyes"; then
603 if test -n "${with_nspr_libs}"; then
604 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
606 MANUAL_NSPR_LIBS="$nsprlibs"
609 AC_MSG_FAILURE([NSPR libs not found. Use --with-nspr-libs to specify the libdir of NSPR.])
611 AC_MSG_RESULT([$moz_nspr_libs])
613 dnl *****************
615 dnl *****************
616 AC_MSG_CHECKING([for Mozilla nss3 includes])
617 CPPFLAGS_save="$CPPFLAGS"
618 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
620 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
621 [moz_nss_includes="yes"],[moz_nss_includes="no"])
622 CPPFLAGS="$CPPFLAGS_save"
624 if test "x${moz_nss_includes}" = "xyes"; then
625 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
627 AC_MSG_FAILURE([NSS headers not found. Use --with-nss-includes to specify the include dir of NSS.])
629 AC_MSG_RESULT($moz_nss_includes)
631 AC_MSG_CHECKING([for Mozilla nss libraries])
632 LDFLAGS_save="$LDFLAGS"
634 nsslibs="-lssl3 -lsmime3 -lnss3"
636 LIBS="$nsslibs $nsprlibs"
637 dnl Test to protect from giving libtool an -L , which results in failure (used below,too)
638 if test -n "${with_nss_libs}"; then
639 LDFLAGS="$LDFLAGS -L$with_nss_libs"
641 LDFLAGS="$LDFLAGS $LDFLAGS_NSPR"
644 AC_LINK_IFELSE([AC_LANG_CALL([],[NSS_Init])],
645 [moz_nss_libs="yes"],[moz_nss_libs="no"])
646 LDFLAGS="$LDFLAGS_save"
649 if test "x${moz_nss_libs}" = "xyes"; then
653 if test "x${enable_smime}" = "xyes"; then
654 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
657 if test -n "${with_nss_libs}"; then
658 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
660 MANUAL_NSS_LIBS="$nsslibs"
663 AC_MSG_FAILURE([NSS libs not found. Use --with-nss-libs to specify the libdir of NSS.])
665 AC_MSG_RESULT([$moz_nss_libs])
667 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
668 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
672 AM_CONDITIONAL(ENABLE_SMIME, test "x$msg_smime" != "xno")
674 AC_SUBST(MANUAL_NSPR_CFLAGS)
675 AC_SUBST(MANUAL_NSPR_LIBS)
676 AC_SUBST(MANUAL_NSS_CFLAGS)
677 AC_SUBST(MANUAL_NSS_LIBS)
679 dnl ******************************
680 dnl system mail stuff
681 dnl ******************************
682 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
683 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
685 AC_MSG_CHECKING([system mail directory])
686 if test -d /var/mail -a '!' -h /var/mail ; then
687 system_mail_dir="/var/mail"
689 system_mail_dir="/var/spool/mail"
691 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
693 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
695 CAMEL_LOCK_HELPER_USER=""
696 CAMEL_LOCK_HELPER_GROUP=""
697 system_mail_perm="world writable"
700 CAMEL_LOCK_HELPER_USER=""
701 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
702 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
705 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
706 CAMEL_LOCK_HELPER_GROUP=""
707 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
710 CAMEL_LOCK_HELPER_USER=""
711 CAMEL_LOCK_HELPER_GROUP=""
712 system_mail_perm="???"
716 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
717 AC_SUBST(CAMEL_LOCK_HELPER_USER)
718 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
720 dnl ******************************
722 dnl ******************************
723 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
724 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
725 [[ #include <time.h> ]],
730 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
731 if test $ac_cv_struct_tm_gmtoff = yes; then
732 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
734 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
735 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
736 [[ #include <time.h> ]],
738 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
739 if test $ac_cv_var_timezone = yes; then
740 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
741 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
742 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
743 [[ #include <time.h> ]],
745 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
746 if test $ac_cv_var_altzone = yes; then
747 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
750 AC_MSG_ERROR([unable to find a way to determine timezone])
754 dnl ******************************
755 dnl ctime_r prototype
756 dnl ******************************
757 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
759 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
760 [[ #include <time.h> ]],
763 ctime_r (&date, buf, 100); ]]
764 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
767 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
768 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
771 dnl ******************************
772 dnl gethostbyname_r prototype
773 dnl ******************************
774 AC_CHECK_FUNCS(gethostbyname_r,[
775 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
777 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
779 #include "confdefs.h"
780 #include <sys/types.h>
781 #include <sys/socket.h>
782 #include <netinet/in.h>
784 #define BUFSIZE (sizeof(struct hostent)+10)
788 char buffer[BUFSIZE];
791 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
793 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
796 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
797 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
800 dnl ******************************
801 dnl gethostbyaddr_r prototype
802 dnl ******************************
803 AC_CHECK_FUNCS(gethostbyaddr_r,[
804 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
806 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
808 #include "confdefs.h"
809 #include <sys/types.h>
810 #include <sys/socket.h>
811 #include <netinet/in.h>
813 #define BUFSIZE (sizeof(struct hostent)+10)
817 char buffer[BUFSIZE];
820 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
821 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
824 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
825 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
828 dnl ******************************
829 dnl stat(v)fs location/type
830 dnl ******************************
831 AC_CHECK_HEADER([sys/statvfs.h],
832 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
833 [[ #if HAVE_SYS_STATVFS_H
834 #include <sys/statvfs.h>
837 AC_CHECK_FUNCS(statvfs)
839 AC_CHECK_HEADER([sys/param.h],
840 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
841 [[ #if HAVE_SYS_PARAM_H
842 #include <sys/param.h>
845 AC_CHECK_HEADER([sys/mount.h],
846 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
847 [[ #if HAVE_SYS_MOUNT_H
848 #include <sys/mount.h>
851 AC_CHECK_FUNCS(statfs)
853 dnl ******************************
854 dnl IPv6 support and getaddrinfo calls
855 dnl ******************************
856 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
858 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
859 [[ #include "confdefs.h"
860 #include <sys/types.h>
861 #include <sys/socket.h>
862 #include <netinet/in.h>
866 [[ #ifndef NI_MAXHOST
867 #define NI_MAXHOST 1025
871 #define NI_MAXSERV 32
874 struct addrinfo hints, *res;
875 struct sockaddr_in6 sin6;
877 char host[NI_MAXHOST];
878 char serv[NI_MAXSERV];
880 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
882 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
883 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
886 if test x"$ac_cv_have_addrinfo" = "xno" ; then
887 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
888 if test x"$enable_ipv6" = "xyes" ; then
889 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
893 AC_ARG_ENABLE([ipv6],
894 AS_HELP_STRING([--enable-ipv6=no/yes],
895 [Enable support for resolving IPv6 addresses.]),
896 [enable_ipv6=$enableval],[enable_ipv6=yes])
897 if test x"$enable_ipv6" = "xyes"; then
899 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
900 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
901 [[ #include "confdefs.h"
902 #include <sys/types.h>
903 #include <sys/socket.h>
904 #include <netinet/in.h>
907 [[ struct addrinfo hints;
908 hints.ai_flags = AI_ADDRCONFIG;
910 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
916 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
918 dnl ******************************
920 dnl ******************************
921 AC_MSG_CHECKING([if we should build the calendar])
922 AC_ARG_ENABLE([calendar],
923 AS_HELP_STRING([--enable-calendar=yes/no],
924 [Enable the calendar components (default yes)]),
925 [enable_calendar=$enableval], [enable_calendar=yes])
927 if test "x${enable_calendar}" != "xno"; then
928 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
930 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
931 AC_MSG_RESULT([$enable_calendar])
932 msg_calendar=$enable_calendar
934 dnl **********************************
935 dnl Weather calendar backend support
936 dnl **********************************
937 AC_MSG_CHECKING([if we should build the weather calendar backend])
938 AC_ARG_WITH([weather],
939 [AS_HELP_STRING([--with-weather],
940 [Build the weather calendar backend (default=yes)])],
941 [use_gweather=$withval], [use_gweather=yes])
942 if test "$enable_calendar" = "no"; then
943 use_gweather="no (calendar support is disabled)"
946 AC_MSG_RESULT([$use_gweather])
947 if test "$use_gweather" = "yes"; then
948 PKG_CHECK_MODULES([LIBGWEATHER], [gweather >= gweather_minimum_version],[],
949 [AC_MSG_ERROR([The weather calendar backend requires GWeather >= gweather_minimum_version. Alternatively, you may specify --without-weather as a configure option to avoid building the backend.])])
951 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
953 dnl ******************************
955 dnl ******************************
956 AC_ARG_ENABLE([nntp],
957 AS_HELP_STRING([--enable-nntp],
958 [Build Usenet news (NNTP) backend]),
959 [enable_nntp=$enableval],[enable_nntp=yes])
960 if test "x$enable_nntp" = "xyes"; then
961 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
966 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
968 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
970 dnl ******************************
971 dnl IMAP4rev1 code support.
972 dnl ******************************
974 AS_HELP_STRING([--enable-imap4=no/yes],
975 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
976 [],[enable_imap4=no])
978 if test "x$enable_imap4" = "xyes"; then
979 AC_DEFINE(ENABLE_IMAP4,1,[Really don't try this at home])
984 AM_CONDITIONAL(ENABLE_IMAP4, [test x$enable_imap4 = xyes])
986 dnl ******************************
987 dnl IMAPX code support.
988 dnl ******************************
990 AS_HELP_STRING([--enable-imapx=no/yes],
991 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
992 [],[enable_imapx=no])
994 if test "x$enable_imapx" = "xyes"; then
995 AC_DEFINE(ENABLE_IMAPX,1,[Really don't try this at home])
996 AC_PATH_PROG(GPERF, gperf)
997 if test -z "$GPERF" ; then
998 AC_MSG_ERROR([You need gperf to compile imapx provider])
1004 AM_CONDITIONAL(ENABLE_IMAPX, [test x$enable_imapx = xyes])
1006 dnl ******************************
1008 dnl ******************************
1009 AC_ARG_ENABLE([hula],
1010 AS_HELP_STRING([--enable-hula=no/yes],
1011 [Enable support for the now-defunct Hula project]),
1012 [],[enable_hula=no])
1014 if test "x$enable_hula" = "xyes"; then
1015 AC_DEFINE(ENABLE_HULA,1,[Build Hula backend])
1020 AM_CONDITIONAL(ENABLE_HULA, [test x$enable_hula = xyes])
1022 dnl ******************************
1024 dnl ******************************
1025 AC_ARG_ENABLE([dot-locking],
1026 AS_HELP_STRING([--enable-dot-locking=yes/no],
1027 [Enable support for locking mail files with dot locking]),
1028 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1030 if test $os_win32 != yes -a "x$enable_dot_locking" = "xyes"; then
1031 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1037 AC_ARG_ENABLE([file-locking],
1038 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1039 [Enable support for locking mail files with file locking]),
1040 [],[enable_file_locking=fcntl])
1042 if test $os_win32 != yes -a "x$enable_file_locking" = "xfcntl"; then
1043 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1046 if test $os_win32 != yes -a "x$enable_file_locking" = "xflock"; then
1047 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1054 dnl ******************************
1055 dnl sendmail operation
1056 dnl ******************************
1057 AC_MSG_CHECKING([for SunOS broken spool format])
1058 if test "x$host_os" = "xsunos" ; then
1059 with_broken_spool="yes"
1062 AC_ARG_WITH([broken-spool],
1063 AS_HELP_STRING([--with-broken-spool=yes/no],
1064 [Using SunOS/Solaris sendmail which has a broken spool format]),
1065 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1067 if test "x$with_broken_spool" = "xyes"; then
1068 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1071 AC_MSG_RESULT([$with_broken_spool])
1078 dnl ******************************
1080 dnl ******************************
1083 dnl ******************************
1085 dnl ******************************
1086 if test "$os_win32" != yes; then
1088 case $with_openldap in
1093 case $with_static_ldap in
1095 msg_ldap="$with_openldap (static)"
1098 msg_ldap="$with_openldap (dynamic)"
1103 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1104 if test "$with_openldap" = no ; then
1105 EVO_SUNLDAP_CHECK(no)
1106 case $with_sunldap in
1111 case $with_static_sunldap in
1113 msg_ldap="$with_sunldap (static)"
1116 msg_ldap="$with_sunldap (dynamic)"
1123 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1125 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1127 dnl Win32 LDAP support
1128 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1129 LDAP_LIBS="-lwldap32"
1130 AC_SUBST(LDAP_CFLAGS)
1132 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1133 AM_CONDITIONAL(ENABLE_LDAP, true)
1134 AM_CONDITIONAL(SUNLDAP, false)
1138 DBUS_GLIB_REQUIRED=dbus_glib_minimum_version
1139 AC_SUBST(DBUS_GLIB_REQUIRED)
1141 dnl ******************************
1142 dnl GObject marshalling
1143 dnl ******************************
1146 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1147 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1148 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1150 dnl ******************************
1151 dnl Posix thread support
1152 dnl ******************************
1154 dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
1155 dnl GNOME_PTHREAD_CHECK
1157 dnl if test "x$PTHREAD_LIB" = "x" ; then
1158 dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
1161 dnl Notice that this is a hack, and we wont be able to use this forever, but
1162 dnl at least for some time
1166 THREADS_LIBS="$PTHREAD_LIB"
1167 THREADS_CFLAGS="$PTHREAD_CFLAGS"
1169 AC_SUBST(THREADS_LIBS)
1170 AC_SUBST(THREADS_CFLAGS)
1171 AC_DEFINE(ENABLE_THREADS,1,[Required])
1173 dnl ******************************
1175 dnl ******************************
1176 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_minimum_version)
1177 AC_SUBST(DBUS_GLIB_CFLAGS)
1178 AC_SUBST(DBUS_GLIB_LIBS)
1180 dnl ***********************
1181 dnl Gnome keyring support
1182 dnl ***********************
1183 AC_ARG_ENABLE([gnome-keyring],
1184 AS_HELP_STRING([--enable-gnome-keyring],
1185 [Attempt to use Gnome Keyring for storing passwords @<:@default=yes@:>@]),
1186 [enable_gnome_keyring="$enableval"],[enable_gnome_keyring="yes"])
1188 if test "x${enable_gnome_keyring}" = "xyes"; then
1189 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= gnome_keyring_minimum_version, have_gnome_keyring="yes", have_gnome_keyring="no");
1190 if test "x${have_gnome_keyring}" = "xyes"; then
1191 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Gnome Keyring available])
1192 GNOME_KEYRING_REQUIREMENT="gnome-keyring-1"
1194 AC_MSG_ERROR([gnome-keyring >= gnome_keyring_minimum_version is required for gnome keyring support. Use --disable-gnome-keyring if you want to disable gnome-keyring support.])
1198 dnl ******************************
1199 dnl Utility macro to set compiler flags for a specific lib.
1200 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1201 dnl ******************************
1202 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1203 PKG_CHECK_MODULES([$1], [$2])
1204 $1_CFLAGS="[$]$1_CFLAGS $3 "
1205 $1_LIBS="[$]$1_LIBS $4 "
1208 dnl ******************************
1209 dnl libedataserver flags
1210 dnl ******************************
1211 E_DATA_SERVER_DEPS="libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1213 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
1214 AC_SUBST(E_DATA_SERVER_CFLAGS)
1215 AC_SUBST(E_DATA_SERVER_LIBS)
1217 dnl ******************************
1218 dnl libedataserverui
1219 dnl ******************************
1220 E_DATA_SERVER_UI_DEPS="gtk+-2.0 libxml-2.0 gobject-2.0 gthread-2.0 gconf-2.0 $GNOME_KEYRING_REQUIREMENT"
1222 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, $THREADS_CFLAGS, $THREADS_LIBS)
1223 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1224 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1226 E_BACKEND_DEPS="gobject-2.0 libxml-2.0 gmodule-2.0 gconf-2.0"
1228 dnl ******************************
1229 dnl libebackend flags
1230 dnl ******************************
1231 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1232 AC_SUBST(E_BACKEND_CFLAGS)
1233 AC_SUBST(E_BACKEND_LIBS)
1235 dnl ******************************
1236 dnl evolution-addressbook flags
1237 dnl ******************************
1238 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 dbus-glib-1 gobject-2.0 gthread-2.0 gconf-2.0"
1240 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1241 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1242 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1244 dnl ******************************
1245 dnl evolution-calendar flags
1246 dnl ******************************
1247 if test "x${enable_calendar}" = "xyes"; then
1248 EVOLUTION_CALENDAR_DEPS="libical >= libical_minimum_version libxml-2.0 dbus-glib-1 gio-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
1251 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1252 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1253 dnl to differentiate between <libical/ical.h> and <ical.h>
1254 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1255 dnl libical is fixed, we have to work-around the buggy CFlags.
1257 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1258 LIBICAL_EXTRA_LIBS=""
1259 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1260 AC_SUBST(LIBICAL_EXTRA_LIBS)
1262 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1263 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1264 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1267 dnl ******************************
1269 dnl ******************************
1270 GDATA_DEPS="libsoup-2.4 libxml-2.0"
1271 EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
1272 AC_SUBST(GDATA_CFLAGS)
1273 AC_SUBST(GDATA_LIBS)
1275 dnl ******************************
1277 dnl ******************************
1278 LIBSOUP_REQUIRED=libsoup_minimum_version
1279 AC_SUBST(LIBSOUP_REQUIRED)
1281 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1282 AC_SUBST(SOUP_CFLAGS)
1285 dnl ******************************
1287 dnl ******************************
1288 SQLITE_REQUIRED=sqlite_minimum_version
1289 AC_SUBST(SQLITE_REQUIRED)
1292 dnl deflateInit is a #define, use deflateEnd instead
1293 AC_CHECK_LIB(z, deflateEnd,
1294 [AC_CHECK_HEADER(zlib.h, zlib_found=true)])
1295 if test "x$zlib_found" = "xfalse"; then
1296 AC_MSG_ERROR([*** zlib is required])
1299 dnl ******************************
1300 dnl Checks for large file support
1301 dnl ******************************
1302 AC_ARG_ENABLE([largefile],
1303 AS_HELP_STRING([--enable-largefile],
1304 [enable support for large files [[default=no]]]),
1305 [],[enable_largefile="no"])
1307 if test "x$enable_largefile" != "xno"; then
1309 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1310 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1311 [[ #include <sys/types.h>
1312 #include <sys/stat.h>
1315 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1316 )],[ac_cv_largefile64_source="no"],
1317 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1318 [[ #define _LARGEFILE64_SOURCE
1319 #include <sys/types.h>
1320 #include <sys/stat.h>
1323 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1324 [ac_cv_largefile64_source="unknown"])])
1327 enable_largefile="no"
1329 if test "x$ac_cv_largefile64_source" = "xyes"; then
1330 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1331 enable_largefile="yes"
1332 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1333 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1336 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1337 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1338 enable_largefile="yes"
1341 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1342 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1343 enable_largefile="yes"
1346 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1350 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1352 EVO_SET_COMPILE_FLAGS(CAMEL, $mozilla_nss gio-2.0 sqlite3 >= sqlite_minimum_version gthread-2.0, $THREADS_CFLAGS $KRB5_CFLAGS $MANUAL_NSS_CFLAGS $LARGEFILE_CFLAGS, -lz $THREADS_LIBS $KRB5_LIBS $MANUAL_NSS_LIBS)
1353 AC_SUBST(CAMEL_CFLAGS)
1354 AC_SUBST(CAMEL_LIBS)
1355 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1356 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1358 dnl ******************************
1359 dnl Special directories
1360 dnl ******************************
1362 dnl If you add something here, consider whether or not you also
1363 dnl need to add it to one or more .pc.in files (for Connector,
1366 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1367 AC_SUBST(privdatadir)
1369 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1370 AC_SUBST(privincludedir)
1372 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1373 AC_SUBST(privlibdir)
1375 imagesdir='${datadir}'/pixmaps/evolution-data-server
1378 extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
1379 AC_SUBST(extensiondir)
1381 uidir="$privdatadir/ui"
1384 if test $use_gweather = yes; then
1385 weatherdatadir="$privdatadir/weather"
1386 AC_SUBST(weatherdatadir)
1389 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1390 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
1391 AC_SUBST(camel_providerdir)
1393 dnl ******************************
1394 dnl IDL/Component Versioning
1395 dnl ******************************
1396 INTERFACE_VERSION="$BASE_VERSION"
1397 AC_SUBST(INTERFACE_VERSION)
1398 AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "$INTERFACE_VERSION", [IDL interface version (Major.Minor)])
1400 EVO_SUBST_SERVER_RULE='%.server.in: %.server.in.in ; sed -e "s|\@BINDIR\@|$(bindir)|" -e "s|\@LIBEXECDIR_IN_SERVER_FILE\@|$(LIBEXECDIR_IN_SERVER_FILE)|" -e "s|\@COMPONENTDIR\@|$(componentdir)|" -e "s|\@IMPORTERSDIR\@|$(importersdir)|" -e "s|\@EXEEXT\@|$(EXEEXT)|" -e "s|\@VERSION\@|$(BASE_VERSION)|" -e "s|\@API_VERSION\@|$(API_VERSION)|" -e "s|\@INTERFACE_VERSION\@|$(INTERFACE_VERSION)|" $< > $@'
1401 EVO_NAME_SERVER_RULE='%_$(API_VERSION).server: %.server ; mv $< $@'
1402 AC_SUBST(EVO_SUBST_SERVER_RULE)
1403 AC_SUBST(EVO_NAME_SERVER_RULE)
1405 dnl *******************
1406 dnl D-BUS service stuff
1407 dnl *******************
1408 EVO_SUBST_SERVICE_RULE='%.service: %.service.in Makefile ; sed -e "s|\@BINDIR\@|$(bindir)|" -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@COMPONENTDIR\@|$(componentdir)|" -e "s|\@IMPORTERSDIR\@|$(importersdir)|" -e "s|\@VERSION\@|$(BASE_VERSION)|" -e "s|\@INTERFACE_VERSION\@|$(INTERFACE_VERSION)|" $< > $@'
1409 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1411 dnl ******************************
1413 dnl ******************************
1414 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1417 dnl ******************************
1419 dnl ******************************
1422 dnl ******************************
1424 dnl ******************************
1426 export privincludedir
1431 evolution-data-server-zip
1432 evolution-data-server.pc
1433 addressbook/Makefile
1434 addressbook/libebook/Makefile
1435 addressbook/libebook/libebook.pc
1436 addressbook/libedata-book/Makefile
1437 addressbook/libedata-book/libedata-book.pc
1438 addressbook/backends/Makefile
1439 addressbook/backends/file/Makefile
1440 addressbook/backends/vcf/Makefile
1441 addressbook/backends/ldap/Makefile
1442 addressbook/backends/google/Makefile
1443 addressbook/backends/groupwise/Makefile
1444 addressbook/backends/webdav/Makefile
1445 addressbook/tests/Makefile
1446 addressbook/tests/ebook/Makefile
1447 addressbook/tests/vcard/Makefile
1450 calendar/libecal/Makefile
1451 calendar/libecal/libecal.pc
1452 calendar/libedata-cal/Makefile
1453 calendar/libedata-cal/libedata-cal.pc
1454 calendar/backends/Makefile
1455 calendar/backends/caldav/Makefile
1456 calendar/backends/file/Makefile
1457 calendar/backends/groupwise/Makefile
1458 calendar/backends/http/Makefile
1459 calendar/backends/contacts/Makefile
1460 calendar/backends/weather/Makefile
1461 calendar/backends/google/Makefile
1462 calendar/tests/Makefile
1463 calendar/tests/ecal/Makefile
1465 camel/providers/Makefile
1466 camel/providers/groupwise/Makefile
1467 camel/providers/hula/Makefile
1468 camel/providers/imap/Makefile
1469 camel/providers/imapx/Makefile
1470 camel/providers/imap4/Makefile
1471 camel/providers/local/Makefile
1472 camel/providers/nntp/Makefile
1473 camel/providers/pop3/Makefile
1474 camel/providers/sendmail/Makefile
1475 camel/providers/smtp/Makefile
1476 camel/tests/Makefile
1477 camel/tests/folder/Makefile
1478 camel/tests/lib/Makefile
1479 camel/tests/message/Makefile
1480 camel/tests/mime-filter/Makefile
1481 camel/tests/misc/Makefile
1482 camel/tests/smime/Makefile
1483 camel/tests/stream/Makefile
1485 camel/camel-provider.pc
1486 libebackend/Makefile
1487 libebackend/libebackend.pc
1488 libedataserver/Makefile
1489 libedataserver/eds-version.h
1490 libedataserver/libedataserver.pc
1491 libedataserverui/Makefile
1492 libedataserverui/libedataserverui.pc
1494 servers/groupwise/Makefile
1495 servers/groupwise/libegroupwise.pc
1496 servers/google/Makefile
1497 servers/google/libgdata/Makefile
1498 servers/google/libgdata/libgdata.pc
1499 servers/google/libgdata-google/Makefile
1500 servers/google/libgdata-google/libgdata-google.pc
1503 docs/reference/Makefile
1504 docs/reference/addressbook/Makefile
1505 docs/reference/addressbook/libebook/Makefile
1506 docs/reference/addressbook/libedata-book/Makefile
1507 docs/reference/calendar/Makefile
1508 docs/reference/calendar/libecal/Makefile
1509 docs/reference/calendar/libedata-cal/Makefile
1510 docs/reference/camel/Makefile
1511 docs/reference/libedataserver/Makefile
1512 docs/reference/libedataserverui/Makefile
1513 docs/reference/libebackend/Makefile
1519 evolution-data-server has been configured as follows:
1520 Calendar: $msg_calendar
1521 Weather calendar: $use_gweather
1522 Mail Directory: $system_mail_dir, $system_mail_perm
1523 LDAP support: $msg_ldap
1524 NNTP support: $msg_nntp
1525 Kerberos 5: $msg_krb5
1526 Gnome Keyring: $enable_gnome_keyring
1527 SSL support: $msg_ssl
1528 SMIME support: $msg_smime
1529 IPv6 support: $msg_ipv6
1530 Dot Locking: $msg_dot
1531 File Locking: $msg_file
1532 Large files: $enable_largefile
1533 Gtk Doc: $enable_gtk_doc
1535 if test "$msg_hula" = "yes"; then
1536 echo "Hula support: $msg_hula"
1539 if test "$msg_imapx" = "yes"; then
1541 IMAPX support: $msg_imapx