aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 450db33aeda936b41c4d08bc4654a568abd66c15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# Process this file with autoconf to produce a configure script.
AC_INIT(camel)
AM_CONFIG_HEADER(config.h)

cflags_set=${CFLAGS+set}

EVOLUTION_MAJOR_VERSION=0
EVOLUTION_MINOR_VERSION=0
EVOLUTION_MICRO_VERSION=0
VERSION=$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION
PACKAGE=evolution

AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_SUBST(VERSION)


dnl Initialize libtool
AM_PROG_LIBTOOL

dnl Initialize maintainer mode
AM_MAINTAINER_MODE

AC_CANONICAL_HOST

AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT(capplet)
GNOME_COMPILE_WARNINGS
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LEX
AC_PROG_YACC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib)
AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL")

AC_MSG_CHECKING(system mail directory)
if test -d /var/mail; then
    system_mail_dir=/var/mail
else
    system_mail_dir=/var/spool/mail
fi
AC_MSG_RESULT($system_mail_dir)
AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir")

dnl Check for new enough gnome-libs
CFLAGS_save=$CFLAGS
LIBS_save=$LIBS
CFLAGS=`gnome-config --cflags gnomeui`
LIBS=`gnome-config --libs gnomeui`

AC_CHECK_LIB(gnomeui, gnome_window_icon_set_default_from_file, ,[
AC_MSG_ERROR(gnome-libs 1.0.59 or higher is required.)])

CFLAGS=$CFLAGS_save
LIBS=$LIBS_save

ALL_LINGUAS="da el fr gl ja nl no ru sv tr uk"

AM_GNOME_GETTEXT

GNOME_X_CHECKS

dnl Purify support
AC_ARG_ENABLE(purify, 
[  --enable-purify=[no/yes]      Enable support for building executables with
                                Purify.],,enable_purify=no)
AC_PATH_PROG(PURIFY, purify, impure)
AC_SUBST(PURIFY)
AM_CONDITIONAL(ENABLE_PURIFY, test "x$enable_purify" = "xyes" -a "x$purify" != "ximpure")

dnl * Time zone stuff
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
    AC_TRY_COMPILE([
        #include <time.h>
    ], [
        timezone = 1;
    ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
    AC_DEFINE(HAVE_TIMEZONE)
else
    AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
        AC_TRY_COMPILE([
            #include <time.h>
            ], [
            struct tm tm;
            tm.tm_gmtoff = 1;
            ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
    if test $ac_cv_struct_tm_gmtoff = yes; then
        AC_DEFINE(HAVE_TM_GMTOFF)
    else
        AC_ERROR(unable to find a way to determine timezone)
    fi
fi

AC_CHECK_FUNCS(mkstemp)

dnl **************************************************
dnl * pas-backend-file stuff.
dnl * check for db_185.h.  if it's there, we use it.
dnl * otherwise, we use db.h (since it'll be 185).
dnl **************************************************
AC_CHECK_HEADERS(db_185.h)

dnl **************************************************
dnl * ldap related stuff.
dnl **************************************************
AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="-llber")
if test x$ac_cv_lib_lber_ber_get_tag = xyes; then
AC_CHECK_LIB(ldap, ldap_open, LDAP_LIBS="-lldap $LDAP_LIBS", ,-llber)
fi
if test x$ac_cv_lib_ldap_ldap_open = xyes; then
    AC_DEFINE(HAVE_LDAP)
    AC_SUBST(LDAP_LIBS)
else
    AC_MSG_WARN(no ldap support present)
fi
AM_CONDITIONAL(ENABLE_LDAP, test x$ac_cv_lib_ldap_ldap_open = xyes)

dnl **************************************************
dnl * Posix thread support
dnl **************************************************

have_pthread=false

AC_ARG_WITH(threads, [  --with-threads          Include thread support],[
        if test x$withval = xyes; then
              test_thread=true
        else
              test_thread=false
    fi
],[
    test_thread=false
])

if $test_thread; then
     GNOME_PTHREAD_CHECK
     if test "x$PTHREAD_LIB" = "x" ; then
         have_pthread=false
     else
         have_pthread=true
     fi
else
     have_pthread=false
fi

AM_CONDITIONAL(ENABLE_THREADS, $have_pthread)

dnl
dnl Notice that this is a hack, and we wont be able to use this forever, but
dnl at least for some time
dnl
if $have_pthread; then 
    THREADS_LIBS="$PTHREAD_LIB `glib-config --libs gthread`"
    THREADS_CFLAGS="`glib-config --cflags gthread`"
else
    THREADS_LIBS=""
    THREADS_CFLAGS=""
fi


dnl **************************************************
dnl * Print check
dnl **************************************************
AC_MSG_CHECKING(for GnomePrint libraries >= 0.10)
if gnome-config --libs print > /dev/null 2>&1; then 
    vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" | \
        awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
    if test "$vers" -ge 10; then
        AC_MSG_RESULT(found)
    else
        AC_MSG_ERROR(You need at least GNOME print 0.10 for this version of Gnumeric)
    fi
else
    AC_MSG_ERROR(Did not find GnomePrint installed)
fi
GNOME_PRINT_LIBS=`gnome-config --libs print`
GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
AC_SUBST(GNOME_PRINT_LIBS)
AC_SUBST(GNOME_PRINT_CFLAGS)

dnl **************************************************
dnl * ORBit support
dnl **************************************************
dnl GNOMEGNORBA_LIBS="$GNOMEGNORBA_LIBS"
dnl AC_SUBST(GNOMEGNORBA_LIBS)


dnl ******************************
dnl Check for Bonobo
dnl ******************************
AC_MSG_CHECKING(for Bonobo > 0.5)
if gnome-config --libs bonobo > /dev/null 2>&1; then
    vers=`gnome-config --modversion bonobo`
        echo $vers
    case $vers
    in
        bonobo-0.[[012345]]) bonobo_ok=false ;;
        *) bonobo_ok=true ;;
    esac
else
    bonobo_ok=false
fi

if $bonobo_ok; then
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(Bonobo 0.5 is required to compile Evolution)
fi


dnl ******************************
dnl LibGlade checking
dnl ******************************
AC_MSG_CHECKING(For Glade libraries)
if gnome-config --libs libglade > /dev/null 2>&1; then 
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(Did not find libGlade installed)
fi

dnl ******************************
dnl libunicode checking
dnl ******************************
AC_MSG_CHECKING(For libunicode)
if unicode-config --libs > /dev/null 2>&1; then 
    UNICODE_LIBS=`unicode-config --libs`
    UNICODE_CFLAGS=`unicode-config --cflags`
    AC_SUBST(UNICODE_LIBS)
    AC_SUBST(UNICODE_CFLAGS)
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(libunicode not found)
fi

dnl ******************************
dnl GdkPixbuf checking
dnl ******************************
AC_MSG_CHECKING(For Gdkpixbuf libraries)
if gnome-config --libs gdk_pixbuf gnomecanvaspixbuf > /dev/null 2>&1; then 
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(Did not find gdkpixbuf installed)
fi

GLIB_CFLAGS="`glib-config --cflags`"
GLIB_LIBS="`glib-config --libs`"

AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)


EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_LIBS `unicode-config --libs`"
EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_CFLAGS `unicode-config --cflags`"

AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)


