1 | # Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(camel) |
---|
3 | AM_CONFIG_HEADER(config.h) |
---|
4 | |
---|
5 | EVOLUTION_MAJOR_VERSION=1 |
---|
6 | EVOLUTION_MINOR_VERSION=0 |
---|
7 | EVOLUTION_MICRO_VERSION=5 |
---|
8 | EVOLUTION_NANO_VERSION=0 |
---|
9 | VERSION=$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION |
---|
10 | PACKAGE=evolution |
---|
11 | |
---|
12 | AM_INIT_AUTOMAKE($PACKAGE, $VERSION) |
---|
13 | AC_SUBST(VERSION) |
---|
14 | |
---|
15 | AC_CHECK_LIB(resolv, res_query, RESOLV_LIBS="-lresolv") |
---|
16 | AC_SUBST(RESOLV_LIBS) |
---|
17 | |
---|
18 | AC_CANONICAL_HOST |
---|
19 | |
---|
20 | AC_DEFINE_UNQUOTED(VERSION_COMMENT, "") |
---|
21 | |
---|
22 | AC_DEFUN(EVO_CHECK_LIB, [ |
---|
23 | dispname="$1" |
---|
24 | pkgname="$2" |
---|
25 | minvers="$3" |
---|
26 | maxvers="$4" |
---|
27 | |
---|
28 | AC_MSG_CHECKING(for $dispname) |
---|
29 | |
---|
30 | if gnome-config --libs $pkgname > /dev/null 2>&1; then |
---|
31 | pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'` |
---|
32 | else |
---|
33 | pkgvers=not |
---|
34 | fi |
---|
35 | AC_MSG_RESULT($pkgvers found) |
---|
36 | |
---|
37 | pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'` |
---|
38 | cmpminvers=`echo $minvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'` |
---|
39 | cmpmaxvers=`echo $maxvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'` |
---|
40 | ok=yes |
---|
41 | if test "$pkgvers" -lt $cmpminvers; then |
---|
42 | ok=no |
---|
43 | elif test -n "$maxvers"; then |
---|
44 | if test "$pkgvers" -gt $cmpmaxvers; then |
---|
45 | ok=no |
---|
46 | elif test "$maxvers" != "$minvers" -a "$cmpmaxvers" -eq "$pkgvers"; then |
---|
47 | ok=no |
---|
48 | fi |
---|
49 | fi |
---|
50 | if test $ok = no; then |
---|
51 | case $maxvers in |
---|
52 | "") |
---|
53 | dispvers="$minvers or higher" |
---|
54 | ;; |
---|
55 | $minvers) |
---|
56 | dispvers="$minvers (exactly)" |
---|
57 | ;; |
---|
58 | *) |
---|
59 | dispvers="$minvers or higher, but less than $maxvers," |
---|
60 | ;; |
---|
61 | esac |
---|
62 | |
---|
63 | AC_MSG_ERROR([ |
---|
64 | "" |
---|
65 | "You need $dispname $dispvers to build Evolution" |
---|
66 | "If you think you already have this installed, consult the README."]) |
---|
67 | fi |
---|
68 | ]) |
---|
69 | |
---|
70 | SCROLLKEEPER_REQUIRED=0.1.4 |
---|
71 | AC_SUBST(SCROLLKEEPER_REQUIRED) |
---|
72 | |
---|
73 | dnl Check for scrollkeeper |
---|
74 | AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no) |
---|
75 | if test x$SCROLLKEEPER_CONFIG = xno; then |
---|
76 | AC_MSG_ERROR(Couldn't find scrollkeeper-config -- please install the scrollkeeper package) |
---|
77 | fi |
---|
78 | SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir` |
---|
79 | AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR) |
---|
80 | |
---|
81 | dnl Test whether jw is installed |
---|
82 | AC_PATH_PROG(JW,jw,no) |
---|
83 | if test x$JW = xno; then |
---|
84 | HAVE_JW="no" |
---|
85 | else |
---|
86 | HAVE_JW="yes" |
---|
87 | fi |
---|
88 | AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes") |
---|
89 | AC_SUBST(HAVE_JW) |
---|
90 | |
---|
91 | dnl Initialize maintainer mode |
---|
92 | AM_MAINTAINER_MODE |
---|
93 | |
---|
94 | AC_ISC_POSIX |
---|
95 | AC_PROG_CC |
---|
96 | AC_PROG_CPP |
---|
97 | AM_PROG_LEX |
---|
98 | AC_PROG_YACC |
---|
99 | case $YACC in |
---|
100 | *yacc*) |
---|
101 | AC_MSG_ERROR(You need bison to build Evolution) |
---|
102 | ;; |
---|
103 | esac |
---|
104 | AC_STDC_HEADERS |
---|
105 | AC_ARG_PROGRAM |
---|
106 | AC_PROG_INSTALL |
---|
107 | AC_PROG_LN_S |
---|
108 | AC_PROG_MAKE_SET |
---|
109 | |
---|
110 | dnl Initialize xml-i18n-tools |
---|
111 | AM_PROG_XML_I18N_TOOLS |
---|
112 | |
---|
113 | dnl Initialize libtool |
---|
114 | AM_PROG_LIBTOOL |
---|
115 | |
---|
116 | AM_ACLOCAL_INCLUDE(macros) |
---|
117 | GNOME_INIT() |
---|
118 | GNOME_COMPILE_WARNINGS |
---|
119 | GNOME_X_CHECKS |
---|
120 | EVO_CHECK_LIB(gnome-libs, gnome, 1.2.9) |
---|
121 | |
---|
122 | ALL_LINGUAS="az bg ca da de el en_AU en_GB es fi fr ga gl hu it ja ko lt lv nl nn no pl pt pt_BR ro ru sk sl sv tr uk zh_CN zh_TW" |
---|
123 | AM_GNOME_GETTEXT |
---|
124 | localedir='$(prefix)/$(DATADIRNAME)/locale' |
---|
125 | AC_SUBST(localedir) |
---|
126 | |
---|
127 | dnl |
---|
128 | dnl Purify support |
---|
129 | dnl |
---|
130 | AC_ARG_ENABLE(purify, |
---|
131 | [ --enable-purify=[no/yes] Enable support for building executables with |
---|
132 | Purify.],,enable_purify=no) |
---|
133 | AC_PATH_PROG(PURIFY, purify, impure) |
---|
134 | AC_ARG_WITH(purify-options, [ --with-purify-options=OPTIONS Options passed to the purify command line (defaults to PURIFYOPTIONS variable).]) |
---|
135 | if test "x$with_purify_options" = "xno"; then |
---|
136 | with_purify_options="-always-use-cache-dir=yes -cache-dir=/gnome/lib/purify" |
---|
137 | fi |
---|
138 | if test "x$PURIFYOPTIONS" = "x"; then |
---|
139 | PURIFYOPTIONS=$with_purify_options |
---|
140 | fi |
---|
141 | AC_SUBST(PURIFY) |
---|
142 | AM_CONDITIONAL(ENABLE_PURIFY, test "x$enable_purify" = "xyes" -a "x$PURIFY" != "ximpure") |
---|
143 | PURIFY="$PURIFY $PURIFYOPTIONS" |
---|
144 | |
---|
145 | |
---|
146 | AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib) |
---|
147 | AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL") |
---|
148 | |
---|
149 | AC_MSG_CHECKING(system mail directory) |
---|
150 | if test -d /var/mail -a '!' -h /var/mail ; then |
---|
151 | system_mail_dir=/var/mail |
---|
152 | else |
---|
153 | system_mail_dir=/var/spool/mail |
---|
154 | fi |
---|
155 | AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir") |
---|
156 | |
---|
157 | case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in |
---|
158 | d??????rw?) |
---|
159 | CAMEL_LOCK_HELPER_USER="" |
---|
160 | CAMEL_LOCK_HELPER_GROUP="" |
---|
161 | system_mail_perm="world writable" |
---|
162 | ;; |
---|
163 | |
---|
164 | d???rw????) |
---|
165 | CAMEL_LOCK_HELPER_USER="" |
---|
166 | CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'` |
---|
167 | system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP" |
---|
168 | ;; |
---|
169 | |
---|
170 | drw???????) |
---|
171 | CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'` |
---|
172 | CAMEL_LOCK_HELPER_GROUP="" |
---|
173 | system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER" |
---|
174 | ;; |
---|
175 | |
---|
176 | *) |
---|
177 | CAMEL_LOCK_HELPER_USER="" |
---|
178 | CAMEL_LOCK_HELPER_GROUP="" |
---|
179 | system_mail_perm="???" |
---|
180 | ;; |
---|
181 | esac |
---|
182 | |
---|
183 | AC_MSG_RESULT([$system_mail_dir, $system_mail_perm]) |
---|
184 | AC_SUBST(CAMEL_LOCK_HELPER_USER) |
---|
185 | AC_SUBST(CAMEL_LOCK_HELPER_GROUP) |
---|
186 | |
---|
187 | dnl * Time zone stuff |
---|
188 | AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone, |
---|
189 | AC_TRY_COMPILE([ |
---|
190 | #include <time.h> |
---|
191 | ], [ |
---|
192 | timezone = 1; |
---|
193 | ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)) |
---|
194 | if test $ac_cv_var_timezone = yes; then |
---|
195 | AC_DEFINE(HAVE_TIMEZONE) |
---|
196 | else |
---|
197 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, |
---|
198 | AC_TRY_COMPILE([ |
---|
199 | #include <time.h> |
---|
200 | ], [ |
---|
201 | struct tm tm; |
---|
202 | tm.tm_gmtoff = 1; |
---|
203 | ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) |
---|
204 | if test $ac_cv_struct_tm_gmtoff = yes; then |
---|
205 | AC_DEFINE(HAVE_TM_GMTOFF) |
---|
206 | else |
---|
207 | AC_ERROR(unable to find a way to determine timezone) |
---|
208 | fi |
---|
209 | fi |
---|
210 | |
---|
211 | AC_CHECK_FUNCS(mkstemp mkdtemp isblank) |
---|
212 | |
---|
213 | dnl ************************************************** |
---|
214 | dnl ctime_r prototype |
---|
215 | dnl ************************************************** |
---|
216 | |
---|
217 | AC_CACHE_CHECK([if ctime_r wants three arguments], ac_cv_ctime_r_three_args, |
---|
218 | [ |
---|
219 | AC_TRY_COMPILE([ |
---|
220 | #include <time.h> |
---|
221 | ],[ |
---|
222 | char *buf; |
---|
223 | time_t date; |
---|
224 | ctime_r( &date, buf, 100 ); |
---|
225 | ],[ |
---|
226 | ac_cv_ctime_r_three_args=yes |
---|
227 | ],[ |
---|
228 | ac_cv_ctime_r_three_args=no |
---|
229 | ]) |
---|
230 | ]) |
---|
231 | |
---|
232 | if test x"$ac_cv_ctime_r_three_args" = xyes ; then |
---|
233 | AC_DEFINE(CTIME_R_THREE_ARGS) |
---|
234 | fi |
---|
235 | |
---|
236 | dnl ************************************************** |
---|
237 | dnl gethostbyname_r prototype |
---|
238 | dnl ************************************************** |
---|
239 | |
---|
240 | AC_CHECK_FUNCS(gethostbyname_r,[ |
---|
241 | AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args, |
---|
242 | [ |
---|
243 | AC_TRY_COMPILE([ |
---|
244 | #include "confdefs.h" |
---|
245 | #include <sys/types.h> |
---|
246 | #include <sys/socket.h> |
---|
247 | #include <netinet/in.h> |
---|
248 | #include <netdb.h> |
---|
249 | |
---|
250 | #define BUFSIZE (sizeof(struct hostent)+10) |
---|
251 | ],[ |
---|
252 | struct hostent hent; |
---|
253 | char buffer[BUFSIZE]; |
---|
254 | int bufsize=BUFSIZE; |
---|
255 | int h_errno; |
---|
256 | |
---|
257 | (void)gethostbyname_r( "www.ximian.com", &hent, buffer, bufsize, &h_errno); |
---|
258 | ],[ |
---|
259 | ac_cv_gethostbyname_r_five_args=yes |
---|
260 | ],[ |
---|
261 | ac_cv_gethostbyname_r_five_args=no |
---|
262 | ]) |
---|
263 | ])]) |
---|
264 | |
---|
265 | if test x"$ac_cv_gethostbyname_r_five_args" = xyes ; then |
---|
266 | AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS) |
---|
267 | fi |
---|
268 | |
---|
269 | dnl *********** |
---|
270 | dnl * db3 stuff |
---|
271 | dnl *********** |
---|
272 | |
---|
273 | # To ensure that any copy of evolution of a given version can read |
---|
274 | # the data files of any other copy, we require a precise db3 version. |
---|
275 | # This can only change between Evolution versions (and then can only |
---|
276 | # go up.) |
---|
277 | evolution_db_version_major=3 |
---|
278 | evolution_db_version_minor=1 |
---|
279 | evolution_db_version_patch=17 |
---|
280 | |
---|
281 | evolution_db_version=${evolution_db_version_major}.${evolution_db_version_minor}.${evolution_db_version_patch} |
---|
282 | AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MAJOR,$evolution_db_version_major) |
---|
283 | AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MINOR,$evolution_db_version_minor) |
---|
284 | AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_PATCH,$evolution_db_version_patch) |
---|
285 | |
---|
286 | |
---|
287 | AC_ARG_WITH(db3, [ --with-db3=PREFIX Location of db3], |
---|
288 | [with_db3_includes="$withval/include" |
---|
289 | with_db3_libs="$withval/lib"]) |
---|
290 | AC_ARG_WITH(db3-includes, [ --with-db3-includes=PATH Location of db3 includes], |
---|
291 | with_db3_includes="$withval") |
---|
292 | AC_ARG_WITH(db3-libs, [ --with-db3-libs=PATH Location of db3 libs], |
---|
293 | with_db3_libs="$withval") |
---|
294 | |
---|
295 | if test -z "$with_db3_libs"; then |
---|
296 | with_db3_libs="/usr/lib" |
---|
297 | fi |
---|
298 | |
---|
299 | dnl The AC_CACHE_CHECK lets you avoid having to specify --with-db3 |
---|
300 | dnl again with later configures |
---|
301 | AC_CACHE_CHECK([for db3 compiler flags], ac_cv_db3_cflags, |
---|
302 | [ |
---|
303 | if test -n "${with_db3_includes}"; then |
---|
304 | ac_cv_db3_cflags="-I$with_db3_includes" |
---|
305 | fi |
---|
306 | ]) |
---|
307 | DB3_CFLAGS=$ac_cv_db3_cflags |
---|
308 | AC_SUBST(DB3_CFLAGS) |
---|
309 | |
---|
310 | CPPFLAGS_save="$CPPFLAGS" |
---|
311 | CPPFLAGS="$DB3_CFLAGS $CPPFLAGS" |
---|
312 | AC_CHECK_HEADERS(db.h db3/db.h, break) |
---|
313 | |
---|
314 | AC_CACHE_CHECK([db3 header version], ac_cv_db3_header_version, |
---|
315 | [ |
---|
316 | AC_TRY_COMPILE([ |
---|
317 | #ifdef HAVE_DB3_DB_H |
---|
318 | #include <db3/db.h> |
---|
319 | #else |
---|
320 | #include <db.h> |
---|
321 | #endif |
---|
322 | ],[ |
---|
323 | #if DB_VERSION_MAJOR != $evolution_db_version_major || \ |
---|
324 | DB_VERSION_MINOR != $evolution_db_version_minor || \ |
---|
325 | DB_VERSION_PATCH != $evolution_db_version_patch |
---|
326 | #error |
---|
327 | #endif |
---|
328 | ], :, AC_MSG_ERROR(Found db.h is not version $evolution_db_version)) |
---|
329 | |
---|
330 | ac_cv_db3_header_version=$evolution_db_version |
---|
331 | ]) |
---|
332 | |
---|
333 | GNOME_PTHREAD_CHECK |
---|
334 | |
---|
335 | AC_CACHE_CHECK([for db3 library name], ac_cv_db3_ldadd, |
---|
336 | [ |
---|
337 | LIBS_save="$LIBS" |
---|
338 | ac_cv_db3_ldadd="" |
---|
339 | |
---|
340 | for name in db db3 db-3.1; do |
---|
341 | LIBS="$LIBS_save $with_db3_libs/lib${name}.a $PTHREAD_LIB" |
---|
342 | AC_TRY_LINK([ |
---|
343 | #ifdef HAVE_DB3_DB_H |
---|
344 | #include <db3/db.h> |
---|
345 | #else |
---|
346 | #include <db.h> |
---|
347 | #endif |
---|
348 | ],[ |
---|
349 | DB *db; |
---|
350 | db_create (&db, 0, 0); |
---|
351 | ], [ |
---|
352 | ac_cv_db3_ldadd="$with_db3_libs/lib${name}.a $PTHREAD_LIB" |
---|
353 | break |
---|
354 | ]) |
---|
355 | done |
---|
356 | LIBS="$LIBS_save" |
---|
357 | |
---|
358 | if test -z "$ac_cv_db3_ldadd"; then |
---|
359 | AC_MSG_ERROR(Could not find db3 library) |
---|
360 | fi |
---|
361 | ]) |
---|
362 | DB3_LDADD=$ac_cv_db3_ldadd |
---|
363 | AC_SUBST(DB3_LDADD) |
---|
364 | |
---|
365 | AC_CACHE_CHECK([that db3 library version matches header version], ac_cv_db3_lib_version_match, |
---|
366 | [ |
---|
367 | LIBS="$DB3_LDADD $LIBS" |
---|
368 | AC_TRY_RUN([ |
---|
369 | #ifdef HAVE_DB3_DB_H |
---|
370 | #include <db3/db.h> |
---|
371 | #else |
---|
372 | #include <db.h> |
---|
373 | #endif |
---|
374 | |
---|
375 | int |
---|
376 | main (void) |
---|
377 | { |
---|
378 | int major, minor, patch; |
---|
379 | |
---|
380 | db_version (&major, &minor, &patch); |
---|
381 | return !(major == DB_VERSION_MAJOR && |
---|
382 | minor == DB_VERSION_MINOR && |
---|
383 | patch == DB_VERSION_PATCH); |
---|
384 | } |
---|
385 | ], ac_cv_db3_lib_version_match=yes, ac_cv_db3_lib_version_match=no, |
---|
386 | ac_cv_db3_lib_version_match=yes) |
---|
387 | ]) |
---|
388 | if test "$ac_cv_db3_lib_version_match" = no; then |
---|
389 | AC_MSG_ERROR(db3 headers and library do not match... multiple copies installed?) |
---|
390 | fi |
---|
391 | |
---|
392 | CPPFLAGS="$CPPFLAGS_save" |
---|
393 | LIBS="$LIBS_save" |
---|
394 | |
---|
395 | |
---|
396 | dnl ************************************************** |
---|
397 | dnl * ldap related stuff. |
---|
398 | dnl ************************************************** |
---|
399 | AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution]) |
---|
400 | AC_ARG_WITH(static-ldap, [ --with-static-ldap=[no/yes] Link LDAP support statically into evolution ]) |
---|
401 | AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=no}") |
---|
402 | case $ac_cv_with_openldap in |
---|
403 | no|"") |
---|
404 | msg_ldap=no |
---|
405 | ;; |
---|
406 | yes) |
---|
407 | with_openldap=/usr |
---|
408 | msg_ldap=yes |
---|
409 | ;; |
---|
410 | *) |
---|
411 | with_openldap=$ac_cv_with_openldap |
---|
412 | LDAP_CFLAGS="-I$ac_cv_with_openldap/include" |
---|
413 | LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib" |
---|
414 | msg_ldap=yes |
---|
415 | ;; |
---|
416 | esac |
---|
417 | |
---|
418 | if test "$msg_ldap" = yes; then |
---|
419 | |
---|
420 | AC_DEFINE(HAVE_LDAP) |
---|
421 | |
---|
422 | if test -f $with_openldap/lib/libldap.la; then |
---|
423 | msg_ldap_linktype="(static)" |
---|
424 | else |
---|
425 | msg_ldap_linktype="(dynamic)" |
---|
426 | fi |
---|
427 | |
---|
428 | |
---|
429 | if test "${with_static_ldap+set}" = set; then |
---|
430 | case $with_static_ldap in |
---|
431 | no|"") |
---|
432 | msg_ldap_linktype="(dynamic)" |
---|
433 | ;; |
---|
434 | *) |
---|
435 | msg_ldap_linktype="(static)" |
---|
436 | ;; |
---|
437 | esac |
---|
438 | fi |
---|
439 | |
---|
440 | AC_CACHE_CHECK(if OpenLDAP is version 2.x, ac_cv_openldap_version2, [ |
---|
441 | CPPFLAGS_save="$CPPFLAGS" |
---|
442 | CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS" |
---|
443 | AC_EGREP_CPP(yes, [ |
---|
444 | #include "ldap.h" |
---|
445 | #if LDAP_VENDOR_VERSION > 20000 |
---|
446 | yes |
---|
447 | #endif |
---|
448 | ], ac_cv_openldap_version2=yes, ac_cv_openldap_version2=no) |
---|
449 | CPPFLAGS="$CPPFLAGS_save" |
---|
450 | ]) |
---|
451 | if test "$ac_cv_openldap_version2" = no; then |
---|
452 | AC_MSG_ERROR(evolution requires OpenLDAP version >= 2) |
---|
453 | fi |
---|
454 | |
---|
455 | AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv") |
---|
456 | AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket") |
---|
457 | AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl") |
---|
458 | AC_CHECK_LIB(lber, ber_get_tag, [ |
---|
459 | if test "$msg_ldap_linktype" = "(static)"; then |
---|
460 | LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS" |
---|
461 | |
---|
462 | # libldap might depend on OpenSSL... We need to pull |
---|
463 | # in the dependency libs explicitly here since we're |
---|
464 | # not using libtool for the configure test. |
---|
465 | if test -f $with_openldap/lib/libldap.la; then |
---|
466 | LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS" |
---|
467 | fi |
---|
468 | else |
---|
469 | LDAP_LIBS="-llber $LDAP_LIBS" |
---|
470 | fi |
---|
471 | AC_CHECK_LIB(ldap, ldap_open, [ |
---|
472 | if test $msg_ldap_linktype = "(static)"; then |
---|
473 | LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS" |
---|
474 | else |
---|
475 | LDAP_LIBS="-lldap $LDAP_LIBS" |
---|
476 | fi], |
---|
477 | LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS) |
---|
478 | LDAP_LIBS="$LDAP_LDFLAGS $LDAP_LIBS" |
---|
479 | ], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS) |
---|
480 | |
---|
481 | if test -z "$LDAP_LIBS"; then |
---|
482 | AC_MSG_ERROR(could not find OpenLDAP libraries) |
---|
483 | elif test "$msg_ldap_linktype" = "(static)"; then |
---|
484 | case "$host" in |
---|
485 | *solaris*) |
---|
486 | if echo $LDAP_LIBS | grep -- "-lresolv" >/dev/null 2>&1; then |
---|
487 | LDAP_LIBS=`echo $LDAP_LIBS | sed "s,-lresolv ,,g"` |
---|
488 | LDAP_SHARED="-lresolv" |
---|
489 | fi |
---|
490 | ;; |
---|
491 | esac |
---|
492 | |
---|
493 | LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic $LDAP_SHARED" |
---|
494 | fi |
---|
495 | |
---|
496 | AC_SUBST(LDAP_CFLAGS) |
---|
497 | AC_SUBST(LDAP_LIBS) |
---|
498 | fi |
---|
499 | AM_CONDITIONAL(ENABLE_LDAP, test $msg_ldap = yes) |
---|
500 | |
---|
501 | dnl ************************************************** |
---|
502 | dnl NNTP support. |
---|
503 | dnl ************************************************** |
---|
504 | AC_ARG_ENABLE(nntp, |
---|
505 | [ --enable-nntp=[no/yes] Attempt to compile incomplete, unsupported NNTP code],,enable_nntp=no) |
---|
506 | if test "x$enable_nntp" = "xyes"; then |
---|
507 | AC_DEFINE(ENABLE_NNTP) |
---|
508 | msg_nntp=yes |
---|
509 | else |
---|
510 | msg_nntp=no |
---|
511 | fi |
---|
512 | AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes) |
---|
513 | |
---|
514 | dnl ************************************************** |
---|
515 | dnl * Posix thread support |
---|
516 | dnl ************************************************** |
---|
517 | |
---|
518 | dnl Hah! Threads are no longer an option |
---|
519 | dnl AC_ARG_WITH(threads, [ --with-threads Include thread support],[ |
---|
520 | dnl FIXME: support more thread types, pth at least |
---|
521 | |
---|
522 | GLIB_CONFIG=${GLIB_CONFIG-glib-config} |
---|
523 | GNOME_PTHREAD_CHECK |
---|
524 | |
---|
525 | if test "x$PTHREAD_LIB" = "x" ; then |
---|
526 | AC_MSG_ERROR([POSIX threads are currently required for Evolution]) |
---|
527 | fi |
---|
528 | |
---|
529 | dnl |
---|
530 | dnl Notice that this is a hack, and we wont be able to use this forever, but |
---|
531 | dnl at least for some time |
---|
532 | dnl |
---|
533 | |
---|
534 | THREADS_LIBS="$PTHREAD_LIB `$GLIB_CONFIG --libs gthread`" |
---|
535 | THREADS_CFLAGS="`$GLIB_CONFIG --cflags gthread`" |
---|
536 | |
---|
537 | AC_SUBST(THREADS_LIBS) |
---|
538 | AC_SUBST(THREADS_CFLAGS) |
---|
539 | AC_DEFINE(ENABLE_THREADS) |
---|
540 | |
---|
541 | dnl ************************************************** |
---|
542 | dnl * File locking |
---|
543 | dnl ************************************************** |
---|
544 | |
---|
545 | AC_ARG_ENABLE(dot-locking, |
---|
546 | [ --enable-dot-locking=[yes/no] Enable support for locking mail files with dot locking],,enable_dot_locking=yes) |
---|
547 | if test "x$enable_dot_locking" = "xyes"; then |
---|
548 | AC_DEFINE(USE_DOT) |
---|
549 | msg_dot=yes |
---|
550 | else |
---|
551 | msg_dot=no |
---|
552 | fi |
---|
553 | |
---|
554 | AC_ARG_ENABLE(file-locking, |
---|
555 | [ --enable-file-locking=[fcntl/flock/no] Enable support for locking mail files with file locking],,enable_file_locking=fcntl) |
---|
556 | if test "x$enable_file_locking" = "xfcntl"; then |
---|
557 | AC_DEFINE(USE_FCNTL) |
---|
558 | msg_file=fcntl |
---|
559 | else |
---|
560 | if test "x$enable_file_locking" = "xflock"; then |
---|
561 | AC_DEFINE(USE_FLOCK) |
---|
562 | msg_file=flock |
---|
563 | else |
---|
564 | msg_file=no |
---|
565 | fi |
---|
566 | fi |
---|
567 | |
---|
568 | dnl ************************************************** |
---|
569 | dnl * sendmail operation |
---|
570 | dnl ************************************************** |
---|
571 | |
---|
572 | AC_MSG_CHECKING(for SunOS broken spool format) |
---|
573 | if test "x$host_os" = "xsunos" ; then |
---|
574 | with_broken_spool="yes" |
---|
575 | fi |
---|
576 | |
---|
577 | AC_ARG_WITH(broken-spool, |
---|
578 | [ --with-broken-spool=[yes/no] Using SunOS/Solaris sendmail which has a broken spool format],,with_broken_spool=${with_broken_spool:=no}) |
---|
579 | |
---|
580 | if test "x$with_broken_spool" = "xyes"; then |
---|
581 | AC_DEFINE(HAVE_BROKEN_SPOOL) |
---|
582 | fi |
---|
583 | |
---|
584 | AC_MSG_RESULT($with_broken_spool) |
---|
585 | |
---|
586 | dnl *************** |
---|
587 | dnl GNOME Libraries |
---|
588 | dnl *************** |
---|
589 | EVO_CHECK_LIB(Bonobo, bonobox, 1.0.3) |
---|
590 | EVO_CHECK_LIB(OAF, oaf, 0.6.2) |
---|
591 | EVO_CHECK_LIB(libglade, libglade, 0.14) |
---|
592 | EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, gnomecanvaspixbuf, 0.9.0) |
---|
593 | EVO_CHECK_LIB(GNOME-VFS, vfs, 1.0) |
---|
594 | EVO_CHECK_LIB(libxml, xml, 1.8.10, 2.0) |
---|
595 | EVO_CHECK_LIB(bonobo-conf, bonobo_conf, 0.11) |
---|
596 | |
---|
597 | EVO_CHECK_LIB(GAL, gal, 0.19.2) |
---|
598 | EVO_CHECK_LIB(GtkHTML, gtkhtml, 1.0.1) |
---|
599 | |
---|
600 | dnl ************************* |
---|
601 | dnl CFLAGS and LIBS and stuff |
---|
602 | dnl ************************* |
---|
603 | GLIB_CFLAGS="`$GLIB_CONFIG --cflags`" |
---|
604 | GLIB_LIBS="`$GLIB_CONFIG --libs`" |
---|
605 | AC_SUBST(GLIB_CFLAGS) |
---|
606 | AC_SUBST(GLIB_LIBS) |
---|
607 | |
---|
608 | GAL_CFLAGS="`gnome-config --cflags gal`" |
---|
609 | GAL_LIBS="`gnome-config --libs gal`" |
---|
610 | AC_SUBST(GAL_CFLAGS) |
---|
611 | AC_SUBST(GAL_LIBS) |
---|
612 | |
---|
613 | BONOBO_CONF_CFLAGS="`gnome-config --cflags bonobo_conf`" |
---|
614 | BONOBO_CONF_LIBS="`gnome-config --libs bonobo_conf`" |
---|
615 | AC_SUBST(BONOBO_CONF_CFLAGS) |
---|
616 | AC_SUBST(BONOBO_CONF_LIBS) |
---|
617 | |
---|
618 | EXTRA_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf libart gnomecanvaspixbuf gnomeui gal` $THREADS_LIBS" |
---|
619 | EXTRA_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf libart gnomecanvaspixbuf gnomeui gal` $THREADS_CFLAGS" |
---|
620 | |
---|
621 | AC_SUBST(EXTRA_GNOME_LIBS) |
---|
622 | AC_SUBST(EXTRA_GNOME_CFLAGS) |
---|
623 | |
---|
624 | BONOBO_GNOME_LIBS="`gnome-config --libs oaf bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $OAF_LIBS" |
---|
625 | BONOBO_GNOME_CFLAGS="`gnome-config --cflags oaf bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $OAF_CFLAGS" |
---|
626 | AC_SUBST(BONOBO_GNOME_LIBS) |
---|
627 | AC_SUBST(BONOBO_GNOME_CFLAGS) |
---|
628 | |
---|
629 | BONOBO_HTML_GNOME_LIBS="`gnome-config --libs oaf bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS" |
---|
630 | BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags oaf bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS" |
---|
631 | AC_SUBST(BONOBO_HTML_GNOME_LIBS) |
---|
632 | AC_SUBST(BONOBO_HTML_GNOME_CFLAGS) |
---|
633 | |
---|
634 | GNOME_PRINT_LIBS=`gnome-config --libs print` |
---|
635 | GNOME_PRINT_CFLAGS=`gnome-config --cflags print` |
---|
636 | AC_SUBST(GNOME_PRINT_LIBS) |
---|
637 | AC_SUBST(GNOME_PRINT_CFLAGS) |
---|
638 | |
---|
639 | BONOBO_CONF_CFLAGS="`gnome-config --cflags bonobo_conf`" |
---|
640 | BONOBO_CONF_LIBS="`gnome-config --libs bonobo_conf`" |
---|
641 | AC_SUBST(BONOBO_CONF_CFLAGS) |
---|
642 | AC_SUBST(BONOBO_CONF_LIBS) |
---|
643 | |
---|
644 | GTKHTML_CFLAGS="`gnome-config --cflags gtkhtml`" |
---|
645 | GTKHTML_LIBS="`gnome-config --libs gtkhtml`" |
---|
646 | GTKHTML_DATADIR=`gnome-config --moddatadir gtkhtml` |
---|
647 | AC_SUBST(GTKHTML_CFLAGS) |
---|
648 | AC_SUBST(GTKHTML_LIBS) |
---|
649 | AC_SUBST(GTKHTML_DATADIR) |
---|
650 | |
---|
651 | GNOME_VFS_LIBS="`gnome-config --libs vfs`" |
---|
652 | GNOME_VFS_CFLAGS="`gnome-config --cflags vfs`" |
---|
653 | AC_SUBST(GNOME_VFS_LIBS) |
---|
654 | AC_SUBST(GNOME_VFS_CFLAGS) |
---|
655 | |
---|
656 | BONOBO_VFS_GNOME_LIBS="`gnome-config --libs oaf bonobox libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `" |
---|
657 | BONOBO_VFS_GNOME_CFLAGS="`gnome-config --cflags oaf bonobox libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `" |
---|
658 | AC_SUBST(BONOBO_VFS_GNOME_LIBS) |
---|
659 | AC_SUBST(BONOBO_VFS_GNOME_CFLAGS) |
---|
660 | |
---|
661 | CAMEL_CFLAGS="`gnome-config --cflags gal xml` $THREADS_CFLAGS" |
---|
662 | CAMEL_LIBS="`gnome-config --libs gal xml` $THREADS_LIBS" |
---|
663 | AC_SUBST(CAMEL_CFLAGS) |
---|
664 | AC_SUBST(CAMEL_LIBS) |
---|
665 | |
---|
666 | camel_providerdir='$(libdir)/evolution/camel-providers/'$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION |
---|
667 | AC_SUBST(camel_providerdir) |
---|
668 | |
---|
669 | MAILER_CFLAGS="`gnome-config --cflags gtkhtml libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal bonobo_conf bonobox bonobox_print vfs oaf` $THREADS_CFLAGS" |
---|
670 | MAILER_LIBS="`gnome-config --libs gtkhtml libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal bonobo_conf bonobox bonobox_print vfs oaf` $THREADS_LIBS" |
---|
671 | AC_SUBST(MAILER_CFLAGS) |
---|
672 | AC_SUBST(MAILER_LIBS) |
---|
673 | |
---|
674 | dnl ****************************** |
---|
675 | dnl Pilot checking |
---|
676 | dnl ****************************** |
---|
677 | AC_ARG_ENABLE(pilot-conduits, |
---|
678 | [ --enable-pilot-conduits=[no/yes] Enable support for building pilot conduits.],,enable_pilot_conduits=no) |
---|
679 | if test "x$enable_pilot_conduits" = "xyes"; then |
---|
680 | GNOME_PILOT_CHECK |
---|
681 | |
---|
682 | CFLAGS_save="$CFLAGS" |
---|
683 | CFLAGS="$CFLAGS $PISOCK_CFLAGS" |
---|
684 | LDFLAGS_save="$LDFLAGS" |
---|
685 | LDFLAGS="$LDFLAGS $PISOCK_LIBS" |
---|
686 | |
---|
687 | AC_CACHE_CHECK([if pilot-link handles UTF-8 conversions], ac_cv_pilot_link_utf8, AC_TRY_RUN([ |
---|
688 | |
---|
689 | #include <stdlib.h> |
---|
690 | #include <string.h> |
---|
691 | #include <pi-util.h> |
---|
692 | |
---|
693 | int main (int argc, char **argv) |
---|
694 | { |
---|
695 | const char *utf8 = "\x66\x66\x66\x66\x66\x66\x66\xC2\xA9"; |
---|
696 | size_t utf8_real_len = strlen (utf8); |
---|
697 | char *pstring; |
---|
698 | |
---|
699 | if (convert_ToPilotChar ("UTF-8", utf8, utf8_real_len, &pstring) == -1) |
---|
700 | exit (1); |
---|
701 | |
---|
702 | exit (0); |
---|
703 | } |
---|
704 | ], ac_cv_pilot_link_utf8=yes, ac_cv_pilot_link_utf8=no, ac_cv_pilot_link_utf8=no)) |
---|
705 | |
---|
706 | CFLAGS="$CFLAGS_save" |
---|
707 | LDFLAGS="$LDFLAGS_save" |
---|
708 | |
---|
709 | if test "$ac_cv_pilot_link_utf8" = no; then |
---|
710 | AC_MSG_ERROR(evolution requires pilot-link to have working UTF-8 conversion routines) |
---|
711 | fi |
---|
712 | fi |
---|
713 | AM_CONDITIONAL(ENABLE_PILOT_CONDUITS, test "x$enable_pilot_conduits" = "xyes") |
---|
714 | if test x$enable_pilot_conduits = xyes; then |
---|
715 | msg_pilot=yes |
---|
716 | else |
---|
717 | msg_pilot=no |
---|
718 | fi |
---|
719 | |
---|
720 | dnl ******** |
---|
721 | dnl Kerberos |
---|
722 | dnl ******** |
---|
723 | AC_SEARCH_LIBS(gethostbyname, nsl) |
---|
724 | AC_SEARCH_LIBS(socket, socket) |
---|
725 | |
---|
726 | AC_ARG_WITH(krb5, [ --with-krb5=PREFIX Location of Kerberos 5 libs/includes]) |
---|
727 | AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Location of Kerberos 4 libs/includes]) |
---|
728 | msg_krb5=no |
---|
729 | if test ${with_krb5:=no} != no; then |
---|
730 | LDFLAGS_save="$LDFLAGS" |
---|
731 | LIBS_save="$LIBS" |
---|
732 | |
---|
733 | mitlibs="-lkrb5 -lk5crypto -lcom_err" |
---|
734 | heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken" |
---|
735 | AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5, |
---|
736 | [ |
---|
737 | LDFLAGS="$LDFLAGS -L$with_krb5/lib" |
---|
738 | LIBS="$LIBS $mitlibs" |
---|
739 | AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$mitlibs", |
---|
740 | [ |
---|
741 | LDFLAGS="$LDFLAGS_save -L$with_krb5/lib" |
---|
742 | LIBS="$LIBS_save $heimlibs" |
---|
743 | AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5=no) |
---|
744 | ]) |
---|
745 | LDFLAGS="$LDFLAGS_save" |
---|
746 | LIBS="$LIBS_save" |
---|
747 | ]) |
---|
748 | if test "$ac_cv_lib_kerberos5" != no; then |
---|
749 | AC_DEFINE(HAVE_KRB5) |
---|
750 | msg_krb5=yes |
---|
751 | KRB5_CFLAGS="-I$with_krb5/include/krb5" |
---|
752 | KRB5_LDFLAGS="-L$with_krb5/lib" |
---|
753 | KRB5_LIBS="$ac_cv_lib_kerberos5" |
---|
754 | fi |
---|
755 | else |
---|
756 | AC_MSG_CHECKING(for Kerberos 5) |
---|
757 | AC_MSG_RESULT($with_krb5) |
---|
758 | fi |
---|
759 | |
---|
760 | msg_krb4=no |
---|
761 | if test x${with_krb4:=no} != xno; then |
---|
762 | LDFLAGS_save="$LDFLAGS" |
---|
763 | LIBS_save="$LIBS" |
---|
764 | AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4, |
---|
765 | [ |
---|
766 | ac_cv_lib_kerberos4=no |
---|
767 | |
---|
768 | case $ac_cv_lib_kerberos5 in |
---|
769 | *k5crypto*) |
---|
770 | # Look for MIT krb5 compat krb4 |
---|
771 | LDFLAGS="$LDFLAGS -L$with_krb4/lib $KRB5_LDFLAGS" |
---|
772 | LIBS="$LIBS -lkrb4 -ldes425 $KRB5_LIBS" |
---|
773 | AC_TRY_LINK_FUNC(krb_mk_req, |
---|
774 | [ |
---|
775 | ac_cv_lib_kerberos4="-lkrb4 -ldes425 $KRB5_LIBS" |
---|
776 | ac_cv_ldflag_kerberos4="$KRB5_LDFLAGS" |
---|
777 | ]) |
---|
778 | ;; |
---|
779 | esac |
---|
780 | |
---|
781 | if test "$ac_cv_lib_kerberos4" = no; then |
---|
782 | # Look for KTH krb4 |
---|
783 | LDFLAGS="$LDFLAGS_save -L$with_krb4/lib" |
---|
784 | LIBS="$LIBS_save -lkrb -lcrypto -lcom_err -lroken" |
---|
785 | AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken") |
---|
786 | fi |
---|
787 | if test "$ac_cv_lib_kerberos4" = no; then |
---|
788 | # Look for old MIT krb4 |
---|
789 | LDFLAGS="$LDFLAGS_save -L$with_krb4/lib" |
---|
790 | LIBS="$LIBS_save -lkrb" |
---|
791 | AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4=-lkrb, |
---|
792 | [ |
---|
793 | LIBS="$LIBS -ldes" |
---|
794 | AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -ldes") |
---|
795 | ]) |
---|
796 | fi |
---|
797 | ]) |
---|
798 | LDFLAGS="$LDFLAGS_save" |
---|
799 | LIBS="$LIBS_save" |
---|
800 | if test "$ac_cv_lib_kerberos4" != no; then |
---|
801 | AC_DEFINE(HAVE_KRB4) |
---|
802 | msg_krb4=yes |
---|
803 | if test -f "$with_krb4/include/krb.h" -o -f "$with_krb4/include/port-sockets.h"; then |
---|
804 | KRB4_CFLAGS="-I$with_krb4/include" |
---|
805 | else |
---|
806 | KRB4_CFLAGS="-I$with_krb4/include/kerberosIV" |
---|
807 | fi |
---|
808 | KRB4_LDFLAGS="-L$with_krb4/lib $ac_cv_ldflag_kerberos4" |
---|
809 | KRB4_LIBS="$ac_cv_lib_kerberos4" |
---|
810 | |
---|
811 | CFLAGS_save="$CFLAGS" |
---|
812 | CFLAGS="$CFLAGS $KRB4_CFLAGS" |
---|
813 | AC_TRY_COMPILE([#include "krb.h" |
---|
814 | int krb_sendauth; |
---|
815 | ],[return 0],[AC_DEFINE(NEED_KRB_SENDAUTH_PROTO)],) |
---|
816 | CFLAGS="$CFLAGS_save" |
---|
817 | fi |
---|
818 | else |
---|
819 | AC_MSG_CHECKING(for Kerberos 4) |
---|
820 | AC_MSG_RESULT(${with_krb4}) |
---|
821 | fi |
---|
822 | |
---|
823 | AC_SUBST(KRB5_CFLAGS) |
---|
824 | AC_SUBST(KRB5_LDFLAGS) |
---|
825 | AC_SUBST(KRB5_LIBS) |
---|
826 | AC_SUBST(KRB4_CFLAGS) |
---|
827 | AC_SUBST(KRB4_LDFLAGS) |
---|
828 | AC_SUBST(KRB4_LIBS) |
---|
829 | |
---|
830 | |
---|
831 | dnl ========================== |
---|
832 | dnl Pedantic PGP/MIME |
---|
833 | dnl ========================== |
---|
834 | AC_ARG_ENABLE(pedantic-pgp-mime, |
---|
835 | [ --enable-pedantic-pgp-mime=[no/yes] Enable pedantic PGP/MIME handling (not recommended)],,enable_pedantic_pgp_mime=no) |
---|
836 | if test "x$enable_pedantic_pgp_mime" = "xyes"; then |
---|
837 | AC_DEFINE(ENABLE_PEDANTIC_PGPMIME) |
---|
838 | fi |
---|
839 | |
---|
840 | |
---|
841 | dnl ******************************************************************************** |
---|
842 | dnl security extension support (SSL and S/MIME) |
---|
843 | dnl |
---|
844 | dnl The following voodoo does detection of mozilla libraries (nspr and nss) |
---|
845 | dnl needed by Camel (SSL and S/MIME). |
---|
846 | dnl |
---|
847 | dnl The Evolution security extensions are only built if these libraries are found |
---|
848 | dnl ******************************************************************************** |
---|
849 | msg_ssl=no |
---|
850 | AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.], |
---|
851 | with_nspr_includes="$withval", with_nspr_includes="/usr/include/nspr") |
---|
852 | have_nspr_includes="no" |
---|
853 | if test "x${with_nspr_includes}" != "xno"; then |
---|
854 | CPPFLAGS_save="$CPPFLAGS" |
---|
855 | |
---|
856 | AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes) |
---|
857 | AC_MSG_RESULT("") |
---|
858 | |
---|
859 | CPPFLAGS="$CPPFLAGS -I$with_nspr_includes" |
---|
860 | AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ]) |
---|
861 | CPPFLAGS="$CPPFLAGS_save" |
---|
862 | |
---|
863 | if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then |
---|
864 | have_nspr_includes="yes" |
---|
865 | NSPR_CFLAGS="-I$with_nspr_includes" |
---|
866 | fi |
---|
867 | else |
---|
868 | AC_MSG_CHECKING(for Mozilla nspr4 includes) |
---|
869 | AC_MSG_RESULT(no) |
---|
870 | fi |
---|
871 | |
---|
872 | AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.], |
---|
873 | with_nspr_libs="$withval") |
---|
874 | have_nspr_libs="no" |
---|
875 | if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then |
---|
876 | CFLAGS_save="$CFLAGS" |
---|
877 | LDFLAGS_save="$LDFLAGS" |
---|
878 | |
---|
879 | nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB" |
---|
880 | AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs, |
---|
881 | [ |
---|
882 | CFLAGS="$CFLAGS $NSPR_CFLAGS" |
---|
883 | |
---|
884 | if test "x${with_nspr_libs}" != "x"; then |
---|
885 | LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs" |
---|
886 | else |
---|
887 | LDFLAGS="$LDFLAGS $nsprlibs" |
---|
888 | fi |
---|
889 | |
---|
890 | AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no") |
---|
891 | CFLAGS="$CFLAGS_save" |
---|
892 | LDFLAGS="$LDFLAGS_save" |
---|
893 | ]) |
---|
894 | if test "x$moz_nspr_libs" != "xno"; then |
---|
895 | have_nspr_libs="yes" |
---|
896 | NSPR_LDFLAGS="-L$with_nspr_libs $nsprlibs" |
---|
897 | else |
---|
898 | NSPR_CLFAGS="" |
---|
899 | fi |
---|
900 | else |
---|
901 | AC_MSG_CHECKING(for Mozilla nspr4 libraries) |
---|
902 | AC_MSG_RESULT(no) |
---|
903 | fi |
---|
904 | |
---|
905 | AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.], |
---|
906 | with_nss_includes="$withval", with_nss_includes="/usr/include/moznss") |
---|
907 | if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then |
---|
908 | CPPFLAGS_save="$CPPFLAGS" |
---|
909 | |
---|
910 | AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes) |
---|
911 | AC_MSG_RESULT("") |
---|
912 | |
---|
913 | if test "x${with_nspr_includes}" != "x"; then |
---|
914 | CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes" |
---|
915 | else |
---|
916 | CPPFLAGS="$CPPFLAGS -I$with_nss_includes" |
---|
917 | fi |
---|
918 | |
---|
919 | AC_CHECK_HEADERS(nss.h ssl.h smime.h, |
---|
920 | [ have_nss_includes="yes" ], |
---|
921 | [ have_nss_includes="no" ]) |
---|
922 | |
---|
923 | CPPFLAGS="$CPPFLAGS_save" |
---|
924 | |
---|
925 | if test "x${have_nss_includes}" = xyes ; then |
---|
926 | have_nss_includes="yes" |
---|
927 | NSS_CFLAGS="-I$with_nss_includes" |
---|
928 | else |
---|
929 | NSPR_CFLAGS="" |
---|
930 | NSPR_LDFLAGS="" |
---|
931 | fi |
---|
932 | else |
---|
933 | AC_MSG_CHECKING(for Mozilla nss3 includes) |
---|
934 | AC_MSG_RESULT(no) |
---|
935 | fi |
---|
936 | |
---|
937 | AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs.], |
---|
938 | with_nss_libs="$withval") |
---|
939 | if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then |
---|
940 | LDFLAGS_save="$LDFLAGS" |
---|
941 | |
---|
942 | nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB" |
---|
943 | nsslibs="-lssl3 -lsmime3 -lnss3" |
---|
944 | AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs, |
---|
945 | [ |
---|
946 | LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs" |
---|
947 | AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no") |
---|
948 | LDFLAGS="$LDFLAGS_save" |
---|
949 | ]) |
---|
950 | if test "$moz_nss_libs" != no; then |
---|
951 | AC_DEFINE(HAVE_NSS) |
---|
952 | AC_DEFINE(HAVE_SSL) |
---|
953 | msg_ssl="yes (Mozilla NSS)" |
---|
954 | NSS_LDFLAGS="-L$with_nss_libs $nsslibs" |
---|
955 | else |
---|
956 | NSS_CFLAGS="" |
---|
957 | NSPR_CFLAGS="" |
---|
958 | NSPR_LDFLAGS="" |
---|
959 | fi |
---|
960 | else |
---|
961 | AC_MSG_CHECKING(for Mozilla nss libraries) |
---|
962 | AC_MSG_RESULT(no) |
---|
963 | fi |
---|
964 | |
---|
965 | AC_SUBST(NSPR_CFLAGS) |
---|
966 | AC_SUBST(NSPR_LDFLAGS) |
---|
967 | AC_SUBST(NSS_CFLAGS) |
---|
968 | AC_SUBST(NSS_LDFLAGS) |
---|
969 | |
---|
970 | ################################################## |
---|
971 | # Check for gtk-doc. |
---|
972 | ################################################## |
---|
973 | |
---|
974 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
975 | |
---|
976 | if test "x$with_html_dir" = "x" ; then |
---|
977 | HTML_DIR='${datadir}/gnome/html' |
---|
978 | else |
---|
979 | HTML_DIR=$with_html_dir |
---|
980 | fi |
---|
981 | |
---|
982 | AC_SUBST(HTML_DIR) |
---|
983 | |
---|
984 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
985 | |
---|
986 | gtk_doc_min_version=0.6 |
---|
987 | if $GTKDOC ; then |
---|
988 | gtk_doc_version=`gtkdoc-mkdb --version` |
---|
989 | AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) |
---|
990 | if perl <<EOF ; then |
---|
991 | exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) && |
---|
992 | ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1); |
---|
993 | EOF |
---|
994 | AC_MSG_RESULT(yes) |
---|
995 | else |
---|
996 | AC_MSG_RESULT(no) |
---|
997 | GTKDOC=false |
---|
998 | fi |
---|
999 | fi |
---|
1000 | |
---|
1001 | dnl Let people disable the gtk-doc stuff. |
---|
1002 | AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) |
---|
1003 | |
---|
1004 | if test x$enable_gtk_doc = xauto ; then |
---|
1005 | if test x$GTKDOC = xtrue ; then |
---|
1006 | enable_gtk_doc=yes |
---|
1007 | else |
---|
1008 | enable_gtk_doc=no |
---|
1009 | fi |
---|
1010 | fi |
---|
1011 | |
---|
1012 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
1013 | |
---|
1014 | dnl ****************** |
---|
1015 | dnl Sub-version number |
---|
1016 | dnl ****************** |
---|
1017 | AC_ARG_WITH(sub-version, [ --with-sub-version=VERSION Specify a sub-version string]) |
---|
1018 | AC_DEFINE_UNQUOTED(SUB_VERSION, "$with_sub_version") |
---|
1019 | |
---|
1020 | dnl ******************** |
---|
1021 | dnl KDE applnk directory |
---|
1022 | dnl ******************** |
---|
1023 | AC_ARG_WITH(kde-applnk-path, [ --with-kde-applnk-path=PATH Location of KDE applnk files], |
---|
1024 | [with_kde_applnk_path="$withval"]) |
---|
1025 | AC_MSG_CHECKING(for the KDE applnk directory) |
---|
1026 | if test -z "$with_kde_applnk_path"; then |
---|
1027 | with_kde_applnk_path="$prefix/share/applnk" |
---|
1028 | fi |
---|
1029 | if test -d "$with_kde_applnk_path" ; then |
---|
1030 | AC_MSG_RESULT("$with_kde_applnk_path" found) |
---|
1031 | AC_DEFINE(HAVE_KDE_APPLNK) |
---|
1032 | KDE_APPLNK_DIR="$with_kde_applnk_path" |
---|
1033 | else |
---|
1034 | AC_MSG_RESULT(not found) |
---|
1035 | KDE_APPLNK_DIR="" |
---|
1036 | fi |
---|
1037 | AM_CONDITIONAL(HAVE_KDE_APPLNK, test x"$KDE_APPLNK_DIR" != x) |
---|
1038 | AC_SUBST(KDE_APPLNK_DIR) |
---|
1039 | |
---|
1040 | dnl ****************** |
---|
1041 | dnl CDE dtappintegrate |
---|
1042 | dnl ****************** |
---|
1043 | |
---|
1044 | AC_ARG_WITH(cde-path, [ --with-cde-path=PATH Location of CDE installation], |
---|
1045 | [with_cde_path="$withval"]) |
---|
1046 | if test -z "$with_cde_path"; then |
---|
1047 | with_cde_path="/usr/dt" |
---|
1048 | fi |
---|
1049 | |
---|
1050 | AC_MSG_CHECKING(for dtappintegrate) |
---|
1051 | if test -x "$with_cde_path/bin/dtappintegrate" ; then |
---|
1052 | DTAPPINTEGRATE="$with_cde_path/bin/dtappintegrate" |
---|
1053 | else |
---|
1054 | DTAPPINTEGRATE="no" |
---|
1055 | fi |
---|
1056 | AC_MSG_RESULT([$DTAPPINTEGRATE]) |
---|
1057 | |
---|
1058 | AC_SUBST(DTAPPINTEGRATE) |
---|
1059 | AM_CONDITIONAL(HAVE_DTAPPINTEGRATE, test "x$DTAPPINTEGRATE" != "xno") |
---|
1060 | |
---|
1061 | dnl **************************************************** |
---|
1062 | dnl GNOME_PREFIX is is needed by shell/evolution-nognome |
---|
1063 | dnl **************************************************** |
---|
1064 | |
---|
1065 | GNOME_PREFIX="`gnome-config --prefix`" |
---|
1066 | AC_SUBST(GNOME_PREFIX) |
---|
1067 | |
---|
1068 | dnl ****************************** |
---|
1069 | dnl Makefiles |
---|
1070 | dnl ****************************** |
---|
1071 | |
---|
1072 | AC_CONFIG_SUBDIRS(libical) |
---|
1073 | |
---|
1074 | EVOLUTION_DIR=`(cd $srcdir; pwd)` |
---|
1075 | AC_SUBST(EVOLUTION_DIR) |
---|
1076 | |
---|
1077 | AC_OUTPUT([ |
---|
1078 | Makefile |
---|
1079 | addressbook/Makefile |
---|
1080 | addressbook/backend/Makefile |
---|
1081 | addressbook/backend/ebook/Makefile |
---|
1082 | addressbook/backend/idl/Makefile |
---|
1083 | addressbook/backend/pas/Makefile |
---|
1084 | addressbook/conduit/Makefile |
---|
1085 | addressbook/gui/Makefile |
---|
1086 | addressbook/gui/component/Makefile |
---|
1087 | addressbook/gui/component/select-names/Makefile |
---|
1088 | addressbook/gui/contact-editor/Makefile |
---|
1089 | addressbook/gui/contact-list-editor/Makefile |
---|
1090 | addressbook/gui/merging/Makefile |
---|
1091 | addressbook/gui/search/Makefile |
---|
1092 | addressbook/gui/widgets/Makefile |
---|
1093 | addressbook/printing/Makefile |
---|
1094 | art/Makefile |
---|
1095 | calendar/Makefile |
---|
1096 | calendar/cal-client/Makefile |
---|
1097 | calendar/cal-util/Makefile |
---|
1098 | calendar/conduits/Makefile |
---|
1099 | calendar/conduits/calendar/Makefile |
---|
1100 | calendar/conduits/todo/Makefile |
---|
1101 | calendar/gui/Makefile |
---|
1102 | calendar/gui/alarm-notify/Makefile |
---|
1103 | calendar/gui/dialogs/Makefile |
---|
1104 | calendar/idl/Makefile |
---|
1105 | calendar/importers/Makefile |
---|
1106 | calendar/pcs/Makefile |
---|
1107 | camel/Makefile |
---|
1108 | camel/providers/Makefile |
---|
1109 | camel/providers/imap/Makefile |
---|
1110 | camel/providers/local/Makefile |
---|
1111 | camel/providers/nntp/Makefile |
---|
1112 | camel/providers/pop3/Makefile |
---|
1113 | camel/providers/sendmail/Makefile |
---|
1114 | camel/providers/smtp/Makefile |
---|
1115 | camel/tests/Makefile |
---|
1116 | camel/tests/folder/Makefile |
---|
1117 | camel/tests/lib/Makefile |
---|
1118 | camel/tests/message/Makefile |
---|
1119 | camel/tests/mime-filter/Makefile |
---|
1120 | camel/tests/misc/Makefile |
---|
1121 | camel/tests/smime/Makefile |
---|
1122 | camel/tests/stream/Makefile |
---|
1123 | composer/Makefile |
---|
1124 | data/Makefile |
---|
1125 | data/cde_app_root/Makefile |
---|
1126 | data/cde_app_root/dt/Makefile |
---|
1127 | data/cde_app_root/dt/appconfig/Makefile |
---|
1128 | data/cde_app_root/dt/appconfig/appmanager/Makefile |
---|
1129 | data/cde_app_root/dt/appconfig/appmanager/C/Makefile |
---|
1130 | data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile |
---|
1131 | data/cde_app_root/dt/appconfig/icons/Makefile |
---|
1132 | data/cde_app_root/dt/appconfig/icons/C/Makefile |
---|
1133 | data/cde_app_root/dt/appconfig/types/Makefile |
---|
1134 | data/cde_app_root/dt/appconfig/types/C/Makefile |
---|
1135 | data/cde_app_root/dt/appconfig/types/C/Ximian.dt |
---|
1136 | default_user/Makefile |
---|
1137 | default_user/local/Makefile |
---|
1138 | default_user/local/Calendar/Makefile |
---|
1139 | default_user/local/Contacts/Makefile |
---|
1140 | default_user/local/Drafts/Makefile |
---|
1141 | default_user/local/Inbox/Makefile |
---|
1142 | default_user/local/Outbox/Makefile |
---|
1143 | default_user/local/Sent/Makefile |
---|
1144 | default_user/local/Tasks/Makefile |
---|
1145 | default_user/local/Trash/Makefile |
---|
1146 | doc/Makefile |
---|
1147 | doc/devel/Makefile |
---|
1148 | doc/devel/calendar/Makefile |
---|
1149 | doc/devel/calendar/cal-client/Makefile |
---|
1150 | doc/devel/calendar/cal-util/Makefile |
---|
1151 | e-util/Makefile |
---|
1152 | e-util/ename/Makefile |
---|
1153 | filter/Makefile |
---|
1154 | help/Makefile |
---|
1155 | help/C/Makefile |
---|
1156 | help/no/Makefile |
---|
1157 | importers/Makefile |
---|
1158 | intl/Makefile |
---|
1159 | libibex/Makefile |
---|
1160 | libversit/Makefile |
---|
1161 | libwombat/Makefile |
---|
1162 | macros/Makefile |
---|
1163 | mail/Makefile |
---|
1164 | mail/importers/Makefile |
---|
1165 | my-evolution/Makefile |
---|
1166 | omf-install/Makefile |
---|
1167 | po/Makefile.in |
---|
1168 | shell/Makefile |
---|
1169 | shell/evolution-nognome |
---|
1170 | shell/glade/Makefile |
---|
1171 | shell/importer/Makefile |
---|
1172 | tools/Makefile |
---|
1173 | ui/Makefile |
---|
1174 | views/Makefile |
---|
1175 | views/addressbook/Makefile |
---|
1176 | views/calendar/Makefile |
---|
1177 | views/mail/Makefile |
---|
1178 | views/tasks/Makefile |
---|
1179 | widgets/Makefile |
---|
1180 | widgets/e-timezone-dialog/Makefile |
---|
1181 | widgets/menus/Makefile |
---|
1182 | widgets/misc/Makefile |
---|
1183 | wombat/Makefile |
---|
1184 | ]) |
---|
1185 | |
---|
1186 | if test "x$with_sub_version" != "x"; then |
---|
1187 | echo " |
---|
1188 | Evolution ($with_sub_version) has been configured as follows: " |
---|
1189 | else |
---|
1190 | echo " |
---|
1191 | Evolution has been configured as follows: " |
---|
1192 | fi |
---|
1193 | |
---|
1194 | echo " |
---|
1195 | Mail Directory: $system_mail_dir, $system_mail_perm |
---|
1196 | LDAP support: $msg_ldap $msg_ldap_linktype" |
---|
1197 | if test "$msg_nntp" = "yes"; then |
---|
1198 | echo "\ |
---|
1199 | NNTP support: $msg_nntp" |
---|
1200 | fi |
---|
1201 | echo "\ |
---|
1202 | Pilot conduits: $msg_pilot |
---|
1203 | Kerberos 4/5: $msg_krb4/$msg_krb5 |
---|
1204 | SSL support: $msg_ssl |
---|
1205 | Dot Locking: $msg_dot |
---|
1206 | File Locking: $msg_file |
---|
1207 | Gtk-doc: $enable_gtk_doc" |
---|
1208 | |
---|
1209 | if test x$enable_gtk_doc = xyes; then |
---|
1210 | echo " |
---|
1211 | Programming documentation files will be built automatically. |
---|
1212 | " |
---|
1213 | else |
---|
1214 | echo " |
---|
1215 | Programming documentation files will not be built. |
---|
1216 | You may want to install the gtk-doc package |
---|
1217 | so that you will get the Evolution Developer's Guide. |
---|
1218 | " |
---|
1219 | fi |
---|