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 CFLAGS="$CFLAGS -Wall"
130 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
133 # Note that we need to link to pthreadGC2 in all cases. This
134 # is because some locking is used even when pthread support is
136 pthread_name=pthreadGC2
137 CFLAGS="$CFLAGS -mms-bitfields"
138 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
146 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
149 LIBS="$LIBS $GTK_LIBS"
150 AC_CHECK_FUNCS(bind_textdomain_codeset)
154 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"
155 GETTEXT_PACKAGE=sylpheed-claws
156 AC_SUBST(GETTEXT_PACKAGE)
157 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
159 AM_GNU_GETTEXT_VERSION([0.14.5])
160 AM_GNU_GETTEXT([external])
162 if test "x${DATADIRNAME}" = "x"; then
164 AC_SUBST(DATADIRNAME)
167 localedir='${prefix}/${DATADIRNAME}/locale'
168 AC_ARG_WITH(localedir,
169 [ --with-localedir=DIR Locale directory],
170 [localedir="$withval"])
173 manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
174 AC_ARG_WITH(manualdir,
175 [ --with-manualdir=DIR Manual directory],
176 [manualdir="$withval"])
179 AC_ARG_ENABLE(manual,
180 [ --disable-manual Disable manual support],
181 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
183 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
185 dnl Set PACKAGE_DATA_DIR in config.h.
186 if test "x${datadir}" = 'x${prefix}/share'; then
187 if test "x${prefix}" = "xNONE"; then
188 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
190 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
193 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", PACKAGE_DATA_DIR)
196 AC_CHECK_LIB(xpg4, setlocale)
198 dnl for GThread support (currently disabled)
199 dnl AC_ARG_ENABLE(threads,
200 dnl [ --enable-threads Enable multithread support [default=no]],
201 dnl [use_threads=$enableval], [use_threads=no])
203 AC_MSG_CHECKING([whether to use threads])
204 if test x"$use_threads" = xyes ; then
206 if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
207 CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
208 LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
209 AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
211 AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
217 dnl Check for d_type member in struct dirent
218 AC_MSG_CHECKING([whether struct dirent has d_type member])
219 AC_CACHE_VAL(ac_cv_dirent_d_type,[
220 AC_TRY_COMPILE([#include <dirent.h>],
221 [struct dirent d; d.d_type = DT_REG;],
222 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
224 AC_MSG_RESULT($ac_cv_dirent_d_type)
225 if test $ac_cv_dirent_d_type = yes; then
226 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
227 Define if `struct dirent' has `d_type' member.)
230 # Check whether mkdir does not take the permission argument.
231 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
233 dnl Checks for header files.
237 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
238 sys/param.h sys/utsname.h sys/select.h \
239 wchar.h wctype.h locale.h netdb.h)
241 dnl alf - Check for apache installation f*ck up. apache may also install an
242 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
243 AC_TRY_COMPILE([#include <stdlib.h>
244 #include <fnmatch.h>],
245 [int x = USE_HSREGEX;],
246 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
247 if test $ac_cv_have_apache_fnmatch = yes; then
248 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
250 AC_MSG_CHECKING([whether to use Apache regex header kludge])
251 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
253 dnl Checks for typedefs, structures, and compiler characteristics.
260 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
261 dnl may be defined only in wchar.h (this happens with gcc-2.96).
262 dnl So we need to use this extended macro.
263 SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
268 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
270 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
271 AC_CHECK_SIZEOF(unsigned short, 2)
272 AC_CHECK_SIZEOF(unsigned int, 4)
273 AC_CHECK_SIZEOF(unsigned long, 4)
275 dnl Checks for library functions.
277 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
278 wcsstr wcswcs iswalnum iswspace towlower \
279 wcslen wcscpy wcsncpy \
280 uname flock lockf inet_aton inet_addr \
281 fchmod mkstemp truncate getuid regcomp)
283 dnl *****************
284 dnl ** common code **
285 dnl *****************
288 AM_PATH_GLIB_2_0(2.0.0,,
289 AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
290 gmodule gobject gthread)
292 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
294 LIBS="$LIBS $GTK_LIBS"
295 AC_CHECK_FUNCS(bind_textdomain_codeset)
298 dnl check for IPv6 option
300 [ --disable-ipv6 Disable IPv6 support],
301 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
303 dnl automated checks for IPv6 support.
304 AC_MSG_CHECKING([whether to use IPv6])
305 if test x"$ac_cv_enable_ipv6" = xyes; then
307 AC_MSG_CHECKING([for IPv6 support])
308 AC_CACHE_VAL(ac_cv_ipv6,[
309 AC_TRY_COMPILE([#define INET6
310 #include <sys/types.h>
311 #include <netinet/in.h>],
312 [int x = IPPROTO_IPV6; struct in6_addr a;],
313 ac_cv_ipv6=yes, ac_cv_ipv6=no)
315 AC_MSG_RESULT($ac_cv_ipv6)
316 if test $ac_cv_ipv6 = yes; then
317 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
319 AC_MSG_WARN(*** IPv6 will not be supported ***)
326 dnl Check for OpenSSL
327 AC_ARG_ENABLE(openssl,
328 [ --disable-openssl Do not use OpenSSL for SSL support.],
329 [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
330 AC_MSG_CHECKING([whether to use OpenSSL])
331 if test x"$ac_cv_enable_openssl" = xyes; then
333 PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
334 if test x$ac_cv_enable_openssl = xyes; then
335 AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
337 AC_MSG_RESULT(not found)
338 AC_MSG_WARN([*** OpenSSL will not be supported ***])
343 AC_SUBST(OPENSSL_CFLAGS)
344 AC_SUBST(OPENSSL_LIBS)
346 dnl password encryption
349 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
354 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
355 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
356 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
358 dnl RC dir (will be default at a certain point in time)
359 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .sylpheed-claws)],
360 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".sylpheed-claws")
361 if test x"$ac_cv_with_config_dir" = x""; then
362 ac_cv_with_config_dir=".sylpheed-claws"
364 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
366 dnl ************************
367 dnl ** GTK user interface **
368 dnl ************************
371 AM_PATH_GTK_2_0(2.4.0,,
372 AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
374 dnl --disable-deprecated switch for GTK2 purification
375 AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
376 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
381 dnl GNU/Aspell is used for spell checking
382 AC_ARG_ENABLE(aspell,
383 [ --disable-aspell Disable GNU/aspell support [default=yes]],
384 [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
385 AC_MSG_CHECKING([whether to use GNU/aspell])
386 if test $ac_cv_enable_aspell = yes; then
388 AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
389 [use_aspell=no ac_cv_enable_aspell=no])
394 dnl want crash dialog
395 AC_ARG_ENABLE(crash-dialog,
396 [ --enable-crash-dialog Enable crash dialog [default=no]],
397 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
398 if test $ac_cv_enable_crash_dialog = yes; then
399 dnl check if GDB is somewhere
400 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
401 AC_MSG_CHECKING([whether to use crash dialog])
402 if test $ac_cv_enable_crash_dialog = yes; then
403 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
405 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
408 dnl Check for X-Face support
409 AC_ARG_ENABLE(compface,
410 [ --disable-compface Do not use compface (X-Face)],
411 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
412 AC_MSG_CHECKING([whether to use compface])
413 if test x"$ac_cv_enable_compface" = xyes; then
415 AC_CHECK_LIB(compface, uncompface,
416 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
417 [ac_cv_enable_compface=no])
418 if test x"$ac_cv_enable_compface" = xyes; then
419 COMPFACE_LIBS="-lcompface"
423 AC_SUBST(COMPFACE_LIBS)
428 dnl check for pthread support
429 AC_ARG_ENABLE(pthread,
430 [ --disable-pthread Disable pthread support],
431 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
432 AC_MSG_CHECKING([whether to use pthread])
433 if test x$ac_cv_enable_pthread = xno; then
438 # For W32 we need to use a special ptrhead lib. In this case we can't
439 # use AC_CHECK_LIB because it has no means of checking for a
440 # library installed under a different name. Checking for the
442 if test -n "${pthread_name}" ; then
443 ac_cv_enable_pthread=yes
445 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
447 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
449 if test x$ac_cv_enable_pthread = xyes; then
450 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
451 if test -z "${pthread_name}" ; then
452 PTHREAD_LIBS="-lpthread"
457 AC_SUBST(PTHREAD_LIBS)
460 dnl Check whether we need to pass -lresolv
461 dnl We know that we don't need it for W32.
463 if test x$os_win32 = xno; then
466 ac_cv_var__res_options=no
467 AC_TRY_LINK([#include <sys/types.h>
468 #include <sys/socket.h>
469 #include <netinet/in.h>
470 #include <arpa/nameser.h>
471 #include <resolv.h>],
472 [_res.options = RES_INIT;],
473 ac_cv_var__res_options=yes);
474 if test "$ac_cv_var__res_options" != "yes"; then
479 if test "x$LIBRESOLV" = "x"; then
480 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
486 LIBS="$LIBS $LIBRESOLV"
488 dnl for LDAP support in addressbook
489 dnl no check for libraries; dynamically loaded
491 [ --disable-ldap Do not build LDAP support [default=yes]],
492 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
493 AC_MSG_CHECKING([whether to use LDAP])
494 if test x"$ac_cv_enable_ldap" = xno; then
496 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
497 AC_MSG_RESULT(no - LDAP support needs pthread support)
503 dnl check for available libraries, and pull them in
504 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
505 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
506 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
507 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
510 AC_CHECK_HEADERS(ldap.h lber.h,
511 [ ac_cv_enable_ldap=yes ],
512 [ ac_cv_enable_ldap=no ])
514 if test "$ac_cv_enable_ldap" = yes; then
515 AC_CHECK_LIB(ldap, ldap_open,
516 [ ac_cv_enable_ldap=yes ],
517 [ ac_cv_enable_ldap=no ],
520 AC_CHECK_LIB(ldap, ldap_start_tls_s,
521 [ ac_cv_have_tls=yes ],
522 [ ac_cv_have_tls=no ])
526 AC_MSG_CHECKING([whether ldap library is available])
527 AC_MSG_RESULT($ac_cv_enable_ldap)
529 AC_MSG_CHECKING([whether TLS library is available])
530 AC_MSG_RESULT($ac_cv_have_tls)
532 if test "$ac_cv_enable_ldap" = yes; then
533 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
534 LDAP_LIBS="$LDAP_LIBS -lldap"
536 if test "$ac_cv_have_tls" = yes; then
537 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
542 dnl for JPilot support in addressbook
543 dnl no check for libraries; these are dynamically loaded
544 AC_ARG_ENABLE(jpilot,
545 [ --disable-jpilot Enable JPilot support [default=yes]],
546 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
547 AC_MSG_CHECKING([whether to use JPilot])
548 if test "$ac_cv_enable_jpilot" = yes; then
550 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
551 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
552 [ ac_cv_enable_jpilot=no ])
553 if test "$ac_cv_enable_jpilot" = no; then
554 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
555 [ ac_cv_enable_jpilot=yes
556 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
559 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
560 if test x"$ac_cv_enable_jpilot" = xyes; then
561 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
563 AC_MSG_NOTICE([JPilot support not available])
565 AC_SUBST(JPILOT_LIBS)
570 dnl #######################################################################
571 dnl # Check for startup notification
572 dnl #######################################################################
573 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
575 if test "x$enable_startup_notification" = "xyes"; then
576 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
578 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
579 echo "Building with libstartup-notification"
580 enable_startup_notification=yes
583 echo "Building without libstartup-notification"
584 enable_startup_notification=no
587 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
588 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
591 dnl *************************
592 dnl ** section for plugins **
593 dnl *************************
598 AC_MSG_CHECKING([whether to build Trayicon plugin])
599 AC_ARG_ENABLE(trayicon-plugin,
600 [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
601 [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
602 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
604 PLUGINS="trayicon $PLUGINS"
608 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
610 dnl --- SpamAssassin ---
611 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
612 AC_ARG_ENABLE(spamassassin-plugin,
613 [ --disable-spamassassin-plugin Build SpamAssassin plugin [default=yes]],
614 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
615 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
618 PLUGINS="spamassassin $PLUGINS"
622 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
625 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
626 AC_ARG_ENABLE(pgpcore-plugin,
627 [ --disable-pgpcore-plugin Do not build PGP/Core plugin],
628 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
629 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
631 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
632 [ac_cv_enable_pgpcore_plugin=no])
633 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
634 PLUGINS="pgpcore $PLUGINS"
636 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
637 [Define if GPGME supports PKA.]))
638 #needed to get GPGME_LIBS and al correctly
639 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
640 [ac_cv_enable_pgpcore_plugin=no])
642 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
647 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
649 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
650 AC_ARG_ENABLE(pgpmime-plugin,
651 [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
652 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
653 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
655 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
656 PLUGINS="pgpmime $PLUGINS"
658 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
659 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
664 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
666 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
667 AC_ARG_ENABLE(pgpinline-plugin,
668 [ --disable-pgpinline-plugin Do not build PGP/Inline plugin],
669 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
670 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
672 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
673 PLUGINS="pgpinline $PLUGINS"
675 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
676 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
681 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
683 dnl --- Dillo Viewer ---
684 AC_MSG_CHECKING([whether to build Dillo plugin])
685 AC_ARG_ENABLE(dillo-viewer-plugin,
686 [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
687 [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
688 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
690 PLUGINS="dillo-viewer $PLUGINS"
694 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
697 AC_ARG_ENABLE(demo-plugin,
698 [ --enable-demo-plugin Build demo plugin [default=no]],
699 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
700 if test x"$ac_cv_enable_demo_plugin" = xyes; then
701 PLUGINS="demo $PLUGINS"
703 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
706 AC_MSG_CHECKING([whether to build ClamAV plugin])
707 AC_ARG_ENABLE(clamav-plugin,
708 [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
709 [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
710 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
712 PKG_CHECK_MODULES(CLAMAV, libclamav, ac_cv_enable_clamav_plugin=yes,
713 ac_cv_enable_clamav_plugin=no)
714 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
715 PLUGINS="clamav $PLUGINS"
717 AC_MSG_RESULT(not found)
718 AC_MSG_WARN([*** ClamAV plugin will not be built ***])
723 AC_SUBST(CLAMAV_LIBS)
724 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
727 AC_MSG_CHECKING([whether to use libetpan])
728 AC_ARG_ENABLE(libetpan,
729 [ --disable-libetpan Do not compile IMAP4 support with libetpan],
730 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
731 if test x"$ac_cv_enable_libetpan" = xyes; then
734 AC_PATH_PROG(libetpanconfig, [libetpan-config])
735 if test "x$libetpanconfig" != "x"; then
736 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
737 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
738 if test "x$libetpan_result" = "xyes"; then
739 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
740 LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
741 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
742 AC_MSG_RESULT([$libetpan_result])
745 if test "x$libetpan_result" = "xyes"; then
746 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
747 LIBETPAN_LIBS="`$libetpanconfig --libs`"
748 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
749 if test "$LIBETPAN_VERSION" -lt "041"; then
750 AC_MSG_RESULT([*** Sylpheed requires libetpan 0.41 or newer. See http://www.etpan.org/])
751 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
752 AC_MSG_ERROR([libetpan 0.41 not found])
754 AC_SUBST(LIBETPAN_FLAGS)
755 AC_SUBST(LIBETPAN_LIBS)
756 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
758 AC_MSG_RESULT([*** Sylpheed requires libetpan 0.41 or newer. See http://www.etpan.org/ ])
759 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
760 AC_MSG_ERROR([libetpan 0.41 not found])
765 AM_CONDITIONAL(SYLPHEED_LIBETPAN, test "x$libetpan_result" = "xyes")
769 AC_MSG_CHECKING([whether to use libgnomeprint])
770 AC_ARG_ENABLE(gnomeprint,
771 [ --disable-gnomeprint Do not use libgnomeprint for printing],
772 [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
773 if test x$ac_cv_enable_gnomeprint = xyes; then
775 PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
776 ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
777 if test x"$ac_cv_enable_gnomeprint" = xyes; then
778 AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
780 AC_MSG_RESULT(not found)
781 AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
782 AC_MSG_WARN([*** using built-in printing support ***])
787 AM_CONDITIONAL(SYLPHEED_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
789 dnl ****************************
790 dnl ** Final configure output **
791 dnl ****************************
800 src/common/passcrypt.h
804 src/plugins/demo/Makefile
805 src/plugins/spamassassin/Makefile
806 src/plugins/dillo_viewer/Makefile
807 src/plugins/trayicon/Makefile
808 src/plugins/trayicon/libeggtrayicon/Makefile
809 src/plugins/clamav/Makefile
810 src/plugins/pgpcore/Makefile
811 src/plugins/pgpmime/Makefile
812 src/plugins/pgpinline/Makefile
820 manual/dist/pdf/Makefile
821 manual/dist/ps/Makefile
822 manual/dist/html/Makefile
823 manual/dist/txt/Makefile
827 dnl Output the configuration summary
829 echo "$PACKAGE $VERSION"
831 echo "JPilot : $ac_cv_enable_jpilot"
832 echo "LDAP : $ac_cv_enable_ldap"
833 echo "OpenSSL : $ac_cv_enable_openssl"
834 echo "iconv : $am_cv_func_iconv"
835 echo "compface : $ac_cv_enable_compface"
836 echo "IPv6 : $ac_cv_enable_ipv6"
837 echo "GNU/aspell : $ac_cv_enable_aspell"
838 echo "IMAP4 : $ac_cv_enable_libetpan"
839 echo "Crash dialog : $ac_cv_enable_crash_dialog"
840 echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
841 echo "Manual : $ac_cv_enable_manual"
842 echo "Plugins : $PLUGINS"
843 echo "Config dir : $ac_cv_with_config_dir"
845 echo "The binary will be installed in $prefix/bin"
847 echo "Configure finished, type 'make' to build."