* src/mainwindow.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=85
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 sr sv 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 if test "$ac_cv_enable_compface" = yes; then
295         AC_CHECK_LIB(compface, uncompface,,[ac_cv_enable_compface=no])
296 fi
297
298 dnl for LDAP support in addressbook
299 dnl no check for libraries; dynamically loaded
300 AC_ARG_ENABLE(ldap,
301         [  --enable-ldap           Enable LDAP support [default=no]],
302         [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
303 AC_MSG_CHECKING([whether to use LDAP])
304 if test "$ac_cv_enable_ldap" = yes; then
305         AC_MSG_RESULT(yes)
306
307         dnl check for available libraries, and pull them in
308         AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
309         AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
310         AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
311         AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
312                      $LDAP_LIBS)
313
314         dnl we need libpthread for sylpheed ldap,  until we find
315         dnl a better way to handle ldap requests asynchronously...
316         AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
317
318         AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
319                          [ ac_cv_enable_ldap=yes ],
320                          [ ac_cv_enable_ldap=no ])
321
322         if test "$ac_cv_enable_ldap" = yes; then
323                 AC_CHECK_LIB(ldap, ldap_open,
324                              [ ac_cv_enable_ldap=yes ],
325                              [ ac_cv_enable_ldap=no ],
326                              $LDAP_LIBS)
327         fi
328
329         AC_MSG_CHECKING([whether ldap library is available])
330         AC_MSG_RESULT($ac_cv_enable_ldap)
331
332         if test "$ac_cv_enable_ldap" = yes; then
333                 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
334                 LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
335                 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
336                 AC_SUBST(LDAP_LIBS)
337         fi
338 else
339         AC_MSG_RESULT(no)
340 fi
341
342 dnl for JPilot support in addressbook
343 dnl no check for libraries; these are dynamically loaded
344 AC_ARG_ENABLE(jpilot,
345         [  --enable-jpilot         Enable JPilot support [default=no]],
346         [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
347 AC_MSG_CHECKING([whether to use JPilot])
348 if test "$ac_cv_enable_jpilot" = yes; then
349         AC_MSG_RESULT(yes)
350         AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
351                          [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
352                          [ ac_cv_enable_jpilot=no ])
353         if test "$ac_cv_enable_jpilot" = no; then
354                 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
355                                  [ ac_cv_enable_jpilot=yes
356                                    AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
357         fi
358         AC_MSG_CHECKING([whether jpilot is available])
359         AC_MSG_RESULT($ac_cv_enable_jpilot)
360
361         if test "$ac_cv_enable_jpilot" = yes; then
362                 LIBS="$LIBS -lpisock"
363         fi
364 else
365         AC_MSG_RESULT(no)
366 fi
367
368 dnl GPGME is used to support OpenPGP 
369 AC_ARG_ENABLE(gpgme,
370         [  --enable-gpgme          Enable GnuPG support using GPGME [default=no]],
371         [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
372 AC_MSG_CHECKING([whether to use GPGME])
373 if test $ac_cv_enable_gpgme = yes; then
374         AC_MSG_RESULT(yes)
375         AM_PATH_GPGME(0.3.10, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
376                       [use_gpgme=no
377                        ac_cv_enable_gpgme=no])
378 else
379         AC_MSG_RESULT(no)
380 fi
381
382 dnl *************************
383 dnl ** section for plugins **
384 dnl *************************
385
386 PLUGINS=""
387
388 AC_ARG_ENABLE(trayicon-plugin,
389         [  --enable-trayicon-plugin   System Tray Icon [default=no]],
390         [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=no])
391 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
392 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
393         PLUGINS="trayicon $PLUGINS"
394 fi
395
396 AC_ARG_ENABLE(spamassassin-plugin,
397         [  --enable-spamassassin-plugin    Build SpamAssassin plugin [default=no]],
398         [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
399 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
400 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
401         AC_SPAMASSASSIN
402         PLUGINS="spamassassin $PLUGINS"
403 fi
404
405 AC_ARG_ENABLE(mathml-viewer-plugin,
406         [  --enable-mathml-viewer-plugin    Build MathML-Viewer plugin [default=no]],
407         [ac_cv_enable_mathml_viewer_plugin=$enableval], [ac_cv_enable_mathml_viewer_plugin=no])
408 AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
409 if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
410         PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.4.2)
411         AC_SUBST(GTK_MATH_VIEW_CFLAGS)
412         AC_SUBST(GTK_MATH_VIEW_LIBS)
413
414         PLUGINS="mathml-viewer $PLUGINS"
415 fi
416
417 AC_ARG_ENABLE(image-viewer-plugin,
418         [  --disable-image-viewer-plugin   Do not build image viewer plugin],
419         [ac_cv_enable_image_viewer_plugin=$enableval], [ac_cv_enable_image_viewer_plugin=yes])
420 if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
421         AC_ARG_ENABLE(gdk-pixbuf,
422                 [  --disable-gdk-pixbuf    Do not use gdk-pixbuf],
423                 [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes])
424         AC_ARG_ENABLE(imlib,
425                 [  --disable-imlib         Do not use imlib],
426                 [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes])
427
428         if test "$ac_cv_enable_gdk_pixbuf" = yes; then
429                 AM_PATH_GDK_PIXBUF(0.8.0,
430                         [AC_DEFINE(HAVE_GDK_PIXBUF, 1, Define if you use gdk-pixbuf to support image viewer)
431                          ac_cv_enable_imlib=no], [ac_cv_enable_gdk_pixbuf=no])
432         fi
433         if test "$ac_cv_enable_imlib" = yes; then
434                 AM_PATH_GDK_IMLIB(1.9,
435                         AC_DEFINE(HAVE_GDK_IMLIB, 1, Define if you use gdk_imlib to support image viewer),
436                         [ac_cv_enable_imlib=no])
437         fi
438         if test x"$ac_cv_enable_gdk_pixbuf" = xno -a x"$ac_cv_enable_imlib" = xno; then
439                 $ac_cv_enable_image_viewer_plugin = no
440         fi
441 fi
442 AM_CONDITIONAL(BUILD_IMAGE_VIEWER_PLUGIN, test x"$ac_cv_enable_image_viewer_plugin" = xyes)
443 if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
444         if test "$ac_cv_enable_gdk_pixbuf" = yes; then
445                 PLUGINS="image-viewer(gdk-pixbuf) $PLUGINS"
446         elif test "$ac_cv_enable_imlib" = yes; then
447                 PLUGINS="image-viewer(gdk_imlib) $PLUGINS"
448         fi
449 fi
450
451 AC_ARG_ENABLE(dillo-viewer-plugin,
452         [  --enable-dillo-viewer-plugin   Build Dillo plugin for html mail rendering [default=no]],
453         [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=no])
454 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
455 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
456         PLUGINS="dillo-viewer $PLUGINS"
457 fi
458
459 AC_ARG_ENABLE(demo-plugin,
460         [  --enable-demo-plugin    Build demo plugin [default=no]],
461         [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
462 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
463 if test x"$ac_cv_enable_demo_plugin" = xyes; then
464         PLUGINS="demo $PLUGINS"
465 fi
466
467 AC_ARG_ENABLE(clamav-plugin,
468         [  --enable-clamav-plugin    Build Clam AntiVirus plugin [default=no]],
469         [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=no])
470 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
471 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
472         AC_CHECK_LIB(clamav, cl_scanfile, clamav_lib=-lclamav)
473         if test -z "${clamav_lib}"
474         then
475                 AC_MSG_ERROR(clamav library not found)
476         fi
477         CLAMAV_LIBS="${clamav_lib}"
478         AC_SUBST(CLAMAV_LIBS)
479
480         PLUGINS="clamav $PLUGINS"
481 fi
482
483 dnl ****************************
484 dnl ** Final configure output **
485 dnl ****************************
486
487 AC_OUTPUT([
488 Makefile
489 sylpheed.spec
490 intl/Makefile
491 ac/Makefile
492 po/Makefile.in
493 src/common/version.h
494 src/Makefile
495 src/common/Makefile
496 src/common/passcrypt.h
497 src/gtk/Makefile
498 src/plugins/Makefile
499 src/plugins/demo/Makefile
500 src/plugins/spamassassin/Makefile
501 src/plugins/mathml_viewer/Makefile
502 src/plugins/dillo_viewer/Makefile
503 src/plugins/image_viewer/Makefile
504 src/plugins/trayicon/Makefile
505 src/plugins/trayicon/libeggtrayicon/Makefile
506 src/plugins/clamav/Makefile
507 faq/Makefile
508 faq/de/Makefile
509 faq/en/Makefile
510 faq/es/Makefile
511 faq/fr/Makefile
512 faq/it/Makefile
513 man/Makefile
514 manual/Makefile
515 manual/de/Makefile
516 manual/en/Makefile
517 manual/es/Makefile
518 manual/fr/Makefile
519 manual/ja/Makefile
520 tools/Makefile
521 config/Makefile
522 ])
523
524 dnl Output the configuration summary
525 echo ""
526 echo "$PACKAGE $VERSION"
527 echo ""
528 echo "GnuPG         : $ac_cv_enable_gpgme"
529 echo "JPilot        : $ac_cv_enable_jpilot"
530 echo "LDAP          : $ac_cv_enable_ldap"
531 echo "OpenSSL       : $ac_cv_enable_openssl"
532 echo "iconv         : $am_cv_func_iconv"
533 echo "compface      : $ac_cv_enable_compface"
534 echo "IPv6          : $ac_cv_enable_ipv6"
535 echo "GNU/aspell    : $ac_cv_enable_aspell"
536 echo "Crash dialog  : $ac_cv_enable_crash_dialog"
537 echo "Plugins       : $PLUGINS"
538 echo "Config dir    : $ac_cv_with_config_dir"
539 echo ""
540 echo "The binary will be installed in $prefix/bin"
541 echo ""
542 echo "Configure finished, type 'make' to build."