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.
90 SYLPHEED_ACLOCAL_INCLUDE(m4)
92 dnl ******************************
94 dnl Not needed anymore because we
95 dnl do AC_CANONICAL_SYSTEM above
96 dnl ******************************
99 dnl Copied from the official gtk+-2 configure.in
100 AC_MSG_CHECKING([for some Win32 platform])
102 *-*-mingw*|*-*-cygwin*)
104 LDFLAGS="$LDFLAGS -mwindows"
110 AC_MSG_RESULT([$platform_win32])
111 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
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 AC_MSG_CHECKING([for Cygwin])
134 AC_MSG_RESULT([$env_cygwin])
135 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
137 CFLAGS="$CFLAGS -Wall"
142 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
145 # Note that we need to link to pthreadGC2 in all cases. This
146 # is because some locking is used even when pthread support is
148 pthread_name=pthreadGC2
149 CFLAGS="$CFLAGS -mms-bitfields"
150 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
158 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
161 LIBS="$LIBS $GTK_LIBS"
162 AC_CHECK_FUNCS(bind_textdomain_codeset)
166 ALL_LINGUAS="bg ca cs de el en_GB es fi fr hr hu it ja ko nb nl pl pt_BR ru sk sr sv zh_CN zh_TW"
167 GETTEXT_PACKAGE=sylpheed-claws
168 AC_SUBST(GETTEXT_PACKAGE)
169 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
171 AM_GNU_GETTEXT_VERSION([0.15])
172 AM_GNU_GETTEXT([external])
174 manualdir='${datarootdir}/${PACKAGE}/manual'
175 AC_ARG_WITH(manualdir,
176 [ --with-manualdir=DIR Manual directory],
177 [manualdir="$withval"])
180 AC_ARG_ENABLE(manual,
181 [ --disable-manual Disable manual support],
182 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
184 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
186 dnl Set PACKAGE_DATA_DIR in config.h.
187 if test "x${datarootdir}" = 'x${prefix}/share'; then
188 if test "x${prefix}" = "xNONE"; then
189 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
191 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
194 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
197 AC_CHECK_LIB(xpg4, setlocale)
199 dnl for GThread support (currently disabled)
200 dnl AC_ARG_ENABLE(threads,
201 dnl [ --enable-threads Enable multithread support [default=no]],
202 dnl [use_threads=$enableval], [use_threads=no])
204 AC_MSG_CHECKING([whether to use threads])
205 if test x"$use_threads" = xyes ; then
207 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
208 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
209 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
210 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
212 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
218 dnl Check for d_type member in struct dirent
219 AC_MSG_CHECKING([whether struct dirent has d_type member])
220 AC_CACHE_VAL(ac_cv_dirent_d_type,[
221 AC_TRY_COMPILE([#include <dirent.h>],
222 [struct dirent d; d.d_type = DT_REG;],
223 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
225 AC_MSG_RESULT($ac_cv_dirent_d_type)
226 if test $ac_cv_dirent_d_type = yes; then
227 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
228 Define if `struct dirent' has `d_type' member.)
231 # Check whether mkdir does not take the permission argument.
232 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
234 dnl Checks for header files.
238 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
239 sys/param.h sys/utsname.h sys/select.h \
240 wchar.h wctype.h locale.h netdb.h)
242 dnl alf - Check for apache installation f*ck up. apache may also install an
243 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
244 AC_TRY_COMPILE([#include <stdlib.h>
245 #include <fnmatch.h>],
246 [int x = USE_HSREGEX;],
247 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
248 if test $ac_cv_have_apache_fnmatch = yes; then
249 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
251 AC_MSG_CHECKING([whether to use Apache regex header kludge])
252 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
254 dnl Checks for typedefs, structures, and compiler characteristics.
261 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
262 dnl may be defined only in wchar.h (this happens with gcc-2.96).
263 dnl So we need to use this extended macro.
264 SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
269 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
271 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
272 AC_CHECK_SIZEOF(unsigned short, 2)
273 AC_CHECK_SIZEOF(unsigned int, 4)
274 AC_CHECK_SIZEOF(unsigned long, 4)
276 dnl Checks for library functions.
278 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
279 uname flock lockf inet_aton inet_addr \
280 fchmod mkstemp truncate getuid regcomp)
282 dnl *****************
283 dnl ** common code **
284 dnl *****************
287 AM_PATH_GLIB_2_0(2.6.0,,
288 AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
289 gmodule gobject gthread)
291 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
293 LIBS="$LIBS $GTK_LIBS"
294 AC_CHECK_FUNCS(bind_textdomain_codeset)
297 dnl check for IPv6 option
299 [ --disable-ipv6 Disable IPv6 support],
300 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
302 dnl automated checks for IPv6 support.
303 AC_MSG_CHECKING([whether to use IPv6])
304 if test x"$ac_cv_enable_ipv6" = xyes; then
306 AC_MSG_CHECKING([for IPv6 support])
307 AC_CACHE_VAL(ac_cv_ipv6,[
308 AC_TRY_COMPILE([#define INET6
309 #include <sys/types.h>
310 #include <netinet/in.h>],
311 [int x = IPPROTO_IPV6; struct in6_addr a;],
312 ac_cv_ipv6=yes, ac_cv_ipv6=no)
314 AC_MSG_RESULT($ac_cv_ipv6)
315 if test $ac_cv_ipv6 = yes; then
316 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
318 AC_MSG_WARN(*** IPv6 will not be supported ***)
325 dnl Check for OpenSSL
326 AC_ARG_ENABLE(openssl,
327 [ --disable-openssl Do not use OpenSSL for SSL support.],
328 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
329 AC_MSG_CHECKING([whether to use OpenSSL])
330 if test x"$ac_cv_enable_openssl" = xyes; then
332 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
333 if test x$ac_cv_enable_openssl = xyes; then
334 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
336 AC_MSG_RESULT(not found)
337 AC_MSG_WARN([*** OpenSSL will not be supported ***])
342 AC_SUBST(OPENSSL_CFLAGS)
343 AC_SUBST(OPENSSL_LIBS)
345 dnl password encryption
350 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
353 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
360 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
361 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
362 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
364 dnl RC dir (will be default at a certain point in time)
365 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .sylpheed-claws)],
366 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".sylpheed-claws")
367 if test x"$ac_cv_with_config_dir" = x""; then
368 ac_cv_with_config_dir=".sylpheed-claws"
370 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
372 dnl ************************
373 dnl ** GTK user interface **
374 dnl ************************
377 AM_PATH_GTK_2_0(2.6.0,,
378 AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
380 dnl --disable-deprecated switch for GTK2 purification
381 AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
382 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
387 dnl GNU/Aspell is used for spell checking
388 AC_ARG_ENABLE(aspell,
389 [ --disable-aspell Disable GNU/aspell support [default=yes]],
390 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
391 AC_MSG_CHECKING([whether to use GNU/aspell])
392 if test $ac_cv_enable_aspell = yes; then
394 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
395 [use_aspell=no ac_cv_enable_aspell=no])
400 dnl want crash dialog
401 AC_ARG_ENABLE(crash-dialog,
402 [ --enable-crash-dialog Enable crash dialog [default=no]],
403 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
404 if test $ac_cv_enable_crash_dialog = yes; then
405 dnl check if GDB is somewhere
406 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
407 AC_MSG_CHECKING([whether to use crash dialog])
408 if test $ac_cv_enable_crash_dialog = yes; then
409 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
411 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
414 dnl Check for X-Face support
415 AC_ARG_ENABLE(compface,
416 [ --disable-compface Do not use compface (X-Face)],
417 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
418 AC_MSG_CHECKING([whether to use compface])
419 if test x"$ac_cv_enable_compface" = xyes; then
421 AC_CHECK_LIB(compface, uncompface,
422 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
423 [ac_cv_enable_compface=no])
424 if test x"$ac_cv_enable_compface" = xyes; then
425 COMPFACE_LIBS="-lcompface"
429 AC_SUBST(COMPFACE_LIBS)
434 dnl check for pthread support
435 AC_ARG_ENABLE(pthread,
436 [ --disable-pthread Disable pthread support],
437 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
438 AC_MSG_CHECKING([whether to use pthread])
439 if test x$ac_cv_enable_pthread = xno; then
444 # For W32 we need to use a special ptrhead lib. In this case we can't
445 # use AC_CHECK_LIB because it has no means of checking for a
446 # library installed under a different name. Checking for the
448 if test -n "${pthread_name}" ; then
449 ac_cv_enable_pthread=yes
451 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
453 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
455 if test x$ac_cv_enable_pthread = xyes; then
456 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
457 if test -z "${pthread_name}" ; then
458 PTHREAD_LIBS="-lpthread"
463 AC_SUBST(PTHREAD_LIBS)
466 dnl Check whether we need to pass -lresolv
467 dnl We know that we don't need it for W32.
469 if test x$os_win32 = xno; then
472 ac_cv_var__res_options=no
473 AC_TRY_LINK([#include <sys/types.h>
474 #include <sys/socket.h>
475 #include <netinet/in.h>
476 #include <arpa/nameser.h>
477 #include <resolv.h>],
478 [_res.options = RES_INIT;],
479 ac_cv_var__res_options=yes);
480 if test "$ac_cv_var__res_options" != "yes"; then
485 if test "x$LIBRESOLV" = "x"; then
486 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
492 LIBS="$LIBS $LIBRESOLV"
494 dnl for LDAP support in addressbook
495 dnl no check for libraries; dynamically loaded
497 [ --disable-ldap Do not build LDAP support [default=yes]],
498 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
499 AC_MSG_CHECKING([whether to use LDAP])
500 if test x"$ac_cv_enable_ldap" = xno; then
502 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
503 AC_MSG_RESULT(no - LDAP support needs pthread support)
509 dnl check for available libraries, and pull them in
510 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
511 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
512 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
513 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
516 AC_CHECK_HEADERS(ldap.h lber.h,
517 [ ac_cv_enable_ldap=yes ],
518 [ ac_cv_enable_ldap=no ])
520 if test "$ac_cv_enable_ldap" = yes; then
521 AC_CHECK_LIB(ldap, ldap_open,
522 [ ac_cv_enable_ldap=yes ],
523 [ ac_cv_enable_ldap=no ],
526 AC_CHECK_LIB(ldap, ldap_start_tls_s,
527 [ ac_cv_have_tls=yes ],
528 [ ac_cv_have_tls=no ])
532 AC_MSG_CHECKING([whether ldap library is available])
533 AC_MSG_RESULT($ac_cv_enable_ldap)
535 AC_MSG_CHECKING([whether TLS library is available])
536 AC_MSG_RESULT($ac_cv_have_tls)
538 if test "$ac_cv_enable_ldap" = yes; then
539 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
540 LDAP_LIBS="$LDAP_LIBS -lldap"
542 if test "$ac_cv_have_tls" = yes; then
543 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
548 dnl for JPilot support in addressbook
549 dnl no check for libraries; these are dynamically loaded
550 AC_ARG_ENABLE(jpilot,
551 [ --disable-jpilot Enable JPilot support [default=yes]],
552 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
553 AC_MSG_CHECKING([whether to use JPilot])
554 if test "$ac_cv_enable_jpilot" = yes; then
556 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
557 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
558 [ ac_cv_enable_jpilot=no ])
559 if test "$ac_cv_enable_jpilot" = no; then
560 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
561 [ ac_cv_enable_jpilot=yes
562 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
565 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
566 if test x"$ac_cv_enable_jpilot" = xyes; then
567 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
569 AC_MSG_NOTICE([JPilot support not available])
571 AC_SUBST(JPILOT_LIBS)
576 dnl #######################################################################
577 dnl # Check for startup notification
578 dnl #######################################################################
579 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
581 if test "x$enable_startup_notification" = "xyes"; then
582 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
584 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
585 echo "Building with libstartup-notification"
586 enable_startup_notification=yes
589 echo "Building without libstartup-notification"
590 enable_startup_notification=no
593 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
594 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
597 dnl *************************
598 dnl ** section for plugins **
599 dnl *************************
604 AC_MSG_CHECKING([whether to build Trayicon plugin])
605 AC_ARG_ENABLE(trayicon-plugin,
606 [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
607 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
608 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
610 PLUGINS="trayicon $PLUGINS"
614 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
616 dnl --- SpamAssassin ---
617 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
618 AC_ARG_ENABLE(spamassassin-plugin,
619 [ --disable-spamassassin-plugin Build SpamAssassin plugin [default=yes]],
620 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
621 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
624 PLUGINS="spamassassin $PLUGINS"
625 AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being build.)
629 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
631 dnl --- Bogofilter ---
632 AC_MSG_CHECKING([whether to build Bogofilter plugin])
633 AC_ARG_ENABLE(bogofilter-plugin,
634 [ --disable-bogofilter-plugin Build bogofilter plugin [default=yes]],
635 [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
636 if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
638 PLUGINS="bogofilter $PLUGINS"
639 AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being build.)
643 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
646 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
647 AC_ARG_ENABLE(pgpcore-plugin,
648 [ --disable-pgpcore-plugin Do not build PGP/Core plugin],
649 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
650 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
652 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
653 [ac_cv_enable_pgpcore_plugin=no])
654 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
655 PLUGINS="pgpcore $PLUGINS"
657 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
658 [Define if GPGME supports PKA.]))
659 #needed to get GPGME_LIBS and al correctly
660 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
661 [ac_cv_enable_pgpcore_plugin=no])
663 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
668 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
670 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
671 AC_ARG_ENABLE(pgpmime-plugin,
672 [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
673 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
674 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
676 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
677 PLUGINS="pgpmime $PLUGINS"
679 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
680 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
685 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
687 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
688 AC_ARG_ENABLE(pgpinline-plugin,
689 [ --disable-pgpinline-plugin Do not build PGP/Inline plugin],
690 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
691 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
693 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
694 PLUGINS="pgpinline $PLUGINS"
696 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
697 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
702 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
704 dnl --- Dillo Viewer ---
705 AC_MSG_CHECKING([whether to build Dillo plugin])
706 AC_ARG_ENABLE(dillo-viewer-plugin,
707 [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
708 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
709 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
711 PLUGINS="dillo-viewer $PLUGINS"
715 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
718 AC_ARG_ENABLE(demo-plugin,
719 [ --enable-demo-plugin Build demo plugin [default=no]],
720 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
721 if test x"$ac_cv_enable_demo_plugin" = xyes; then
722 PLUGINS="demo $PLUGINS"
724 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
727 AC_MSG_CHECKING([whether to build ClamAV plugin])
728 AC_ARG_ENABLE(clamav-plugin,
729 [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
730 [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
731 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
733 PKG_CHECK_MODULES(CLAMAV, libclamav, ac_cv_enable_clamav_plugin=yes,
734 ac_cv_enable_clamav_plugin=no)
735 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
736 PLUGINS="clamav $PLUGINS"
738 AC_MSG_RESULT(not found)
739 AC_MSG_WARN([*** ClamAV plugin will not be built ***])
744 AC_SUBST(CLAMAV_LIBS)
745 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
748 AC_MSG_CHECKING([whether to use libetpan])
749 AC_ARG_ENABLE(libetpan,
750 [ --disable-libetpan Do not compile IMAP4 support with libetpan],
751 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
752 if test x"$ac_cv_enable_libetpan" = xyes; then
755 AC_PATH_PROG(libetpanconfig, [libetpan-config])
756 if test "x$libetpanconfig" != "x"; then
757 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
758 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
759 if test "x$libetpan_result" = "xyes"; then
760 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
761 LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
762 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
763 AC_MSG_RESULT([$libetpan_result])
766 if test "x$libetpan_result" = "xyes"; then
767 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
768 LIBETPAN_LIBS="`$libetpanconfig --libs`"
769 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
770 if test "$LIBETPAN_VERSION" -lt "046"; then
771 AC_MSG_RESULT([*** Sylpheed requires libetpan 0.46 or newer. See http://www.etpan.org/])
772 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
773 AC_MSG_ERROR([libetpan 0.46 not found])
775 AC_SUBST(LIBETPAN_FLAGS)
776 AC_SUBST(LIBETPAN_LIBS)
777 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
779 AC_MSG_RESULT([*** Sylpheed requires libetpan 0.46 or newer. See http://www.etpan.org/ ])
780 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
781 AC_MSG_ERROR([libetpan 0.46 not found])
786 AM_CONDITIONAL(SYLPHEED_LIBETPAN, test "x$libetpan_result" = "xyes")
790 AC_MSG_CHECKING([whether to use libgnomeprint])
791 AC_ARG_ENABLE(gnomeprint,
792 [ --disable-gnomeprint Do not use libgnomeprint for printing],
793 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
794 if test x$ac_cv_enable_gnomeprint = xyes; then
796 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
797 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
798 if test x"$ac_cv_enable_gnomeprint" = xyes; then
799 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
801 AC_MSG_RESULT(not found)
802 AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
803 AC_MSG_WARN([*** using built-in printing support ***])
808 AM_CONDITIONAL(SYLPHEED_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
810 dnl ****************************
811 dnl ** Final configure output **
812 dnl ****************************
821 src/common/passcrypt.h
825 src/plugins/demo/Makefile
826 src/plugins/bogofilter/Makefile
827 src/plugins/spamassassin/Makefile
828 src/plugins/dillo_viewer/Makefile
829 src/plugins/trayicon/Makefile
830 src/plugins/trayicon/libeggtrayicon/Makefile
831 src/plugins/clamav/Makefile
832 src/plugins/pgpcore/Makefile
833 src/plugins/pgpmime/Makefile
834 src/plugins/pgpinline/Makefile
842 manual/dist/pdf/Makefile
843 manual/dist/ps/Makefile
844 manual/dist/html/Makefile
845 manual/dist/txt/Makefile
847 manual/fr/dist/Makefile
848 manual/fr/dist/pdf/Makefile
849 manual/fr/dist/ps/Makefile
850 manual/fr/dist/html/Makefile
851 manual/fr/dist/txt/Makefile
853 manual/pl/dist/Makefile
854 manual/pl/dist/pdf/Makefile
855 manual/pl/dist/ps/Makefile
856 manual/pl/dist/html/Makefile
857 manual/pl/dist/txt/Makefile
859 manual/es/dist/Makefile
860 manual/es/dist/pdf/Makefile
861 manual/es/dist/ps/Makefile
862 manual/es/dist/html/Makefile
863 manual/es/dist/txt/Makefile
867 dnl Output the configuration summary
869 echo "$PACKAGE $VERSION"
871 echo "JPilot : $ac_cv_enable_jpilot"
872 echo "LDAP : $ac_cv_enable_ldap"
873 echo "OpenSSL : $ac_cv_enable_openssl"
874 echo "iconv : $am_cv_func_iconv"
875 echo "compface : $ac_cv_enable_compface"
876 echo "IPv6 : $ac_cv_enable_ipv6"
877 echo "GNU/aspell : $ac_cv_enable_aspell"
878 echo "IMAP4 : $ac_cv_enable_libetpan"
879 echo "Crash dialog : $ac_cv_enable_crash_dialog"
880 echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
881 echo "Manual : $ac_cv_enable_manual"
882 echo "Plugins : $PLUGINS"
883 echo "Config dir : $ac_cv_with_config_dir"
885 echo "The binary will be installed in $prefix/bin"
887 echo "Configure finished, type 'make' to build."