source: trunk/third/evolution/configure.in @ 19036

Revision 19036, 40.2 KB checked in by ghudson, 21 years ago (diff)
Merge with evolution 1.2.2.
Line 
1# Process this file with autoconf to produce a configure script.
2AC_INIT(camel)
3AM_CONFIG_HEADER(config.h)
4
5if test -f libversit/CVS/Repository; then
6        case `cat libversit/CVS/Repository` in
7        gnome-pim*)
8                echo ""
9                echo "ERROR: CVS working directory is out of date"
10                echo "Please do:"
11                echo "    rm -rf libversit"
12                echo "    cvs update -d libversit"
13                echo "    automake libversit/Makefile"
14                echo "and try again. We apologize for the inconvenience"
15                exit 1
16                ;;
17        esac
18fi
19
20EVOLUTION_MAJOR_VERSION=1
21EVOLUTION_MINOR_VERSION=2
22EVOLUTION_MICRO_VERSION=2
23EVOLUTION_NANO_VERSION=0
24VERSION=$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION
25PACKAGE=evolution
26
27AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
28AC_SUBST(VERSION)
29
30AC_CHECK_LIB(resolv, res_query, RESOLV_LIBS="-lresolv")
31AC_SUBST(RESOLV_LIBS)
32
33AC_CANONICAL_HOST
34
35AC_DEFINE_UNQUOTED(VERSION_COMMENT, "")
36
37SCROLLKEEPER_REQUIRED=0.1.4
38AC_SUBST(SCROLLKEEPER_REQUIRED)
39
40dnl Check for scrollkeeper
41AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
42if test x$SCROLLKEEPER_CONFIG = xno; then
43  AC_MSG_ERROR(Couldn't find scrollkeeper-config -- please install the scrollkeeper package)
44fi
45SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir`
46AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR)
47
48dnl  Test whether jw is installed
49AC_PATH_PROG(JW,jw,no)
50if test x$JW = xno; then
51  HAVE_JW="no"
52else
53  HAVE_JW="yes"
54fi
55AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
56AC_SUBST(HAVE_JW)
57
58dnl Initialize maintainer mode
59AM_MAINTAINER_MODE
60
61AC_ISC_POSIX
62AC_PROG_CC
63AC_PROG_CPP
64AM_PROG_LEX
65AC_PROG_YACC
66case $YACC in
67*yacc*)
68        AC_MSG_ERROR(You need bison to build Evolution)
69        ;;
70esac
71AC_STDC_HEADERS
72AC_ARG_PROGRAM
73AC_PROG_INSTALL
74AC_PROG_LN_S
75AC_PROG_MAKE_SET
76
77dnl Initialize xml-i18n-tools
78AM_PROG_XML_I18N_TOOLS
79
80dnl Initialize libtool
81AM_PROG_LIBTOOL
82
83AM_ACLOCAL_INCLUDE(macros)
84GNOME_INIT()
85GNOME_COMPILE_WARNINGS
86GNOME_X_CHECKS
87EVO_CHECK_LIB(gnome-libs, gnome, 1.2.9)
88AC_CHECK_HEADERS(alloca.h)
89
90dnl check for socklen_t (in Unix98)
91AC_MSG_CHECKING(for socklen_t)
92AC_TRY_COMPILE([#include <sys/socket.h>
93socklen_t x;
94],[],[AC_MSG_RESULT(yes)],[
95AC_TRY_COMPILE([#include <sys/socket.h>
96int accept (int, struct sockaddr *, size_t *);
97],[],[
98AC_MSG_RESULT(size_t)
99AC_DEFINE(socklen_t,size_t)], [
100AC_MSG_RESULT(int)
101AC_DEFINE(socklen_t,int)])])
102
103ALL_LINGUAS="az bg ca cs da de el en_AU en_GB es et eu fi fr ga gl hu it ja ko lt lv nl nn no pl pt pt_BR ro ru sk sl sv tr uk vi zh_CN zh_TW"
104AM_GNOME_GETTEXT
105localedir='$(prefix)/$(DATADIRNAME)/locale'
106AC_SUBST(localedir)
107
108dnl
109dnl Purify support
110dnl
111EVO_PURIFY_SUPPORT
112
113dnl
114dnl system mail stuff
115dnl
116AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib)
117AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL")
118
119AC_MSG_CHECKING(system mail directory)
120if test -d /var/mail -a '!' -h /var/mail ; then
121        system_mail_dir=/var/mail
122else
123        system_mail_dir=/var/spool/mail
124fi
125AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir")
126
127case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
128d??????rw?)
129        CAMEL_LOCK_HELPER_USER=""
130        CAMEL_LOCK_HELPER_GROUP=""
131        system_mail_perm="world writable"
132        ;;
133
134d???rw????)
135        CAMEL_LOCK_HELPER_USER=""
136        CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
137        system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
138        ;;
139
140drw???????)
141        CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
142        CAMEL_LOCK_HELPER_GROUP=""
143        system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
144        ;;
145
146*)
147        CAMEL_LOCK_HELPER_USER=""
148        CAMEL_LOCK_HELPER_GROUP=""
149        system_mail_perm="???"
150        ;;
151esac
152
153AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
154AC_SUBST(CAMEL_LOCK_HELPER_USER)
155AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
156
157
158dnl ***************
159dnl Timezone checks
160dnl ***************
161AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
162        AC_TRY_COMPILE([
163                #include <time.h>
164                ], [
165                struct tm tm;
166                tm.tm_gmtoff = 1;
167                ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
168if test $ac_cv_struct_tm_gmtoff = yes; then
169        AC_DEFINE(HAVE_TM_GMTOFF)
170else
171        AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
172                AC_TRY_COMPILE([
173                        #include <time.h>
174                ], [
175                        timezone = 1;
176                ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
177        if test $ac_cv_var_timezone = yes; then
178                AC_DEFINE(HAVE_TIMEZONE)
179                AC_CACHE_CHECK(for altzone variable, ac_cv_var_altzone,
180                        AC_TRY_COMPILE([
181                                #include <time.h>
182                        ], [
183                                altzone = 1;
184                        ], ac_cv_var_altzone=yes, ac_cv_var_altzone=no))
185                if test $ac_cv_var_altzone = yes; then
186                        AC_DEFINE(HAVE_ALTZONE)
187                fi
188        else
189                AC_ERROR(unable to find a way to determine timezone)
190        fi
191fi
192
193
194AC_CHECK_FUNCS(mkstemp mkdtemp isblank)
195
196dnl **************************************************
197dnl ctime_r prototype
198dnl **************************************************
199
200AC_CACHE_CHECK([if ctime_r wants three arguments], ac_cv_ctime_r_three_args,
201[
202        AC_TRY_COMPILE([
203                #include <time.h>
204        ],[
205                char *buf;
206                time_t date;
207                ctime_r (&date, buf, 100);
208        ],[
209                ac_cv_ctime_r_three_args=yes
210        ],[
211                ac_cv_ctime_r_three_args=no
212        ])
213])
214       
215if test x"$ac_cv_ctime_r_three_args" = xyes ; then
216        AC_DEFINE(CTIME_R_THREE_ARGS)
217fi
218
219dnl **************************************************
220dnl gethostbyname_r prototype
221dnl **************************************************
222
223AC_CHECK_FUNCS(gethostbyname_r,[
224AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args,
225[
226        AC_TRY_COMPILE([
227                #include "confdefs.h"
228                #include <sys/types.h>
229                #include <sys/socket.h>
230                #include <netinet/in.h>
231                #include <netdb.h>
232
233                #define BUFSIZE (sizeof(struct hostent)+10)
234        ],[
235                struct hostent hent;
236                char buffer[BUFSIZE];
237                int bufsize=BUFSIZE;
238                int h_errno;
239
240                (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
241        ],[
242                ac_cv_gethostbyname_r_five_args=yes
243        ],[
244                ac_cv_gethostbyname_r_five_args=no
245        ])
246])])
247       
248if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
249        AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS)
250fi
251
252dnl **************************************************
253dnl gethostbyaddr_r prototype
254dnl **************************************************
255
256AC_CHECK_FUNCS(gethostbyaddr_r,[
257AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], ac_cv_gethostbyaddr_r_seven_args,
258[
259        AC_TRY_COMPILE([
260                #include "confdefs.h"
261                #include <sys/types.h>
262                #include <sys/socket.h>
263                #include <netinet/in.h>
264                #include <netdb.h>
265
266                #define BUFSIZE (sizeof(struct hostent)+10)
267        ],[
268                struct hostent hent;
269                char buffer[BUFSIZE];
270                int bufsize=BUFSIZE;
271                int h_errno;
272
273                (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
274        ],[
275                ac_cv_gethostbyaddr_r_seven_args=yes
276        ],[
277                ac_cv_gethostbyaddr_r_seven_args=no
278        ])
279])])
280       
281if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
282        AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS)
283fi
284
285
286dnl **************************************************
287dnl * IPv6 support
288dnl **************************************************
289AC_ARG_ENABLE(ipv6, [  --enable-ipv6=[no/yes]      Enable support for resolving IPv6 addresses.],,enable_ipv6=no)
290if test "x$enable_ipv6" = "xyes"; then
291AC_CACHE_CHECK([if system has necessary structs and functions for IPv6 support], msg_ipv6,
292[
293        AC_TRY_COMPILE([
294                #include "confdefs.h"
295                #include <sys/types.h>
296                #include <sys/socket.h>
297                #include <netinet/in.h>
298                #include <netdb.h>
299
300        ],[
301                struct addrinfo hints, *res;
302                struct sockaddr_in6 sin6;
303                int af = AF_INET6;
304               
305                getaddrinfo ("www.ximian.com", NULL, &hints, &res);
306                freeaddrinfo (res);
307        ],[
308                msg_ipv6=yes
309        ],[
310                enable_ipv6=no
311                msg_ipv6=no
312        ])
313])
314else
315        msg_ipv6=no
316fi
317AM_CONDITIONAL(ENABLE_IPv6, test "x$enable_ipv6" = "xyes")
318
319
320dnl ***********
321dnl * db3 stuff
322dnl ***********
323
324# To ensure that any copy of evolution of a given version can read
325# the data files of any other copy, we require a precise db3 version.
326# This can only change between Evolution versions (and then can only
327# go up.)
328evolution_db_version_major=3
329evolution_db_version_minor=1
330evolution_db_version_patch=17
331
332evolution_db_version=${evolution_db_version_major}.${evolution_db_version_minor}.${evolution_db_version_patch}
333AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MAJOR,$evolution_db_version_major)
334AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MINOR,$evolution_db_version_minor)
335AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_PATCH,$evolution_db_version_patch)
336
337
338AC_ARG_WITH(db3,          [  --with-db3=PREFIX              Location of db3],
339        [with_db3_includes="$withval/include"
340         with_db3_libs="$withval/lib"])
341AC_ARG_WITH(db3-includes, [  --with-db3-includes=PATH       Location of db3 includes],
342        with_db3_includes="$withval")
343AC_ARG_WITH(db3-libs,     [  --with-db3-libs=PATH           Location of db3 libs],
344        with_db3_libs="$withval")
345
346if test -z "$with_db3_libs"; then
347        with_db3_libs="/usr/lib"
348fi
349
350dnl The AC_CACHE_CHECK lets you avoid having to specify --with-db3
351dnl again with later configures
352AC_CACHE_CHECK([for db3 compiler flags], ac_cv_db3_cflags,
353[
354        if test -n "${with_db3_includes}"; then
355                ac_cv_db3_cflags="-I$with_db3_includes"
356        fi
357])
358DB3_CFLAGS=$ac_cv_db3_cflags
359AC_SUBST(DB3_CFLAGS)
360
361CPPFLAGS_save="$CPPFLAGS"
362CPPFLAGS="$DB3_CFLAGS $CPPFLAGS"
363AC_CHECK_HEADERS(db.h db3/db.h, break)
364
365AC_CACHE_CHECK([db3 header version], ac_cv_db3_header_version,
366[
367        AC_TRY_COMPILE([
368                #ifdef HAVE_DB3_DB_H
369                #include <db3/db.h>
370                #else
371                #include <db.h>
372                #endif
373        ],[
374                #if DB_VERSION_MAJOR != $evolution_db_version_major || \
375                    DB_VERSION_MINOR != $evolution_db_version_minor || \
376                    DB_VERSION_PATCH != $evolution_db_version_patch
377                #error
378                #endif
379        ], :, AC_MSG_ERROR(Found db.h is not version $evolution_db_version))
380
381        ac_cv_db3_header_version=$evolution_db_version
382])
383
384GNOME_PTHREAD_CHECK
385
386AC_CACHE_CHECK([for db3 library name], ac_cv_db3_ldadd,
387[
388        LIBS_save="$LIBS"
389        ac_cv_db3_ldadd=""
390
391        for name in db db3 db-3.1; do
392                LIBS="$LIBS_save $with_db3_libs/lib${name}.a $PTHREAD_LIB"
393                AC_TRY_LINK([
394                        #ifdef HAVE_DB3_DB_H
395                        #include <db3/db.h>
396                        #else
397                        #include <db.h>
398                        #endif
399                ],[
400                        DB *db;
401                        db_create (&db, 0, 0);
402                ], [
403                        ac_cv_db3_ldadd="$with_db3_libs/lib${name}.a $PTHREAD_LIB"
404                        break
405                ])
406        done
407        LIBS="$LIBS_save"
408
409        if test -z "$ac_cv_db3_ldadd"; then
410                AC_MSG_ERROR(Could not find db3 library)
411        fi
412])
413DB3_LDADD=$ac_cv_db3_ldadd
414AC_SUBST(DB3_LDADD)
415
416AC_CACHE_CHECK([that db3 library version matches header version], ac_cv_db3_lib_version_match,
417[
418        LIBS="$DB3_LDADD $LIBS"
419        AC_TRY_RUN([
420                #ifdef HAVE_DB3_DB_H
421                #include <db3/db.h>
422                #else
423                #include <db.h>
424                #endif
425
426                int
427                main (void)
428                {
429                        int major, minor, patch;
430
431                        db_version (&major, &minor, &patch);
432                        return !(major == DB_VERSION_MAJOR &&
433                                 minor == DB_VERSION_MINOR &&
434                                 patch == DB_VERSION_PATCH);
435                }
436        ], ac_cv_db3_lib_version_match=yes, ac_cv_db3_lib_version_match=no,
437        ac_cv_db3_lib_version_match=yes)
438])
439if test "$ac_cv_db3_lib_version_match" = no; then
440        AC_MSG_ERROR(db3 headers and library do not match... multiple copies installed?)
441fi
442
443CPPFLAGS="$CPPFLAGS_save"
444LIBS="$LIBS_save"
445
446
447dnl **************************************************
448dnl LDAP support.
449dnl **************************************************
450EVO_LDAP_CHECK(no)
451case $with_openldap in
452no)
453        msg_ldap=no
454        ;;
455*)
456        case $with_static_ldap in
457        yes)
458                msg_ldap="yes (static)"
459                ;;
460        *)
461                msg_ldap="yes (dynamic)"
462                ;;
463        esac
464esac
465
466dnl **************************************************
467dnl NNTP support.
468dnl **************************************************
469AC_ARG_ENABLE(nntp,
470[  --enable-nntp=[no/yes]      Attempt to compile incomplete, unsupported NNTP code],,enable_nntp=no)
471if test "x$enable_nntp" = "xyes"; then
472        AC_DEFINE(ENABLE_NNTP)
473        msg_nntp=yes
474else
475        msg_nntp=no
476fi
477AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes)
478
479dnl **************************************************
480dnl * Posix thread support
481dnl **************************************************
482
483dnl Hah! Threads are no longer an option
484dnl AC_ARG_WITH(threads, [  --with-threads          Include thread support],[
485dnl FIXME: support more thread types, pth at least
486
487GLIB_CONFIG=${GLIB_CONFIG-glib-config}
488GNOME_PTHREAD_CHECK
489
490if test "x$PTHREAD_LIB" = "x" ; then
491        AC_MSG_ERROR([POSIX threads are currently required for Evolution])
492fi
493
494dnl
495dnl Notice that this is a hack, and we wont be able to use this forever, but
496dnl at least for some time
497dnl
498
499THREADS_LIBS="$PTHREAD_LIB `$GLIB_CONFIG --libs gthread`"
500THREADS_CFLAGS="`$GLIB_CONFIG --cflags gthread`"
501
502AC_SUBST(THREADS_LIBS)
503AC_SUBST(THREADS_CFLAGS)
504AC_DEFINE(ENABLE_THREADS)
505
506dnl **************************************************
507dnl * File locking
508dnl **************************************************
509
510AC_ARG_ENABLE(dot-locking,
511[  --enable-dot-locking=[yes/no] Enable support for locking mail files with dot locking],,enable_dot_locking=yes)
512if test "x$enable_dot_locking" = "xyes"; then
513  AC_DEFINE(USE_DOT)
514  msg_dot=yes
515else
516  msg_dot=no   
517fi
518
519AC_ARG_ENABLE(file-locking,
520[  --enable-file-locking=[fcntl/flock/no] Enable support for locking mail files with file locking],,enable_file_locking=fcntl)
521if test "x$enable_file_locking" = "xfcntl"; then
522  AC_DEFINE(USE_FCNTL)
523  msg_file=fcntl
524else
525  if test "x$enable_file_locking" = "xflock"; then
526    AC_DEFINE(USE_FLOCK)
527    msg_file=flock
528  else
529    msg_file=no
530  fi
531fi
532
533dnl **************************************************
534dnl * sendmail operation
535dnl **************************************************
536
537AC_MSG_CHECKING(for SunOS broken spool format)
538if test "x$host_os" = "xsunos" ; then
539   with_broken_spool="yes"
540fi
541
542AC_ARG_WITH(broken-spool,
543[  --with-broken-spool=[yes/no] Using SunOS/Solaris sendmail which has a broken spool format],,with_broken_spool=${with_broken_spool:=no})
544
545if test "x$with_broken_spool" = "xyes"; then
546  AC_DEFINE(HAVE_BROKEN_SPOOL)
547fi
548
549AC_MSG_RESULT($with_broken_spool)
550
551dnl ***************************************************************
552dnl Whether to build shlib components (instead of out-of-proc ones)
553dnl ***************************************************************
554
555AC_ARG_ENABLE(shlib-components,
556              [   --enable-shlib-components Enable building of some of the components as shared libs],
557              enable_shlib_components=yes,enable_shlib_components=no)
558
559AM_CONDITIONAL(ENABLE_SHLIB_COMPONENTS, test "x$enable_shlib_components" = "xyes")
560
561if test "x$enable_shlib_components" = "xyes" ; then
562        OAF_SHLIB_TYPE="shlib"
563        OAF_SHLIB_PREFIX="lib"
564        OAF_SHLIB_SUFFIX=".so"
565else
566        OAF_SHLIB_TYPE="exe"
567        OAF_SHLIB_PREFIX=""
568        OAF_SHLIB_SUFFIX=""
569fi
570
571AC_SUBST(OAF_SHLIB_TYPE)
572AC_SUBST(OAF_SHLIB_PREFIX)
573AC_SUBST(OAF_SHLIB_SUFFIX)
574
575dnl ***************
576dnl GNOME Libraries
577dnl ***************
578EVO_CHECK_LIB(Bonobo, bonobox, 1.0.3)
579EVO_CHECK_LIB(OAF, oaf, 0.6.10)
580EVO_CHECK_LIB(libglade, libglade, 0.14)
581EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, gnomecanvaspixbuf, 0.18.0)
582EVO_CHECK_LIB(GNOME-VFS, vfs, 1.0.5)
583EVO_CHECK_LIB(libxml, xml, 1.8.17, 2.0)
584EVO_CHECK_LIB(bonobo-conf, bonobo_conf, 0.11)
585
586EVO_CHECK_LIB(GAL, gal, 0.22)
587PKG_CHECK_MODULES(GTKHTML, gtkhtml-1.1 >= 1.1.7)
588AC_SUBST(GTKHTML_CFLAGS)
589AC_SUBST(GTKHTML_LIBS)
590GTKHTML_DATADIR=`$PKG_CONFIG --variable gtkhtml_datadir gtkhtml-1.1`
591AC_SUBST(GTKHTML_DATADIR)
592EVO_CHECK_LIB(Libsoup, soup, 0.7)
593
594AM_PATH_GCONF(1.0,,,gconf gconf-gtk)
595if test "x$GCONF_CFLAGS" = "x" ; then
596        AC_MSG_ERROR(Evolution requires GConf to be installed)
597fi
598
599dnl ******************************
600dnl Pilot checking
601dnl ******************************
602AC_ARG_ENABLE(pilot-conduits,
603[  --enable-pilot-conduits=[no/yes] Enable support for building pilot conduits.],,enable_pilot_conduits=no)
604if test "x$enable_pilot_conduits" = "xyes"; then
605        GNOME_PILOT_CHECK
606
607        CFLAGS_save="$CFLAGS"
608        CFLAGS="$CFLAGS $PISOCK_CFLAGS"
609        LDFLAGS_save="$LDFLAGS"
610        LDFLAGS="$LDFLAGS $PISOCK_LIBS"
611
612        AC_CACHE_CHECK([if pilot-link handles UTF-8 conversions], ac_cv_pilot_link_utf8, AC_TRY_RUN([
613
614#include <stdlib.h>
615#include <string.h>
616#include <pi-util.h>
617
618int main (int argc, char **argv)
619{
620        const char *utf8 = "\x66\x66\x66\x66\x66\x66\x66\xC2\xA9";
621        size_t utf8_real_len = strlen (utf8);
622        char *pstring; 
623
624        if (convert_ToPilotChar ("UTF-8", utf8, utf8_real_len, &pstring) == -1)
625                exit (1);
626
627        exit (0);
628}
629], ac_cv_pilot_link_utf8=yes, ac_cv_pilot_link_utf8=no, ac_cv_pilot_link_utf8=no))
630
631        CFLAGS="$CFLAGS_save"
632        LDFLAGS="$LDFLAGS_save"
633
634        if test "$ac_cv_pilot_link_utf8" = no; then
635                AC_MSG_ERROR(evolution requires pilot-link to have working UTF-8 conversion routines)
636        fi
637fi
638AM_CONDITIONAL(ENABLE_PILOT_CONDUITS, test "x$enable_pilot_conduits" = "xyes")
639if test x$enable_pilot_conduits = xyes; then
640   msg_pilot=yes
641else
642   msg_pilot=no
643fi
644
645dnl ********
646dnl Kerberos
647dnl ********
648AC_SEARCH_LIBS(gethostbyname, nsl)
649AC_SEARCH_LIBS(socket, socket)
650
651AC_ARG_WITH(krb5, [  --with-krb5=PREFIX      Location of Kerberos 5 libs/includes])
652AC_ARG_WITH(krb4, [  --with-krb4=PREFIX      Location of Kerberos 4 libs/includes])
653msg_krb5=no
654if test ${with_krb5:=no} != no; then
655        LDFLAGS_save="$LDFLAGS"
656        LIBS_save="$LIBS"
657
658        mitlibs="-lkrb5 -lk5crypto -lcom_err"
659        heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken"
660        AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5,
661        [
662                LDFLAGS="$LDFLAGS -L$with_krb5/lib"
663                LIBS="$LIBS $mitlibs"
664                AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$mitlibs",
665                [
666                        LDFLAGS="$LDFLAGS_save -L$with_krb5/lib"
667                        LIBS="$LIBS_save $heimlibs"
668                        AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5=no)
669                ])
670                LDFLAGS="$LDFLAGS_save"
671                LIBS="$LIBS_save"
672        ])
673        if test "$ac_cv_lib_kerberos5" != no; then
674                AC_DEFINE(HAVE_KRB5)
675                msg_krb5=yes
676                KRB5_CFLAGS="-I$with_krb5/include/krb5"
677                KRB5_LDFLAGS="-L$with_krb5/lib"
678                KRB5_LIBS="$ac_cv_lib_kerberos5"
679        fi
680else
681        AC_MSG_CHECKING(for Kerberos 5)
682        AC_MSG_RESULT($with_krb5)
683fi
684
685msg_krb4=no
686if test x${with_krb4:=no} != xno; then
687        LDFLAGS_save="$LDFLAGS"
688        LIBS_save="$LIBS"
689        AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4,
690        [
691                ac_cv_lib_kerberos4=no
692
693                case $ac_cv_lib_kerberos5 in
694                *k5crypto*)
695                        # Look for MIT krb5 compat krb4
696                        LDFLAGS="$LDFLAGS -L$with_krb4/lib $KRB5_LDFLAGS"
697                        LIBS="$LIBS -lkrb4 -ldes425 $KRB5_LIBS"
698                        AC_TRY_LINK_FUNC(krb_mk_req,
699                        [
700                                ac_cv_lib_kerberos4="-lkrb4 -ldes425 $KRB5_LIBS"
701                                ac_cv_ldflag_kerberos4="$KRB5_LDFLAGS"
702                        ])
703                        ;;
704                esac
705
706                if test "$ac_cv_lib_kerberos4" = no; then
707                        # Look for KTH krb4
708                        LDFLAGS="$LDFLAGS_save -L$with_krb4/lib"
709                        LIBS="$LIBS_save -lkrb -lcrypto -lcom_err -lroken"
710                        AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken")
711                fi
712                if test "$ac_cv_lib_kerberos4" = no; then
713                        # Look for old MIT krb4
714                        LDFLAGS="$LDFLAGS_save -L$with_krb4/lib"
715                        LIBS="$LIBS_save -lkrb"
716                        AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4=-lkrb,
717                        [
718                                LIBS="$LIBS -ldes"
719                                AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -ldes")
720                        ])
721                fi
722        ])
723        LDFLAGS="$LDFLAGS_save"
724        LIBS="$LIBS_save"
725        if test "$ac_cv_lib_kerberos4" != no; then
726                AC_DEFINE(HAVE_KRB4)
727                msg_krb4=yes
728                if test -f "$with_krb4/include/krb.h" -o -f "$with_krb4/include/port-sockets.h"; then
729                        KRB4_CFLAGS="-I$with_krb4/include"
730                fi
731                if test -d "$with_krb4/include/kerberosIV"; then
732                        KRB4_CFLAGS="$KRB4_CFLAGS -I$with_krb4/include/kerberosIV"
733                fi
734                KRB4_LDFLAGS="-L$with_krb4/lib $ac_cv_ldflag_kerberos4"
735                KRB4_LIBS="$ac_cv_lib_kerberos4"
736
737                CFLAGS_save="$CFLAGS"
738                CFLAGS="$CFLAGS $KRB4_CFLAGS"
739                AC_TRY_COMPILE([#include "krb.h"
740                int krb_sendauth;
741                ],[return 0],[AC_DEFINE(NEED_KRB_SENDAUTH_PROTO)],)
742                CFLAGS="$CFLAGS_save"
743        fi
744else
745        AC_MSG_CHECKING(for Kerberos 4)
746        AC_MSG_RESULT(${with_krb4})
747fi
748
749AC_SUBST(KRB5_CFLAGS)
750AC_SUBST(KRB5_LDFLAGS)
751AC_SUBST(KRB5_LIBS)
752AC_SUBST(KRB4_CFLAGS)
753AC_SUBST(KRB4_LDFLAGS)
754AC_SUBST(KRB4_LIBS)
755
756
757dnl ==========================
758dnl Pedantic PGP/MIME
759dnl ==========================
760AC_ARG_ENABLE(pedantic-pgp-mime,
761[  --enable-pedantic-pgp-mime=[no/yes] Enable pedantic PGP/MIME handling (not recommended)],,enable_pedantic_pgp_mime=no)
762if test "x$enable_pedantic_pgp_mime" = "xyes"; then
763        AC_DEFINE(ENABLE_PEDANTIC_PGPMIME)
764fi
765
766
767dnl ********************************************************************************
768dnl security extension support (SSL and S/MIME)
769dnl
770dnl The following voodoo does detection of mozilla libraries (nspr and nss)
771dnl needed by Camel (SSL and S/MIME).
772dnl
773dnl The Evolution security extensions are only built if these libraries are found
774dnl ********************************************************************************
775msg_ssl=no
776
777dnl these 2 enable's are inverses of each other
778AC_ARG_ENABLE(nss, [  --enable-nss=[yes,no,static]        Attempt to use Mozilla libnss for SSL support.],
779        enable_nss="$enableval", enable_nss="yes")
780
781AC_ARG_ENABLE(openssl, [  --enable-openssl=[no,yes]        Attempt to use OpenSSL for SSL support.],
782        enable_openssl="$enableval", enable_openssl="no")
783
784if test "x${enable_openssl}" = "xyes"; then
785dnl User wants to override nss with OpenSSL
786        enable_nss="no"
787        AC_MSG_WARN([OpenSSL enabled, disabling NSS.])
788fi
789
790if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
791        AC_ARG_WITH(nspr-includes, [  --with-nspr-includes=PREFIX     Location of NSPR header files.],
792                with_nspr_includes="$withval", with_nspr_includes="/usr/include/nspr")
793        have_nspr_includes="no"
794        if test "x${with_nspr_includes}" != "xno"; then
795                CPPFLAGS_save="$CPPFLAGS"
796               
797                AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
798                AC_MSG_RESULT("")
799               
800                CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
801                AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
802                CPPFLAGS="$CPPFLAGS_save"
803               
804                if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
805                        have_nspr_includes="yes"
806                        NSPR_CFLAGS="-I$with_nspr_includes"
807                fi
808        else
809                AC_MSG_CHECKING(for Mozilla nspr4 includes)
810                AC_MSG_RESULT(no)
811        fi
812       
813        AC_ARG_WITH(nspr-libs, [  --with-nspr-libs=PREFIX     Location of Mozilla nspr4 libs.],
814                with_nspr_libs="$withval")
815        have_nspr_libs="no"
816        if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
817                CFLAGS_save="$CFLAGS"
818                LDFLAGS_save="$LDFLAGS"
819
820                if test "$enable_nss" = "static"; then
821                    if test -z "${with_nspr_libs}"; then
822                        AC_MSG_ERROR([Static linkage requested, but path to nspr libraries not set]
823                                     [Please specify the path to libnspr4.a]
824                                     [Example: --with-nspr-libs=/usr/lib])
825                    else
826                        nsprlibs="-ldl $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
827                    fi
828                else
829                    nsprlibs="-ldl -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
830                fi
831
832                AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
833                [
834                        LIBS_save="$LIBS"
835                        CFLAGS="$CFLAGS $NSPR_CFLAGS"
836
837                        if test "x${with_nspr_libs}" != "x"; then
838                                LIBS="$nsprlibs"
839                                LDFLAGS="$LDFLAGS -L$with_nspr_libs"
840                        else
841                                LIBS="$nsprlibs"
842                                LDFLAGS="$LDFLAGS"
843                        fi
844                       
845                        AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
846                        CFLAGS="$CFLAGS_save"
847                        LDFLAGS="$LDFLAGS_save"
848                        LIBS="$LIBS_save"
849                ])
850                if test "x$moz_nspr_libs" != "xno"; then
851                        have_nspr_libs="yes"
852                        NSPR_LDFLAGS="-L$with_nspr_libs $nsprlibs"
853                else
854                        NSPR_CLFAGS=""
855                fi
856        else
857                AC_MSG_CHECKING(for Mozilla nspr4 libraries)
858                AC_MSG_RESULT(no)
859        fi
860       
861        AC_ARG_WITH(nss-includes, [  --with-nss-includes=PREFIX     Location of NSS3 headers.],
862                with_nss_includes="$withval", with_nss_includes="/usr/include/moznss")
863        if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
864                CPPFLAGS_save="$CPPFLAGS"
865               
866                AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
867                AC_MSG_RESULT("")
868       
869                if test "x${with_nspr_includes}" != "x"; then
870                        CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
871                else
872                        CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
873                fi
874       
875                AC_CHECK_HEADERS(nss.h ssl.h smime.h,
876                        [ have_nss_includes="yes" ],
877                        [ have_nss_includes="no" ])
878       
879                CPPFLAGS="$CPPFLAGS_save"
880               
881                if test "x${have_nss_includes}" = xyes ; then   
882                        have_nss_includes="yes"
883                        NSS_CFLAGS="-I$with_nss_includes"
884                else
885                        NSPR_CFLAGS=""
886                        NSPR_LDFLAGS=""
887                fi
888        else
889                AC_MSG_CHECKING(for Mozilla nss3 includes)
890                AC_MSG_RESULT(no)
891        fi
892       
893        AC_ARG_WITH(nss-libs, [  --with-nss-libs=PREFIX         Location of Mozilla nss3 libs.],
894                with_nss_libs="$withval")
895        if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
896                LDFLAGS_save="$LDFLAGS"
897       
898                if test "$enable_nss" = "static"; then
899                    if test -z "${with_nss_libs}"; then
900                        AC_MSG_ERROR([Static linkage requested, but path to nss libraries not set]
901                                     [Please specify the path to libnss3.a]
902                                     [Example: --with-nspr-libs=/usr/lib/mozilla])
903                    else
904                        nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
905                        case "$host" in
906                                *solaris*)
907                                nsslibs="$nsslibs $with_nss_libs/libfreebl.a"
908                        ;;
909                        esac
910                    fi
911                else
912                        nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
913                fi     
914
915                AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
916                [
917                        LIBS_save="$LIBS"
918                        LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
919                        LIBS="$nsslibs $nsprlibs"
920                        AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
921                        if test "$moz_nss_libs" = no; then
922                                nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
923                                LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
924                                AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")       
925                        fi
926                        LDFLAGS="$LDFLAGS_save"
927                        LIBS="$LIBS_save"
928                ])
929                if test "$moz_nss_libs" != no; then
930                        AC_DEFINE(HAVE_NSS)
931                        AC_DEFINE(HAVE_SSL)
932                        if test "$enable_nss" = "static"; then
933                                msg_ssl="yes (Mozilla NSS:static)"
934                        else
935                                msg_ssl="yes (Mozilla NSS)"
936                        fi # static_nss
937                        NSS_LDFLAGS="-L$with_nss_libs $nsslibs"
938                else
939                        NSS_CFLAGS=""
940                        NSPR_CFLAGS=""
941                        NSPR_LDFLAGS=""
942                fi
943        else
944                AC_MSG_CHECKING(for Mozilla nss libraries)
945                AC_MSG_RESULT(no)
946        fi
947fi
948
949AC_SUBST(NSPR_CFLAGS)
950AC_SUBST(NSPR_LDFLAGS)
951AC_SUBST(NSS_CFLAGS)
952AC_SUBST(NSS_LDFLAGS)
953
954dnl ******************
955dnl CDE dtappintegrate
956dnl ******************
957
958AC_ARG_WITH(cde-path, [  --with-cde-path=PATH   Location of CDE installation],
959            [with_cde_path="$withval"])
960if test -z "$with_cde_path"; then
961        with_cde_path="/usr/dt"
962fi
963
964AC_MSG_CHECKING(for dtappintegrate)
965if test -x "$with_cde_path/bin/dtappintegrate" ; then
966        DTAPPINTEGRATE="$with_cde_path/bin/dtappintegrate"
967else
968        DTAPPINTEGRATE="no"
969fi
970AC_MSG_RESULT([$DTAPPINTEGRATE])
971
972AC_SUBST(DTAPPINTEGRATE)
973AM_CONDITIONAL(HAVE_DTAPPINTEGRATE, test "x$DTAPPINTEGRATE" != "xno")
974
975dnl *****************
976dnl killall or pkill?
977dnl *****************
978
979AC_MSG_CHECKING(for command to kill processes)
980
981if test `uname -s` = "SunOS" ; then
982        KILL_PROCESS_CMD="pkill";
983else
984        KILL_PROCESS_CMD="killall";
985fi
986
987KILL_PROCESS_CMD=`which $KILL_PROCESS_CMD`
988if test -z "$KILL_PROCESS_CMD" ; then
989        AC_MSG_RESULT(none)
990else
991        AC_MSG_RESULT($KILL_PROCESS_CMD)
992        AC_DEFINE_UNQUOTED(KILL_PROCESS_CMD, "$KILL_PROCESS_CMD")
993fi
994
995dnl ****************************************************
996dnl GNOME_PREFIX is is needed by shell/evolution-nognome
997dnl ****************************************************
998
999GNOME_PREFIX="`gnome-config --prefix`"
1000AC_SUBST(GNOME_PREFIX)
1001
1002dnl ******************************
1003dnl OpenSSL
1004dnl ******************************
1005
1006dnl only continue detecting OpenSSL if we haven't already found all of the
1007dnl Mozilla libnss includes/libraries and if user actually wants ssl support
1008if test "$msg_ssl" = "no" -a "x${enable_openssl}" != "xno"; then
1009        AC_ARG_WITH(openssl-includes, [  --with-openssl-includes=PREFIX     Location of OpenSSL includes.],
1010                with_openssl_includes="$withval", with_openssl_includes="/usr/include")
1011        have_openssl_includes="no"
1012        if test "x${with_openssl_includes}" != "xno"; then
1013                CPPFLAGS_save="$CPPFLAGS"
1014               
1015                AC_MSG_CHECKING(for OpenSSL includes)
1016                AC_MSG_RESULT("")
1017               
1018                CPPFLAGS="$CPPFLAGS -I$with_openssl_includes"
1019                AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h, [ openssl_includes="yes" ])
1020                CPPFLAGS="$CPPFLAGS_save"
1021               
1022                if test "x{$openssl_includes}" != "xno" -a "x{$openssl_includes}" != "x"; then
1023                        have_openssl_includes="yes"
1024                        OPENSSL_CFLAGS="-I$with_openssl_includes"
1025                else
1026                        OPENSSL_CFLAGS=""
1027                fi
1028        else
1029                AC_MSG_CHECKING(for OpenSSL includes)
1030                AC_MSG_RESULT(no)
1031        fi
1032       
1033        AC_ARG_WITH(openssl-libs, [  --with-openssl-libs=PREFIX         Location of OpenSSL libs.],
1034                with_openssl_libs="$withval")
1035        if test "x${with_openssl_libs}" != "xno" -a "x${have_openssl_includes}" != "xno"; then
1036                LDFLAGS_save="$LDFLAGS"
1037       
1038                case $with_openssl_libs in
1039                ""|-L*) ;;
1040                *) with_openssl_libs="-L$with_openssl_libs" ;;
1041                esac
1042       
1043                AC_CHECK_LIB(dl, dlopen, DL_LDFLAGS="-ldl", DL_LDFLAGS="")
1044                AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs,
1045                [
1046                        LDFLAGS="$LDFLAGS $with_openssl_libs -lssl -lcrypto $DL_LDFLAGS"
1047                        AC_TRY_LINK_FUNC(SSL_read, openssl_libs="yes", openssl_libs="no")
1048                        LDFLAGS="$LDFLAGS_save"
1049                ])
1050                if test "x${openssl_libs}" != "xno"; then
1051                        AC_DEFINE(HAVE_OPENSSL)
1052                        AC_DEFINE(HAVE_SSL)
1053                        msg_ssl="yes (OpenSSL)"
1054                        OPENSSL_LDFLAGS="$with_openssl_libs -lssl -lcrypto $DL_LDFLAGS"
1055                else
1056                        OPENSSL_CFLAGS=""
1057                        OPENSSL_LDFLAGS=""
1058                fi
1059        else
1060                AC_MSG_CHECKING(for OpenSSL libraries)
1061                AC_MSG_RESULT(no)
1062        fi
1063else
1064        OPENSSL_CFLAGS=""
1065        OPENSSL_LDFLAGS=""
1066fi
1067
1068AC_SUBST(OPENSSL_CFLAGS)
1069AC_SUBST(OPENSSL_LDFLAGS)
1070
1071dnl *************************
1072dnl CFLAGS and LIBS and stuff
1073dnl *************************
1074
1075dnl Utility macro to set compiler flags for a specific lib.
1076AC_DEFUN(EVO_SET_COMPILE_FLAGS, [
1077        deps="$2"
1078        extra_cflags="$3"
1079        extra_libs="$4"
1080        $1_CFLAGS="\$(WERROR) `gnome-config --cflags $deps` $extra_cflags"
1081        $1_LIBS="`gnome-config --libs $deps` $extra_libs"
1082])
1083
1084dnl --- Flags to get all the GNOME stuff
1085
1086FULL_GNOME_DEPS="bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs"
1087
1088EVO_SET_COMPILE_FLAGS(GNOME_FULL, $FULL_GNOME_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS})
1089AC_SUBST(GNOME_FULL_CFLAGS)
1090AC_SUBST(GNOME_FULL_LIBS)
1091
1092dnl --- Flags for the various libraries we build
1093
1094EVO_SET_COMPILE_FLAGS(CAMEL, gal xml,
1095                      $THREADS_CFLAGS $KRB4_CFLAGS $NSS_CFLAGS $NSPR_CFLAGS $OPENSSL_CFLAGS,
1096                      $THREADS_LIBS $KRB4_LDFLAGS $NSS_LDFLAGS $NSPR_LDFLAGS $OPENSSL_LDFLAGS)
1097AC_SUBST(CAMEL_CFLAGS)
1098AC_SUBST(CAMEL_LIBS)
1099
1100EVO_SET_COMPILE_FLAGS(E_NAME, bonobox gal oaf)
1101AC_SUBST(E_NAME_CFLAGS)
1102AC_SUBST(E_NAME_LIBS)
1103
1104EVO_SET_COMPILE_FLAGS(E_UTIL, bonobox gal oaf libglade bonobo_conf soup,
1105                      $GCONF_CFLAGS $THREADS_CFLAGS $NSPR_CFLAGS,
1106                      $GCONF_LIBS $THREADS_LIBS $NSPR_LDFLAGS)
1107AC_SUBST(E_UTIL_CFLAGS)
1108AC_SUBST(E_UTIL_LIBS)
1109
1110EVO_SET_COMPILE_FLAGS(E_WIDGETS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs)
1111AC_SUBST(E_WIDGETS_CFLAGS)
1112AC_SUBST(E_WIDGETS_LIBS)
1113
1114EVO_SET_COMPILE_FLAGS(IMPORTERS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs)
1115AC_SUBST(IMPORTERS_CFLAGS)
1116AC_SUBST(IMPORTERS_LIBS)
1117
1118dnl libibex is now deprecated
1119dnl EVO_SET_COMPILE_FLAGS(LIBIBEX, bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs,
1120dnl                   $THREADS_CFLAGS, $THREADS_LIBS)
1121dnl AC_SUBST(LIBIBEX_CFLAGS)
1122dnl AC_SUBST(LIBIBEX_LIBS)
1123
1124EVO_SET_COMPILE_FLAGS(LIBFILTER, bonobo gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade)
1125AC_SUBST(LIBFILTER_CFLAGS)
1126AC_SUBST(LIBFILTER_LIBS)
1127
1128dnl --- evolution (shell) flags
1129
1130EVO_SET_COMPILE_FLAGS(SHELL, bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS})
1131AC_SUBST(SHELL_CFLAGS)
1132AC_SUBST(SHELL_LIBS)
1133
1134dnl --- evolution-addressbook flags
1135
1136EVOLUTION_ADDRESSBOOK_DEPS="bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs"
1137
1138EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS})
1139AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
1140AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
1141
1142EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK_CONDUIT, gpilot $EVOLUTION_ADDRESSBOOK_DEPS, $PISOCK_CFLAGS)
1143AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS)
1144AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS)
1145
1146dnl -- evolution-executive-summary flags
1147
1148EVO_SET_COMPILE_FLAGS(EVOLUTION_EXECUTIVE_SUMMARY,
1149                      bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf soup vfs, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS})
1150AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS)
1151AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_LIBS)
1152
1153dnl --- evolution-calendar flags
1154
1155EVOLUTION_CALENDAR_DEPS="bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs"
1156
1157EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS})
1158AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
1159AC_SUBST(EVOLUTION_CALENDAR_LIBS)
1160
1161EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR_CONDUIT, gpilot $EVOLUTION_CALENDAR_DEPS, $PISOCK_CFLAGS)
1162AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
1163AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_LIBS)
1164
1165dnl --- evolution-mail flags
1166
1167dnl ******************************
1168dnl Versioned library files
1169dnl ******************************
1170
1171privlibdir='$(pkglibdir)/'$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION
1172AC_SUBST(privlibdir)
1173
1174camel_providerdir="$privlibdir/camel-providers"
1175AC_SUBST(camel_providerdir)
1176
1177EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, $FULL_GNOME_DEPS soup, $GCONF_CFLAGS $THREADS_CFLAGS ${GTKHTML_CFLAGS}, $GCONF_LIBS $THREADS_LIBS ${GTKHTML_LIBS})
1178AC_SUBST(EVOLUTION_MAIL_CFLAGS)
1179AC_SUBST(EVOLUTION_MAIL_LIBS)
1180
1181dnl -- wombat flags
1182
1183EVO_SET_COMPILE_FLAGS(WOMBAT, $FULL_GNOME_DEPS, $LDAP_CFLAGS, $LDAP_LIBS)
1184AC_SUBST(WOMBAT_CFLAGS)
1185AC_SUBST(WOMBAT_LIBS)
1186
1187##################################################
1188# Check for gtk-doc.
1189##################################################
1190
1191AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
1192
1193if test "x$with_html_dir" = "x" ; then
1194  HTML_DIR='${datadir}/gnome/html'
1195else
1196  HTML_DIR=$with_html_dir
1197fi
1198
1199AC_SUBST(HTML_DIR)
1200
1201AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
1202
1203gtk_doc_min_version=0.6
1204if $GTKDOC ; then
1205    gtk_doc_version=`gtkdoc-mkdb --version`
1206    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
1207    if perl <<EOF ; then
1208      exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
1209            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
1210EOF
1211      AC_MSG_RESULT(yes)
1212   else
1213      AC_MSG_RESULT(no)
1214      GTKDOC=false
1215   fi
1216fi
1217
1218dnl Let people disable the gtk-doc stuff.
1219AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
1220
1221if test x$enable_gtk_doc = xauto ; then
1222  if test x$GTKDOC = xtrue ; then
1223    enable_gtk_doc=yes
1224  else
1225    enable_gtk_doc=no
1226  fi
1227fi
1228
1229AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
1230
1231dnl ******************
1232dnl Sub-version number
1233dnl ******************
1234AC_ARG_WITH(sub-version, [  --with-sub-version=VERSION Specify a sub-version string])
1235AC_DEFINE_UNQUOTED(SUB_VERSION, "$with_sub_version")
1236
1237dnl ********************
1238dnl KDE applnk directory
1239dnl ********************
1240AC_ARG_WITH(kde-applnk-path, [  --with-kde-applnk-path=PATH    Location of KDE applnk files],
1241            [with_kde_applnk_path="$withval"])
1242if test x"$with_kde_applnk_path" != x"no"; then
1243        if test -z "$with_kde_applnk_path"; then
1244                with_kde_applnk_path="$prefix/share/applnk"
1245        fi
1246        if test -d "$with_kde_applnk_path" ; then
1247                AC_DEFINE(HAVE_KDE_APPLNK)
1248                KDE_APPLNK_DIR="$with_kde_applnk_path"
1249        else
1250                AC_PATH_PROG(KDECONFIG, kde-config)
1251                if test -n "$KDECONFIG"; then
1252                        KDE_APPLNK_DIR=`$KDECONFIG --expandvars --install apps`
1253                        AC_DEFINE(HAVE_KDE_APPLNK)
1254                else
1255                        KDE_APPLNK_DIR=""
1256                fi
1257        fi
1258else
1259        KDE_APPLNK_DIR=""
1260fi
1261AM_CONDITIONAL(HAVE_KDE_APPLNK, test x"$KDE_APPLNK_DIR" != x)
1262AC_SUBST(KDE_APPLNK_DIR)
1263
1264dnl ******************************
1265dnl foo for *Conf.sh.in
1266dnl ******************************
1267
1268EVOLUTION_LIBDIR="-L${libdir}"
1269EVOLUTION_DATADIR="${datadir}"
1270EVOLUTION_INCLUDEDIR="-I${includedir}/evolution"
1271CAMEL_INCLUDEDIR="-I${includedir}/camel"
1272
1273AC_SUBST(EVOLUTION_LIBDIR)
1274AC_SUBST(EVOLUTION_DATADIR)
1275AC_SUBST(EVOLUTION_INCLUDEDIR)
1276AC_SUBST(CAMEL_INCLUDEDIR)
1277
1278dnl ******************************
1279dnl Makefiles
1280dnl ******************************
1281
1282AC_CONFIG_SUBDIRS(libical)
1283
1284EVOLUTION_DIR=`(cd $srcdir; pwd)`
1285AC_SUBST(EVOLUTION_DIR)
1286
1287AC_OUTPUT([
1288Makefile
1289addressbook/Makefile
1290addressbook/backend/Makefile
1291addressbook/backend/ebook/Makefile
1292addressbook/backend/idl/Makefile
1293addressbook/backend/pas/Makefile
1294addressbook/conduit/Makefile
1295addressbook/gui/Makefile
1296addressbook/gui/component/Makefile
1297addressbook/gui/component/select-names/Makefile
1298addressbook/gui/contact-editor/Makefile
1299addressbook/gui/contact-list-editor/Makefile
1300addressbook/gui/merging/Makefile
1301addressbook/gui/search/Makefile
1302addressbook/gui/widgets/Makefile
1303addressbook/printing/Makefile
1304art/Makefile
1305calendar/Makefile
1306calendar/cal-client/Makefile
1307calendar/cal-util/Makefile
1308calendar/conduits/Makefile
1309calendar/conduits/calendar/Makefile
1310calendar/conduits/todo/Makefile
1311calendar/gui/Makefile
1312calendar/gui/alarm-notify/Makefile
1313calendar/gui/dialogs/Makefile
1314calendar/idl/Makefile
1315calendar/importers/Makefile
1316calendar/pcs/Makefile
1317camel/Makefile
1318camel/providers/Makefile
1319camel/providers/imap/Makefile
1320camel/providers/local/Makefile
1321camel/providers/nntp/Makefile
1322camel/providers/pop3/Makefile
1323camel/providers/sendmail/Makefile
1324camel/providers/smtp/Makefile
1325camel/tests/Makefile
1326camel/tests/folder/Makefile
1327camel/tests/lib/Makefile
1328camel/tests/message/Makefile
1329camel/tests/mime-filter/Makefile
1330camel/tests/misc/Makefile
1331camel/tests/smime/Makefile
1332camel/tests/stream/Makefile
1333composer/Makefile
1334data/Makefile
1335data/cde_app_root/Makefile
1336data/cde_app_root/dt/Makefile
1337data/cde_app_root/dt/appconfig/Makefile
1338data/cde_app_root/dt/appconfig/appmanager/Makefile
1339data/cde_app_root/dt/appconfig/appmanager/C/Makefile
1340data/cde_app_root/dt/appconfig/appmanager/C/Ximian/Makefile
1341data/cde_app_root/dt/appconfig/icons/Makefile
1342data/cde_app_root/dt/appconfig/icons/C/Makefile
1343data/cde_app_root/dt/appconfig/types/Makefile
1344data/cde_app_root/dt/appconfig/types/C/Makefile
1345data/cde_app_root/dt/appconfig/types/C/Ximian.dt
1346default_user/Makefile
1347default_user/local/Makefile
1348default_user/local/Calendar/Makefile
1349default_user/local/Contacts/Makefile
1350default_user/local/Drafts/Makefile
1351default_user/local/Inbox/Makefile
1352default_user/local/Outbox/Makefile
1353default_user/local/Sent/Makefile
1354default_user/local/Tasks/Makefile
1355default_user/local/Trash/Makefile
1356doc/Makefile
1357doc/devel/Makefile
1358doc/devel/calendar/Makefile
1359doc/devel/calendar/cal-client/Makefile
1360doc/devel/calendar/cal-util/Makefile
1361e-util/Makefile
1362e-util/ename/Makefile
1363filter/Makefile
1364help/Makefile
1365help/C/Makefile
1366help/no/Makefile
1367importers/Makefile
1368intl/Makefile
1369libversit/Makefile
1370libwombat/Makefile
1371macros/Makefile
1372mail/Makefile
1373mail/importers/Makefile
1374my-evolution/Makefile
1375omf-install/Makefile
1376po/Makefile.in
1377shell/Makefile
1378shell/evolution-nognome
1379shell/glade/Makefile
1380shell/importer/Makefile
1381sounds/Makefile
1382tools/Makefile
1383ui/Makefile
1384views/Makefile
1385views/addressbook/Makefile
1386views/calendar/Makefile
1387views/mail/Makefile
1388views/tasks/Makefile
1389widgets/Makefile
1390widgets/e-timezone-dialog/Makefile
1391widgets/menus/Makefile
1392widgets/misc/Makefile
1393wombat/Makefile
1394
1395my-evolution/GNOME_Evolution_Summary.oaf.in
1396])
1397
1398if test "x$with_sub_version" != "x"; then
1399echo "
1400        Evolution ($with_sub_version) has been configured as follows: "
1401else
1402echo "
1403        Evolution has been configured as follows: "
1404fi
1405
1406echo "
1407        Mail Directory:   $system_mail_dir, $system_mail_perm
1408        LDAP support:     $msg_ldap"
1409if test "$msg_nntp" = "yes"; then
1410echo "\
1411        NNTP support:     $msg_nntp"
1412fi
1413echo "\
1414        Pilot conduits:   $msg_pilot
1415        Kerberos 4/5:     $msg_krb4/$msg_krb5
1416        SSL support:      $msg_ssl
1417        IPv6 support:     $msg_ipv6
1418        Dot Locking:      $msg_dot
1419        File Locking:     $msg_file
1420        Gtk-doc:          $enable_gtk_doc
1421        Shlib components: $enable_shlib_components"
1422
1423if test x$enable_gtk_doc = xyes; then
1424echo "
1425        Programming documentation files will be built automatically."
1426else
1427echo "
1428        Programming documentation files will not be built.
1429        You may want to install the gtk-doc package
1430        so that you will get the Evolution Developer's Guide."
1431fi
1432
1433if test "x$enable_shlib_components" = "xyes" ; then
1434        echo "
1435        *** Warning, shlib components are currently broken.
1436        *** Enabling this option will probably cause Evolution to not
1437        *** work correctly.
1438"
1439else
1440        echo "
1441"
1442fi
Note: See TracBrowser for help on using the repository browser.