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"
150 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
151 CFLAGS="$CFLAGS -DSOLARIS"
159 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
162 LIBS="$LIBS $GTK_LIBS"
163 AC_CHECK_FUNCS(bind_textdomain_codeset)
167 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"
168 GETTEXT_PACKAGE=claws-mail
169 AC_SUBST(GETTEXT_PACKAGE)
170 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
172 AM_GNU_GETTEXT_VERSION([0.15])
173 AM_GNU_GETTEXT([external])
175 manualdir='${docdir}/manual'
176 AC_ARG_WITH(manualdir,
177 [ --with-manualdir=DIR Manual directory],
178 [manualdir="$withval"])
181 AC_ARG_ENABLE(manual,
182 [ --disable-manual Disable manual support],
183 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
185 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
187 dnl Set PACKAGE_DATA_DIR in config.h.
188 if test "x${datarootdir}" = 'x${prefix}/share'; then
189 if test "x${prefix}" = "xNONE"; then
190 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
192 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
195 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
198 AC_CHECK_LIB(xpg4, setlocale)
203 [ --disable-libsm Do not use libSM for session management.],
204 [ac_cv_enable_libsm=$enableval], [ac_cv_enable_libsm=yes])
205 AC_MSG_CHECKING([whether to use LibSM])
206 if test x"$ac_cv_enable_libsm" = xyes; then
208 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
209 [SM_LIBS="$X_LIBS -lSM -lICE"],ac_cv_enable_libsm=no,
211 AC_CHECK_HEADERS(X11/SM/SMlib.h,,ac_cv_enable_libsm=no)
212 if test x"$ac_cv_enable_libsm" = xyes; then
213 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
215 AC_MSG_RESULT(not found)
216 AC_MSG_WARN([*** LibSM will not be supported ***])
223 dnl for GThread support (currently disabled)
224 dnl AC_ARG_ENABLE(threads,
225 dnl [ --enable-threads Enable multithread support [default=no]],
226 dnl [use_threads=$enableval], [use_threads=no])
228 AC_MSG_CHECKING([whether to use threads])
229 if test x"$use_threads" = xyes ; then
231 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
232 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
233 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
234 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
236 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
242 dnl Check for d_type member in struct dirent
243 AC_MSG_CHECKING([whether struct dirent has d_type member])
244 AC_CACHE_VAL(ac_cv_dirent_d_type,[
245 AC_TRY_COMPILE([#include <dirent.h>],
246 [struct dirent d; d.d_type = DT_REG;],
247 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
249 AC_MSG_RESULT($ac_cv_dirent_d_type)
250 if test $ac_cv_dirent_d_type = yes; then
251 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
252 Define if `struct dirent' has `d_type' member.)
255 # Check whether mkdir does not take the permission argument.
256 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
258 dnl Checks for header files.
262 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
263 sys/param.h sys/utsname.h sys/select.h \
264 wchar.h wctype.h locale.h netdb.h)
266 dnl alf - Check for apache installation f*ck up. apache may also install an
267 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
268 AC_TRY_COMPILE([#include <stdlib.h>
269 #include <fnmatch.h>],
270 [int x = USE_HSREGEX;],
271 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
272 if test $ac_cv_have_apache_fnmatch = yes; then
273 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
275 AC_MSG_CHECKING([whether to use Apache regex header kludge])
276 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
278 dnl Checks for typedefs, structures, and compiler characteristics.
285 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
286 dnl may be defined only in wchar.h (this happens with gcc-2.96).
287 dnl So we need to use this extended macro.
288 CLAWS_CHECK_TYPE(wint_t, unsigned int,
293 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
295 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
296 AC_CHECK_SIZEOF(unsigned short, 2)
297 AC_CHECK_SIZEOF(unsigned int, 4)
298 AC_CHECK_SIZEOF(unsigned long, 4)
300 dnl Checks for library functions.
302 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
303 uname flock lockf inet_aton inet_addr \
304 fchmod mkstemp truncate getuid regcomp)
306 AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
308 dnl *****************
309 dnl ** common code **
310 dnl *****************
313 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
315 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
316 AC_SUBST(GLIB_GENMARSHAL)
318 AC_SUBST(GLIB_CFLAGS)
321 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
323 LIBS="$LIBS $GTK_LIBS"
324 AC_CHECK_FUNCS(bind_textdomain_codeset)
327 dnl check for IPv6 option
329 [ --disable-ipv6 Disable IPv6 support],
330 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
332 dnl automated checks for IPv6 support.
333 AC_MSG_CHECKING([whether to use IPv6])
334 if test x"$ac_cv_enable_ipv6" = xyes; then
336 AC_MSG_CHECKING([for IPv6 support])
337 AC_CACHE_VAL(ac_cv_ipv6,[
338 AC_TRY_COMPILE([#define INET6
339 #include <sys/types.h>
340 #include <netinet/in.h>],
341 [int x = IPPROTO_IPV6; struct in6_addr a;],
342 ac_cv_ipv6=yes, ac_cv_ipv6=no)
344 AC_MSG_RESULT($ac_cv_ipv6)
345 if test $ac_cv_ipv6 = yes; then
346 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
348 AC_MSG_WARN(*** IPv6 will not be supported ***)
355 dnl Check for OpenSSL
356 AC_ARG_ENABLE(openssl,
357 [ --disable-openssl Do not use OpenSSL for SSL support.],
358 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
359 AC_MSG_CHECKING([whether to use OpenSSL])
360 if test x"$ac_cv_enable_openssl" = xyes; then
362 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
363 if test x$ac_cv_enable_openssl = xyes; then
364 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
366 AC_MSG_RESULT(not found)
367 AC_MSG_WARN([*** OpenSSL will not be supported ***])
372 AC_SUBST(OPENSSL_CFLAGS)
373 AC_SUBST(OPENSSL_LIBS)
375 dnl password encryption
380 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
383 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
390 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
391 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
392 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
394 dnl RC dir (will be default at a certain point in time)
395 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
396 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
397 if test x"$ac_cv_with_config_dir" = x""; then
398 ac_cv_with_config_dir=".claws-mail"
400 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
402 dnl ************************
403 dnl ** GTK user interface **
404 dnl ************************
407 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
409 dnl --disable-deprecated switch for GTK2 purification
410 AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
411 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
416 dnl GNU/Aspell is used for spell checking
417 AC_ARG_ENABLE(aspell,
418 [ --disable-aspell Disable GNU/aspell support [default=yes]],
419 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
420 AC_MSG_CHECKING([whether to use GNU/aspell])
421 if test $ac_cv_enable_aspell = yes; then
423 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
424 [use_aspell=no ac_cv_enable_aspell=no])
429 dnl want crash dialog
430 AC_ARG_ENABLE(crash-dialog,
431 [ --enable-crash-dialog Enable crash dialog [default=no]],
432 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
433 if test $ac_cv_enable_crash_dialog = yes; then
434 dnl check if GDB is somewhere
435 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
436 AC_MSG_CHECKING([whether to use crash dialog])
437 if test $ac_cv_enable_crash_dialog = yes; then
438 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
440 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
445 [ --enable-maemo Build for the Maemo platform [default=no]],
446 [ac_cv_enable_maemo=$enableval], [ac_cv_enable_maemo=no])
447 if test $ac_cv_enable_maemo = yes; then
448 PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, ac_cv_enable_maemo=yes,
449 ac_cv_enable_maemo=no)
450 AC_SUBST(MAEMO_CFLAGS)
452 if test $ac_cv_enable_maemo = no; then
453 AC_MSG_ERROR(libosso, hildon-libs or hildon-fm not found)
455 AC_DEFINE(MAEMO, 1, Build for maemo)
458 PKG_CHECK_MODULES(CONIC, conic, ac_cv_enable_conic=yes,
459 ac_cv_enable_conic=no)
460 AC_SUBST(CONIC_CFLAGS)
462 if test $ac_cv_enable_conic = yes; then
463 AC_DEFINE(CONIC, 1, Have conic lib)
466 dnl Check for X-Face support
467 AC_ARG_ENABLE(compface,
468 [ --disable-compface Do not use compface (X-Face)],
469 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
470 AC_MSG_CHECKING([whether to use compface])
471 if test x"$ac_cv_enable_compface" = xyes; then
473 AC_CHECK_LIB(compface, uncompface,
474 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
475 [ac_cv_enable_compface=no])
476 if test x"$ac_cv_enable_compface" = xyes; then
477 COMPFACE_LIBS="-lcompface"
481 AC_SUBST(COMPFACE_LIBS)
486 dnl check for pthread support
487 AC_ARG_ENABLE(pthread,
488 [ --disable-pthread Disable pthread support],
489 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
490 AC_MSG_CHECKING([whether to use pthread])
491 if test x$ac_cv_enable_pthread = xno; then
496 # For W32 we need to use a special ptrhead lib. In this case we can't
497 # use AC_CHECK_LIB because it has no means of checking for a
498 # library installed under a different name. Checking for the
500 if test -n "${pthread_name}" ; then
501 ac_cv_enable_pthread=yes
503 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
505 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
507 if test x$ac_cv_enable_pthread = xyes; then
508 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
509 if test -z "${pthread_name}" ; then
510 PTHREAD_LIBS="-lpthread"
515 AC_SUBST(PTHREAD_LIBS)
518 dnl Check whether we need to pass -lresolv
519 dnl We know that we don't need it for W32.
521 if test x$os_win32 = xno; then
524 ac_cv_var__res_options=no
525 AC_TRY_LINK([#include <sys/types.h>
526 #include <sys/socket.h>
527 #include <netinet/in.h>
528 #include <arpa/nameser.h>
529 #include <resolv.h>],
530 [_res.options = RES_INIT;],
531 ac_cv_var__res_options=yes);
532 if test "$ac_cv_var__res_options" != "yes"; then
537 if test "x$LIBRESOLV" = "x"; then
538 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
544 LIBS="$LIBS $LIBRESOLV"
546 dnl for LDAP support in addressbook
547 dnl no check for libraries; dynamically loaded
549 [ --disable-ldap Do not build LDAP support [default=yes]],
550 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
551 AC_MSG_CHECKING([whether to use LDAP])
552 if test x"$ac_cv_enable_ldap" = xno; then
554 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
555 AC_MSG_RESULT(no - LDAP support needs pthread support)
561 dnl check for available libraries, and pull them in
562 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
563 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
564 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
565 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
568 AC_CHECK_HEADERS(ldap.h lber.h,
569 [ ac_cv_enable_ldap=yes ],
570 [ ac_cv_enable_ldap=no ])
572 if test "$ac_cv_enable_ldap" = yes; then
573 AC_CHECK_LIB(ldap, ldap_open,
574 [ ac_cv_enable_ldap=yes ],
575 [ ac_cv_enable_ldap=no ],
578 AC_CHECK_LIB(ldap, ldap_start_tls_s,
579 [ ac_cv_have_tls=yes ],
580 [ ac_cv_have_tls=no ])
584 AC_MSG_CHECKING([whether ldap library is available])
585 AC_MSG_RESULT($ac_cv_enable_ldap)
587 AC_MSG_CHECKING([whether TLS library is available])
588 AC_MSG_RESULT($ac_cv_have_tls)
590 if test "$ac_cv_enable_ldap" = yes; then
591 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
592 LDAP_LIBS="$LDAP_LIBS -lldap"
594 if test "$ac_cv_have_tls" = yes; then
595 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
600 dnl for JPilot support in addressbook
601 dnl no check for libraries; these are dynamically loaded
602 AC_ARG_ENABLE(jpilot,
603 [ --disable-jpilot Enable JPilot support [default=yes]],
604 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
605 AC_MSG_CHECKING([whether to use JPilot])
606 if test "$ac_cv_enable_jpilot" = yes; then
608 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
609 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
610 [ ac_cv_enable_jpilot=no ])
611 if test "$ac_cv_enable_jpilot" = no; then
612 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
613 [ ac_cv_enable_jpilot=yes
614 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
617 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
618 if test x"$ac_cv_enable_jpilot" = xyes; then
619 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
621 AC_MSG_NOTICE([JPilot support not available])
623 AC_SUBST(JPILOT_LIBS)
628 dnl #######################################################################
629 dnl # Check for startup notification
630 dnl #######################################################################
631 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
633 if test "x$enable_startup_notification" = "xyes"; then
634 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
636 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
637 echo "Building with libstartup-notification"
638 enable_startup_notification=yes
641 echo "Building without libstartup-notification"
642 enable_startup_notification=no
645 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
646 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
649 dnl *************************
650 dnl ** section for plugins **
651 dnl *************************
656 AC_MSG_CHECKING([whether to build Trayicon plugin])
657 AC_ARG_ENABLE(trayicon-plugin,
658 [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
659 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
660 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
662 PLUGINS="trayicon $PLUGINS"
666 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
668 dnl --- SpamAssassin ---
669 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
670 AC_ARG_ENABLE(spamassassin-plugin,
671 [ --disable-spamassassin-plugin Build SpamAssassin plugin [default=yes]],
672 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
673 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
676 PLUGINS="spamassassin $PLUGINS"
677 AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being built.)
681 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
683 dnl --- Bogofilter ---
684 AC_MSG_CHECKING([whether to build Bogofilter plugin])
685 AC_ARG_ENABLE(bogofilter-plugin,
686 [ --disable-bogofilter-plugin Build bogofilter plugin [default=yes]],
687 [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
688 if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
690 PLUGINS="bogofilter $PLUGINS"
691 AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being built.)
695 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
698 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
699 AC_ARG_ENABLE(pgpcore-plugin,
700 [ --disable-pgpcore-plugin Do not build PGP/Core plugin],
701 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
702 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
704 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
705 [ac_cv_enable_pgpcore_plugin=no])
706 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
707 PLUGINS="pgpcore $PLUGINS"
709 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
710 [Define if GPGME supports PKA.]))
711 #needed to get GPGME_LIBS and al correctly
712 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
713 [ac_cv_enable_pgpcore_plugin=no])
715 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
720 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
722 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
723 AC_ARG_ENABLE(pgpmime-plugin,
724 [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
725 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
726 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
728 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
729 PLUGINS="pgpmime $PLUGINS"
731 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
732 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
737 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
739 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
740 AC_ARG_ENABLE(pgpinline-plugin,
741 [ --disable-pgpinline-plugin Do not build PGP/Inline plugin],
742 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
743 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
745 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
746 PLUGINS="pgpinline $PLUGINS"
748 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
749 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
754 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
756 dnl --- Dillo Viewer ---
757 AC_MSG_CHECKING([whether to build Dillo plugin])
758 AC_ARG_ENABLE(dillo-viewer-plugin,
759 [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
760 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
761 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
763 PLUGINS="dillo-viewer $PLUGINS"
767 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
770 AC_ARG_ENABLE(demo-plugin,
771 [ --enable-demo-plugin Build demo plugin [default=no]],
772 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
773 if test x"$ac_cv_enable_demo_plugin" = xyes; then
774 PLUGINS="demo $PLUGINS"
776 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
779 AC_MSG_CHECKING([whether to build ClamAV plugin])
780 AC_ARG_ENABLE(clamav-plugin,
781 [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
782 [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
783 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
785 PKG_CHECK_MODULES(CLAMAV, libclamav, ac_cv_enable_clamav_plugin=yes,
786 ac_cv_enable_clamav_plugin=no)
787 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
788 PLUGINS="clamav $PLUGINS"
790 AC_MSG_RESULT(not found)
791 AC_MSG_WARN([*** ClamAV plugin will not be built ***])
796 AC_SUBST(CLAMAV_LIBS)
797 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
800 AC_MSG_CHECKING([whether to use libetpan])
801 AC_ARG_ENABLE(libetpan,
802 [ --disable-libetpan Do not compile IMAP4 support with libetpan],
803 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
804 if test x"$ac_cv_enable_libetpan" = xyes; then
807 AC_PATH_PROG(libetpanconfig, [libetpan-config])
808 if test "x$libetpanconfig" != "x"; then
809 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
810 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
811 if test "x$libetpan_result" = "xyes"; then
812 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
813 LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
814 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
815 AC_MSG_RESULT([$libetpan_result])
818 if test "x$libetpan_result" = "xyes"; then
819 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
820 LIBETPAN_LIBS="`$libetpanconfig --libs`"
821 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
822 if test "$LIBETPAN_VERSION" -lt "049"; then
823 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/])
824 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
825 AC_MSG_ERROR([libetpan 0.49 not found])
827 AC_SUBST(LIBETPAN_FLAGS)
828 AC_SUBST(LIBETPAN_LIBS)
829 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
831 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/ ])
832 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
833 AC_MSG_ERROR([libetpan 0.49 not found])
838 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
842 AC_MSG_CHECKING([whether to use libgnomeprint])
843 AC_ARG_ENABLE(gnomeprint,
844 [ --disable-gnomeprint Do not use libgnomeprint for printing],
845 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
846 if test x$ac_cv_enable_gnomeprint = xyes; then
848 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
849 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
850 if test x"$ac_cv_enable_gnomeprint" = xyes; then
851 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
853 AC_MSG_RESULT(not found)
854 AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
855 AC_MSG_WARN([*** using built-in printing support ***])
860 AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
862 AC_MSG_CHECKING([whether to use valgrind])
863 AC_ARG_ENABLE(valgrind,
864 [ --disable-valgrind Do not use valgrind for debugging],
865 [ac_cv_enable_valgrind=$enableval], [ac_cv_enable_valgrind=yes])
866 if test x$ac_cv_enable_valgrind = xyes; then
868 PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
869 ac_cv_enable_valgrind=yes, ac_cv_enable_valgrind=no)
870 if test x"$ac_cv_enable_valgrind" = xyes; then
871 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
873 AC_MSG_RESULT(not found)
878 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$ac_cv_enable_valgrind" = x"yes")
880 dnl ****************************
881 dnl ** Final configure output **
882 dnl ****************************
891 src/common/passcrypt.h
895 src/plugins/demo/Makefile
896 src/plugins/bogofilter/Makefile
897 src/plugins/spamassassin/Makefile
898 src/plugins/dillo_viewer/Makefile
899 src/plugins/trayicon/Makefile
900 src/plugins/trayicon/libeggtrayicon/Makefile
901 src/plugins/clamav/Makefile
902 src/plugins/pgpcore/Makefile
903 src/plugins/pgpmime/Makefile
904 src/plugins/pgpinline/Makefile
912 manual/dist/pdf/Makefile
913 manual/dist/ps/Makefile
914 manual/dist/html/Makefile
915 manual/dist/txt/Makefile
917 manual/fr/dist/Makefile
918 manual/fr/dist/pdf/Makefile
919 manual/fr/dist/ps/Makefile
920 manual/fr/dist/html/Makefile
921 manual/fr/dist/txt/Makefile
923 manual/pl/dist/Makefile
924 manual/pl/dist/pdf/Makefile
925 manual/pl/dist/ps/Makefile
926 manual/pl/dist/html/Makefile
927 manual/pl/dist/txt/Makefile
929 manual/es/dist/Makefile
930 manual/es/dist/pdf/Makefile
931 manual/es/dist/ps/Makefile
932 manual/es/dist/html/Makefile
933 manual/es/dist/txt/Makefile
937 dnl Output the configuration summary
939 echo "$PACKAGE $VERSION"
941 echo "JPilot : $ac_cv_enable_jpilot"
942 echo "LDAP : $ac_cv_enable_ldap"
943 echo "OpenSSL : $ac_cv_enable_openssl"
944 echo "iconv : $am_cv_func_iconv"
945 echo "compface : $ac_cv_enable_compface"
946 echo "IPv6 : $ac_cv_enable_ipv6"
947 echo "GNU/aspell : $ac_cv_enable_aspell"
948 echo "IMAP4 : $ac_cv_enable_libetpan"
949 echo "Crash dialog : $ac_cv_enable_crash_dialog"
950 echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
951 echo "LibSM : $ac_cv_enable_libsm"
952 echo "Manual : $ac_cv_enable_manual"
953 echo "Plugins : $PLUGINS"
954 echo "Maemo build : $ac_cv_enable_maemo"
955 echo "Config dir : $ac_cv_with_config_dir"
957 echo "The binary will be installed in $prefix/bin"
959 echo "Configure finished, type 'make' to build."