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 dnl For pkgconfig files.
675 AC_SUBST(mozilla_nss)
676 AC_SUBST(mozilla_nspr)
678 AC_SUBST(MANUAL_NSPR_CFLAGS)
679 AC_SUBST(MANUAL_NSPR_LIBS)
680 AC_SUBST(MANUAL_NSS_CFLAGS)
681 AC_SUBST(MANUAL_NSS_LIBS)
683 dnl ******************************
684 dnl system mail stuff
685 dnl ******************************
686 AC_PATH_PROG(SENDMAIL, sendmail, [/usr/sbin/sendmail], [/usr/sbin:/usr/lib])
687 AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL", [Path to a sendmail binary, or equivalent])
689 AC_MSG_CHECKING([system mail directory])
690 if test -d /var/mail -a '!' -h /var/mail ; then
691 system_mail_dir="/var/mail"
693 system_mail_dir="/var/spool/mail"
695 AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir", [Directory local mail is delivered to])
697 case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
699 CAMEL_LOCK_HELPER_USER=""
700 CAMEL_LOCK_HELPER_GROUP=""
701 system_mail_perm="world writable"
704 CAMEL_LOCK_HELPER_USER=""
705 CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
706 system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
709 CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
710 CAMEL_LOCK_HELPER_GROUP=""
711 system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
714 CAMEL_LOCK_HELPER_USER=""
715 CAMEL_LOCK_HELPER_GROUP=""
716 system_mail_perm="???"
720 AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
721 AC_SUBST(CAMEL_LOCK_HELPER_USER)
722 AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
724 dnl ******************************
726 dnl ******************************
727 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
728 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
729 [[ #include <time.h> ]],
734 )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
735 if test $ac_cv_struct_tm_gmtoff = yes; then
736 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
738 AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
739 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
740 [[ #include <time.h> ]],
742 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
743 if test $ac_cv_var_timezone = yes; then
744 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
745 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
746 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
747 [[ #include <time.h> ]],
749 )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
750 if test $ac_cv_var_altzone = yes; then
751 AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
754 AC_MSG_ERROR([unable to find a way to determine timezone])
758 dnl ******************************
759 dnl ctime_r prototype
760 dnl ******************************
761 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
763 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
764 [[ #include <time.h> ]],
767 ctime_r (&date, buf, 100); ]]
768 )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
771 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
772 AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
775 dnl ******************************
776 dnl gethostbyname_r prototype
777 dnl ******************************
778 AC_CHECK_FUNCS(gethostbyname_r,[
779 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
781 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
783 #include "confdefs.h"
784 #include <sys/types.h>
785 #include <sys/socket.h>
786 #include <netinet/in.h>
788 #define BUFSIZE (sizeof(struct hostent)+10)
792 char buffer[BUFSIZE];
795 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
797 )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
800 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
801 AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
804 dnl ******************************
805 dnl gethostbyaddr_r prototype
806 dnl ******************************
807 AC_CHECK_FUNCS(gethostbyaddr_r,[
808 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
810 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
812 #include "confdefs.h"
813 #include <sys/types.h>
814 #include <sys/socket.h>
815 #include <netinet/in.h>
817 #define BUFSIZE (sizeof(struct hostent)+10)
821 char buffer[BUFSIZE];
824 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
825 )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
828 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
829 AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
832 dnl ******************************
833 dnl stat(v)fs location/type
834 dnl ******************************
835 AC_CHECK_HEADER([sys/statvfs.h],
836 [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
837 [[ #if HAVE_SYS_STATVFS_H
838 #include <sys/statvfs.h>
841 AC_CHECK_FUNCS(statvfs)
843 AC_CHECK_HEADER([sys/param.h],
844 [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
845 [[ #if HAVE_SYS_PARAM_H
846 #include <sys/param.h>
849 AC_CHECK_HEADER([sys/mount.h],
850 [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
851 [[ #if HAVE_SYS_MOUNT_H
852 #include <sys/mount.h>
855 AC_CHECK_FUNCS(statfs)
857 dnl ******************************
858 dnl IPv6 support and getaddrinfo calls
859 dnl ******************************
860 AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], [ac_cv_have_addrinfo],
862 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
863 [[ #include "confdefs.h"
864 #include <sys/types.h>
865 #include <sys/socket.h>
866 #include <netinet/in.h>
870 [[ #ifndef NI_MAXHOST
871 #define NI_MAXHOST 1025
875 #define NI_MAXSERV 32
878 struct addrinfo hints, *res;
879 struct sockaddr_in6 sin6;
881 char host[NI_MAXHOST];
882 char serv[NI_MAXSERV];
884 getaddrinfo ("www.ximian.com", NULL, &hints, &res);
886 getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0); ]]
887 )],[ac_cv_have_addrinfo=yes],[ac_cv_have_addrinfo=no])
890 if test x"$ac_cv_have_addrinfo" = "xno" ; then
891 AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
892 if test x"$enable_ipv6" = "xyes" ; then
893 AC_MSG_ERROR([system doesn't support necessary interfaces for ipv6 support])
897 AC_ARG_ENABLE([ipv6],
898 AS_HELP_STRING([--enable-ipv6=no/yes],
899 [Enable support for resolving IPv6 addresses.]),
900 [enable_ipv6=$enableval],[enable_ipv6=yes])
901 if test x"$enable_ipv6" = "xyes"; then
903 AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
904 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
905 [[ #include "confdefs.h"
906 #include <sys/types.h>
907 #include <sys/socket.h>
908 #include <netinet/in.h>
911 [[ struct addrinfo hints;
912 hints.ai_flags = AI_ADDRCONFIG;
914 )],[AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])],[])
920 AM_CONDITIONAL(ENABLE_IPv6, [test "x$enable_ipv6" = "xyes"])
922 dnl ******************************
924 dnl ******************************
925 AC_MSG_CHECKING([if we should build the calendar])
926 AC_ARG_ENABLE([calendar],
927 AS_HELP_STRING([--enable-calendar=yes/no],
928 [Enable the calendar components (default yes)]),
929 [enable_calendar=$enableval], [enable_calendar=yes])
931 if test "x${enable_calendar}" != "xno"; then
932 AC_DEFINE(ENABLE_CALENDAR, 1, [Define if Calendar should be built])
934 AM_CONDITIONAL(ENABLE_CALENDAR, [test x$enable_calendar = xyes])
935 AC_MSG_RESULT([$enable_calendar])
936 msg_calendar=$enable_calendar
938 dnl **********************************
939 dnl Weather calendar backend support
940 dnl **********************************
941 AC_MSG_CHECKING([if we should build the weather calendar backend])
942 AC_ARG_WITH([weather],
943 [AS_HELP_STRING([--with-weather],
944 [Build the weather calendar backend (default=yes)])],
945 [use_gweather=$withval], [use_gweather=yes])
946 if test "$enable_calendar" = "no"; then
947 use_gweather="no (calendar support is disabled)"
950 AC_MSG_RESULT([$use_gweather])
951 if test "$use_gweather" = "yes"; then
952 PKG_CHECK_MODULES([LIBGWEATHER], [gweather >= gweather_minimum_version],[],
953 [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.])])
955 AM_CONDITIONAL(ENABLE_WEATHER, [test $use_gweather = yes])
957 dnl ******************************
959 dnl ******************************
960 AC_ARG_ENABLE([nntp],
961 AS_HELP_STRING([--enable-nntp],
962 [Build Usenet news (NNTP) backend]),
963 [enable_nntp=$enableval],[enable_nntp=yes])
964 if test "x$enable_nntp" = "xyes"; then
965 AC_DEFINE(ENABLE_NNTP,1,[Build NNTP backend])
970 AM_CONDITIONAL(ENABLE_NNTP, [test x$enable_nntp = xyes])
972 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
974 dnl ******************************
975 dnl IMAP4rev1 code support.
976 dnl ******************************
978 AS_HELP_STRING([--enable-imap4=no/yes],
979 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
980 [],[enable_imap4=no])
982 if test "x$enable_imap4" = "xyes"; then
983 AC_DEFINE(ENABLE_IMAP4,1,[Really don't try this at home])
988 AM_CONDITIONAL(ENABLE_IMAP4, [test x$enable_imap4 = xyes])
990 dnl ******************************
991 dnl IMAPX code support.
992 dnl ******************************
994 AS_HELP_STRING([--enable-imapx=no/yes],
995 [Attempt to compile yet another, incomplete, very unsupported IMAPv4r1 implementation]),
996 [],[enable_imapx=no])
998 if test "x$enable_imapx" = "xyes"; then
999 AC_DEFINE(ENABLE_IMAPX,1,[Really don't try this at home])
1000 AC_PATH_PROG(GPERF, gperf)
1001 if test -z "$GPERF" ; then
1002 AC_MSG_ERROR([You need gperf to compile imapx provider])
1008 AM_CONDITIONAL(ENABLE_IMAPX, [test x$enable_imapx = xyes])
1010 dnl ******************************
1012 dnl ******************************
1013 AC_ARG_ENABLE([hula],
1014 AS_HELP_STRING([--enable-hula=no/yes],
1015 [Enable support for the now-defunct Hula project]),
1016 [],[enable_hula=no])
1018 if test "x$enable_hula" = "xyes"; then
1019 AC_DEFINE(ENABLE_HULA,1,[Build Hula backend])
1024 AM_CONDITIONAL(ENABLE_HULA, [test x$enable_hula = xyes])
1026 dnl ******************************
1028 dnl ******************************
1029 AC_ARG_ENABLE([dot-locking],
1030 AS_HELP_STRING([--enable-dot-locking=yes/no],
1031 [Enable support for locking mail files with dot locking]),
1032 [enable_dot_locking=$enableval],[enable_dot_locking=yes])
1034 if test $os_win32 != yes -a "x$enable_dot_locking" = "xyes"; then
1035 AC_DEFINE(USE_DOT,1,[Define to use dot locking for mbox files])
1041 AC_ARG_ENABLE([file-locking],
1042 AS_HELP_STRING([--enable-file-locking=fcntl/flock/no],
1043 [Enable support for locking mail files with file locking]),
1044 [],[enable_file_locking=fcntl])
1046 if test $os_win32 != yes -a "x$enable_file_locking" = "xfcntl"; then
1047 AC_DEFINE(USE_FCNTL,1,[Define to use fcntl locking for mbox files])
1050 if test $os_win32 != yes -a "x$enable_file_locking" = "xflock"; then
1051 AC_DEFINE(USE_FLOCK,1,[Define to use flock locking for mbox files])
1058 dnl ******************************
1059 dnl sendmail operation
1060 dnl ******************************
1061 AC_MSG_CHECKING([for SunOS broken spool format])
1062 if test "x$host_os" = "xsunos" ; then
1063 with_broken_spool="yes"
1066 AC_ARG_WITH([broken-spool],
1067 AS_HELP_STRING([--with-broken-spool=yes/no],
1068 [Using SunOS/Solaris sendmail which has a broken spool format]),
1069 [with_broken_spool=$enableval],[with_broken_spool=${with_broken_spool:=no}])
1071 if test "x$with_broken_spool" = "xyes"; then
1072 AC_DEFINE(HAVE_BROKEN_SPOOL,1,[Define if mail delivered to the system mail directory is in broken Content-Length format])
1075 AC_MSG_RESULT([$with_broken_spool])
1082 dnl ******************************
1084 dnl ******************************
1087 dnl ******************************
1089 dnl ******************************
1090 if test "$os_win32" != yes; then
1092 case $with_openldap in
1097 case $with_static_ldap in
1099 msg_ldap="$with_openldap (static)"
1102 msg_ldap="$with_openldap (dynamic)"
1107 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
1108 if test "$with_openldap" = no ; then
1109 EVO_SUNLDAP_CHECK(no)
1110 case $with_sunldap in
1115 case $with_static_sunldap in
1117 msg_ldap="$with_sunldap (static)"
1120 msg_ldap="$with_sunldap (dynamic)"
1127 AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
1129 LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
1131 dnl Win32 LDAP support
1132 LDAP_CFLAGS="-DLDAP_DEPRECATED"
1133 LDAP_LIBS="-lwldap32"
1134 AC_SUBST(LDAP_CFLAGS)
1136 AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
1137 AM_CONDITIONAL(ENABLE_LDAP, true)
1138 AM_CONDITIONAL(SUNLDAP, false)
1142 DBUS_GLIB_REQUIRED=dbus_glib_minimum_version
1143 AC_SUBST(DBUS_GLIB_REQUIRED)
1145 dnl ******************************
1146 dnl GObject marshalling
1147 dnl ******************************
1150 dnl We use AC_SUBST_FILE because AC_SUBST won't deal with newlines
1151 EVO_MARSHAL_RULE=$srcdir/marshal.mk
1152 AC_SUBST_FILE(EVO_MARSHAL_RULE)
1154 dnl ******************************
1155 dnl Posix thread support
1156 dnl ******************************
1158 dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config}
1159 dnl GNOME_PTHREAD_CHECK
1161 dnl if test "x$PTHREAD_LIB" = "x" ; then
1162 dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution])
1165 dnl Notice that this is a hack, and we wont be able to use this forever, but
1166 dnl at least for some time
1170 THREADS_LIBS="$PTHREAD_LIB"
1171 THREADS_CFLAGS="$PTHREAD_CFLAGS"
1173 AC_SUBST(THREADS_LIBS)
1174 AC_SUBST(THREADS_CFLAGS)
1175 AC_DEFINE(ENABLE_THREADS,1,[Required])
1177 dnl ******************************
1179 dnl ******************************
1180 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_minimum_version)
1181 AC_SUBST(DBUS_GLIB_CFLAGS)
1182 AC_SUBST(DBUS_GLIB_LIBS)
1184 dnl ***********************
1185 dnl Gnome keyring support
1186 dnl ***********************
1187 AC_ARG_ENABLE([gnome-keyring],
1188 AS_HELP_STRING([--enable-gnome-keyring],
1189 [Attempt to use Gnome Keyring for storing passwords @<:@default=yes@:>@]),
1190 [enable_gnome_keyring="$enableval"],[enable_gnome_keyring="yes"])
1192 if test "x${enable_gnome_keyring}" = "xyes"; then
1193 PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= gnome_keyring_minimum_version, have_gnome_keyring="yes", have_gnome_keyring="no");
1194 if test "x${have_gnome_keyring}" = "xyes"; then
1195 AC_DEFINE(WITH_GNOME_KEYRING, 1, [Gnome Keyring available])
1196 GNOME_KEYRING_REQUIREMENT="gnome-keyring-1"
1198 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.])
1202 dnl ******************************
1203 dnl Utility macro to set compiler flags for a specific lib.
1204 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1205 dnl ******************************
1206 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1207 PKG_CHECK_MODULES([$1], [$2])
1208 $1_CFLAGS="[$]$1_CFLAGS $3 "
1209 $1_LIBS="[$]$1_LIBS $4 "
1212 dnl ******************************
1213 dnl libedataserver flags
1214 dnl ******************************
1215 E_DATA_SERVER_DEPS="libxml-2.0 libsoup-2.4 gconf-2.0 $mozilla_nspr"
1217 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS)
1218 AC_SUBST(E_DATA_SERVER_CFLAGS)
1219 AC_SUBST(E_DATA_SERVER_LIBS)
1221 dnl ******************************
1222 dnl libedataserverui
1223 dnl ******************************
1224 E_DATA_SERVER_UI_DEPS="gtk+-2.0 libxml-2.0 gobject-2.0 gthread-2.0 gconf-2.0 $GNOME_KEYRING_REQUIREMENT"
1226 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, $THREADS_CFLAGS, $THREADS_LIBS)
1227 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
1228 AC_SUBST(E_DATA_SERVER_UI_LIBS)
1230 E_BACKEND_DEPS="gobject-2.0 libxml-2.0 gmodule-2.0 gconf-2.0"
1232 dnl ******************************
1233 dnl libebackend flags
1234 dnl ******************************
1235 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
1236 AC_SUBST(E_BACKEND_CFLAGS)
1237 AC_SUBST(E_BACKEND_LIBS)
1239 dnl ******************************
1240 dnl evolution-addressbook flags
1241 dnl ******************************
1242 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 dbus-glib-1 gobject-2.0 gthread-2.0 gconf-2.0"
1244 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1245 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1246 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1248 dnl ******************************
1249 dnl evolution-calendar flags
1250 dnl ******************************
1251 if test "x${enable_calendar}" = "xyes"; then
1252 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"
1255 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
1256 dnl It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
1257 dnl to differentiate between <libical/ical.h> and <ical.h>
1258 dnl We have fixed all our instances to use <libical/ical.h>. Until the .pc from
1259 dnl libical is fixed, we have to work-around the buggy CFlags.
1261 LIBICAL_EXTRA_CFLAGS=" -I`$PKG_CONFIG --variable=includedir libical` "
1262 LIBICAL_EXTRA_LIBS=""
1263 AC_SUBST(LIBICAL_EXTRA_CFLAGS)
1264 AC_SUBST(LIBICAL_EXTRA_LIBS)
1266 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
1267 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1268 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1271 dnl ******************************
1273 dnl ******************************
1274 GDATA_DEPS="libsoup-2.4 libxml-2.0"
1275 EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
1276 AC_SUBST(GDATA_CFLAGS)
1277 AC_SUBST(GDATA_LIBS)
1279 dnl ******************************
1281 dnl ******************************
1282 LIBSOUP_REQUIRED=libsoup_minimum_version
1283 AC_SUBST(LIBSOUP_REQUIRED)
1285 EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.4)
1286 AC_SUBST(SOUP_CFLAGS)
1289 dnl ******************************
1291 dnl ******************************
1292 SQLITE_REQUIRED=sqlite_minimum_version
1293 AC_SUBST(SQLITE_REQUIRED)
1296 dnl deflateInit is a #define, use deflateEnd instead
1297 AC_CHECK_LIB(z, deflateEnd,
1298 [AC_CHECK_HEADER(zlib.h, zlib_found=true)])
1299 if test "x$zlib_found" = "xfalse"; then
1300 AC_MSG_ERROR([*** zlib is required])
1303 dnl ******************************
1304 dnl Checks for large file support
1305 dnl ******************************
1306 AC_ARG_ENABLE([largefile],
1307 AS_HELP_STRING([--enable-largefile],
1308 [enable support for large files [[default=no]]]),
1309 [],[enable_largefile="no"])
1311 if test "x$enable_largefile" != "xno"; then
1313 AC_CACHE_CHECK([for _LARGEFILE64_SOURCE value needed for large files], [ac_cv_largefile64_source],
1314 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1315 [[ #include <sys/types.h>
1316 #include <sys/stat.h>
1319 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]]
1320 )],[ac_cv_largefile64_source="no"],
1321 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1322 [[ #define _LARGEFILE64_SOURCE
1323 #include <sys/types.h>
1324 #include <sys/stat.h>
1327 [[ int fd = open ("__o_largefile", O_CREAT | O_RDWR | O_LARGEFILE, 0644); ]])],[ac_cv_largefile64_source="yes"],
1328 [ac_cv_largefile64_source="unknown"])])
1331 enable_largefile="no"
1333 if test "x$ac_cv_largefile64_source" = "xyes"; then
1334 LARGEFILE_CFLAGS="-D_LARGEFILE64_SOURCE"
1335 enable_largefile="yes"
1336 elif test "x$ac_cv_largefile64_source" = "xunknown"; then
1337 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1340 if test -n "$ac_cv_sys_large_files" -a "x$ac_cv_sys_large_files" != "xno"; then
1341 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGE_FILES"
1342 enable_largefile="yes"
1345 if test "x$ac_cv_sys_file_offset_bits" != "xno"; then
1346 LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
1347 enable_largefile="yes"
1350 AC_DEFINE(O_LARGEFILE, 0, [Define to 0 if your system does not have the O_LARGEFILE flag])
1354 AM_CONDITIONAL(ENABLE_LARGEFILE, [test "x$enable_largefile" = "xyes"])
1356 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)
1357 AC_SUBST(CAMEL_CFLAGS)
1358 AC_SUBST(CAMEL_LIBS)
1359 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1360 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1362 dnl ******************************
1363 dnl Special directories
1364 dnl ******************************
1366 dnl If you add something here, consider whether or not you also
1367 dnl need to add it to one or more .pc.in files (for Connector,
1370 privdatadir='${datadir}'/evolution-data-server-$BASE_VERSION
1371 AC_SUBST(privdatadir)
1373 privincludedir='${includedir}'/evolution-data-server-$BASE_VERSION
1374 AC_SUBST(privincludedir)
1376 privlibdir='${libdir}'/evolution-data-server-$BASE_VERSION
1377 AC_SUBST(privlibdir)
1379 imagesdir='${datadir}'/pixmaps/evolution-data-server
1382 extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
1383 AC_SUBST(extensiondir)
1385 uidir="$privdatadir/ui"
1388 if test $use_gweather = yes; then
1389 weatherdatadir="$privdatadir/weather"
1390 AC_SUBST(weatherdatadir)
1393 dnl separate camel from e-d-s? or should it be under the same spot? same for now.
1394 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
1395 AC_SUBST(camel_providerdir)
1397 dnl ******************************
1398 dnl IDL/Component Versioning
1399 dnl ******************************
1400 INTERFACE_VERSION="$BASE_VERSION"
1401 AC_SUBST(INTERFACE_VERSION)
1402 AC_DEFINE_UNQUOTED(INTERFACE_VERSION, "$INTERFACE_VERSION", [IDL interface version (Major.Minor)])
1404 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)|" $< > $@'
1405 EVO_NAME_SERVER_RULE='%_$(API_VERSION).server: %.server ; mv $< $@'
1406 AC_SUBST(EVO_SUBST_SERVER_RULE)
1407 AC_SUBST(EVO_NAME_SERVER_RULE)
1409 dnl *******************
1410 dnl D-BUS service stuff
1411 dnl *******************
1412 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)|" $< > $@'
1413 AC_SUBST(EVO_SUBST_SERVICE_RULE)
1415 dnl ******************************
1417 dnl ******************************
1418 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1421 dnl ******************************
1423 dnl ******************************
1426 dnl ******************************
1428 dnl ******************************
1430 export privincludedir
1435 evolution-data-server-zip
1436 evolution-data-server.pc
1437 addressbook/Makefile
1438 addressbook/libebook/Makefile
1439 addressbook/libebook/libebook.pc
1440 addressbook/libedata-book/Makefile
1441 addressbook/libedata-book/libedata-book.pc
1442 addressbook/backends/Makefile
1443 addressbook/backends/file/Makefile
1444 addressbook/backends/vcf/Makefile
1445 addressbook/backends/ldap/Makefile
1446 addressbook/backends/google/Makefile
1447 addressbook/backends/groupwise/Makefile
1448 addressbook/backends/webdav/Makefile
1449 addressbook/tests/Makefile
1450 addressbook/tests/ebook/Makefile
1451 addressbook/tests/vcard/Makefile
1454 calendar/libecal/Makefile
1455 calendar/libecal/libecal.pc
1456 calendar/libedata-cal/Makefile
1457 calendar/libedata-cal/libedata-cal.pc
1458 calendar/backends/Makefile
1459 calendar/backends/caldav/Makefile
1460 calendar/backends/file/Makefile
1461 calendar/backends/groupwise/Makefile
1462 calendar/backends/http/Makefile
1463 calendar/backends/contacts/Makefile
1464 calendar/backends/weather/Makefile
1465 calendar/backends/google/Makefile
1466 calendar/tests/Makefile
1467 calendar/tests/ecal/Makefile
1469 camel/providers/Makefile
1470 camel/providers/groupwise/Makefile
1471 camel/providers/hula/Makefile
1472 camel/providers/imap/Makefile
1473 camel/providers/imapx/Makefile
1474 camel/providers/imap4/Makefile
1475 camel/providers/local/Makefile
1476 camel/providers/nntp/Makefile
1477 camel/providers/pop3/Makefile
1478 camel/providers/sendmail/Makefile
1479 camel/providers/smtp/Makefile
1480 camel/tests/Makefile
1481 camel/tests/folder/Makefile
1482 camel/tests/lib/Makefile
1483 camel/tests/message/Makefile
1484 camel/tests/mime-filter/Makefile
1485 camel/tests/misc/Makefile
1486 camel/tests/smime/Makefile
1487 camel/tests/stream/Makefile
1489 camel/camel-provider.pc
1490 libebackend/Makefile
1491 libebackend/libebackend.pc
1492 libedataserver/Makefile
1493 libedataserver/eds-version.h
1494 libedataserver/libedataserver.pc
1495 libedataserverui/Makefile
1496 libedataserverui/libedataserverui.pc
1498 servers/groupwise/Makefile
1499 servers/groupwise/libegroupwise.pc
1500 servers/google/Makefile
1501 servers/google/libgdata/Makefile
1502 servers/google/libgdata/libgdata.pc
1503 servers/google/libgdata-google/Makefile
1504 servers/google/libgdata-google/libgdata-google.pc
1507 docs/reference/Makefile
1508 docs/reference/addressbook/Makefile
1509 docs/reference/addressbook/libebook/Makefile
1510 docs/reference/addressbook/libedata-book/Makefile
1511 docs/reference/calendar/Makefile
1512 docs/reference/calendar/libecal/Makefile
1513 docs/reference/calendar/libedata-cal/Makefile
1514 docs/reference/camel/Makefile
1515 docs/reference/libedataserver/Makefile
1516 docs/reference/libedataserverui/Makefile
1517 docs/reference/libebackend/Makefile
1523 evolution-data-server has been configured as follows:
1524 Calendar: $msg_calendar
1525 Weather calendar: $use_gweather
1526 Mail Directory: $system_mail_dir, $system_mail_perm
1527 LDAP support: $msg_ldap
1528 NNTP support: $msg_nntp
1529 Kerberos 5: $msg_krb5
1530 Gnome Keyring: $enable_gnome_keyring
1531 SSL support: $msg_ssl
1532 SMIME support: $msg_smime
1533 IPv6 support: $msg_ipv6
1534 Dot Locking: $msg_dot
1535 File Locking: $msg_file
1536 Large files: $enable_largefile
1537 Gtk Doc: $enable_gtk_doc
1539 if test "$msg_hula" = "yes"; then
1540 echo "Hula support: $msg_hula"
1543 if test "$msg_imapx" = "yes"; then
1545 IMAPX support: $msg_imapx