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(CLAWS_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(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
56 dnl libtool versioning
57 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
58 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
59 LT_REVISION=$INTERFACE_AGE
60 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
66 dnl Specify a header configuration file
67 AC_CONFIG_HEADERS(config.h)
71 dnl Checks for programs.
87 CLAWS_ACLOCAL_INCLUDE(m4)
89 dnl ******************************
91 dnl Not needed anymore because we
92 dnl do AC_CANONICAL_SYSTEM above
93 dnl ******************************
96 dnl Copied from the official gtk+-2 configure.in
97 AC_MSG_CHECKING([for some Win32 platform])
99 *-*-mingw*|*-*-cygwin*)
101 LDFLAGS="$LDFLAGS -mwindows"
107 AC_MSG_RESULT([$platform_win32])
108 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
110 AC_MSG_CHECKING([for native Win32])
119 AC_MSG_RESULT([$os_win32])
120 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
122 AC_MSG_CHECKING([for Cygwin])
131 AC_MSG_RESULT([$env_cygwin])
132 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
134 CFLAGS="$CFLAGS -Wall"
139 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
142 # Note that we need to link to pthreadGC2 in all cases. This
143 # is because some locking is used even when pthread support is
145 pthread_name=pthreadGC2
146 CFLAGS="$CFLAGS -mms-bitfields"
147 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
155 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
158 LIBS="$LIBS $GTK_LIBS"
159 AC_CHECK_FUNCS(bind_textdomain_codeset)
163 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"
164 GETTEXT_PACKAGE=claws-mail
165 AC_SUBST(GETTEXT_PACKAGE)
166 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
168 AM_GNU_GETTEXT_VERSION([0.15])
169 AM_GNU_GETTEXT([external])
171 manualdir='${docdir}/manual'
172 AC_ARG_WITH(manualdir,
173 [ --with-manualdir=DIR Manual directory],
174 [manualdir="$withval"])
177 AC_ARG_ENABLE(manual,
178 [ --disable-manual Disable manual support],
179 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
181 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
183 dnl Set PACKAGE_DATA_DIR in config.h.
184 if test "x${datarootdir}" = 'x${prefix}/share'; then
185 if test "x${prefix}" = "xNONE"; then
186 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
188 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
191 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
194 AC_CHECK_LIB(xpg4, setlocale)
199 [ --disable-libsm Do not use libSM for session management.],
200 [ac_cv_enable_libsm=$enableval], [ac_cv_enable_libsm=yes])
201 AC_MSG_CHECKING([whether to use LibSM])
202 if test x"$ac_cv_enable_libsm" = xyes; then
204 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
205 [SM_LIBS="$X_LIBS -lSM -lICE"],ac_cv_enable_libsm=no,
207 AC_CHECK_HEADERS(X11/SM/SMlib.h,,ac_cv_enable_libsm=no)
208 if test x"$ac_cv_enable_libsm" = xyes; then
209 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
211 AC_MSG_RESULT(not found)
212 AC_MSG_WARN([*** LibSM will not be supported ***])
219 dnl for GThread support (currently disabled)
220 dnl AC_ARG_ENABLE(threads,
221 dnl [ --enable-threads Enable multithread support [default=no]],
222 dnl [use_threads=$enableval], [use_threads=no])
224 AC_MSG_CHECKING([whether to use threads])
225 if test x"$use_threads" = xyes ; then
227 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
228 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
229 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
230 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
232 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
238 dnl Check for d_type member in struct dirent
239 AC_MSG_CHECKING([whether struct dirent has d_type member])
240 AC_CACHE_VAL(ac_cv_dirent_d_type,[
241 AC_TRY_COMPILE([#include <dirent.h>],
242 [struct dirent d; d.d_type = DT_REG;],
243 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
245 AC_MSG_RESULT($ac_cv_dirent_d_type)
246 if test $ac_cv_dirent_d_type = yes; then
247 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
248 Define if `struct dirent' has `d_type' member.)
251 # Check whether mkdir does not take the permission argument.
252 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
254 dnl Checks for header files.
258 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
259 sys/param.h sys/utsname.h sys/select.h \
260 wchar.h wctype.h locale.h netdb.h)
262 dnl alf - Check for apache installation f*ck up. apache may also install an
263 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
264 AC_TRY_COMPILE([#include <stdlib.h>
265 #include <fnmatch.h>],
266 [int x = USE_HSREGEX;],
267 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
268 if test $ac_cv_have_apache_fnmatch = yes; then
269 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
271 AC_MSG_CHECKING([whether to use Apache regex header kludge])
272 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
274 dnl Checks for typedefs, structures, and compiler characteristics.
281 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
282 dnl may be defined only in wchar.h (this happens with gcc-2.96).
283 dnl So we need to use this extended macro.
284 CLAWS_CHECK_TYPE(wint_t, unsigned int,
289 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
291 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
292 AC_CHECK_SIZEOF(unsigned short, 2)
293 AC_CHECK_SIZEOF(unsigned int, 4)
294 AC_CHECK_SIZEOF(unsigned long, 4)
296 dnl Checks for library functions.
298 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
299 uname flock lockf inet_aton inet_addr \
300 fchmod mkstemp truncate getuid regcomp)
302 AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
304 dnl *****************
305 dnl ** common code **
306 dnl *****************
309 AM_PATH_GLIB_2_0(2.6.0,,
310 AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
311 gmodule gobject gthread)
313 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
315 LIBS="$LIBS $GTK_LIBS"
316 AC_CHECK_FUNCS(bind_textdomain_codeset)
319 dnl check for IPv6 option
321 [ --disable-ipv6 Disable IPv6 support],
322 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
324 dnl automated checks for IPv6 support.
325 AC_MSG_CHECKING([whether to use IPv6])
326 if test x"$ac_cv_enable_ipv6" = xyes; then
328 AC_MSG_CHECKING([for IPv6 support])
329 AC_CACHE_VAL(ac_cv_ipv6,[
330 AC_TRY_COMPILE([#define INET6
331 #include <sys/types.h>
332 #include <netinet/in.h>],
333 [int x = IPPROTO_IPV6; struct in6_addr a;],
334 ac_cv_ipv6=yes, ac_cv_ipv6=no)
336 AC_MSG_RESULT($ac_cv_ipv6)
337 if test $ac_cv_ipv6 = yes; then
338 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
340 AC_MSG_WARN(*** IPv6 will not be supported ***)
347 dnl Check for OpenSSL
348 AC_ARG_ENABLE(openssl,
349 [ --disable-openssl Do not use OpenSSL for SSL support.],
350 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
351 AC_MSG_CHECKING([whether to use OpenSSL])
352 if test x"$ac_cv_enable_openssl" = xyes; then
354 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
355 if test x$ac_cv_enable_openssl = xyes; then
356 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
358 AC_MSG_RESULT(not found)
359 AC_MSG_WARN([*** OpenSSL will not be supported ***])
364 AC_SUBST(OPENSSL_CFLAGS)
365 AC_SUBST(OPENSSL_LIBS)
367 dnl password encryption
372 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
375 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
382 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
383 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
384 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
386 dnl RC dir (will be default at a certain point in time)
387 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
388 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
389 if test x"$ac_cv_with_config_dir" = x""; then
390 ac_cv_with_config_dir=".claws-mail"
392 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
394 dnl ************************
395 dnl ** GTK user interface **
396 dnl ************************
399 AM_PATH_GTK_2_0(2.6.0,,
400 AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
402 dnl --disable-deprecated switch for GTK2 purification
403 AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
404 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
409 dnl GNU/Aspell is used for spell checking
410 AC_ARG_ENABLE(aspell,
411 [ --disable-aspell Disable GNU/aspell support [default=yes]],
412 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
413 AC_MSG_CHECKING([whether to use GNU/aspell])
414 if test $ac_cv_enable_aspell = yes; then
416 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
417 [use_aspell=no ac_cv_enable_aspell=no])
422 dnl want crash dialog
423 AC_ARG_ENABLE(crash-dialog,
424 [ --enable-crash-dialog Enable crash dialog [default=no]],
425 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
426 if test $ac_cv_enable_crash_dialog = yes; then
427 dnl check if GDB is somewhere
428 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
429 AC_MSG_CHECKING([whether to use crash dialog])
430 if test $ac_cv_enable_crash_dialog = yes; then
431 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
433 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
436 dnl Check for X-Face support
437 AC_ARG_ENABLE(compface,
438 [ --disable-compface Do not use compface (X-Face)],
439 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
440 AC_MSG_CHECKING([whether to use compface])
441 if test x"$ac_cv_enable_compface" = xyes; then
443 AC_CHECK_LIB(compface, uncompface,
444 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
445 [ac_cv_enable_compface=no])
446 if test x"$ac_cv_enable_compface" = xyes; then
447 COMPFACE_LIBS="-lcompface"
451 AC_SUBST(COMPFACE_LIBS)
456 dnl check for pthread support
457 AC_ARG_ENABLE(pthread,
458 [ --disable-pthread Disable pthread support],
459 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
460 AC_MSG_CHECKING([whether to use pthread])
461 if test x$ac_cv_enable_pthread = xno; then
466 # For W32 we need to use a special ptrhead lib. In this case we can't
467 # use AC_CHECK_LIB because it has no means of checking for a
468 # library installed under a different name. Checking for the
470 if test -n "${pthread_name}" ; then
471 ac_cv_enable_pthread=yes
473 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
475 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
477 if test x$ac_cv_enable_pthread = xyes; then
478 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
479 if test -z "${pthread_name}" ; then
480 PTHREAD_LIBS="-lpthread"
485 AC_SUBST(PTHREAD_LIBS)
488 dnl Check whether we need to pass -lresolv
489 dnl We know that we don't need it for W32.
491 if test x$os_win32 = xno; then
494 ac_cv_var__res_options=no
495 AC_TRY_LINK([#include <sys/types.h>
496 #include <sys/socket.h>
497 #include <netinet/in.h>
498 #include <arpa/nameser.h>
499 #include <resolv.h>],
500 [_res.options = RES_INIT;],
501 ac_cv_var__res_options=yes);
502 if test "$ac_cv_var__res_options" != "yes"; then
507 if test "x$LIBRESOLV" = "x"; then
508 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
514 LIBS="$LIBS $LIBRESOLV"
516 dnl for LDAP support in addressbook
517 dnl no check for libraries; dynamically loaded
519 [ --disable-ldap Do not build LDAP support [default=yes]],
520 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
521 AC_MSG_CHECKING([whether to use LDAP])
522 if test x"$ac_cv_enable_ldap" = xno; then
524 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
525 AC_MSG_RESULT(no - LDAP support needs pthread support)
531 dnl check for available libraries, and pull them in
532 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
533 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
534 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
535 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
538 AC_CHECK_HEADERS(ldap.h lber.h,
539 [ ac_cv_enable_ldap=yes ],
540 [ ac_cv_enable_ldap=no ])
542 if test "$ac_cv_enable_ldap" = yes; then
543 AC_CHECK_LIB(ldap, ldap_open,
544 [ ac_cv_enable_ldap=yes ],
545 [ ac_cv_enable_ldap=no ],
548 AC_CHECK_LIB(ldap, ldap_start_tls_s,
549 [ ac_cv_have_tls=yes ],
550 [ ac_cv_have_tls=no ])
554 AC_MSG_CHECKING([whether ldap library is available])
555 AC_MSG_RESULT($ac_cv_enable_ldap)
557 AC_MSG_CHECKING([whether TLS library is available])
558 AC_MSG_RESULT($ac_cv_have_tls)
560 if test "$ac_cv_enable_ldap" = yes; then
561 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
562 LDAP_LIBS="$LDAP_LIBS -lldap"
564 if test "$ac_cv_have_tls" = yes; then
565 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
570 dnl for JPilot support in addressbook
571 dnl no check for libraries; these are dynamically loaded
572 AC_ARG_ENABLE(jpilot,
573 [ --disable-jpilot Enable JPilot support [default=yes]],
574 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
575 AC_MSG_CHECKING([whether to use JPilot])
576 if test "$ac_cv_enable_jpilot" = yes; then
578 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
579 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
580 [ ac_cv_enable_jpilot=no ])
581 if test "$ac_cv_enable_jpilot" = no; then
582 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
583 [ ac_cv_enable_jpilot=yes
584 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
587 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
588 if test x"$ac_cv_enable_jpilot" = xyes; then
589 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
591 AC_MSG_NOTICE([JPilot support not available])
593 AC_SUBST(JPILOT_LIBS)
598 dnl #######################################################################
599 dnl # Check for startup notification
600 dnl #######################################################################
601 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
603 if test "x$enable_startup_notification" = "xyes"; then
604 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
606 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
607 echo "Building with libstartup-notification"
608 enable_startup_notification=yes
611 echo "Building without libstartup-notification"
612 enable_startup_notification=no
615 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
616 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
619 dnl *************************
620 dnl ** section for plugins **
621 dnl *************************
626 AC_MSG_CHECKING([whether to build Trayicon plugin])
627 AC_ARG_ENABLE(trayicon-plugin,
628 [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
629 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
630 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
632 PLUGINS="trayicon $PLUGINS"
636 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
638 dnl --- SpamAssassin ---
639 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
640 AC_ARG_ENABLE(spamassassin-plugin,
641 [ --disable-spamassassin-plugin Build SpamAssassin plugin [default=yes]],
642 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
643 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
646 PLUGINS="spamassassin $PLUGINS"
647 AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being build.)
651 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
653 dnl --- Bogofilter ---
654 AC_MSG_CHECKING([whether to build Bogofilter plugin])
655 AC_ARG_ENABLE(bogofilter-plugin,
656 [ --disable-bogofilter-plugin Build bogofilter plugin [default=yes]],
657 [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
658 if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
660 PLUGINS="bogofilter $PLUGINS"
661 AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being build.)
665 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
668 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
669 AC_ARG_ENABLE(pgpcore-plugin,
670 [ --disable-pgpcore-plugin Do not build PGP/Core plugin],
671 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
672 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
674 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
675 [ac_cv_enable_pgpcore_plugin=no])
676 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
677 PLUGINS="pgpcore $PLUGINS"
679 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
680 [Define if GPGME supports PKA.]))
681 #needed to get GPGME_LIBS and al correctly
682 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
683 [ac_cv_enable_pgpcore_plugin=no])
685 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
690 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
692 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
693 AC_ARG_ENABLE(pgpmime-plugin,
694 [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
695 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
696 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
698 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
699 PLUGINS="pgpmime $PLUGINS"
701 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
702 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
707 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
709 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
710 AC_ARG_ENABLE(pgpinline-plugin,
711 [ --disable-pgpinline-plugin Do not build PGP/Inline plugin],
712 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
713 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
715 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
716 PLUGINS="pgpinline $PLUGINS"
718 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
719 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
724 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
726 dnl --- Dillo Viewer ---
727 AC_MSG_CHECKING([whether to build Dillo plugin])
728 AC_ARG_ENABLE(dillo-viewer-plugin,
729 [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
730 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
731 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
733 PLUGINS="dillo-viewer $PLUGINS"
737 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
740 AC_ARG_ENABLE(demo-plugin,
741 [ --enable-demo-plugin Build demo plugin [default=no]],
742 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
743 if test x"$ac_cv_enable_demo_plugin" = xyes; then
744 PLUGINS="demo $PLUGINS"
746 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
749 AC_MSG_CHECKING([whether to build ClamAV plugin])
750 AC_ARG_ENABLE(clamav-plugin,
751 [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
752 [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
753 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
755 PKG_CHECK_MODULES(CLAMAV, libclamav, ac_cv_enable_clamav_plugin=yes,
756 ac_cv_enable_clamav_plugin=no)
757 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
758 PLUGINS="clamav $PLUGINS"
760 AC_MSG_RESULT(not found)
761 AC_MSG_WARN([*** ClamAV plugin will not be built ***])
766 AC_SUBST(CLAMAV_LIBS)
767 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
770 AC_MSG_CHECKING([whether to use libetpan])
771 AC_ARG_ENABLE(libetpan,
772 [ --disable-libetpan Do not compile IMAP4 support with libetpan],
773 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
774 if test x"$ac_cv_enable_libetpan" = xyes; then
777 AC_PATH_PROG(libetpanconfig, [libetpan-config])
778 if test "x$libetpanconfig" != "x"; then
779 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
780 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
781 if test "x$libetpan_result" = "xyes"; then
782 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
783 LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
784 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
785 AC_MSG_RESULT([$libetpan_result])
788 if test "x$libetpan_result" = "xyes"; then
789 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
790 LIBETPAN_LIBS="`$libetpanconfig --libs`"
791 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
792 if test "$LIBETPAN_VERSION" -lt "048"; then
793 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.48 or newer. See http://www.etpan.org/])
794 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
795 AC_MSG_ERROR([libetpan 0.48 not found])
797 AC_SUBST(LIBETPAN_FLAGS)
798 AC_SUBST(LIBETPAN_LIBS)
799 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
801 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.48 or newer. See http://www.etpan.org/ ])
802 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
803 AC_MSG_ERROR([libetpan 0.48 not found])
808 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
812 AC_MSG_CHECKING([whether to use libgnomeprint])
813 AC_ARG_ENABLE(gnomeprint,
814 [ --disable-gnomeprint Do not use libgnomeprint for printing],
815 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
816 if test x$ac_cv_enable_gnomeprint = xyes; then
818 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
819 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
820 if test x"$ac_cv_enable_gnomeprint" = xyes; then
821 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
823 AC_MSG_RESULT(not found)
824 AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
825 AC_MSG_WARN([*** using built-in printing support ***])
830 AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
832 dnl ****************************
833 dnl ** Final configure output **
834 dnl ****************************
843 src/common/passcrypt.h
847 src/plugins/demo/Makefile
848 src/plugins/bogofilter/Makefile
849 src/plugins/spamassassin/Makefile
850 src/plugins/dillo_viewer/Makefile
851 src/plugins/trayicon/Makefile
852 src/plugins/trayicon/libeggtrayicon/Makefile
853 src/plugins/clamav/Makefile
854 src/plugins/pgpcore/Makefile
855 src/plugins/pgpmime/Makefile
856 src/plugins/pgpinline/Makefile
864 manual/dist/pdf/Makefile
865 manual/dist/ps/Makefile
866 manual/dist/html/Makefile
867 manual/dist/txt/Makefile
869 manual/fr/dist/Makefile
870 manual/fr/dist/pdf/Makefile
871 manual/fr/dist/ps/Makefile
872 manual/fr/dist/html/Makefile
873 manual/fr/dist/txt/Makefile
875 manual/pl/dist/Makefile
876 manual/pl/dist/pdf/Makefile
877 manual/pl/dist/ps/Makefile
878 manual/pl/dist/html/Makefile
879 manual/pl/dist/txt/Makefile
881 manual/es/dist/Makefile
882 manual/es/dist/pdf/Makefile
883 manual/es/dist/ps/Makefile
884 manual/es/dist/html/Makefile
885 manual/es/dist/txt/Makefile
889 dnl Output the configuration summary
891 echo "$PACKAGE $VERSION"
893 echo "JPilot : $ac_cv_enable_jpilot"
894 echo "LDAP : $ac_cv_enable_ldap"
895 echo "OpenSSL : $ac_cv_enable_openssl"
896 echo "iconv : $am_cv_func_iconv"
897 echo "compface : $ac_cv_enable_compface"
898 echo "IPv6 : $ac_cv_enable_ipv6"
899 echo "GNU/aspell : $ac_cv_enable_aspell"
900 echo "IMAP4 : $ac_cv_enable_libetpan"
901 echo "Crash dialog : $ac_cv_enable_crash_dialog"
902 echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
903 echo "LibSM : $ac_cv_enable_libsm"
904 echo "Manual : $ac_cv_enable_manual"
905 echo "Plugins : $PLUGINS"
906 echo "Config dir : $ac_cv_with_config_dir"
908 echo "The binary will be installed in $prefix/bin"
910 echo "Configure finished, type 'make' to build."