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 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
53 if test x$PKG_CONFIG = xno ; then
54 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
57 dnl GNOME 2.x installed?
58 PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
59 AM_CONDITIONAL(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
61 dnl libtool versioning
62 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
63 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
64 LT_REVISION=$INTERFACE_AGE
65 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
71 dnl Specify a header configuration file
72 AC_CONFIG_HEADERS(config.h)
76 dnl Checks for programs.
92 CLAWS_ACLOCAL_INCLUDE(m4)
94 dnl ******************************
96 dnl Not needed anymore because we
97 dnl do AC_CANONICAL_SYSTEM above
98 dnl ******************************
101 dnl Copied from the official gtk+-2 configure.in
102 AC_MSG_CHECKING([for some Win32 platform])
104 *-*-mingw*|*-*-cygwin*)
106 LDFLAGS="$LDFLAGS -mwindows"
112 AC_MSG_RESULT([$platform_win32])
113 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
115 AC_MSG_CHECKING([for native Win32])
124 AC_MSG_RESULT([$os_win32])
125 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
127 AC_MSG_CHECKING([for Cygwin])
136 AC_MSG_RESULT([$env_cygwin])
137 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
139 if test "$GCC" = "yes"
141 CFLAGS="$CFLAGS -Wno-unused-function"
144 CFLAGS="$CFLAGS -Wall"
148 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
151 # Note that we need to link to pthreadGC2 in all cases. This
152 # is because some locking is used even when pthread support is
154 pthread_name=pthreadGC2
155 CFLAGS="$CFLAGS -mms-bitfields"
156 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
159 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
160 CFLAGS="$CFLAGS -DSOLARIS"
168 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
171 LIBS="$LIBS $GTK_LIBS"
172 AC_CHECK_FUNCS(bind_textdomain_codeset)
176 ALL_LINGUAS="bg ca cs de el en_GB es fi fr he hr hu it ja ko nb nl pl pt_BR ru sk sr sv zh_CN zh_TW"
177 GETTEXT_PACKAGE=claws-mail
178 AC_SUBST(GETTEXT_PACKAGE)
179 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
181 AM_GNU_GETTEXT_VERSION([0.15])
182 AM_GNU_GETTEXT([external])
184 manualdir='${docdir}/manual'
185 AC_ARG_WITH(manualdir,
186 [ --with-manualdir=DIR Manual directory],
187 [manualdir="$withval"])
190 AC_ARG_ENABLE(manual,
191 [ --disable-manual do not build manual],
192 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
194 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
196 dnl Set PACKAGE_DATA_DIR in config.h.
197 if test "x${datarootdir}" = 'x${prefix}/share'; then
198 if test "x${prefix}" = "xNONE"; then
199 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
201 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
204 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
207 AC_CHECK_LIB(xpg4, setlocale)
212 [ --disable-libsm disable libSM support for session management.],
213 [ac_cv_enable_libsm=$enableval], [ac_cv_enable_libsm=yes])
214 AC_MSG_CHECKING([whether to use LibSM])
215 if test x"$ac_cv_enable_libsm" = xyes; then
217 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
218 [SM_LIBS="$X_LIBS -lSM -lICE"],ac_cv_enable_libsm=no,
220 AC_CHECK_HEADERS(X11/SM/SMlib.h,,ac_cv_enable_libsm=no)
221 if test x"$ac_cv_enable_libsm" = xyes; then
222 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
224 AC_MSG_RESULT(not found)
225 AC_MSG_WARN([*** LibSM will not be supported ***])
232 dnl for GThread support (currently disabled)
233 dnl AC_ARG_ENABLE(threads,
234 dnl [ --enable-threads Enable multithread support [default=no]],
235 dnl [use_threads=$enableval], [use_threads=no])
237 AC_MSG_CHECKING([whether to use threads])
238 if test x"$use_threads" = xyes ; then
240 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
241 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
242 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
243 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
245 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
251 dnl Check for d_type member in struct dirent
252 AC_MSG_CHECKING([whether struct dirent has d_type member])
253 AC_CACHE_VAL(ac_cv_dirent_d_type,[
254 AC_TRY_COMPILE([#include <dirent.h>],
255 [struct dirent d; d.d_type = DT_REG;],
256 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
258 AC_MSG_RESULT($ac_cv_dirent_d_type)
259 if test $ac_cv_dirent_d_type = yes; then
260 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
261 Define if `struct dirent' has `d_type' member.)
264 # Check whether mkdir does not take the permission argument.
265 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
267 dnl Checks for header files.
271 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
272 sys/param.h sys/utsname.h sys/select.h \
273 wchar.h wctype.h locale.h netdb.h)
275 dnl alf - Check for apache installation f*ck up. apache may also install an
276 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
277 AC_TRY_COMPILE([#include <stdlib.h>
278 #include <fnmatch.h>],
279 [int x = USE_HSREGEX;],
280 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
281 if test $ac_cv_have_apache_fnmatch = yes; then
282 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
284 AC_MSG_CHECKING([whether to use Apache regex header kludge])
285 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
287 dnl Checks for typedefs, structures, and compiler characteristics.
294 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
295 dnl may be defined only in wchar.h (this happens with gcc-2.96).
296 dnl So we need to use this extended macro.
297 CLAWS_CHECK_TYPE(wint_t, unsigned int,
302 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
304 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
305 AC_CHECK_SIZEOF(unsigned short, 2)
306 AC_CHECK_SIZEOF(unsigned int, 4)
307 AC_CHECK_SIZEOF(unsigned long, 4)
309 dnl Checks for library functions.
311 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
312 uname flock lockf inet_aton inet_addr \
313 fchmod mkstemp truncate getuid regcomp)
315 AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
317 dnl *****************
318 dnl ** common code **
319 dnl *****************
322 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
324 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
325 AC_SUBST(GLIB_GENMARSHAL)
327 AC_SUBST(GLIB_CFLAGS)
330 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
332 LIBS="$LIBS $GTK_LIBS"
333 AC_CHECK_FUNCS(bind_textdomain_codeset)
336 dnl check for IPv6 option
338 [ --disable-ipv6 disable build IPv6 support],
339 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
341 dnl automated checks for IPv6 support.
342 AC_MSG_CHECKING([whether to use IPv6])
343 if test x"$ac_cv_enable_ipv6" = xyes; then
345 AC_MSG_CHECKING([for IPv6 support])
346 AC_CACHE_VAL(ac_cv_ipv6,[
347 AC_TRY_COMPILE([#define INET6
348 #include <sys/types.h>
349 #include <netinet/in.h>],
350 [int x = IPPROTO_IPV6; struct in6_addr a;],
351 ac_cv_ipv6=yes, ac_cv_ipv6=no)
353 AC_MSG_RESULT($ac_cv_ipv6)
354 if test $ac_cv_ipv6 = yes; then
355 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
357 AC_MSG_WARN(*** IPv6 will not be supported ***)
364 dnl Check for OpenSSL
365 AC_ARG_ENABLE(openssl,
366 [ --disable-openssl disable OpenSSL support.],
367 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
369 AC_ARG_ENABLE(gnutls, [ --enable-gnutls enable GnuTLS support],
370 [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=no])
371 if test x$ac_cv_enable_openssl = xyes && test x$ac_cv_enable_gnutls != xyes; then
372 ac_cv_enable_gnutls="no"
374 if test x$ac_cv_enable_gnutls = xyes; then
375 ac_cv_enable_openssl="no"
378 AC_MSG_CHECKING([whether to use OpenSSL])
379 if test x"$ac_cv_enable_openssl" = xyes; then
381 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
382 if test x$ac_cv_enable_openssl = xyes; then
383 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
385 AC_MSG_RESULT(not found)
386 AC_MSG_WARN([*** OpenSSL will not be supported ***])
391 AC_SUBST(OPENSSL_CFLAGS)
392 AC_SUBST(OPENSSL_LIBS)
394 AC_MSG_CHECKING([whether to use GnuTLS])
395 if test "x$ac_cv_enable_gnutls" != "xno"; then
396 OCPPFLAGS="$CPPFLAGS"
399 AC_CHECK_HEADER(gnutls/gnutls.h, [
400 AC_CHECK_LIB(gnutls, gnutls_global_deinit,
401 [AC_DEFINE(USE_GNUTLS, 1, Define to use GnuTLS.)],
402 [ac_cv_enable_gnutls=no])
403 ],[ac_cv_enable_gnutls=no])
404 if test "x$ac_cv_enable_gnutls" != "xyes"; then
405 CPPFLAGS="$OCPPFLAGS"
409 if test "x$ac_cv_enable_gnutls" = "xyes"; then
410 AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
411 GNUTLS_LIBS="-lgnutls"
415 AC_SUBST(GNUTLS_LIBS)
417 dnl password encryption
422 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
425 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
432 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
433 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
434 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
436 dnl RC dir (will be default at a certain point in time)
437 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
438 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
439 if test x"$ac_cv_with_config_dir" = x""; then
440 ac_cv_with_config_dir=".claws-mail"
442 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
444 dnl ************************
445 dnl ** GTK user interface **
446 dnl ************************
449 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
451 dnl --disable-deprecated switch for GTK2 purification
452 AC_ARG_ENABLE(deprecated, [ --disable-deprecated disable deprecated GTK functions. ],
453 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
458 dnl GNU/Aspell is used for spell checking
459 AC_ARG_ENABLE(aspell,
460 [ --disable-aspell disable GNU/aspell support],
461 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
462 AC_MSG_CHECKING([whether to use GNU/aspell])
463 if test $ac_cv_enable_aspell = yes; then
465 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
466 [use_aspell=no ac_cv_enable_aspell=no])
471 dnl want crash dialog
472 AC_ARG_ENABLE(crash-dialog,
473 [ --enable-crash-dialog Enable crash dialog [default=no]],
474 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
475 if test $ac_cv_enable_crash_dialog = yes; then
476 dnl check if GDB is somewhere
477 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
478 AC_MSG_CHECKING([whether to use crash dialog])
479 if test $ac_cv_enable_crash_dialog = yes; then
480 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
482 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
487 [ --enable-maemo build for the Maemo platform [default=no]],
488 [ac_cv_enable_maemo=$enableval], [ac_cv_enable_maemo=no])
489 if test $ac_cv_enable_maemo = yes; then
490 PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, ac_cv_enable_maemo=yes,
491 ac_cv_enable_maemo=no)
492 AC_SUBST(MAEMO_CFLAGS)
494 if test $ac_cv_enable_maemo = no; then
496 PKG_CHECK_MODULES(MAEMO, libosso hildon-1 hildon-fm-2 gnome-vfs-2.0 hal, ac_cv_enable_maemo=yes,
497 ac_cv_enable_maemo=no)
498 AC_SUBST(MAEMO_CFLAGS)
500 if test $ac_cv_enable_maemo = no; then
501 AC_MSG_ERROR(one of libosso hildon-libs hildon-fm hildon-1 hildon-fm-2 not found)
503 AC_DEFINE(MAEMO, 1, Build for maemo)
504 AC_DEFINE(CHINOOK, 1, Maemo chinook)
505 ac_cv_enable_generic_umpc=yes
508 AC_DEFINE(MAEMO, 1, Build for maemo)
509 ac_cv_enable_generic_umpc=yes
514 AC_ARG_ENABLE(generic-umpc,
515 [ --enable-generic-umpc Enable generic UMPC code [default=no]],
516 [ac_cv_enable_generic_umpc=$enableval], [ac_cv_enable_generic_umpc=no])
517 if test $ac_cv_enable_generic_umpc = yes; then
518 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
519 AC_MSG_RESULT($ac_cv_enable_generic_umpc)
522 PKG_CHECK_MODULES(CONIC, conic, ac_cv_enable_conic=yes,
523 ac_cv_enable_conic=no)
524 AC_SUBST(CONIC_CFLAGS)
526 if test $ac_cv_enable_conic = yes; then
527 AC_DEFINE(CONIC, 1, Have conic lib)
530 dnl Check for X-Face support
531 AC_ARG_ENABLE(compface,
532 [ --disable-compface disable compface (X-Face) support],
533 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
534 AC_MSG_CHECKING([whether to use compface])
535 if test x"$ac_cv_enable_compface" = xyes; then
537 AC_CHECK_LIB(compface, uncompface,
538 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
539 [ac_cv_enable_compface=no])
540 if test x"$ac_cv_enable_compface" = xyes; then
541 COMPFACE_LIBS="-lcompface"
545 AC_SUBST(COMPFACE_LIBS)
550 dnl check for pthread support
551 AC_ARG_ENABLE(pthread,
552 [ --disable-pthread disable pthread support],
553 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
554 AC_MSG_CHECKING([whether to use pthread])
555 if test x$ac_cv_enable_pthread = xno; then
560 # For W32 we need to use a special ptrhead lib. In this case we can't
561 # use AC_CHECK_LIB because it has no means of checking for a
562 # library installed under a different name. Checking for the
564 if test -n "${pthread_name}" ; then
565 ac_cv_enable_pthread=yes
567 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
569 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
571 if test x$ac_cv_enable_pthread = xyes; then
572 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
573 if test -z "${pthread_name}" ; then
574 PTHREAD_LIBS="-lpthread"
579 AC_SUBST(PTHREAD_LIBS)
582 dnl Check whether we need to pass -lresolv
583 dnl We know that we don't need it for W32.
585 if test x$os_win32 = xno; then
588 ac_cv_var__res_options=no
589 AC_TRY_LINK([#include <sys/types.h>
590 #include <sys/socket.h>
591 #include <netinet/in.h>
592 #include <arpa/nameser.h>
593 #include <resolv.h>],
594 [_res.options = RES_INIT;],
595 ac_cv_var__res_options=yes);
596 if test "$ac_cv_var__res_options" != "yes"; then
601 if test "x$LIBRESOLV" = "x"; then
602 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
608 LIBS="$LIBS $LIBRESOLV"
610 dnl for LDAP support in addressbook
611 dnl no check for libraries; dynamically loaded
613 [ --disable-ldap disable LDAP support],
614 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
615 AC_MSG_CHECKING([whether to use LDAP])
616 if test x"$ac_cv_enable_ldap" = xno; then
618 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
619 AC_MSG_RESULT(no - LDAP support needs pthread support)
625 dnl check for available libraries, and pull them in
626 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
627 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
628 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
629 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
632 AC_CHECK_HEADERS(ldap.h lber.h,
633 [ ac_cv_enable_ldap=yes ],
634 [ ac_cv_enable_ldap=no ])
636 if test "$ac_cv_enable_ldap" = yes; then
637 AC_CHECK_LIB(ldap, ldap_open,
638 [ ac_cv_enable_ldap=yes ],
639 [ ac_cv_enable_ldap=no ],
642 AC_CHECK_LIB(ldap, ldap_start_tls_s,
643 [ ac_cv_have_tls=yes ],
644 [ ac_cv_have_tls=no ])
648 AC_MSG_CHECKING([whether ldap library is available])
649 AC_MSG_RESULT($ac_cv_enable_ldap)
651 AC_MSG_CHECKING([whether TLS library is available])
652 AC_MSG_RESULT($ac_cv_have_tls)
654 if test "$ac_cv_enable_ldap" = yes; then
655 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
656 LDAP_LIBS="$LDAP_LIBS -lldap"
658 if test "$ac_cv_have_tls" = yes; then
659 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
664 dnl for JPilot support in addressbook
665 dnl no check for libraries; these are dynamically loaded
666 AC_ARG_ENABLE(jpilot,
667 [ --disable-jpilot disable JPilot support],
668 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
669 AC_MSG_CHECKING([whether to use JPilot])
670 if test "$ac_cv_enable_jpilot" = yes; then
672 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
673 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
674 [ ac_cv_enable_jpilot=no ])
675 if test "$ac_cv_enable_jpilot" = no; then
676 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
677 [ ac_cv_enable_jpilot=yes
678 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
681 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
682 if test x"$ac_cv_enable_jpilot" = xyes; then
683 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
685 AC_MSG_NOTICE([JPilot support not available])
687 AC_SUBST(JPILOT_LIBS)
692 dnl #######################################################################
693 dnl # Check for startup notification
694 dnl #######################################################################
695 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable startup notification support],,enable_startup_notification=yes)
697 if test "x$enable_startup_notification" = "xyes"; then
698 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
700 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
701 echo "Building with libstartup-notification"
702 enable_startup_notification=yes
705 echo "Building without libstartup-notification"
706 enable_startup_notification=no
709 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
710 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
713 dnl #######################################################################
714 dnl # Check for D-Bus support
715 dnl #######################################################################
716 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
718 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
722 echo "D-Bus requirements not met. D-Bus support not activated."
725 AC_SUBST(DBUS_CFLAGS)
728 dnl #######################################################################
729 dnl # Check for NetworkManager support
730 dnl #######################################################################
731 if test x"$enable_dbus_glib" = xyes; then
732 AC_ARG_ENABLE(networkmanager-support, [ --disable-networkmanager-support disable NetworkManager support],,enable_networkmanager_support=yes)
733 if test x"$enable_networkmanager_support" = xyes; then
734 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 0.6.2,
736 AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
737 echo "Building with NetworkManager support"
738 enable_networkmanager_support=yes
741 echo "NetworkManager not found."
742 enable_networkmanager_support=no
744 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
747 echo "NetworkManager support deactivated as D-Bus requirements were not met."
748 enable_networkmanager_support=no
751 dnl *************************
752 dnl ** section for plugins **
753 dnl *************************
758 AC_MSG_CHECKING([whether to build Trayicon plugin])
759 AC_ARG_ENABLE(trayicon-plugin,
760 [ --disable-trayicon-plugin do not build System Tray Icon plugin],
761 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
762 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
764 PLUGINS="trayicon $PLUGINS"
768 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
770 dnl --- SpamAssassin ---
771 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
772 AC_ARG_ENABLE(spamassassin-plugin,
773 [ --disable-spamassassin-plugin do not build SpamAssassin plugin],
774 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
775 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
778 PLUGINS="spamassassin $PLUGINS"
779 AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being built.)
783 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
785 dnl --- Bogofilter ---
786 AC_MSG_CHECKING([whether to build Bogofilter plugin])
787 AC_ARG_ENABLE(bogofilter-plugin,
788 [ --disable-bogofilter-plugin do not build bogofilter plugin],
789 [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
790 if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
792 PLUGINS="bogofilter $PLUGINS"
793 AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being built.)
797 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
800 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
801 AC_ARG_ENABLE(pgpcore-plugin,
802 [ --disable-pgpcore-plugin do not build PGP/Core plugin],
803 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
804 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
806 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
807 [ac_cv_enable_pgpcore_plugin=no])
808 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
809 PLUGINS="pgpcore $PLUGINS"
811 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
812 [Define if GPGME supports PKA.]))
813 #needed to get GPGME_LIBS and al correctly
814 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
815 [ac_cv_enable_pgpcore_plugin=no])
817 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
822 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
824 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
825 AC_ARG_ENABLE(pgpmime-plugin,
826 [ --disable-pgpmime-plugin do not build PGP/MIME plugin],
827 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
828 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
830 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
831 PLUGINS="pgpmime $PLUGINS"
833 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
834 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
839 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
841 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
842 AC_ARG_ENABLE(pgpinline-plugin,
843 [ --disable-pgpinline-plugin do not build PGP/Inline plugin],
844 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
845 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
847 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
848 PLUGINS="pgpinline $PLUGINS"
850 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
851 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
856 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
858 dnl --- Dillo Viewer ---
859 AC_MSG_CHECKING([whether to build Dillo plugin])
860 AC_ARG_ENABLE(dillo-viewer-plugin,
861 [ --disable-dillo-viewer-plugin do not build Dillo plugin for html mail rendering],
862 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
863 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
865 PLUGINS="dillo-viewer $PLUGINS"
869 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
872 AC_ARG_ENABLE(demo-plugin,
873 [ --enable-demo-plugin build demo plugin],
874 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
875 if test x"$ac_cv_enable_demo_plugin" = xyes; then
876 PLUGINS="demo $PLUGINS"
878 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
881 AC_MSG_CHECKING([whether to use libetpan])
882 AC_ARG_ENABLE(libetpan,
883 [ --disable-libetpan disable IMAP4/NNTP (libetpan) support],
884 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
885 if test x"$ac_cv_enable_libetpan" = xyes; then
888 AC_PATH_PROG(libetpanconfig, [libetpan-config])
889 if test "x$libetpanconfig" != "x"; then
890 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
891 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
892 if test "x$libetpan_result" = "xyes"; then
893 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
894 LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
895 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
896 AC_MSG_RESULT([$libetpan_result])
899 if test "x$libetpan_result" = "xyes"; then
900 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
901 LIBETPAN_LIBS="`$libetpanconfig --libs`"
902 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
903 if test "$LIBETPAN_VERSION" -lt "049"; then
904 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/])
905 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
906 AC_MSG_ERROR([libetpan 0.49 not found])
908 AC_SUBST(LIBETPAN_FLAGS)
909 AC_SUBST(LIBETPAN_LIBS)
910 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
912 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/ ])
913 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
914 AC_MSG_ERROR([libetpan 0.49 not found])
919 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
922 dnl Printing support.
923 PKG_CHECK_MODULES(GTK210, gtk+-2.0 >= 2.10, ac_cv_have_gtk210=yes, ac_cv_have_gtk210=no)
925 AC_MSG_CHECKING([whether to use libgnomeprint])
926 AC_ARG_ENABLE(gnomeprint,
927 [ --disable-gnomeprint disable libgnomeprint support],
928 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=auto])
930 if test x$ac_cv_have_gtk210 = xyes; then
931 ac_cv_enable_gnomeprint="no"
934 if test x$ac_cv_enable_gnomeprint = xyes \
935 -o \( x$ac_cv_enable_gnomeprint = xauto \
936 -a x$ac_cv_have_gtk210 = xno \); then
938 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
939 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
940 if test x"$ac_cv_enable_gnomeprint" = xyes; then
941 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
943 AC_MSG_RESULT(not found)
944 AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
945 AC_MSG_WARN([*** using built-in printing support ***])
948 ac_cv_enable_gnomeprint=no
951 AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
953 AC_MSG_CHECKING([whether to use valgrind])
954 AC_ARG_ENABLE(valgrind,
955 [ --disable-valgrind disable valgrind support for debugging],
956 [ac_cv_enable_valgrind=$enableval], [ac_cv_enable_valgrind=yes])
957 if test x$ac_cv_enable_valgrind = xyes; then
959 PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
960 ac_cv_enable_valgrind=yes, ac_cv_enable_valgrind=no)
961 if test x"$ac_cv_enable_valgrind" = xyes; then
962 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
964 AC_MSG_RESULT(not found)
969 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$ac_cv_enable_valgrind" = x"yes")
971 dnl ****************************
972 dnl ** Final configure output **
973 dnl ****************************
982 src/common/passcrypt.h
986 src/plugins/demo/Makefile
987 src/plugins/bogofilter/Makefile
988 src/plugins/spamassassin/Makefile
989 src/plugins/dillo_viewer/Makefile
990 src/plugins/trayicon/Makefile
991 src/plugins/trayicon/libeggtrayicon/Makefile
992 src/plugins/pgpcore/Makefile
993 src/plugins/pgpmime/Makefile
994 src/plugins/pgpinline/Makefile
1001 manual/dist/Makefile
1002 manual/dist/pdf/Makefile
1003 manual/dist/ps/Makefile
1004 manual/dist/html/Makefile
1005 manual/dist/txt/Makefile
1007 manual/fr/dist/Makefile
1008 manual/fr/dist/pdf/Makefile
1009 manual/fr/dist/ps/Makefile
1010 manual/fr/dist/html/Makefile
1011 manual/fr/dist/txt/Makefile
1013 manual/pl/dist/Makefile
1014 manual/pl/dist/pdf/Makefile
1015 manual/pl/dist/ps/Makefile
1016 manual/pl/dist/html/Makefile
1017 manual/pl/dist/txt/Makefile
1019 manual/es/dist/Makefile
1020 manual/es/dist/pdf/Makefile
1021 manual/es/dist/ps/Makefile
1022 manual/es/dist/html/Makefile
1023 manual/es/dist/txt/Makefile
1027 dnl Output the configuration summary
1029 echo "$PACKAGE $VERSION"
1031 echo "JPilot : $ac_cv_enable_jpilot"
1032 echo "LDAP : $ac_cv_enable_ldap"
1033 echo "OpenSSL : $ac_cv_enable_openssl"
1034 echo "gnuTLS : $ac_cv_enable_gnutls"
1035 echo "iconv : $am_cv_func_iconv"
1036 echo "compface : $ac_cv_enable_compface"
1037 echo "IPv6 : $ac_cv_enable_ipv6"
1038 echo "GNU/aspell : $ac_cv_enable_aspell"
1039 echo "IMAP4 : $ac_cv_enable_libetpan"
1040 echo "NNTP : $ac_cv_enable_libetpan"
1041 echo "Crash dialog : $ac_cv_enable_crash_dialog"
1042 echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
1043 echo "GTK+ print support: $ac_cv_have_gtk210"
1044 echo "LibSM : $ac_cv_enable_libsm"
1045 echo "NetworkManager : $enable_networkmanager_support"
1046 echo "Manual : $ac_cv_enable_manual"
1047 echo "Plugins : $PLUGINS"
1048 echo "Generic UMPC code : $ac_cv_enable_generic_umpc"
1049 echo "Maemo build : $ac_cv_enable_maemo"
1050 echo "Config dir : $ac_cv_with_config_dir"
1052 echo "The binary will be installed in $prefix/bin"
1054 echo "Configure finished, type 'make' to build."