[l10n] Updated German help translation screen-shots
[evolution.git] / configure.ac
blob5c2c5edf2a3477732ea03db7b325b40812041e75
1 dnl Evolution Versions
2 m4_define([evo_major_version], [3])
3 m4_define([evo_minor_version], [1])
4 m4_define([evo_micro_version], [90])
5 m4_define([evo_version],
6         [evo_major_version.evo_minor_version.evo_micro_version])
7 m4_define([evo_stable_version],
8         [m4_if(m4_eval(evo_minor_version % 2), [1],
9         [evo_major_version.m4_eval(evo_minor_version - 1)],
10         [evo_version])])
12 dnl Base Version: This is for API/version tracking for things like
13 dnl Bonobo server files.  This should always be the major/minor of
14 dnl the stable version or stable version to be.  Note, this is set
15 dnl the way it is so that GETTEXT_PACKAGE will be parsed correctly.
16 BASE_VERSION=3.2
17 m4_define([base_version], [3.2])
19 dnl Upgrade Revision: This is for triggering migration calls between
20 dnl varying versions. Reset to 0 whenever BASE_VERSION changes.
21 m4_define([upgrade_revision], [0])
23 dnl Autoconf / Automake Initialization
24 AC_PREREQ(2.58)
25 AC_INIT([evolution],[evo_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution])
26 AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign])
27 AC_CONFIG_MACRO_DIR([m4])
28 AC_CONFIG_HEADERS(config.h)
29 AC_CONFIG_SRCDIR(README)
31 dnl This is for the autoconf tests only - it set's the language we use
32 AC_LANG(C)
34 dnl Automake 1.11 - Silent Build Rules
35 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37 dnl Required Packages
38 m4_define([glib_minimum_version], [2.28])
39 m4_define([gtk_minimum_version], [3.0.2])
40 m4_define([eds_minimum_version], [evo_version])
41 m4_define([gtkhtml_minimum_version], [4.1.2])
42 m4_define([gnome_desktop_minimum_version], [2.91.3])
43 m4_define([gnome_icon_theme_minimum_version], [2.30.2.1])
44 m4_define([gsettings_desktop_schemas_minimum_version], [2.91.92])
45 m4_define([gconf_minimum_version], [2.0.0])             dnl XXX Just a Guess
46 m4_define([libsoup_minimum_version], [2.31.2])
47 m4_define([libxml_minimum_version], [2.7.3])
48 m4_define([shared_mime_info_minimum_version], [0.22])
49 m4_define([libpst_minimum_version], [0.6.41])
50 m4_define([libnotify_minimum_version], [0.5.1])
52 dnl Optional Packages
53 m4_define([champlain_minimum_version], [0.10])
54 m4_define([clutter_gtk_minimum_version], [0.90])
55 m4_define([geoclue_minimum_version], [0.11.1])
56 m4_define([gladeui_minimum_version], [3.10.0])
57 m4_define([goa_minimum_version], [3.1.1])
58 m4_define([gweather_minimum_version], [2.90.0])
59 m4_define([libcanberra_gtk_minimum_version], [0.25])
60 m4_define([nm_minimum_version], [0.7])
62 dnl XXX These versions don't yet exist.  The latest releases
63 dnl     link to gtk+-2.0 so we've bumped the versions to some
64 dnl     bogus value to force some plugins to be disabled.
65 m4_define([gtkimageview_minimum_version], [2.0])
67 dnl ******************************
68 dnl Compiler Warning Flags
69 dnl ******************************
70 AS_COMPILER_FLAGS(WARNING_FLAGS,
71         "-DPANGO_DISABLE_DEPRECATED
72         -DGDK_PIXBUF_DISABLE_DEPRECATED
73         -DEDS_DISABLE_DEPRECATED
74         -DG_DISABLE_SINGLE_INCLUDES
75         -DGTK_DISABLE_SINGLE_INCLUDES
76         -DE_BOOK_DISABLE_DEPRECATED
77         -DE_CAL_DISABLE_DEPRECATED
78         -Wall -Wextra
79         -Wno-missing-field-initializers
80         -Wno-sign-compare
81         -Wno-unused-parameter
82         -Wdeclaration-after-statement
83         -Werror-implicit-function-declaration
84         -Wformat-security -Winit-self
85         -Wmissing-declarations -Wmissing-include-dirs
86         -Wmissing-noreturn -Wnested-externs -Wpointer-arith
87         -Wredundant-decls -Wundef -Wwrite-strings")
88 AC_SUBST(WARNING_FLAGS)
90 dnl Other useful compiler warnings for test builds only.
91 dnl These may produce warnings we have no control over,
92 dnl or false positives we don't always want to see.
93 dnl
94 dnl     -Wmissing-format-attribute
95 dnl     -Wshadow
96 dnl     -Wformat-nonliteral
97 dnl     -Wstrict-aliasing=2
98 dnl     -DE_BOOK_DISABLE_DEPRECATED
99 dnl     -DE_CAL_DISABLE_DEPRECATED
101 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
102 AC_SUBST(AM_CPPFLAGS)
104 AC_CANONICAL_HOST
105 AC_DEFINE_UNQUOTED(VERSION_COMMENT, "", [Define if you want a comment appended to the version number])
107 dnl This must stay after AC_CANONICAL_HOST, which defines $host.
108 case "$host" in
109 *openbsd*|*freebsd*)
110         dnl Do not set '-Wl,--no-undefined' on freebsd/openbsd
111         ;;
113         LDFLAGS="$LDFLAGS -Wl,--no-undefined"
114         ;;
115 esac
118 dnl *************************************
119 dnl Put the ACLOCAL flags in the Makefile
120 dnl *************************************
121 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
123 dnl ******************************
124 dnl Initialize maintainer mode
125 dnl ******************************
126 AM_MAINTAINER_MODE
128 if test "$evo_version" != "$evo_stable_version"; then
129         AC_DEFINE(STABLE_VERSION, ["evo_stable_version"],
130                 [Define to the latest stable version if this version is unstable])
133 AC_SUBST([BASE_VERSION], [base_version])
134 AC_DEFINE_UNQUOTED(BASE_VERSION, ["$BASE_VERSION"], [Base version (Major.Minor)])
136 AC_SUBST([UPGRADE_REVISION],[upgrade_revision])
137 AC_DEFINE_UNQUOTED(UPGRADE_REVISION, ["$UPGRADE_REVISION"], [The number of times we've upgraded since the BASE_VERSION release])
139 AC_PROG_CC
140 AC_C_INLINE
141 AC_PROG_CPP
142 AM_PROG_CC_C_O
143 AC_PROG_INSTALL
144 AC_PROG_LN_S
145 AC_PROG_MAKE_SET
146 AC_PROG_AWK
147 AC_PATH_PROG([PERL], [perl])
148 AC_SUBST(PERL)
150 AC_ARG_PROGRAM
152 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
153 dnl behavior that -- according to the C99 standard -- is supposed to be
154 dnl undefined.  We may still have aliasing abuses lying around that rely
155 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
156 dnl optimzation until we can find and fix all the abuses.
157 dnl (AC_PROG_CC must run first to set the GCC variable.)
158 dnl XXX This really belongs in AM_CFLAGS.
159 if test "x${GCC}" = "xyes"; then
160         CFLAGS="$CFLAGS -fno-strict-aliasing"
163 dnl ******************************
164 dnl I18N stuff
165 dnl ******************************
166 IT_PROG_INTLTOOL([0.40.0])
168 AM_GNU_GETTEXT_VERSION([0.17])
169 AM_GNU_GETTEXT([external])
171 GETTEXT_PACKAGE=evolution-$BASE_VERSION
172 AC_SUBST(GETTEXT_PACKAGE)
173 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
175 localedir='$(prefix)/$(DATADIRNAME)/locale'
176 AC_SUBST(localedir)
178 dnl ******************************
179 dnl Initialize libtool
180 dnl ******************************
181 LT_PREREQ(2.2)
182 LT_INIT(disable-static win32-dll)
184 PKG_PROG_PKG_CONFIG
186 dnl ********************************************
187 dnl User / Developer Documentation
188 dnl ********************************************
189 GNOME_DOC_INIT
190 GTK_DOC_CHECK(1.9)
192 dnl ******************************
193 dnl Win32
194 dnl ******************************
195 AC_MSG_CHECKING([for Win32])
196 case "$host" in
197 *-mingw*)
198         os_win32=yes
199         NO_UNDEFINED='-no-undefined'
200         SOEXT='.dll'
201         DL_LIB=''
202         SOFTOKN3_LIB=''
203         CHAMPLAIN_REQUIREMENT=''
204         GEOCLUE_REQUIREMENT=''
205         ;;
206 *openbsd*|*freebsd*)
207         os_win32=no
208         NO_UNDEFINED=''
209         SOEXT='.so'
210         SA_JUNK_PLUGIN=sa-junk-plugin
211         BF_JUNK_PLUGIN=bogo-junk-plugin
212         DL_LIB=''
213         SOFTOKN3_LIB='-lsoftokn3'
214         ;;
216         os_win32=no
217         NO_UNDEFINED='-no-undefined'
218         SOEXT='.so'
219         DL_LIB='-ldl'
220         SOFTOKN3_LIB='-lsoftokn3'
221         ;;
222 esac
223 AC_MSG_RESULT([$os_win32])
224 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
225 AC_SUBST(NO_UNDEFINED)
226 AC_SUBST(SOEXT)
228 MATH_LIB="-lm"
229 AC_SUBST(MATH_LIB)
231 if test "$os_win32" = "yes"; then
232         AC_CHECK_TOOL(WINDRES, windres, :)
233 else
234         WINDRES=":"
237 AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
239 AC_SUBST(WINDRES)
241 dnl **********************************
242 dnl Check for base dependencies early.
243 dnl **********************************
244 PKG_CHECK_MODULES([GNOME_PLATFORM],
245         [gio-2.0 >= glib_minimum_version
246          cairo-gobject
247          gtk+-3.0 >= gtk_minimum_version
248          gail-3.0 >= gtk_minimum_version
249          gconf-2.0 >= gconf_minimum_version
250          libxml-2.0 >= libxml_minimum_version
251          shared-mime-info >= shared_mime_info_minimum_version
252          gnome-desktop-3.0 >= gnome_desktop_minimum_version
253          gsettings-desktop-schemas >= gsettings_desktop_schemas_minimum_version])
254 AC_SUBST(GNOME_PLATFORM_CFLAGS)
255 AC_SUBST(GNOME_PLATFORM_LIBS)
257 PKG_CHECK_MODULES([EVOLUTION_DATA_SERVER],
258         [libebook-1.2 >= eds_minimum_version
259          libecal-1.2 >= eds_minimum_version
260          libedataserver-1.2 >= eds_minimum_version
261          libedataserverui-3.0 >= eds_minimum_version
262          libebackend-1.2 >= eds_minimum_version])
264 dnl ******************************
265 dnl Canberra / Canberra-GTK Sound
266 dnl ******************************
267 AC_ARG_ENABLE([canberra],
268         [AS_HELP_STRING([--enable-canberra],
269         [Enable Canberra and Canberra-GTK sound @<:@default=yes@:>@])],
270         [enable_canberra="$enableval"], [enable_canberra=yes])
272 if test $enable_canberra = yes; then
273         PKG_CHECK_MODULES([CANBERRA],[libcanberra-gtk3 >= libcanberra_gtk_minimum_version])
274         AC_DEFINE(HAVE_CANBERRA, 1, [Define if using Canberra and Canberra-GTK for sound])
276 AC_SUBST(CANBERRA_CFLAGS)
277 AC_SUBST(CANBERRA_LIBS)
279 dnl ******************
280 dnl User Documentation
281 dnl ******************
282 AC_MSG_CHECKING([whether to build user documentation])
283 AC_ARG_WITH([help],
284         [AS_HELP_STRING([--with-help],
285         [Build user documentation [default=yes]])],
286         [with_help="$withval"],[with_help="yes"])
287 AM_CONDITIONAL(WITH_HELP, test "x$with_help" != "xno")
288 AC_MSG_RESULT([$with_help])
290 dnl ******************************
291 dnl iconv checking
292 dnl ******************************
293 have_iconv=no
294 save_LIBS="$LIBS"
295 LIBS="$LIBS -liconv"
296 AC_CACHE_CHECK([for iconv in -liconv], [ac_cv_libiconv],
297         AC_LINK_IFELSE([AC_LANG_PROGRAM(
298         [[
299                 #include <iconv.h>
300                 #include <stdlib.h>
301         ]],
302         [[      iconv_t cd;
303                 cd = iconv_open ("UTF-8", "ISO-8859-1");
304         ]]
305         )],[ac_cv_libiconv=yes],[ac_cv_libiconv=no]))
307 if test $ac_cv_libiconv = yes; then
308         ICONV_LIBS="-liconv"
309         if test $os_win32 = yes; then
310                 dnl Don't pointlessly auto-export the global symbols
311                 dnl from a potentially static libiconv.a
312                 ICONV_LIBS="$ICONV_LIBS -Wl,--exclude-libs=libiconv.a"
313         fi
314         have_iconv=yes
315 else
316         LIBS="$save_LIBS"
317         AC_CHECK_FUNC(iconv, have_iconv=yes, have_iconv=no)
320 if test $have_iconv = yes; then
321         if test $ac_cv_libiconv = no; then
322                 AC_CHECK_FUNCS(gnu_get_libc_version)
323         fi
324 AC_CACHE_CHECK([if iconv() handles UTF-8], [ac_cv_libiconv_utf8],
325         AC_RUN_IFELSE([AC_LANG_SOURCE([[
326                 #include <iconv.h>
327                 #include <stdlib.h>
328                 #include <string.h>
329                 #ifdef HAVE_GNU_GET_LIBC_VERSION
330                 #include <gnu/libc-version.h>
331                 #endif
332                 int main() {
333                         char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
334                         char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
335                         char *transbuf = malloc (10), *trans = transbuf;
336                         iconv_t cd;
337                         size_t jp_len = strlen (jp), utf8_len = 10;
338                         size_t utf8_real_len = strlen (utf8);
340                         #ifdef HAVE_GNU_GET_LIBC_VERSION
341                         /* glibc 2.1.2's iconv is broken in hard to test ways. */
342                         if (!strcmp (gnu_get_libc_version (), "2.1.2"))
343                                 exit (1);
344                         #endif
346                         cd = iconv_open ("UTF-8", "ISO-2022-JP");
347                         if (cd == (iconv_t) -1)
348                                 exit (1);
349                         if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
350                                 exit (1);
351                         if (memcmp (utf8, transbuf, utf8_real_len) != 0)
352                                 exit (1);
353                         return (0);}
354                 ]])
355         ],[ac_cv_libiconv_utf8=yes],[ac_cv_libiconv_utf8=no; have_iconv=no],[ac_cv_libiconv_utf8=hopefully]))
358 if test "$have_iconv" = no; then
359         AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
361 AC_SUBST(ICONV_LIBS)
363 save_CFLAGS="$CFLAGS"
364 CFLAGS="$CFLAGS -I$srcdir"
366 AC_MSG_CHECKING([preferred charset name formats for system iconv])
367 AC_RUN_IFELSE([AC_LANG_SOURCE([[
368         #define CONFIGURE_IN
369         #include "iconv-detect.c"
370         ]])],
371         [AC_MSG_RESULT([found])],
372         [AC_MSG_RESULT([not found])
373                 AC_MSG_WARN([
374                 *** The iconv-detect program was unable to determine the
375                 *** preferred charset name formats recognized by your
376                 *** iconv library. It is suggested that you install a
377                 *** working iconv library such as the one found at
378                 *** ftp://ftp.gnu.org/pub/gnu/libiconv
379         ])],
380         [if test x$os_win32 = xyes; then
381                 AC_MSG_RESULT([using known win32 result])
382                 echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
383                 echo  >>iconv-detect.h
384                 echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
385                 echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
386                 echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
387         else
388                 AC_MSG_RESULT([unknown])
389                 AC_MSG_WARN([
390                 *** We can't determine the preferred charset name formats
391                 *** recognized by your iconv library. You are
392                 *** cross-compiling and supposed to know what you are doing.
393                 *** Please construct the iconv-detect.h file manually.
394                 ])
395         fi
398 CFLAGS="$save_CFLAGS"
399 LIBS="$save_LIBS"
401 dnl **************
402 dnl waitpid() etc
403 dnl **************
404 AC_HEADER_SYS_WAIT
406 dnl ***************
407 dnl Purify support
408 dnl ***************
409 EVO_PURIFY_SUPPORT
411 dnl **************
412 dnl Test Component
413 dnl **************
414 AC_ARG_ENABLE([test-component],
415         AS_HELP_STRING([--enable-test-component],
416         [Enable test component.]),
417         [enable_test_comp=$enableval],[enable_test_comp=no])
419 AM_CONDITIONAL(ENABLE_TEST_COMPONENT, [test x$enable_test_comp = xyes])
421 dnl ***************
422 dnl Timezone checks
423 dnl ***************
424 AC_CACHE_CHECK(for tm_gmtoff in struct tm, [ac_cv_struct_tm_gmtoff],
425         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
426         [[      #include <time.h>       ]],
427         [[
428                 struct tm tm;
429                 tm.tm_gmtoff = 1;
430         ]]
431         )],[ac_cv_struct_tm_gmtoff=yes],[ac_cv_struct_tm_gmtoff=no]))
432 if test $ac_cv_struct_tm_gmtoff = yes; then
433         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member])
434 else
435         AC_CACHE_CHECK(for timezone variable, [ac_cv_var_timezone],
436                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
437                 [[      #include <time.h> ]],
438                 [[      timezone = 1;   ]]
439                 )],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no]))
440         if test $ac_cv_var_timezone = yes; then
441                 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if libc defines a timezone variable])
442                 AC_CACHE_CHECK(for altzone variable, [ac_cv_var_altzone],
443                         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
444                         [[      #include <time.h>       ]],
445                         [[      altzone = 1; ]]
446                         )],[ac_cv_var_altzone=yes],[ac_cv_var_altzone=no]))
447                 if test $ac_cv_var_altzone = yes; then
448                         AC_DEFINE(HAVE_ALTZONE, 1, [Define if libc defines an altzone variable])
449                 fi
450         else
451                 AC_MSG_ERROR([unable to find a way to determine timezone])
452         fi
456 AC_CHECK_FUNCS(mkstemp mkdtemp isblank)
458 dnl **************************************************
459 dnl ctime_r prototype
460 dnl **************************************************
462 AC_CACHE_CHECK([if ctime_r wants three arguments], [ac_cv_ctime_r_three_args],
464         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
465         [[      #include <time.h> ]],
466         [[      char *buf;
467                 time_t date;
468                 ctime_r (&date, buf, 100); ]]
469         )],[ac_cv_ctime_r_three_args=yes],[ac_cv_ctime_r_three_args=no])
472 if test x"$ac_cv_ctime_r_three_args" = xyes ; then
473         AC_DEFINE(CTIME_R_THREE_ARGS, 1, [Solaris-style ctime_r])
476 dnl **************************************************
477 dnl gethostbyname_r prototype
478 dnl **************************************************
480 AC_CHECK_FUNCS(gethostbyname_r,[
481 AC_CACHE_CHECK([if gethostbyname_r wants five arguments], [ac_cv_gethostbyname_r_five_args],
483         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
484         [[
485                 #include "confdefs.h"
486                 #include <sys/types.h>
487                 #include <sys/socket.h>
488                 #include <netinet/in.h>
489                 #include <netdb.h>
491                 #define BUFSIZE (sizeof(struct hostent)+10)
492         ]],
493         [[
494                 struct hostent hent;
495                 char buffer[BUFSIZE];
496                 int bufsize=BUFSIZE;
497                 int h_errno;
498                 (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
499         ]]
500         )],[ac_cv_gethostbyname_r_five_args=yes],[ac_cv_gethostbyname_r_five_args=no])
501 ])])
503 if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
504         AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS, 1, [Solaris-style gethostbyname_r])
507 dnl **************************************************
508 dnl gethostbyaddr_r prototype
509 dnl **************************************************
511 AC_CHECK_FUNCS(gethostbyaddr_r,[
512 AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], [ac_cv_gethostbyaddr_r_seven_args],
514         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
515         [[
516                 #include "confdefs.h"
517                 #include <sys/types.h>
518                 #include <sys/socket.h>
519                 #include <netinet/in.h>
520                 #include <netdb.h>
521                 #define BUFSIZE (sizeof(struct hostent)+10)
522         ]],
523         [[
524                 struct hostent hent;
525                 char buffer[BUFSIZE];
526                 int bufsize=BUFSIZE;
527                 int h_errno;
528                 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno); ]]
529         )],[ac_cv_gethostbyaddr_r_seven_args=yes],[ac_cv_gethostbyaddr_r_seven_args=no])
530 ])])
532 if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
533         AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS, 1, [Solaris-style gethostbyaddr_r])
536 dnl **************************************************
537 dnl stat(v)fs location/type
538 dnl **************************************************
540 AC_CHECK_HEADER([sys/statvfs.h],
541         [AC_DEFINE([HAVE_SYS_STATVFS_H], 1, [Have <sys/statvfs.h>])],,
542         [[      #if HAVE_SYS_STATVFS_H
543                 #include <sys/statvfs.h>
544                 #endif
545         ]])
546 AC_CHECK_FUNCS(statvfs)
548 AC_CHECK_HEADER([sys/param.h],
549         [AC_DEFINE([HAVE_SYS_PARAM_H], 1, [Have <sys/param.h>])],,
550         [[      #if HAVE_SYS_PARAM_H
551                 #include <sys/param.h>
552                 #endif
553         ]])
554 AC_CHECK_HEADER([sys/mount.h],
555         [AC_DEFINE([HAVE_SYS_MOUNT_H], 1, [Have <sys/mount.h>])],,
556         [[      #if HAVE_SYS_MOUNT_H
557                 #include <sys/mount.h>
558                 #endif
559         ]])
560 AC_CHECK_FUNCS(statfs)
562 dnl **************************************************
563 dnl Gnome Icon Theme
564 dnl **************************************************
565 PKG_CHECK_MODULES([GIT], [gnome-icon-theme >= gnome_icon_theme_minimum_version])
567 dnl **************************************************
568 dnl Accessibility support
569 dnl **************************************************
570 PKG_CHECK_MODULES([A11Y], [atk])
571 AC_SUBST(A11Y_CFLAGS)
572 AC_SUBST(A11Y_LIBS)
574 dnl **************************************************
575 dnl XF86 multimedia keys support
576 dnl **************************************************
577 have_xfree=no
578 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
579         [[ #include <X11/XF86keysym.h> ]],[[]])],
580         [have_xfree=yes]
582 AC_MSG_CHECKING([for X11 XFree86 headers])
583 AC_MSG_RESULT([$have_xfree])
584 if test x"$have_xfree" = "xyes" ; then
585         AC_DEFINE(HAVE_XFREE, 1, [defined if you have X11/XF86keysym.h])
588 dnl **************************************************
589 dnl Clutter support.
590 dnl **************************************************
591 AC_MSG_CHECKING([whether to build with Clutter])
592 AC_ARG_WITH([clutter],
593        [AC_HELP_STRING([--with-clutter],
594        [Build with Clutter [default=no]])],
595        with_clutter="$withval", with_clutter="no")
596 AC_MSG_RESULT($with_clutter)
598 if test "x$with_clutter" = "xyes"; then
599    PKG_CHECK_MODULES(CLUTTER, [mx-1.0 clutter-gtk-1.0 >= clutter_gtk_minimum_version clutter-1.0 >= 1.0.0])
601    AC_DEFINE(HAVE_CLUTTER, 1, [Clutter available])
602    AM_CONDITIONAL(ENABLE_CLUTTER, true)
603 else
604    AC_DEFINE(HAVE_CLUTTER, 0, [Clutter not available])
605    AM_CONDITIONAL(ENABLE_CLUTTER, false)
609 dnl **************************************************
610 dnl LDAP support.
611 dnl **************************************************
612 if test "$os_win32" != yes; then
613         EVO_LDAP_CHECK(no)
614         case $with_openldap in
615         no)
616                 msg_ldap=no
617                 ;;
618         *)
619                 case $with_static_ldap in
620                 yes)
621                         msg_ldap="yes (static)"
622                 ;;
623                 *)
624                         msg_ldap="yes (dynamic)"
625                         ;;
626                 esac
627         esac
629         SAVE_CFLAGS="$CFLAGS"
630         SAVE_LIBS="$LIBS"
631         LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
632         CFLAGS="$CFLAGS $LDAP_CFLAGS"
633         LIBS="$LIBS $LDAP_LIBS"
634         AC_CHECK_FUNCS(ldap_ntlm_bind)
635         CFLAGS="$SAVE_CFLAGS"
636         LIBS="$SAVE_LIBS"
637 dnl Win32 support
638 else
639         LDAP_CFLAGS="-DLDAP_DEPRECATED"
640         LDAP_LIBS="-lwldap32"
641         AC_SUBST(LDAP_CFLAGS)
642         AC_SUBST(LDAP_LIBS)
643         AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
644         AM_CONDITIONAL(ENABLE_LDAP, true)
645         msg_ldap="yes"
648 dnl **************************************************
649 dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
650 dnl **************************************************
651 if test "$with_openldap" = no ; then
652         EVO_SUNLDAP_CHECK(no)
653         case $with_sunldap in
654         no)
655                 msg_ldap=no
656                 ;;
657         *)
658                 case $with_static_sunldap in
659                 yes)
660                         msg_ldap="$with_sunldap (static)"
661                         ;;
662                 *)
663                         msg_ldap="$with_sunldap (dynamic)"
664                         ;;
665                 esac
666         esac
667 else
668         with_sunldap=no
670 AM_CONDITIONAL(SUNLDAP, [test x$with_sunldap != xno])
672 AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [Define it once memory returned by libical is free'ed properly])
674 dnl ************
675 dnl regex check
676 dnl ************
677 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
678                         [REGEX_LIBS=-lregex
679                         AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])],
680                         [AC_MSG_ERROR([No regex library found])])])
681 AC_SUBST(REGEX_LIBS)
683 dnl *************************
684 dnl GTKHTML check
685 dnl XXX Drop the version from the package name?
686 dnl *************************
687 PKG_CHECK_MODULES([GTKHTML], [libgtkhtml-4.0 >= gtkhtml_minimum_version])
688 AC_SUBST(GTKHTML_CFLAGS)
689 AC_SUBST(GTKHTML_LIBS)
691 dnl ************
692 dnl Kerberos 5
693 dnl ************
694 EVO_KRB5_SUPPORT(no)
696 dnl ******************************
697 dnl Mono hooks
698 dnl This should just define mono CFLAGS etc here, it is used later to turn on the mono plugin or not.
699 dnl ******************************
700 AC_ARG_ENABLE([mono],
701         AS_HELP_STRING([--enable-mono],
702         [Add Mono embedded hooks.]),
703         [enable_mono=$enableval],[enable_mono=no])
704 if test "x${enable_mono}" = "xyes"; then
705         PKG_CHECK_MODULES([MONO], ["mono-2"])
706         AC_DEFINE(ENABLE_MONO,1,[Define if Mono embedding should be enabled])
708 AC_SUBST(MONO_CFLAGS)
709 AC_SUBST(MONO_LIBS)
711 AM_CONDITIONAL(ENABLE_MONO, [test "x$enable_mono" = "xyes"])
713 dnl ******************************
714 dnl Python hooks
715 dnl This should just define python CFLAGS etc here, it is used later to turn on the python plugin or not.
716 dnl (Thanks to Pidgin)
717 dnl ******************************
719 AC_ARG_ENABLE([python],
720         AS_HELP_STRING([--enable-python],
721         [Add python embedded hooks.]),
722         [enable_python=$enableval],[enable_python=no])
724 if test "x${enable_python}" = "xyes"; then
725         AC_PATH_PROG(pythonpath, python)
726         if test "_$pythonpath" != _ ; then
727                 AC_MSG_CHECKING([for python compile flags])
728                 PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'`
729                 PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'`
730                 changequote(<<, >>)dnl
731                 PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'`
732                 PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'`
733                 changequote([, ])dnl
735                 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
736                         PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
737                         PY_INCLUDES="-I$PY_PREFIX/include/python$PY_VERSION"
738                         AC_MSG_RESULT([ok])
739                         python_package="python-devel"
740                 else
741                         AC_MSG_ERROR([Can't find Python.h])
742                         PY_LIBS=""
743                         PY_INCLUDES=""
744                         python_package=""
745                 fi
746         fi
747         AC_SUBST(PY_LIBS)
748         AC_SUBST(PY_INCLUDES)
751 AM_CONDITIONAL(ENABLE_PYTHON, [test "x$enable_python" = "xyes"])
754 dnl ********************************************************************************
755 dnl security extension support (SSL and S/MIME)
757 dnl The following voodoo does detection of mozilla libraries (nspr and nss)
758 dnl needed by Camel (SSL and S/MIME).
760 dnl The Evolution security extensions are only built if these libraries are found
761 dnl ********************************************************************************
762 msg_ssl="no"
763 msg_smime="no"
765 dnl these 2 enable's are inverses of each other
767 AC_ARG_ENABLE([nss],
768         AS_HELP_STRING([--enable-nss=@<:@yes/no/static@:>@],
769         [Attempt to use Mozilla libnss for SSL support.]),
770         [enable_nss=$enableval],[enable_nss=yes])
772 AC_ARG_ENABLE([smime],
773         AS_HELP_STRING([--enable-smime],
774         [Attempt to use Mozilla libnss for SMIME support (this requires --enable-nss)]),
775         [enable_smime=$enableval],[enable_smime=yes])
777 AC_ARG_WITH([nspr-includes],
778         AS_HELP_STRING([--with-nspr-includes=PATH],
779         [Location of Mozilla nspr4 includes.]))
781 AC_ARG_WITH([nspr-libs],
782         AS_HELP_STRING([--with-nspr-libs=PATH],
783         [Location of Mozilla nspr4 libs.]))
785 AC_ARG_WITH([nss-includes],
786         AS_HELP_STRING([--with-nss-includes=PATH],
787         [Location of Mozilla nss3 includes.]))
789 AC_ARG_WITH([nss-libs],
790         AS_HELP_STRING([--with-nss-libs=PATH],
791         [Location of Mozilla nss3 libs.]))
793 if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
794         if test -n "${with_nspr_includes}" || test -n "${with_nspr_libs}" || test -n "${with_nss_includes}" || test -n "${with_nss_libs}" || test "x${enable_nss}" = "xstatic"; then
795                 check_manually="yes"
796         else
797                 check_manually="no"
798         fi
800         if test "x${check_manually}" = "xno"; then
801                 AC_MSG_CHECKING([Mozilla NSPR pkg-config module name])
802                 mozilla_nspr_pcs="nspr mozilla-nspr firefox-nspr xulrunner-nspr seamonkey-nspr"
803                 for pc in $mozilla_nspr_pcs; do
804                         if $PKG_CONFIG --exists $pc; then
805                                 AC_MSG_RESULT([$pc])
806                                 mozilla_nspr=$pc
807                                 break;
808                         fi
809                 done
811                 AC_MSG_CHECKING([Mozilla NSS pkg-config module name])
812                 mozilla_nss_pcs="nss mozilla-nss firefox-nss xulrunner-nss seamonkey-nss"
813                 for pc in $mozilla_nss_pcs; do
814                         if $PKG_CONFIG --exists $pc; then
815                                 AC_MSG_RESULT([$pc])
816                                 mozilla_nss=$pc
817                                 break;
818                         fi
819                 done
821                 if test -n "$mozilla_nspr" -a -n "$mozilla_nss"; then
822                         msg_ssl="yes (Mozilla NSS)"
823                         if test "x$enable_smime" = "xyes"; then
824                                 AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
825                                 msg_smime="yes (Mozilla NSS)"
826                         fi
827                         AC_DEFINE(HAVE_NSS,1,[Define if you have NSS])
828                         AC_DEFINE(HAVE_SSL,1,[Define if you have a supported SSL library])
829                         AC_DEFINE_UNQUOTED(MOZILLA_NSS_LIB_DIR,"`$PKG_CONFIG --variable=libdir $mozilla_nss`",[Define to the full path of mozilla nss library])
830                         MANUAL_NSPR_CFLAGS=""
831                         MANUAL_NSPR_LIBS=""
832                         MANUAL_NSS_CFLAGS=""
833                         MANUAL_NSS_LIBS=""
834                 else
835                         check_manually="yes"
836                         mozilla_nspr=""
837                         mozilla_nss=""
838                 fi
839         fi
841         if test "x${check_manually}" = "xyes"; then
842                 mozilla_nss=""
843                 have_nspr_includes="no"
844                 if test "x${with_nspr_includes}" != "xno"; then
845                         CPPFLAGS_save="$CPPFLAGS"
847                         AC_MSG_CHECKING([for Mozilla nspr4 includes in $with_nspr_includes])
848                         AC_MSG_RESULT([""])
850                         CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
851                         AC_CHECK_HEADERS([nspr.h prio.h],[ moz_nspr_includes="yes" ],,
852                         [[
853                                 #if HAVE_NSPR_H
854                                 #include <nspr.h>
855                                 #include <prio.h>
856                                 #endif
857                         ]])
858                         CPPFLAGS="$CPPFLAGS_save"
860                         if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
861                                 have_nspr_includes="yes"
862                                 MANUAL_NSPR_CFLAGS="-I$with_nspr_includes"
863                         fi
864                 else
865                         AC_MSG_CHECKING([for Mozilla nspr4 includes])
866                         AC_MSG_RESULT([no])
867                 fi
869                 have_nspr_libs="no"
870                 if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
871                         CFLAGS_save="$CFLAGS"
872                         LDFLAGS_save="$LDFLAGS"
874                         if test "$enable_nss" = "static"; then
875                                 if test -z "${with_nspr_libs}"; then
876                                         AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set.]
877                                         [Please specify the path to libnspr4.a]
878                                         [Example: --with-nspr-libs=/usr/lib])
879                                 else
880                                         nsprlibs="$DL_LIB $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a"
881                                 fi
882                         else
883                                 nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
884                         fi
886                         AC_CACHE_CHECK([for Mozilla nspr libraries], [ac_cv_moz_nspr_libs],
887                         [
888                                 LIBS_save="$LIBS"
889                                 CFLAGS="$CFLAGS $MANUAL_NSPR_CFLAGS"
891                                 if test "x${with_nspr_libs}" != "x"; then
892                                         LIBS="$nsprlibs"
893                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs"
894                                 else
895                                         LIBS="$nsprlibs"
896                                         LDFLAGS="$LDFLAGS"
897                                 fi
899                                 AC_LINK_IFELSE([AC_LANG_CALL([], [PR_Init])],
900                                 [ac_cv_moz_nspr_libs="yes"], [ac_cv_moz_nspr_libs="no"])
901                                 CFLAGS="$CFLAGS_save"
902                                 LDFLAGS="$LDFLAGS_save"
903                                 LIBS="$LIBS_save"
904                         ])
905                         if test "x$ac_cv_moz_nspr_libs" != "xno"; then
906                                 have_nspr_libs="yes"
907                                 MANUAL_NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
908                         else
909                                 MANUAL_NSPR_CLFAGS=""
910                         fi
911                 else
912                         AC_MSG_CHECKING([for Mozilla nspr4 libraries])
913                         AC_MSG_RESULT([no])
914                 fi
916                 if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
917                         CPPFLAGS_save="$CPPFLAGS"
919                         AC_MSG_CHECKING([for Mozilla nss3 includes in $with_nss_includes])
920                         AC_MSG_RESULT([""])
922                         if test "x${with_nspr_includes}" != "x"; then
923                                 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
924                         else
925                                 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
926                         fi
928                         AC_CHECK_HEADERS(nss.h ssl.h smime.h,
929                                 [ have_nss_includes="yes" ],
930                                 [ have_nss_includes="no" ],
931                                 [
932                                         #if HAVE_NSPR_H
933                                         #include <nss.h>
934                                         #include <ssl.h>
935                                         #include <smime.h>
936                                         #endif
937                                 ])
939                         CPPFLAGS="$CPPFLAGS_save"
941                         if test "x${have_nss_includes}" = "xyes"; then
942                                 have_nss_includes="yes"
943                                 MANUAL_NSS_CFLAGS="-I$with_nss_includes"
944                         else
945                                 MANUAL_NSPR_CFLAGS=""
946                                 MANUAL_NSPR_LIBS=""
947                         fi
948                 else
949                         AC_MSG_CHECKING([for Mozilla nss3 includes])
950                         AC_MSG_RESULT([no])
951                 fi
953                 if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
954                         LDFLAGS_save="$LDFLAGS"
956                         if test "$enable_nss" = "static"; then
957                                 if test -z "${with_nss_libs}"; then
958                                         AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set.]
959                                         [Please specify the path to libnss3.a]
960                                         [Example: --with-nspr-libs=/usr/lib/mozilla])
961                                 else
962                                         nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
963                                         case "$host" in
964                                                 *solaris*)
965                                                 nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
966                                         ;;
967                                         esac
968                                 fi
969                         else
970                                 nsslibs="-lssl3 -lsmime3 -lnss3"
971                         fi
973                         AC_CACHE_CHECK([for Mozilla nss libraries], [ac_cv_moz_nss_libs],
974                         [
975                                 LIBS_save="$LIBS"
976                                 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
977                                 LIBS="$nsslibs $nsprlibs"
978                                 AC_LINK_IFELSE([AC_LANG_CALL([], [NSS_Init])],
979                                 [ac_cv_moz_nss_libs="yes"], [ac_cv_moz_nss_libs="no"])
980                                 if test "$ac_cv_moz_nss_libs" = no; then
981                                         nsslibs="-lssl3 -lsmime3 -lnss3"
982                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
983                                         AC_LINK_IFELSE([AC_LANG_CALL([], [NSS_Init])],
984                                         [ac_cv_moz_nss_libs="yes"], [ac_cv_moz_nss_libs="no"])
985                                 fi
986                                 LDFLAGS="$LDFLAGS_save"
987                                 LIBS="$LIBS_save"
988                         ])
989                         if test "$ac_cv_moz_nss_libs" != no; then
990                                 AC_DEFINE(HAVE_NSS)
991                                 AC_DEFINE(HAVE_SSL)
992                                 AC_DEFINE_UNQUOTED(MOZILLA_NSS_LIB_DIR,"$with_nss_libs", [Define to the full path of mozilla nss library])
993                                 if test "$enable_nss" = "static"; then
994                                         msg_ssl="yes (Mozilla NSS:static)"
995                                 else
996                                         msg_ssl="yes (Mozilla NSS)"
997                                 fi
998                                 dnl static_nss
999                                 if test "$enable_smime" = "yes"; then
1000                                         AC_DEFINE(ENABLE_SMIME,1,[Define if SMIME should be enabled])
1001                                         msg_smime="yes (Mozilla NSS)"
1002                                 fi
1003                                 MANUAL_NSS_LIBS="-L$with_nss_libs $nsslibs"
1004                         else
1005                                 MANUAL_NSS_CFLAGS=""
1006                                 MANUAL_NSPR_CFLAGS=""
1007                                 MANUAL_NSPR_LIBS=""
1008                         fi
1009                 else
1010                         AC_MSG_CHECKING([for Mozilla nss libraries])
1011                         AC_MSG_RESULT([no])
1012                 fi
1014                 MANUAL_NSS_CFLAGS="$MANUAL_NSPR_CFLAGS $MANUAL_NSS_CFLAGS"
1015                 MANUAL_NSS_LIBS="$MANUAL_NSPR_LIBS $MANUAL_NSS_LIBS"
1016         fi
1019 AM_CONDITIONAL(ENABLE_SMIME, [test "x$msg_smime" != "xno"])
1021 AC_SUBST(MANUAL_NSPR_CFLAGS)
1022 AC_SUBST(MANUAL_NSPR_LIBS)
1023 AC_SUBST(MANUAL_NSS_CFLAGS)
1024 AC_SUBST(MANUAL_NSS_LIBS)
1026 dnl *****************
1027 dnl killall or pkill?
1028 dnl *****************
1030 case "$host" in
1031 *solaris*)
1032         KILL_PROCESS_CMD="/usr/bin/pkill -x"
1033         ;;
1035         AC_PATH_PROGS(KILL_PROCESS_CMD, killall pkill)
1036         ;;
1037 esac
1038 if test -z "$KILL_PROCESS_CMD"; then
1039         AC_MSG_WARN([Could not find a command to kill a process by name])
1040 else
1041         AC_DEFINE_UNQUOTED([KILL_PROCESS_CMD], "$KILL_PROCESS_CMD",
1042                 [Command to kill processes by name])
1045 dnl *******************
1046 dnl GObject marshalling
1047 dnl *******************
1048 AM_PATH_GLIB_2_0
1050 dnl *****************************************************************
1051 dnl Utility macro to set compiler flags for a specific lib.
1052 dnl EVO_SET_COMPILE_FLAGS(VAR-PREFIX, DEPS, EXTRA-CFLAGS, EXTRA-LIBS)
1053 dnl *****************************************************************
1054 AC_DEFUN([EVO_SET_COMPILE_FLAGS], [
1055         PKG_CHECK_MODULES([$1], [$2])
1056         $1_CFLAGS="[$]$1_CFLAGS $3"
1057         $1_LIBS="[$]$1_LIBS $4"
1060 dnl ******************************
1061 dnl TNEF implementation
1062 dnl ******************************
1063 AC_MSG_CHECKING([for yTNEF])
1064 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1065         [[
1066                 #include <stdio.h>
1067                 #include <ytnef.h>
1068         ]],
1069         [[      TNEFStruct *tnef;       ]]
1070         )],     [tnef_ok=yes], [tnef_ok=no])
1071 if test "$tnef_ok" = "yes"; then
1072         AC_MSG_RESULT([yes])
1073         TNEF_ATTACHMENTS="tnef-attachments"
1074         TNEF_CFLAGS="-DHAVE_YTNEF_H"
1075 else
1076         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1077         [[
1078                 #include <stdio.h>
1079                 #include <libytnef/ytnef.h>
1080         ]],
1081         [[      TNEFStruct *tnef;       ]]
1082         )], [tnef_ok=yes], [tnef_ok=no])
1083         if test "$tnef_ok" = "yes"; then
1084                 AC_MSG_RESULT([yes])
1085                 TNEF_ATTACHMENTS="tnef-attachments"
1086                 TNEF_CFLAGS="-DHAVE_LIBYTNEF_YTNEF_H"
1087         else
1088                 AC_MSG_RESULT([no])
1089                 TNEF_ATTACHMENTS=""
1090                 TNEF_CFLAGS=""
1091         fi
1093 AC_SUBST(TNEF_CFLAGS)
1095 dnl *******************************
1096 dnl Check for GNOME Online Accounts
1097 dnl *******************************
1098 AC_ARG_ENABLE([goa],
1099         [AS_HELP_STRING([--enable-goa],
1100         [enable GNOME Online Accounts support (default=yes)])],
1101         [enable_goa=$enableval], [enable_goa=yes])
1102 AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
1103 AC_MSG_RESULT([$enable_goa])
1104 if test "x$enable_goa" = xyes; then
1105         PKG_CHECK_MODULES([GOA], [goa-1.0 >= goa_minimum_version],,
1106         [AC_MSG_ERROR([goa-1.0 not found (or version < goa_minimum_version),
1107         If you want to disable GNOME Online Accounts support,
1108         please append --disable-goa to configure.])])
1110 AM_CONDITIONAL([ENABLE_ONLINE_ACCOUNTS], [test "x$enable_goa" = xyes])
1112 dnl ******************************
1113 dnl Check for NetworkManager
1114 dnl ******************************
1115 AC_ARG_ENABLE([nm],
1116         [AS_HELP_STRING([--enable-nm],
1117         [enable NetworkManager support (default=yes)])],
1118         [enable_nm=$enableval],[enable_nm=yes])
1119 AC_MSG_CHECKING([if NetworkManager support is enabled])
1120 AC_MSG_RESULT([$enable_nm])
1121 if test "$enable_nm" = yes; then
1122         PKG_CHECK_MODULES([NM], [NetworkManager >= nm_minimum_version],,
1123         [AC_MSG_ERROR([NetworkManager not found (or version < nm_minimum_version).
1124         If you want to disable NetworkManager, please append --disable-nm to configure.])])
1125         AC_SUBST(HAVE_NM)
1126         AC_SUBST(NM_CFLAGS)
1128 AM_CONDITIONAL([ENABLE_NETWORK_MANAGER], [test "$enable_nm" = yes])
1130 dnl ******************************
1131 dnl Check for Windows SENS API
1132 dnl ******************************
1133 AC_ARG_ENABLE([sens],
1134         [AS_HELP_STRING([--enable-sens],
1135         [enable Windows SENS support (default=yes)])],
1136         [enable_sens=$enableval],[enable_sens=yes])
1137 if test "x$os_win32" = xyes; then
1138         if test "x$enable_sens" = xyes; then
1139                 AC_CHECK_HEADER([rpc.h],[ enable_sens="yes" ],[ enable_sens="no" ])
1140         fi
1141 else
1142         enable_sens="no"
1144 AC_MSG_CHECKING([if Windows SENS support is enabled])
1145 AC_MSG_RESULT([$enable_sens])
1146 if test "$enable_sens" = yes; then
1147         SENS_LIBS="-lole32 -loleaut32 -luuid -lrpcrt4"
1148         AC_CHECK_HEADER([eventsys.h],
1149                 [AC_DEFINE([HAVE_EVENTSYS_H], 1, [Have <eventsys.h>])],,
1150                 [[      #if HAVE_EVENTSYS_H
1151                         #include <eventsys.h>
1152                         #endif
1153                 ]])
1154         AC_CHECK_HEADER([sensevts.h],
1155                 [AC_DEFINE([HAVE_SENSEVTS_H], 1, [Have <sensevts.h>])],,
1156                 [[      #if HAVE_SENSEVTS_H
1157                         #include <sensevts.h>
1158                         #endif
1159                 ]])
1160         AC_SUBST(HAVE_SENS)
1161         AC_SUBST(SENS_LIBS)
1163 AC_MSG_CHECKING([if Windows SENS support is enabled])
1164 AC_MSG_RESULT([$enable_sens])
1165 if test "$enable_sens" = yes; then
1166         SENS_LIBS="-lole32 -loleaut32 -luuid -lrpcrt4"
1167         AC_CHECK_HEADER([eventsys.h],
1168                 [AC_DEFINE([HAVE_EVENTSYS_H], 1, [Have <eventsys.h>])],,
1169                 [[      #if HAVE_EVENTSYS_H
1170                         #include <eventsys.h>
1171                         #endif
1172                 ]])
1173         AC_CHECK_HEADER([sensevts.h],
1174                 [AC_DEFINE([HAVE_SENSEVTS_H], 1, [Have <sensevts.h>])],,
1175                 [[      #if HAVE_SENSEVTS_H
1176                         #include <sensevts.h>
1177                         #endif
1178                 ]])
1179         AC_SUBST(HAVE_SENS)
1180         AC_SUBST(SENS_LIBS)
1182 AM_CONDITIONAL([ENABLE_WINDOWS_SENS], [test "$enable_sens" = yes])
1184 dnl ******************************
1185 dnl Enable ConnMan support ?
1186 dnl ******************************
1187 AC_ARG_ENABLE([connman],
1188         [AS_HELP_STRING([--enable-connman],
1189         [enable ConnMan support (default=no)])],
1190         [enable_connman=$enableval],[enable_connman=no])
1191 if test "x$enable_nm$enable_connman" = "xyesyes"; then
1192         AC_MSG_ERROR([It is not possible to enable both ConnMan and NetworkManager])
1194 AM_CONDITIONAL([ENABLE_CONNMAN], [test "$enable_connman" = yes])
1196 dnl ******************************
1197 dnl Camel Flags
1198 dnl ******************************
1199 EVO_SET_COMPILE_FLAGS(CAMEL, camel-provider-1.2, $MANUAL_NSS_CFLAGS, $MOXILLA_NSS_CFLAGS)
1200 AC_SUBST(CAMEL_CFLAGS)
1201 AC_SUBST(CAMEL_LIBS)
1203 EVO_SET_COMPILE_FLAGS(CAMEL_GROUPWISE, camel-provider-1.2 libedataserver-1.2)
1204 AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
1205 AC_SUBST(CAMEL_GROUPWISE_LIBS)
1207 if test "x$mozilla_nss" != "x"; then
1208         EVO_SET_COMPILE_FLAGS(MOZILLA_NSS, $mozilla_nss)
1209         MOZILLA_L_DIR=`${PKG_CONFIG} --libs-only-L $mozilla_nss`
1210 else
1211         if test "x$MOZILLA_MANUAL_LIBS" != "x"; then
1212                 MOZILLA_L_DIR="-L$with_nss_lib"
1213         fi
1216 dnl ******************************
1217 dnl CERT_UI Flags
1218 dnl ******************************
1220 dnl Here we want the Mozilla flags to go *before* the other ones,
1221 dnl especially the mozilla-nss -I flags to go before the gnutls ones
1222 dnl (which are dragged in through libedataserverui), as both
1223 dnl gnutls and mozilla-nss have a header called "pkcs12.h" which is
1224 dnl included in smime/lib/e-pkcs12.c. It wants the Mozilla NSS one.
1226 EVO_SET_COMPILE_FLAGS(CERT_UI, libedataserverui-3.0)
1227 CERT_UI_CFLAGS="$MANUAL_NSS_CFLAGS $MOZILLA_NSS_CFLAGS $CERT_UI_CFLAGS"
1228 CERT_UI_LIBS="$MOZILLA_L_DIR $MANUAL_NSS_LIBS $MOZILLA_NSS_LIBS $CERT_UI_LIBS"
1229 AC_SUBST(CERT_UI_CFLAGS)
1230 AC_SUBST(CERT_UI_LIBS)
1232 dnl ************
1233 dnl E_UTIL Flags
1234 dnl ************
1235 EVO_SET_COMPILE_FLAGS(E_UTIL, libedataserverui-3.0 camel-provider-1.2 $mozilla_nspr, $MANUAL_NSPR_CFLAGS $MANUAL_NSPR_LIBS)
1236 AC_SUBST(E_UTIL_CFLAGS)
1237 AC_SUBST(E_UTIL_LIBS)
1239 E_UTIL_LIBS="$E_UTIL_LIBS $MATH_LIB"
1241 dnl **************
1242 dnl TZDIALOG Flags
1243 dnl **************
1244 EVO_SET_COMPILE_FLAGS(TZDIALOG, libecal-1.2 camel-1.2)
1245 AC_SUBST(TZDIALOG_CFLAGS)
1246 AC_SUBST(TZDIALOG_LIBS)
1248 dnl ***************
1249 dnl E_WIDGETS Flags
1250 dnl ***************
1251 EVO_SET_COMPILE_FLAGS(E_WIDGETS, libedataserverui-3.0 gtkhtml-editor-4.0)
1252 AC_SUBST(E_WIDGETS_CFLAGS)
1253 AC_SUBST(E_WIDGETS_LIBS)
1255 dnl ***************
1256 dnl IMPORTERS Flags
1257 dnl ***************
1258 EVO_SET_COMPILE_FLAGS(IMPORTERS, libedataserverui-3.0 camel-provider-1.2 libebook-1.2)
1259 AC_SUBST(IMPORTERS_CFLAGS)
1260 AC_SUBST(IMPORTERS_LIBS)
1262 dnl ***************
1263 dnl LIBFILTER Flags
1264 dnl ***************
1265 EVO_SET_COMPILE_FLAGS(LIBFILTER, libedataserver-1.2 camel-1.2)
1266 AC_SUBST(LIBFILTER_CFLAGS)
1267 AC_SUBST(LIBFILTER_LIBS)
1269 dnl ***********
1270 dnl Shell Flags
1271 dnl ***********
1272 EVO_SET_COMPILE_FLAGS(SHELL, libgtkhtml-4.0 libedataserverui-3.0)
1273 AC_SUBST(SHELL_CFLAGS)
1274 AC_SUBST(SHELL_LIBS)
1276 dnl *****************
1277 dnl Addressbook Flags
1278 dnl *****************
1279 EVOLUTION_ADDRESSBOOK_DEPS="libgtkhtml-4.0 libebook-1.2 libedataserverui-3.0 camel-1.2 gtkhtml-editor-4.0"
1280 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
1281 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1282 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1284 dnl ***************
1285 dnl Libnotify Flags
1286 dnl ***************
1287 LIBNOTIFY_CFLAGS=
1288 LIBNOTIFY_LIBS=
1289 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= libnotify_minimum_version], [HAVE_LIBNOTIFY="yes"], [HAVE_LIBNOTIFY="no"])
1290 if test "x$HAVE_LIBNOTIFY" = "xyes"; then
1291         AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if you have libnotify])
1292         libnotify="libnotify"
1293 else
1294         libnotify=""
1296 AC_SUBST(LIBNOTIFY_CFLAGS)
1297 AC_SUBST(LIBNOTIFY_LIBS)
1299 if $PKG_CONFIG --atleast-version=0.7 libnotify; then
1300         AC_DEFINE(HAVE_LIBNOTIFY_07, 1, [Define if you have libnotify >= 0.7])
1303 dnl **************
1304 dnl Calendar Flags
1305 dnl **************
1306 EVO_SET_COMPILE_FLAGS(LIBSOUP, libsoup-gnome-2.4 >= libsoup_minimum_version)
1307 AC_SUBST(LIBSOUP_CFLAGS)
1308 AC_SUBST(LIBSOUP_LIBS)
1310 EVO_SET_COMPILE_FLAGS(GDATA, libgdata >= 0.7.0)
1311 AC_SUBST(GDATA_CFLAGS)
1312 AC_SUBST(GDATA_LIBS)
1314 if `$PKG_CONFIG --atleast-version=0.9 libgdata`; then
1315         AC_DEFINE(HAVE_LIBGDATA_0_9,1,[libgdata is 0.9 or higher])
1318 EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, libgtkhtml-4.0 libebook-1.2 libecal-1.2 libedataserverui-3.0 libebackend-1.2 $libnotify gtkhtml-editor-4.0)
1319 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1320 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1322 dnl ****************************
1323 dnl Check for ical_set_unknown_token_handling_setting function
1324 dnl ****************************
1325 AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
1326 save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
1327 save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
1328 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1329         [[#include <libical/ical.h>]],
1330         [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
1331         [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])
1332 CFLAGS=$save_cflags
1333 LIBS=$save_libs
1334 AC_MSG_RESULT([$ac_cv_have_iuth])
1336 dnl **********
1337 dnl Mail Flags
1338 dnl **********
1339 EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, camel-provider-1.2 libgtkhtml-4.0 gtkhtml-editor-4.0 $mozilla_nss libebook-1.2 libedataserverui-3.0)
1340 AC_SUBST(EVOLUTION_MAIL_CFLAGS)
1341 AC_SUBST(EVOLUTION_MAIL_LIBS)
1343 dnl ***************************
1344 dnl Evolution-Data-Server Flags
1345 dnl ***************************
1346 DATASERVER_EXEC_VERSION=`${PKG_CONFIG} --variable=execversion evolution-data-server-1.2`
1347 AC_SUBST(DATASERVER_EXEC_VERSION)
1349 dnl *****************
1350 dnl EggSMClient Flags
1351 dnl *****************
1352 if test "x$os_win32" = "xyes"; then
1353         EVO_SET_COMPILE_FLAGS(EGG_SMCLIENT, gtk+-3.0)
1354 else
1355         EVO_SET_COMPILE_FLAGS(EGG_SMCLIENT, gtk+-3.0,, -lSM -lICE)
1357 AC_SUBST(EGG_SMCLIENT_CFLAGS)
1358 AC_SUBST(EGG_SMCLIENT_LIBS)
1360 dnl *******************
1361 dnl Special directories
1362 dnl *******************
1364 dnl If you add something here, consider whether or not you also need to add it to one or more .pc.in
1365 dnl files (for Connector, etc)
1367 privlibdir='${libdir}'/evolution/$BASE_VERSION
1368 AC_SUBST(privlibdir)
1370 privlibexecdir='${libexecdir}'/evolution/$BASE_VERSION
1371 AC_SUBST(privlibexecdir)
1373 privdatadir='${datadir}'/evolution/$BASE_VERSION
1374 AC_SUBST(privdatadir)
1376 privincludedir='${includedir}'/evolution-$BASE_VERSION
1377 AC_SUBST(privincludedir)
1379 moduledir="$privlibdir/modules"
1380 AC_SUBST(moduledir)
1382 uidir="$privdatadir/ui"
1383 AC_SUBST(uidir)
1385 evolutionhelpdir="$privdatadir/help"
1386 AC_SUBST(evolutionhelpdir)
1388 icondir="$privdatadir/icons"
1389 AC_SUBST(icondir)
1391 imagesdir="$privdatadir/images"
1392 AC_SUBST(imagesdir)
1394 if test "$os_win32" = yes; then
1395         dnl On Win32 there is no "rpath" mechanism. We install the private
1396         dnl shared libraries in $libdir, meaning the DLLs will actually be in
1397         dnl $bindir. This means just having $bindir in PATH will be enough. This
1398         dnl also means gnome_win32_get_prefixes() will be able to deduce the
1399         dnl installation folder correctly.
1400         privsolibdir=$libdir
1401 else
1402         privsolibdir=$privlibdir
1404 AC_SUBST(privsolibdir)
1406 soundsdir="$privdatadir/sounds"
1407 AC_SUBST(soundsdir)
1409 etspecdir="$privdatadir/etspec"
1410 AC_SUBST(etspecdir)
1412 viewsdir="$privdatadir/views"
1413 AC_SUBST(viewsdir)
1415 dnl For evolution-alarm-notify.desktop
1416 AS_AC_EXPAND(PRIVLIBEXECDIR, "$privlibexecdir")
1418 dnl ************************
1419 dnl Plugins
1420 dnl ************************
1422 plugindir="$privlibdir/plugins"
1423 AC_SUBST(plugindir)
1425 EVO_PLUGIN_RULE=$srcdir/plugin.mk
1426 AC_SUBST_FILE(EVO_PLUGIN_RULE)
1428 AC_ARG_ENABLE([plugins],
1429         AS_HELP_STRING([--enable-plugins=[no/base/all/experimental/list]],
1430         [Enable plugins.]),
1431         [enable_plugins="$enableval"],[enable_plugins=all])
1433 dnl Add any new plugins here
1434 plugins_base_always="calendar-file calendar-http itip-formatter default-source addressbook-file mark-all-read publish-calendar caldav imap-features google-account-setup webdav-account-setup"
1436 plugins_base="$plugins_base_always"
1437 dist_plugins_base="$plugins_base_always calendar-weather"
1439 plugins_standard_always="bbdb save-calendar mail-to-task mailing-list-actions prefer-plain mail-notification attachment-reminder backup-restore email-custom-header face templates vcard-inline dbx-import"
1441 plugins_standard="$plugins_standard_always"
1442 dist_plugins_standard="$plugins_standard audio-inline image-inline pst-import"
1444 plugins_experimental_always="external-editor"
1446 plugins_experimental="$plugins_experimental_always $TNEF_ATTACHMENTS"
1447 dist_plugins_experimental="$plugins_experimental_always tnef-attachments"
1449 dnl ******************************************************************
1450 dnl The following plugins have additional library dependencies.
1451 dnl They must be explicitly disabled if the libraries are not present.
1452 dnl ******************************************************************
1454 dnl *******************************************
1455 dnl audio-inline plugin requires gstreamer-0.10
1456 dnl *******************************************
1457 AC_ARG_ENABLE([audio-inline],
1458         [AS_HELP_STRING([--enable-audio-inline],
1459         [Enable audio-inline plugin @<:@default=yes@:>@])],
1460         [enable_audio_inline="$enableval"], [enable_audio_inline=yes])
1462 if test "x$enable_audio_inline" = "xyes"; then
1463         PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, have_gst=yes, have_gst=no)
1464         AC_SUBST(GSTREAMER_CFLAGS)
1465         AC_SUBST(GSTREAMER_LIBS)
1467         if test "x$have_gst" = "xyes"; then
1468                 plugins_standard="$plugins_standard audio-inline"
1469         else
1470                 AC_MSG_ERROR([gstreamer-0.10 is required for the audio-inline plugin.  Use --disable-audio-inline to exclude the plugin.])
1471         fi
1474 dnl *****************************************
1475 dnl calendar-weather plugin requires gweather
1476 dnl *****************************************
1477 AC_ARG_ENABLE([weather],
1478         [AS_HELP_STRING([--enable-weather],
1479         [Enable calendar-weather plugin @<:@default=yes@:>@])],
1480         [enable_weather="$enableval"],[enable_weather=yes])
1482 if test "x$enable_weather" = "xyes"; then
1483         PKG_CHECK_MODULES([GWEATHER], gweather-3.0 >= gweather_minimum_version,
1484         have_weather="yes", have_weather="no")
1485         AC_SUBST(GWEATHER_CFLAGS)
1486         AC_SUBST(GWEATHER_LIBS)
1488         if test "x$have_weather" = "xyes"; then
1489                 plugins_base="$plugins_base calendar-weather"
1490         else
1491                 AC_MSG_ERROR([gweather-3.0 >= gweather_minimum_version is required for the calendar-weather plugin.  Use --disable-weather to exclude the plugin.])
1492         fi
1495 dnl ********************************************************************
1496 dnl maps in contacts preview requires champlain-gtk, geoclue and clutter
1497 dnl ********************************************************************
1498 AC_ARG_ENABLE([contact-maps],
1499         [AS_HELP_STRING([--enable-contact-maps],
1500         [Enable contact maps @<:@default=no@:>@])],
1501         [enable_contact_maps="$enableval"], [enable_contact_maps="no"])
1503 if test "x$enable_contact_maps" = "xyes"; then
1504         if test "x$with_clutter" = "xno"; then
1505                 AC_MSG_ERROR([Clutter is required for maps in contacts. Use --with-clutter=yes to enable clutter.])
1506         fi
1508         PKG_CHECK_MODULES([CHAMPLAIN], [champlain-gtk-0.10 >= champlain_minimum_version], [have_champlain=yes], [have_champlain=no])
1509         AC_SUBST(CHAMPLAIN_CFLAGS)
1510         AC_SUBST(CHAMPLAIN_LIBS)
1512         if test "x$have_champlain" = "xno"; then
1513                 AC_MSG_ERROR([champlain-gtk-0.10 >= champlain_minimum_version is required for maps in contacts preview.])
1514         fi
1516         PKG_CHECK_MODULES([GEOCLUE], [geoclue >= geoclue_minimum_version], [have_geoclue=yes], [have_geoclue=no])
1517         AC_SUBST(GEOCLUE_CFLAGS)
1518         AC_SUBST(GEOCLUE_LIBS)
1520         if test "x$have_geoclue" = "xno"; then
1521                 AC_MSG_ERROR([geoclue is required for maps in contacts preview.])
1522         fi
1524         PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= clutter_gtk_minimum_version], [have_clutter_gtk="yes"], [have_clutter_gtk="no"] )
1526         if test "x$have_clutter_gtk" = "xno"; then
1527                 AC_MSG_ERROR([clutter-gtk-1.0 is required for maps in contacts preview.])
1528         fi
1530         AC_DEFINE(WITH_CONTACT_MAPS, 1, [When defined contacts preview will contain maps])
1533 dnl *****************************************
1534 dnl image-inline plugin requires gtkimageview
1535 dnl *****************************************
1536 AC_ARG_ENABLE([image-inline],
1537         [AS_HELP_STRING([--enable-image-inline],
1538         [Enable image-inline plugin @<:@default=yes@:>@])],
1539         [enable_image_inline="$enableval"], [enable_image_inline=yes])
1541 if test "x$enable_image_inline" = "xyes"; then
1542         PKG_CHECK_MODULES(GTKIMAGEVIEW, gtkimageview >= gtkimageview_minimum_version, have_imageview=yes, have_imageview=no)
1543         AC_SUBST(GTKIMAGEVIEW_CFLAGS)
1544         AC_SUBST(GTKIMAGEVIEW_LIBS)
1546         if test "x$have_imageview" = "xyes"; then
1547                 plugins_standard="$plugins_standard image-inline"
1548         else
1549                 AC_MSG_ERROR([gtkimageview >= gtkimageview_minimum_version is required for the image-inline plugin.  Use --disable-image-inline to exclude the plugin.])
1550         fi
1553 dnl *********************************
1554 dnl pst-import plugin requires libpst
1555 dnl *********************************
1556 AC_ARG_ENABLE([pst-import],
1557         [AS_HELP_STRING([--enable-pst-import],
1558         [Enable pst-import plugin @<:@default=yes@:>@])],
1559         [enable_pst="$enableval"], [enable_pst=yes])
1561 if test "x$enable_pst" = "xyes"; then
1562         PKG_CHECK_MODULES(LIBPST, libpst, have_pst=yes, have_pst=no)
1563         AC_SUBST(LIBPST_CFLAGS)
1564         AC_SUBST(LIBPST_LIBS)
1566         if test "x$have_pst" = "xyes"; then
1567                 plugins_standard="$plugins_standard pst-import"
1568         else
1569                 AC_MSG_ERROR([libpst is required for the pst-import plugin.  Use --disable-pst-import to exclude the plugin.])
1570         fi
1573 case x"$enable_plugins" in
1574 xno)
1575         plugins_enabled=""
1576         msg_plugins="no (some core functionality will not be available)"
1577         ;;
1578 xall | x | xyes)
1579         plugins_enabled="$plugins_base $plugins_standard"
1580         msg_plugins="yes (all)"
1581         ;;
1582 xbase)
1583         plugins_enabled="$plugins_base"
1584         msg_plugins="yes ($plugins_base)"
1585         ;;
1586 xexperimental)
1587         plugins_enabled="$plugins_base $plugins_standard $plugins_experimental"
1588         msg_plugins="yes ($plugins_base $plugins_standard $plugins_experimental)"
1589         ;;
1591         plugins_enabled="$enable_plugins"
1592         msg_plugins="yes ($enable_plugins)"
1593         ;;
1594 esac
1596 AC_SUBST(plugins_enabled)
1597 AC_SUBST(dist_plugins_base)
1598 AC_SUBST(dist_plugins_standard)
1599 AC_SUBST(dist_plugins_experimental)
1601 dnl ***********
1602 dnl GConf stuff
1603 dnl ***********
1604 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
1605 AM_GCONF_SOURCE_2
1607 dnl ******************
1608 dnl Sub-version number
1609 dnl ******************
1610 AC_ARG_WITH([sub-version],
1611         AS_HELP_STRING([--with-sub-version=VERSION],
1612         [Specify a sub-version string]))
1614 AC_DEFINE_UNQUOTED(SUB_VERSION, "$with_sub_version", [Version substring, for packagers])
1616 dnl ********************
1617 dnl KDE applnk directory
1618 dnl ********************
1619 AC_ARG_WITH([kde-applnk-path],
1620         AS_HELP_STRING([--with-kde-applnk-path=PATH],
1621         [Location of KDE applnk files]),
1622         [with_kde_applnk_path=$withval], [with_kde_applnk_path="no"])
1624 if test x"$with_kde_applnk_path" != x"no"; then
1625         if test -z "$with_kde_applnk_path"; then
1626                 with_kde_applnk_path="$datadir/applnk"
1627         fi
1628         KDE_APPLNK_DIR="$with_kde_applnk_path"
1629 else
1630         KDE_APPLNK_DIR=""
1632 AM_CONDITIONAL(HAVE_KDE_APPLNK, test x"$KDE_APPLNK_DIR" != x)
1633 AC_SUBST(KDE_APPLNK_DIR)
1635 dnl ********************************************
1636 dnl Glade 3 catalog files (for maintainers only)
1637 dnl ********************************************
1638 AC_ARG_WITH([glade-catalog],
1639         [AS_HELP_STRING([--with-glade-catalog],
1640         [Install the catalog files for Glade 3 ]
1641         [(for maintainers only) [default=no]])],
1642         [with_catalog="$withval"], [with_catalog="no"])
1643 if test "$with_catalog" = "yes"; then
1644         PKG_CHECK_MODULES(GLADEUI, [gladeui-2.0 >= gladeui_minimum_version])
1646 AM_CONDITIONAL(GLADE_CATALOG, test "x$with_catalog" != "xno")
1648 dnl ******************************
1649 dnl Makefiles
1650 dnl ******************************
1652 export privlibdir
1653 export privincludedir
1654 export privdatadir
1655 export plugindir
1657 EVOLUTION_DIR=`(cd $srcdir; pwd)`
1658 AC_SUBST(EVOLUTION_DIR)
1660 AC_CONFIG_FILES([ po/Makefile.in
1661 Makefile
1662 a11y/Makefile
1663 addressbook/Makefile
1664 addressbook/gui/Makefile
1665 addressbook/gui/contact-editor/Makefile
1666 addressbook/gui/contact-list-editor/Makefile
1667 addressbook/gui/merging/Makefile
1668 addressbook/gui/widgets/Makefile
1669 addressbook/importers/Makefile
1670 addressbook/printing/Makefile
1671 addressbook/tools/Makefile
1672 addressbook/tools/csv2vcard
1673 addressbook/util/Makefile
1674 art/Makefile
1675 data/Makefile
1676 data/evolution.desktop.in
1677 data/evolution-alarm-notify.desktop.in
1678 data/evolution-settings.desktop.in
1679 data/icons/Makefile
1680 doc/Makefile
1681 doc/reference/Makefile
1682 doc/reference/shell/Makefile
1683 e-util/Makefile
1684 em-format/Makefile
1685 filter/Makefile
1686 help/Makefile
1687 help/quickref/Makefile
1688 help/quickref/C/Makefile
1689 help/quickref/ca/Makefile
1690 help/quickref/cs/Makefile
1691 help/quickref/de/Makefile
1692 help/quickref/es/Makefile
1693 help/quickref/hu/Makefile
1694 help/quickref/it/Makefile
1695 help/quickref/fr/Makefile
1696 help/quickref/oc/Makefile
1697 help/quickref/pl/Makefile
1698 help/quickref/pt/Makefile
1699 help/quickref/sv/Makefile
1700 help/quickref/sq/Makefile
1701 libgnomecanvas/Makefile
1702 shell/Makefile
1703 shell/evolution-nognome
1704 shell/test/Makefile
1705 ui/Makefile
1706 views/Makefile
1707 views/addressbook/Makefile
1708 views/calendar/Makefile
1709 views/mail/Makefile
1710 views/tasks/Makefile
1711 views/memos/Makefile
1712 widgets/Makefile
1713 widgets/e-timezone-dialog/Makefile
1714 widgets/menus/Makefile
1715 widgets/misc/Makefile
1716 widgets/text/Makefile
1717 widgets/table/Makefile
1718 calendar/Makefile
1719 calendar/importers/Makefile
1720 calendar/gui/Makefile
1721 calendar/gui/alarm-notify/Makefile
1722 calendar/gui/dialogs/Makefile
1723 composer/Makefile
1724 m4/Makefile
1725 mail/Makefile
1726 mail/default/Makefile
1727 mail/default/C/Makefile
1728 mail/default/ca/Makefile
1729 mail/default/cs/Makefile
1730 mail/default/de/Makefile
1731 mail/default/es/Makefile
1732 mail/default/fi/Makefile
1733 mail/default/fr/Makefile
1734 mail/default/hu/Makefile
1735 mail/default/id/Makefile
1736 mail/default/it/Makefile
1737 mail/default/ja/Makefile
1738 mail/default/ko/Makefile
1739 mail/default/lt/Makefile
1740 mail/default/mk/Makefile
1741 mail/default/nl/Makefile
1742 mail/default/pl/Makefile
1743 mail/default/pt/Makefile
1744 mail/default/ro/Makefile
1745 mail/default/sr/Makefile
1746 mail/default/sr@latin/Makefile
1747 mail/default/sv/Makefile
1748 mail/default/zh_CN/Makefile
1749 mail/importers/Makefile
1750 maint/Makefile
1751 modules/Makefile
1752 modules/addressbook/Makefile
1753 modules/bogofilter/Makefile
1754 modules/calendar/Makefile
1755 modules/mail/Makefile
1756 modules/composer-autosave/Makefile
1757 modules/connman/Makefile
1758 modules/mailto-handler/Makefile
1759 modules/network-manager/Makefile
1760 modules/online-accounts/Makefile
1761 modules/offline-alert/Makefile
1762 modules/plugin-lib/Makefile
1763 modules/plugin-manager/Makefile
1764 modules/plugin-mono/Makefile
1765 modules/plugin-python/Makefile
1766 modules/spamassassin/Makefile
1767 modules/startup-wizard/Makefile
1768 modules/windows-sens/Makefile
1769 plugins/Makefile
1770 plugins/addressbook-file/Makefile
1771 plugins/attachment-reminder/Makefile
1772 plugins/audio-inline/Makefile
1773 plugins/backup-restore/Makefile
1774 plugins/bbdb/Makefile
1775 plugins/caldav/Makefile
1776 plugins/calendar-file/Makefile
1777 plugins/calendar-http/Makefile
1778 plugins/calendar-weather/Makefile
1779 plugins/dbx-import/Makefile
1780 plugins/default-source/Makefile
1781 plugins/email-custom-header/Makefile
1782 plugins/external-editor/Makefile
1783 plugins/face/Makefile
1784 plugins/google-account-setup/Makefile
1785 plugins/image-inline/Makefile
1786 plugins/imap-features/Makefile
1787 plugins/itip-formatter/Makefile
1788 plugins/mail-notification/Makefile
1789 plugins/mail-to-task/Makefile
1790 plugins/mailing-list-actions/Makefile
1791 plugins/mark-all-read/Makefile
1792 plugins/prefer-plain/Makefile
1793 plugins/pst-import/Makefile
1794 plugins/publish-calendar/Makefile
1795 plugins/save-calendar/Makefile
1796 plugins/templates/Makefile
1797 plugins/tnef-attachments/Makefile
1798 plugins/vcard-inline/Makefile
1799 plugins/webdav-account-setup/Makefile
1800 smclient/Makefile
1801 smime/Makefile
1802 smime/lib/Makefile
1803 smime/gui/Makefile
1804 sounds/Makefile
1805 capplet/Makefile
1806 capplet/settings/Makefile
1807 capplet/settings/mail-autoconfig/Makefile
1808 evolution-zip
1809 evolution-calendar.pc
1810 evolution-mail.pc
1811 evolution-shell.pc
1812 evolution-plugin.pc
1815 AC_OUTPUT
1817 if test "x$with_sub_version" != "x"; then
1818 echo "
1819         Evolution ($with_sub_version) has been configured as follows: "
1820 else
1821 echo "
1822         Evolution has been configured as follows: "
1825 echo "
1826         LDAP support:           $msg_ldap
1827         Clutter support:        $with_clutter
1828         NetworkManager:         $enable_nm
1829         Windows SENS:           $enable_sens
1830         ConnMan:                $enable_connman
1831         GNOME Online Accounts:  $enable_goa
1832         Libnotify:              $HAVE_LIBNOTIFY
1833         Kerberos 5:             $msg_krb5
1834         SSL support:            $msg_ssl
1835         SMIME support:          $msg_smime
1836         Plugins:                $msg_plugins
1837         User documentation:     $with_help
1838         Mono bindings:          $enable_mono
1839         Python bindings:        $enable_python