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