BONOBO_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gnomecanvaspixbuf gnomeui`"
BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gnomecanvaspixbuf gnomeui `"
AC_SUBST(BONOBO_GNOME_LIBS)
AC_SUBST(BONOBO_GNOME_CFLAGS)

BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS"
BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS"
AC_SUBST(BONOBO_HTML_GNOME_LIBS)
AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)

dnl ******************************
dnl GtkHTML checking
dnl ******************************

AC_MSG_CHECKING(for GtkHTML)
if gnome-config --libs gtkhtml > /dev/null 2>&1; then
    gtkhtml_ok=true
else
    gtkhtml_ok=false
fi

if $gtkhtml_ok; then
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(GtkHTML is required to compile Evolution)
fi

GTKHTML_CFLAGS="`gnome-config --cflags gtkhtml`"
GTKHTML_LIBS="`gnome-config --libs gtkhtml`"

AC_SUBST(GTKHTML_CFLAGS)
AC_SUBST(GTKHTML_LIBS)

dnl ******************************
dnl Gnome-VFS checking
dnl ******************************
AC_MSG_CHECKING(for GNOME-VFS)
if gnome-config --libs vfs > /dev/null 2>&1; then
    vfs_ok=true
else
    vfs_ok=false
fi

if $vfs_ok; then
    AC_MSG_RESULT(found)
else
    AC_MSG_ERROR(GNOME-VFS is required to compile Evolution)
fi

BONOBO_VFS_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
BONOBO_VFS_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
AC_SUBST(BONOBO_VFS_GNOME_LIBS)
AC_SUBST(BONOBO_VFS_GNOME_CFLAGS)

dnl ******************************
dnl Pilot checking
dnl ******************************
dnl GNOME_PILOT_CHECK


dnl ******
dnl XML
dnl ******
GNOME_XML_CHECK
xmlversion=`xml-config --version | sed 's/^libxml//'`
xmlmajor=`echo $xmlversion | awk -F. '{print $1;}'`
xmlminor=`echo $xmlversion | awk -F. '{print $2;}'`
xmlpatch=`echo $xmlversion | awk -F. '{print $3;}'`
if test "$xmlmajor" -ne 1 -o "$xmlminor" -ne 8 -o "$xmlpatch" -lt 7; then
    AC_MSG_ERROR(gnome-xml 1.8.7 (or later, but not 2.0) is required to compile Evolution)
fi

AC_SUBST(CAPPLET_LIBS)

