~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to .pc/20_gettext_intltool.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

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