1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_AUX_DIR(config)
18 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
19 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
21 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}${EXTRA_GTK2_VERSION}
28 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
29 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
30 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
33 AC_SUBST(MAJOR_VERSION)
34 AC_SUBST(MINOR_VERSION)
35 AC_SUBST(MICRO_VERSION)
36 AC_SUBST(EXTRA_VERSION)
39 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
40 if test "$GNOME_CONFIG" != no; then
41 gnomedatadir="`gnome-config --datadir`"
42 gnomeprefix="`gnome-config --prefix`"
43 if test "${prefix}" = "NONE"; then
44 gnomedatadir="${ac_default_prefix}/${gnomedatadir#${gnomeprefix}}"
46 gnomedatadir="${prefix}/${gnomedatadir#${gnomeprefix}}"
48 AC_SUBST(gnomedatadir)
50 AM_CONDITIONAL(SYLPHEED_GNOME, test -n "$gnomedatadir")
52 dnl GNOME 2.x installed?
53 PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
54 AM_CONDITIONAL(SYLPHEED_GNOME2, test x"$ac_enable_gnome2" = x"yes")
57 AC_DEFINE(CLAWS, 1, Compiling Claws branch of sylpheed)
59 dnl libtool versioning
60 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
61 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
62 LT_REVISION=$INTERFACE_AGE
63 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
69 dnl Specify a header configuration file
70 AC_CONFIG_HEADERS(config.h)
74 dnl Checks for programs.
87 SYLPHEED_ACLOCAL_INCLUDE(m4)
89 dnl ******************************
91 dnl ******************************
94 dnl Copied from the official gtk+-2 configure.in
95 AC_MSG_CHECKING([for some Win32 platform])
97 *-*-mingw*|*-*-cygwin*)
99 LDFLAGS="$LDFLAGS -mwindows"
105 AC_MSG_RESULT([$platform_win32])
106 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
108 if test x"$platform_win32" = x"yes"; then
113 AC_MSG_CHECKING([for native Win32])
122 AC_MSG_RESULT([$os_win32])
123 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
125 CFLAGS="$CFLAGS -Wall"
129 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
137 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
140 LIBS="$LIBS $GTK_LIBS"
141 AC_CHECK_FUNCS(bind_textdomain_codeset)
145 ALL_LINGUAS="bg ca cs de el en_GB es fi fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
146 GETTEXT_PACKAGE=sylpheed-claws
147 AC_SUBST(GETTEXT_PACKAGE)
148 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
152 dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
153 localedir='${prefix}/${DATADIRNAME}/locale'
156 manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
158 faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
161 dnl Set PACKAGE_DATA_DIR in config.h.
162 if test "x${datadir}" = 'x${prefix}/share'; then
163 if test "x${prefix}" = "xNONE"; then
164 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
166 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
169 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", PACKAGE_DATA_DIR)
172 AC_CHECK_LIB(xpg4, setlocale)
174 dnl for GThread support (currently disabled)
175 dnl AC_ARG_ENABLE(threads,
176 dnl [ --enable-threads Enable multithread support [default=no]],
177 dnl [use_threads=$enableval], [use_threads=no])
179 AC_MSG_CHECKING([whether to use threads])
180 if test x"$use_threads" = xyes ; then
182 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
183 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
184 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
185 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
187 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
193 dnl Check for d_type member in struct dirent
194 AC_MSG_CHECKING([whether struct dirent has d_type member])
195 AC_CACHE_VAL(ac_cv_dirent_d_type,[
196 AC_TRY_COMPILE([#include <dirent.h>],
197 [struct dirent d; d.d_type = DT_REG;],
198 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
200 AC_MSG_RESULT($ac_cv_dirent_d_type)
201 if test $ac_cv_dirent_d_type = yes; then
202 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
203 Define if `struct dirent' has `d_type' member.)
206 dnl Checks for header files.
210 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
211 sys/param.h sys/utsname.h sys/select.h \
212 wchar.h wctype.h locale.h)
214 dnl alf - Check for apache installation f*ck up. apache may also install an
215 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
216 AC_TRY_COMPILE([#include <stdlib.h>
217 #include <fnmatch.h>],
218 [int x = USE_HSREGEX;],
219 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
220 if test $ac_cv_have_apache_fnmatch = yes; then
221 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
223 AC_MSG_CHECKING([whether to use Apache regex header kludge])
224 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
226 dnl Checks for typedefs, structures, and compiler characteristics.
233 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
234 dnl may be defined only in wchar.h (this happens with gcc-2.96).
235 dnl So we need to use this extended macro.
236 SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
241 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
243 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
244 AC_CHECK_SIZEOF(unsigned short, 2)
245 AC_CHECK_SIZEOF(unsigned int, 4)
246 AC_CHECK_SIZEOF(unsigned long, 4)
248 dnl Checks for library functions.
250 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
251 wcsstr wcswcs iswalnum iswspace towlower \
252 wcslen wcscpy wcsncpy \
253 uname flock lockf inet_aton inet_addr \
256 dnl *****************
257 dnl ** common code **
258 dnl *****************
261 AM_PATH_GLIB_2_0(2.0.0,,
262 AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
263 gmodule gobject gthread)
265 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
267 LIBS="$LIBS $GTK_LIBS"
268 AC_CHECK_FUNCS(bind_textdomain_codeset)
271 dnl check for IPv6 option
273 [ --disable-ipv6 Disable IPv6 support],
274 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
276 dnl automated checks for IPv6 support.
277 AC_MSG_CHECKING([whether to use IPv6])
278 if test x"$ac_cv_enable_ipv6" = xyes; then
280 AC_MSG_CHECKING([for IPv6 support])
281 AC_CACHE_VAL(ac_cv_ipv6,[
282 AC_TRY_COMPILE([#define INET6
283 #include <sys/types.h>
284 #include <netinet/in.h>],
285 [int x = IPPROTO_IPV6; struct in6_addr a;],
286 ac_cv_ipv6=yes, ac_cv_ipv6=no)
288 AC_MSG_RESULT($ac_cv_ipv6)
289 if test $ac_cv_ipv6 = yes; then
290 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
292 AC_MSG_WARN(*** IPv6 will not be supported ***)
299 dnl Check for OpenSSL
300 AC_ARG_ENABLE(openssl,
301 [ --enable-openssl Attempt to use OpenSSL for SSL support.],
302 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
303 if test x"$ac_cv_enable_openssl" = xyes; then
304 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
305 if test x$ac_cv_enable_openssl = xyes; then
306 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
309 AC_SUBST(OPENSSL_CFLAGS)
310 AC_SUBST(OPENSSL_LIBS)
312 dnl password encryption
315 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
320 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
321 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
322 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
324 dnl RC dir (will be default at a certain point in time)
325 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .sylpheed-gtk2)],
326 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".sylpheed-gtk2")
327 if test x"$ac_cv_with_config_dir" = x""; then
328 ac_cv_with_config_dir=".sylpheed-gtk2"
330 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
332 dnl ************************
333 dnl ** GTK user interface **
334 dnl ************************
337 AM_PATH_GTK_2_0(2.4.0,,
338 AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
340 dnl --disable-deprecated switch for GTK2 purification
341 AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
342 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
347 dnl GNU/Aspell is used for spell checking
348 AC_ARG_ENABLE(aspell,
349 [ --enable-aspell Enable GNU/aspell support [default=no]],
350 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=no])
351 AC_MSG_CHECKING([whether to use GNU/aspell])
352 if test $ac_cv_enable_aspell = yes; then
354 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
355 [use_aspell=no ac_cv_enable_aspell=no])
360 dnl want crash dialog
361 AC_ARG_ENABLE(crash-dialog,
362 [ --enable-crash-dialog Enable crash dialog [default=no]],
363 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
364 if test $ac_cv_enable_crash_dialog = yes; then
365 dnl check if GDB is somewhere
366 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
367 AC_MSG_CHECKING([whether to use crash dialog])
368 if test $ac_cv_enable_crash_dialog = yes; then
369 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
371 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
374 dnl Check for X-Face support
375 AC_ARG_ENABLE(compface,
376 [ --disable-compface Do not use compface (X-Face)],
377 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
378 AC_MSG_CHECKING([whether to use compface])
379 if test x"$ac_cv_enable_compface" = xyes; then
381 AC_CHECK_LIB(compface, uncompface,
382 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
383 [ac_cv_enable_compface=no])
384 if test x"$ac_cv_enable_compface" = xyes; then
385 COMPFACE_LIBS="-lcompface"
389 AC_SUBST(COMPFACE_LIBS)
394 dnl check for pthread support
395 AC_ARG_ENABLE(pthread,
396 [ --disable-pthread Disable pthread support],
397 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
398 AC_MSG_CHECKING([whether to use pthread])
399 if test x$ac_cv_enable_pthread = xno; then
404 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
405 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
407 if test x$ac_cv_enable_pthread = xyes; then
408 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
409 PTHREAD_LIBS="-lpthread"
413 AC_SUBST(PTHREAD_LIBS)
415 dnl for LDAP support in addressbook
416 dnl no check for libraries; dynamically loaded
418 [ --enable-ldap Enable LDAP support [default=no]],
419 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
420 AC_MSG_CHECKING([whether to use LDAP])
421 if test x"$ac_cv_enable_ldap" = xno; then
423 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
424 AC_MSG_RESULT(no - LDAP support needs pthread support)
430 dnl check for available libraries, and pull them in
431 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
432 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
433 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
434 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
437 AC_CHECK_HEADERS(ldap.h lber.h,
438 [ ac_cv_enable_ldap=yes ],
439 [ ac_cv_enable_ldap=no ])
441 if test "$ac_cv_enable_ldap" = yes; then
442 AC_CHECK_LIB(ldap, ldap_open,
443 [ ac_cv_enable_ldap=yes ],
444 [ ac_cv_enable_ldap=no ],
447 AC_CHECK_LIB(ldap, ldap_start_tls_s,
448 [ ac_cv_have_tls=yes ],
449 [ ac_cv_have_tls=no ])
453 AC_MSG_CHECKING([whether ldap library is available])
454 AC_MSG_RESULT($ac_cv_enable_ldap)
456 AC_MSG_CHECKING([whether TLS library is available])
457 AC_MSG_RESULT($ac_cv_have_tls)
459 if test "$ac_cv_enable_ldap" = yes; then
460 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
461 LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
462 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
464 if test "$ac_cv_have_tls" = yes; then
465 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
470 dnl for JPilot support in addressbook
471 dnl no check for libraries; these are dynamically loaded
472 AC_ARG_ENABLE(jpilot,
473 [ --enable-jpilot Enable JPilot support [default=no]],
474 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
475 AC_MSG_CHECKING([whether to use JPilot])
476 if test "$ac_cv_enable_jpilot" = yes; then
478 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
479 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
480 [ ac_cv_enable_jpilot=no ])
481 if test "$ac_cv_enable_jpilot" = no; then
482 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
483 [ ac_cv_enable_jpilot=yes
484 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
487 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
488 if test x"$ac_cv_enable_jpilot" = xyes; then
489 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
491 AC_MSG_NOTICE([JPilot support not available])
493 AC_SUBST(JPILOT_LIBS)
498 dnl #######################################################################
499 dnl # Check for startup notification
500 dnl #######################################################################
501 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
503 if test "x$enable_startup_notification" = "xyes"; then
504 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
506 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
507 echo "Building with libstartup-notification"
508 enable_startup_notification=yes
511 echo "Building without libstartup-notification"
512 enable_startup_notification=no
515 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
516 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
519 dnl *************************
520 dnl ** section for plugins **
521 dnl *************************
526 AC_ARG_ENABLE(trayicon-plugin,
527 [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
528 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
529 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
530 PLUGINS="trayicon $PLUGINS"
532 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
534 dnl --- SpamAssassin ---
535 AC_ARG_ENABLE(spamassassin-plugin,
536 [ --enable-spamassassin-plugin Build SpamAssassin plugin [default=no]],
537 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
538 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
540 PLUGINS="spamassassin $PLUGINS"
542 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
545 AC_ARG_ENABLE(pgpcore-plugin,
546 [ --disable-pgpcore-plugin Do not build PGP/Core plugin],
547 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
548 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
549 AM_PATH_GPGME(0.4.5, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
550 [ac_cv_enable_pgpcore_plugin=no])
551 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
552 PLUGINS="pgpcore $PLUGINS"
555 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
557 AC_ARG_ENABLE(pgpmime-plugin,
558 [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
559 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
560 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
561 AM_PATH_GPGME(0.4.5, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
562 [ac_cv_enable_pgpmime_plugin=no])
563 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
564 PLUGINS="pgpmime $PLUGINS"
567 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
569 dnl --- MathML Viewer ---
570 AC_ARG_ENABLE(mathml-viewer-plugin,
571 [ --disable-mathml-viewer-plugin Do not build MathML-Viewer plugin],
572 [ac_cv_enable_mathml_viewer_plugin=$enableval], [ac_cv_enable_mathml_viewer_plugin=yes])
573 if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
574 PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.5, :, ac_cv_enable_mathml_viewer_plugin=no)
576 if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
578 PLUGINS="mathml-viewer $PLUGINS"
581 AC_SUBST(GTK_MATH_VIEW_CFLAGS)
582 AC_SUBST(GTK_MATH_VIEW_LIBS)
583 AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
585 dnl --- Dillo Viewer ---
586 AC_ARG_ENABLE(dillo-viewer-plugin,
587 [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
588 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
589 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
590 PLUGINS="dillo-viewer $PLUGINS"
592 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
595 AC_ARG_ENABLE(demo-plugin,
596 [ --enable-demo-plugin Build demo plugin [default=no]],
597 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
598 if test x"$ac_cv_enable_demo_plugin" = xyes; then
599 PLUGINS="demo $PLUGINS"
601 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
604 AC_ARG_ENABLE(clamav-plugin,
605 [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
606 [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
607 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
608 AC_CHECK_LIB(clamav, cl_scanfile, clamav_lib=-lclamav, ac_cv_enable_clamav_plugin=no)
609 AC_CHECK_HEADERS(clamav.h, :, ac_cv_enable_clamav_plugin=no)
610 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
611 CLAMAV_LIBS="${clamav_lib}"
613 PLUGINS="clamav $PLUGINS"
615 AC_MSG_NOTICE([clamav library not found, will not build clamav plugin])
618 AC_SUBST(CLAMAV_LIBS)
619 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
622 AC_ARG_ENABLE(libetpan,
623 [ --disable-libetpan Do not compile IMAP4 support with libetpan],
624 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
625 if test x"$ac_cv_enable_libetpan" = xyes; then
627 AC_PATH_PROG(libetpanconfig, [libetpan-config])
628 if test "x$libetpanconfig" != "x"; then
629 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
630 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
631 if test "x$libetpan_result" = "xyes"; then
632 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
633 LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
634 AC_TRY_LINK([], [db_mailstorage_init();], [libetpan_result=yes], [libetpan_result=no])
635 AC_MSG_RESULT([$libetpan_result])
638 if test "x$libetpan_result" = "xyes"; then
639 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
640 LIBETPAN_LIBS="`$libetpanconfig --libs`"
641 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
642 if test "$LIBETPAN_VERSION" -lt "038"; then
643 AC_MSG_ERROR([Sylpheed requires libetpan 0.38 or newer. See http://www.etpan.org/])
644 AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
646 AC_SUBST(LIBETPAN_FLAGS)
647 AC_SUBST(LIBETPAN_LIBS)
648 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
650 AC_MSG_ERROR([Sylpheed requires libetpan 0.38 or newer. See http://www.etpan.org/ ])
651 AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
656 AC_ARG_ENABLE(gnomeprint,
657 [ --disable-gnomeprint Do not use libgnomeprint for printing],
658 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
659 if test x$ac_cv_enable_gnomeprint = xyes; then
660 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
661 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
662 if test x$ac_cv_enable_gnomeprint = xno; then
663 AC_MSG_WARN([gnomeprint support enabled but libgnomeprintui wasn't found])
665 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
668 AM_CONDITIONAL(SYLPHEED_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
670 dnl ****************************
671 dnl ** Final configure output **
672 dnl ****************************
682 src/common/passcrypt.h
686 src/plugins/demo/Makefile
687 src/plugins/spamassassin/Makefile
688 src/plugins/mathml_viewer/Makefile
689 src/plugins/dillo_viewer/Makefile
690 src/plugins/trayicon/Makefile
691 src/plugins/trayicon/libeggtrayicon/Makefile
692 src/plugins/clamav/Makefile
693 src/plugins/pgpcore/Makefile
694 src/plugins/pgpmime/Makefile
704 doc/manual/de/Makefile
705 doc/manual/en/Makefile
706 doc/manual/es/Makefile
707 doc/manual/fr/Makefile
708 doc/manual/ja/Makefile
714 dnl Output the configuration summary
716 echo "$PACKAGE $VERSION"
718 echo "JPilot : $ac_cv_enable_jpilot"
719 echo "LDAP : $ac_cv_enable_ldap"
720 echo "OpenSSL : $ac_cv_enable_openssl"
721 echo "iconv : $am_cv_func_iconv"
722 echo "compface : $ac_cv_enable_compface"
723 echo "IPv6 : $ac_cv_enable_ipv6"
724 echo "GNU/aspell : $ac_cv_enable_aspell"
725 echo "IMAP4 : $ac_cv_enable_libetpan"
726 echo "Crash dialog : $ac_cv_enable_crash_dialog"
727 echo "libgnomeprint : $ac_cv_enable_gnomeprint"
728 echo "Plugins : $PLUGINS"
729 echo "Config dir : $ac_cv_with_config_dir"
731 echo "The binary will be installed in $prefix/bin"
733 echo "Configure finished, type 'make' to build."