dnl ******************************
dnl Whether to use OAF
dnl ******************************

AC_MSG_CHECKING(if Bonobo uses OAF)
if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then
    enable_oaf="yes"
else
    enable_oaf="no"
fi

AC_MSG_RESULT("$enable_oaf")

if test "x$enable_oaf" = "xyes"; then
        AC_PATH_PROG(OAF_CONFIG,oaf-config,no)
        if test x$OAF_CONFIG = xno; then
                AC_MSG_ERROR("You enabled OAF support but oaf-config was not found")
        else
                OAF_LIBS=`$OAF_CONFIG --libs`
                OAF_CFLAGS=`$OAF_CONFIG --cflags`
                GNORBA_LIBNAME=
        fi
else
        OAF_LIBS=
        OAF_CFLAGS=
        GNORBA_LIBNAME=gnorba
fi

AC_SUBST(OAF_LIBS)
AC_SUBST(OAF_CFLAGS)

AM_CONDITIONAL(USING_OAF, test "x$enable_oaf" = "xyes")

if test "x$enable_oaf" = "xyes"; then
    AC_DEFINE(USING_OAF)
    BONOBO_GNOME_LIBS="`oaf-config --libs` $BONOBO_GNOME_LIBS"
    BONOBO_GNOME_CFLAGS="`oaf-config --cflags ` $BONOBO_GNOME_CFLAGS"
fi

dnl ********
dnl Kerberos
dnl ********
AC_ARG_WITH(krb5, [  --with-krb5=PREFIX      Location of Kerberos 5 libs/includes])
AC_ARG_WITH(krb4, [  --with-krb4=PREFIX      Location of Kerberos 4 libs/includes])
AC_MSG_CHECKING(for Kerberos 5)
AC_MSG_RESULT(${with_krb5:=no})
if test x$with_krb5 != xno; then
    KRB5_CFLAGS="-I$with_krb5/include/krb5"
    KRB5_LDFLAGS="-L$with_krb5/lib -lkrb5 -lk5crypto -lcom_err"
    AC_DEFINE(HAVE_KRB5)
fi
AC_MSG_CHECKING(for Kerberos 4)
AC_MSG_RESULT(${with_krb4:=no})
if test x$with_krb4 != xno; then
    KRB4_CFLAGS="-I$with_krb4/include -I$with_krb4/include/kerberosIV $KRB5_CFLAGS"
    save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS -L$with_krb4/lib"
    AC_CHECK_LIB(krb, krb_mk_req,
        [KRB4_LDFLAGS="-L$with_krb4/lib -lkrb -ldes"],
        [KRB4_LDFLAGS="-L$with_krb4/lib -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
        -ldes)
    LDFLAGS="$save_LDFLAGS"
    AC_DEFINE(HAVE_KRB4)
fi
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LDFLAGS)
AC_SUBST(KRB4_CFLAGS)
AC_SUBST(KRB4_LDFLAGS)


dnl ******************************
dnl Makefiles
dnl ******************************

AC_CONFIG_SUBDIRS(libical)

AC_OUTPUT([
Makefile
macros/Makefile
intl/Makefile
po/Makefile.in
e-util/Makefile
libibex/Makefile
camel/Makefile
camel/providers/Makefile
camel/providers/mbox/Makefile
camel/providers/pop3/Makefile
camel/providers/sendmail/Makefile
composer/Makefile
widgets/Makefile
widgets/e-text/Makefile
widgets/meeting-time-sel/Makefile
widgets/shortcut-bar/Makefile
widgets/e-table/Makefile
addressbook/Makefile
addressbook/ename/Makefile
addressbook/contact-editor/Makefile
addressbook/printing/Makefile
addressbook/backend/Makefile
addressbook/backend/idl/Makefile
addressbook/backend/pas/Makefile
addressbook/backend/ebook/Makefile
addressbook/gui/Makefile
addressbook/gui/minicard/Makefile
addressbook/gui/component/Makefile
shell/Makefile
mail/Makefile
data/Makefile
libversit/Makefile
libibex/Makefile
calendar/Makefile
calendar/doc/Makefile
calendar/doc/C/Makefile
calendar/idl/Makefile
calendar/cal-util/Makefile
calendar/cal-client/Makefile
calendar/pcs/Makefile
calendar/gui/Makefile
filter/Makefile
wombat/Makefile
art/Makefile
default_user/Makefile
default_user/local/Makefile
default_user/local/Calendar/Makefile
default_user/local/Contacts/Makefile
default_user/local/Directories/Makefile
default_user/local/Directories/subfolders/Makefile
default_user/local/Directories/subfolders/Bigfoot/Makefile
default_user/local/Directories/subfolders/Netcenter/Makefile
default_user/local/Drafts/Makefile
default_user/local/Inbox/Makefile
default_user/local/Outbox/Makefile
default_user/local/Trash/Makefile
tools/Makefile
])