don't use Subject for unknown part name
[claws.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.50)
3 AC_INIT(src/main.c)
4 AC_CONFIG_AUX_DIR(config)
5
6 PACKAGE=sylpheed
7
8 dnl version number
9 MAJOR_VERSION=0
10 MINOR_VERSION=9
11 MICRO_VERSION=6
12 INTERFACE_AGE=0
13 BINARY_AGE=0
14 EXTRA_VERSION=60
15 if test $EXTRA_VERSION -eq 0; then
16     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
17 else
18     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws${EXTRA_VERSION}
19 fi
20
21 dnl set $target
22 AC_CANONICAL_SYSTEM
23
24 dnl
25 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
26 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
27 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
28 AC_SUBST(PACKAGE)
29 AC_SUBST(VERSION)
30 AC_SUBST(MAJOR_VERSION)
31 AC_SUBST(MINOR_VERSION)
32 AC_SUBST(MICRO_VERSION)
33 AC_SUBST(EXTRA_VERSION)
34
35 dnl GNOME installed?
36 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
37 if test "$GNOME_CONFIG" != no; then
38         gnomedatadir="`gnome-config --datadir`"
39         gnomeprefix="`gnome-config --prefix`"
40         if test "${prefix}" = "NONE"; then
41                 gnomedatadir="${ac_default_prefix}/${gnomedatadir#${gnomeprefix}}"
42         else
43                 gnomedatadir="${prefix}/${gnomedatadir#${gnomeprefix}}"
44         fi
45         AC_SUBST(gnomedatadir)
46 fi
47 AM_CONDITIONAL(SYLPHEED_GNOME, test -n "$gnomedatadir")
48
49 dnl Claws version
50 AC_DEFINE(CLAWS, 1, Compiling Claws branch of sylpheed)
51
52 dnl libtool versioning
53 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
54 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
55 LT_REVISION=$INTERFACE_AGE
56 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
57 AC_SUBST(LT_RELEASE)
58 AC_SUBST(LT_CURRENT)
59 AC_SUBST(LT_REVISION)
60 AC_SUBST(LT_AGE)
61
62 dnl Specify a header configuration file
63 AM_CONFIG_HEADER(config.h)
64
65 AM_MAINTAINER_MODE
66
67 dnl Checks for programs.
68 dnl AC_ARG_PROGRAM
69 AC_PROG_CC
70 AC_ISC_POSIX
71 AM_PROG_CC_STDC
72 AC_PROG_INSTALL
73 AC_PROG_LN_S
74 AC_PROG_MAKE_SET
75 AC_PROG_CPP
76 dnl AC_PROG_RANLIB
77 AM_PROG_LEX
78 AC_PROG_YACC
79 AM_PROG_LIBTOOL
80
81 SYLPHEED_ACLOCAL_INCLUDE(ac)
82
83 case "$target" in
84 *-darwin*)
85         CFLAGS="$CFLAGS -traditional-cpp -fno-common"
86         ;;
87 esac
88
89 AM_ICONV
90
91 dnl for gettext
92 ALL_LINGUAS="bg cs de el en_GB es fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
93 AM_GNU_GETTEXT([use-libtool])
94 dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
95 localedir='${prefix}/${DATADIRNAME}/locale'
96 AC_SUBST(localedir)
97
98 manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
99 AC_SUBST(manualdir)
100 faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
101 AC_SUBST(faqdir)
102
103 dnl Set PACKAGE_DATA_DIR in config.h.
104 if test "x${datadir}" = 'x${prefix}/share'; then
105   if test "x${prefix}" = "xNONE"; then
106     AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
107   else
108     AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
109   fi
110 else
111   AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", PACKAGE_DATA_DIR)
112 fi
113
114 AC_CHECK_LIB(xpg4, setlocale)
115
116 dnl for GThread support (currently disabled)
117 dnl AC_ARG_ENABLE(threads,
118 dnl     [  --enable-threads        Enable multithread support [default=no]],
119 dnl     [use_threads=$enableval], [use_threads=no])
120
121 AC_MSG_CHECKING([whether to use threads])
122 if test x"$use_threads" = xyes ; then
123         AC_MSG_RESULT(yes)
124         if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
125                 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
126                 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
127                 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
128         else
129                 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
130         fi
131 else
132         AC_MSG_RESULT(no)
133 fi
134
135 dnl Checks for header files.
136 AC_HEADER_DIRENT
137 AC_HEADER_STDC
138 AC_HEADER_SYS_WAIT
139 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
140                  sys/param.h sys/utsname.h sys/select.h \
141                  wchar.h wctype.h locale.h)
142
143 dnl alf - Check for apache installation f*ck up. apache may also install an 
144 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
145 AC_TRY_COMPILE([#include <stdlib.h>
146                 #include <fnmatch.h>],
147         [int x = USE_HSREGEX;],
148         ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
149 if test $ac_cv_have_apache_fnmatch = yes; then
150         AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
151 fi
152 AC_MSG_CHECKING([whether to use Apache regex header kludge])
153 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
154
155 dnl Checks for typedefs, structures, and compiler characteristics.
156 AC_C_CONST
157 AC_TYPE_OFF_T
158 AC_TYPE_PID_T
159 AC_TYPE_SIZE_T
160 AC_STRUCT_TM
161
162 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
163 dnl may be defined only in wchar.h (this happens with gcc-2.96).
164 dnl So we need to use this extended macro.
165 SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
166 [
167 #if HAVE_WCHAR_H
168 #include <wchar.h>
169 #endif
170 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
171
172 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
173 AC_CHECK_SIZEOF(unsigned short, 2)
174 AC_CHECK_SIZEOF(unsigned int, 4)
175 AC_CHECK_SIZEOF(unsigned long, 4)
176
177 dnl Checks for library functions.
178 AC_FUNC_ALLOCA
179 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
180                wcsstr wcswcs iswalnum iswspace towlower \
181                wcslen wcscpy wcsncpy \
182                uname flock lockf inet_aton inet_addr \
183                fchmod mkstemp)
184
185 dnl *****************
186 dnl ** common code **
187 dnl *****************
188
189 dnl check for glib
190 AM_PATH_GLIB(1.2.6,,
191         AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
192         gthread)
193
194 dnl check for IPv6 option
195 AC_ARG_ENABLE(ipv6,
196         [  --enable-ipv6           Enable IPv6 support [default=no]],
197         [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=no])
198
199 dnl automated checks for IPv6 support.
200 AC_MSG_CHECKING([whether to use IPv6])
201 if test x"$ac_cv_enable_ipv6" = xyes; then
202         AC_MSG_RESULT(yes)
203         AC_MSG_CHECKING([for IPv6 support])
204         AC_CACHE_VAL(ac_cv_ipv6,[
205                 AC_TRY_COMPILE([#define INET6
206                                 #include <sys/types.h>
207                                 #include <netinet/in.h>],
208                         [int x = IPPROTO_IPV6; struct in6_addr a;],
209                         ac_cv_ipv6=yes, ac_cv_ipv6=no)
210         ])
211         AC_MSG_RESULT($ac_cv_ipv6)
212         if test $ac_cv_ipv6 = yes; then
213                 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
214         else
215                 AC_MSG_WARN(*** IPv6 will not be supported ***)
216                 ac_cv_enable_ipv6=no
217         fi
218 else
219         AC_MSG_RESULT(no)
220 fi
221
222 dnl Check for OpenSSL
223 AM_PATH_OPENSSL
224
225 dnl Key for password encryption
226 AC_ARG_WITH(passcrypt-key, [  --with-passcrypt-key=KEY     Key used to encode passwords (8 byte string)],
227             with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
228 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
229
230 dnl RC dir (will be default at a certain point in time)
231 AC_ARG_WITH(config-dir,    [  --with-config-dir=RCDIR      Local configuration dir (default: .sylpheed)],
232               ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".sylpheed")
233 if test x"$ac_cv_with_config_dir" = x""; then
234         ac_cv_with_config_dir=".sylpheed"
235 fi 
236 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
237
238 dnl ************************
239 dnl ** GTK user interface **
240 dnl ************************
241
242 dnl Checks for GTK
243 AM_PATH_GTK(1.2.6,,
244         AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
245
246 dnl check if gdk / gtk was compiled with USE_XIM
247 AC_MSG_CHECKING([whether GTK was compiled with XIM support])
248 CFLAGS_SAVE="$CFLAGS"
249 LDFLAGS_SAVE="$LDFLAGS"
250 CFLAGS="$CFLAGS `$GTK_CONFIG --cflags`"
251 LDFLAGS="$LDFLAGS `$GTK_CONFIG --libs`"
252 AC_CACHE_VAL(ac_cv_use_xim, [
253         AC_TRY_LINK_FUNC([gdk_ic_attr_new],
254                          ac_cv_use_xim=yes, ac_cv_use_xim=no)
255 ])
256 AC_MSG_RESULT($ac_cv_use_xim)
257 if test $ac_cv_use_xim = yes; then
258         AC_DEFINE(USE_XIM, 1, Whether GTK was compiled with XIM support or not)
259 fi
260 CFLAGS="$CFLAGS_SAVE"
261 LDFLAGS="$LDFLAGS_SAVE"
262
263 dnl GNU/Aspell is used for spell checking
264 AC_ARG_ENABLE(aspell,
265         [  --enable-aspell         Enable GNU/aspell support [default=no]],
266         [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=no])
267 AC_MSG_CHECKING([whether to use GNU/aspell])
268 if test $ac_cv_enable_aspell = yes; then
269         AC_MSG_RESULT(yes)
270         AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
271                       [use_aspell=no ac_cv_enable_aspell=no])
272 else
273         AC_MSG_RESULT(no)
274 fi
275
276 dnl want crash dialog
277 AC_ARG_ENABLE(crash-dialog,
278         [  --enable-crash-dialog   Enable crash dialog [default=no]],
279         [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
280 if test $ac_cv_enable_crash_dialog = yes; then
281 dnl check if GDB is somewhere
282         AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
283         AC_MSG_CHECKING([whether to use crash dialog])
284         if test $ac_cv_enable_crash_dialog = yes; then
285                 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
286         fi
287         AC_MSG_RESULT($ac_cv_enable_crash_dialog)
288 fi
289
290 dnl Check for X-Face support
291 AC_ARG_ENABLE(compface,
292         [  --disable-compface      Do not use compface (X-Face)],
293         [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
294 AC_MSG_CHECKING([whether to use compface])
295 if test "$ac_cv_enable_compface" = yes; then
296         AC_MSG_RESULT(yes)
297         AC_MSG_CHECKING([whether compface library is available])
298         AC_MSG_RESULT($ac_cv_enable_compface)
299
300         if test "$ac_cv_enable_compface" = yes; then
301                 COMPFACE_LIBS="$COMPFACE_LIBS -lcompface"
302                 AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)
303                 AC_SUBST(COMPFACE_LIBS)
304         fi
305 else
306         AC_MSG_RESULT(no)
307 fi
308
309 dnl for LDAP support in addressbook
310 dnl no check for libraries; dynamically loaded
311 AC_ARG_ENABLE(ldap,
312         [  --enable-ldap           Enable LDAP support [default=no]],
313         [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
314 AC_MSG_CHECKING([whether to use LDAP])
315 if test "$ac_cv_enable_ldap" = yes; then
316         AC_MSG_RESULT(yes)
317
318         dnl check for available libraries, and pull them in
319         AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
320         AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
321         AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
322         AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
323                      $LDAP_LIBS)
324
325         dnl we need libpthread for sylpheed ldap,  until we find
326         dnl a better way to handle ldap requests asynchronously...
327         AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
328
329         AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
330                          [ ac_cv_enable_ldap=yes ],
331                          [ ac_cv_enable_ldap=no ])
332
333         if test "$ac_cv_enable_ldap" = yes; then
334                 AC_CHECK_LIB(ldap, ldap_open,
335                              [ ac_cv_enable_ldap=yes ],
336                              [ ac_cv_enable_ldap=no ],
337                              $LDAP_LIBS)
338         fi
339
340         AC_MSG_CHECKING([whether ldap library is available])
341         AC_MSG_RESULT($ac_cv_enable_ldap)
342
343         if test "$ac_cv_enable_ldap" = yes; then
344                 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
345                 LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
346                 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
347                 AC_SUBST(LDAP_LIBS)
348         fi
349 else
350         AC_MSG_RESULT(no)
351 fi
352
353 dnl for JPilot support in addressbook
354 dnl no check for libraries; these are dynamically loaded
355 AC_ARG_ENABLE(jpilot,
356         [  --enable-jpilot         Enable JPilot support [default=no]],
357         [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
358 AC_MSG_CHECKING([whether to use JPilot])
359 if test "$ac_cv_enable_jpilot" = yes; then
360         AC_MSG_RESULT(yes)
361         AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
362                          [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
363                          [ ac_cv_enable_jpilot=no ])
364         if test "$ac_cv_enable_jpilot" = no; then
365                 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
366                                  [ ac_cv_enable_jpilot=yes
367                                    AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
368         fi
369         AC_MSG_CHECKING([whether jpilot is available])
370         AC_MSG_RESULT($ac_cv_enable_jpilot)
371
372         if test "$ac_cv_enable_jpilot" = yes; then
373                 LIBS="$LIBS -lpisock"
374         fi
375 else
376         AC_MSG_RESULT(no)
377 fi
378
379 dnl GPGME is used to support OpenPGP 
380 AC_ARG_ENABLE(gpgme,
381         [  --enable-gpgme          Enable GnuPG support using GPGME [default=no]],
382         [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
383 AC_MSG_CHECKING([whether to use GPGME])
384 if test $ac_cv_enable_gpgme = yes; then
385         AC_MSG_RESULT(yes)
386         AM_PATH_GPGME(0.3.10, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
387                       [use_gpgme=no
388                        ac_cv_enable_gpgme=no])
389 else
390         AC_MSG_RESULT(no)
391 fi
392
393 dnl *************************
394 dnl ** section for plugins **
395 dnl *************************
396
397 PLUGINS=""
398
399 dnl --- Trayicon ---
400 AC_ARG_ENABLE(trayicon-plugin,
401         [  --enable-trayicon-plugin   System Tray Icon [default=no]],
402         [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
403 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
404         PLUGINS="trayicon $PLUGINS"
405 fi
406 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
407
408 dnl --- SpamAssassin ---
409 AC_ARG_ENABLE(spamassassin-plugin,
410         [  --enable-spamassassin-plugin    Build SpamAssassin plugin [default=no]],
411         [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
412 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
413         AC_SPAMASSASSIN
414         PLUGINS="spamassassin $PLUGINS"
415 fi
416 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
417
418 dnl --- MathML Viewer ---
419 AC_ARG_ENABLE(mathml-viewer-plugin,
420         [  --enable-mathml-viewer-plugin    Build MathML-Viewer plugin [default=no]],
421         [ac_cv_enable_mathml_viewer_plugin=$enableval], [ac_cv_enable_mathml_viewer_plugin=yes])
422 if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
423         PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.4.2 gtkmathview < 0.5, :, ac_cv_enable_mathml_viewer_plugin=no)
424
425         if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
426                 AC_SUBST(GTK_MATH_VIEW_CFLAGS)
427                 AC_SUBST(GTK_MATH_VIEW_LIBS)
428
429                 PLUGINS="mathml-viewer $PLUGINS"
430         fi
431 fi
432 AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
433
434 dnl --- Image Viewer ---
435 AC_ARG_ENABLE(image-viewer-plugin,
436         [  --disable-image-viewer-plugin   Do not build image viewer plugin],
437         [ac_cv_enable_image_viewer_plugin=$enableval], [ac_cv_enable_image_viewer_plugin=yes])
438 if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
439         AC_ARG_ENABLE(gdk-pixbuf,
440                 [  --disable-gdk-pixbuf    Do not use gdk-pixbuf],
441                 [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes])
442         AC_ARG_ENABLE(imlib,
443                 [  --disable-imlib         Do not use imlib],
444                 [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes])
445
446         if test "$ac_cv_enable_gdk_pixbuf" = yes; then
447                 AM_PATH_GDK_PIXBUF(0.8.0,
448                         [AC_DEFINE(HAVE_GDK_PIXBUF, 1, Define if you use gdk-pixbuf to support image viewer)
449                          ac_cv_enable_imlib=no], [ac_cv_enable_gdk_pixbuf=no])
450         fi
451         if test "$ac_cv_enable_imlib" = yes; then
452                 AM_PATH_GDK_IMLIB(1.9,
453                         AC_DEFINE(HAVE_GDK_IMLIB, 1, Define if you use gdk_imlib to support image viewer),
454                         [ac_cv_enable_imlib=no])
455         fi
456
457         if test "$ac_cv_enable_gdk_pixbuf" = yes; then
458                 PLUGINS="image-viewer(gdk-pixbuf) $PLUGINS"
459         elif test "$ac_cv_enable_imlib" = yes; then
460                 PLUGINS="image-viewer(gdk_imlib) $PLUGINS"
461         else
462                 ac_cv_enable_image_viewer_plugin=no
463         fi
464 fi
465 AM_CONDITIONAL(BUILD_IMAGE_VIEWER_PLUGIN, test x"$ac_cv_enable_image_viewer_plugin" = xyes)
466
467 dnl --- Dillo Viewer ---
468 AC_ARG_ENABLE(dillo-viewer-plugin,
469         [  --enable-dillo-viewer-plugin   Build Dillo plugin for html mail rendering [default=no]],
470         [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
471 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
472         PLUGINS="dillo-viewer $PLUGINS"
473 fi
474 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
475
476 dnl --- Demo ---
477 AC_ARG_ENABLE(demo-plugin,
478         [  --enable-demo-plugin    Build demo plugin [default=no]],
479         [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
480 if test x"$ac_cv_enable_demo_plugin" = xyes; then
481         PLUGINS="demo $PLUGINS"
482 fi
483 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
484
485 dnl --- ClamAV ---
486 AC_ARG_ENABLE(clamav-plugin,
487         [  --enable-clamav-plugin    Build Clam AntiVirus plugin [default=no]],
488         [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
489 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
490         AC_CHECK_LIB(clamav, cl_scanfile, clamav_lib=-lclamav, ac_cv_enable_clamav_plugin=no)
491         AC_CHECK_HEADERS(clamav.h, :, ac_cv_enable_clamav_plugin=no)
492         if test x"$ac_cv_enable_clamav_plugin" = xyes; then
493                 CLAMAV_LIBS="${clamav_lib}"
494                 AC_SUBST(CLAMAV_LIBS)
495
496                 PLUGINS="clamav $PLUGINS"
497         else
498                 AC_MSG_NOTICE([clamav library not found, will not build clamav plugin])
499         fi
500 fi
501 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
502
503 dnl ****************************
504 dnl ** Final configure output **
505 dnl ****************************
506
507 AC_OUTPUT([
508 Makefile
509 sylpheed.spec
510 intl/Makefile
511 ac/Makefile
512 po/Makefile.in
513 src/common/version.h
514 src/Makefile
515 src/common/Makefile
516 src/common/passcrypt.h
517 src/gtk/Makefile
518 src/plugins/Makefile
519 src/plugins/demo/Makefile
520 src/plugins/spamassassin/Makefile
521 src/plugins/mathml_viewer/Makefile
522 src/plugins/dillo_viewer/Makefile
523 src/plugins/image_viewer/Makefile
524 src/plugins/trayicon/Makefile
525 src/plugins/trayicon/libeggtrayicon/Makefile
526 src/plugins/clamav/Makefile
527 faq/Makefile
528 faq/de/Makefile
529 faq/en/Makefile
530 faq/es/Makefile
531 faq/fr/Makefile
532 faq/it/Makefile
533 man/Makefile
534 manual/Makefile
535 manual/de/Makefile
536 manual/en/Makefile
537 manual/es/Makefile
538 manual/fr/Makefile
539 manual/ja/Makefile
540 tools/Makefile
541 config/Makefile
542 sylpheed-claws.pc
543 ])
544
545 dnl Output the configuration summary
546 echo ""
547 echo "$PACKAGE $VERSION"
548 echo ""
549 echo "GnuPG         : $ac_cv_enable_gpgme"
550 echo "JPilot        : $ac_cv_enable_jpilot"
551 echo "LDAP          : $ac_cv_enable_ldap"
552 echo "OpenSSL       : $ac_cv_enable_openssl"
553 echo "iconv         : $am_cv_func_iconv"
554 echo "compface      : $ac_cv_enable_compface"
555 echo "IPv6          : $ac_cv_enable_ipv6"
556 echo "GNU/aspell    : $ac_cv_enable_aspell"
557 echo "Crash dialog  : $ac_cv_enable_crash_dialog"
558 echo "Plugins       : $PLUGINS"
559 echo "Config dir    : $ac_cv_with_config_dir"
560 echo ""
561 echo "The binary will be installed in $prefix/bin"
562 echo ""
563 echo "Configure finished, type 'make' to build."