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