configure 'go to next folder' dialog
[claws.git] / configure.in
index bbbcdecbafe12c7343cba32d1eefdd4648a18c95..1ac28a16f0ce403cf8aafd4a15faa791dda504fe 100644 (file)
@@ -4,17 +4,30 @@ PACKAGE=sylpheed
 
 dnl version number
 MAJOR_VERSION=0
-MINOR_VERSION=4
-MICRO_VERSION=65
-INTERFACE_AGE=65
-BINARY_AGE=65
-EXTRA_VERSION=claws6
+MINOR_VERSION=6
+MICRO_VERSION=2
+INTERFACE_AGE=0
+BINARY_AGE=0
+EXTRA_VERSION=claws4
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+dnl GNOME installed?
+AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
+if test "$GNOME_CONFIG" != no; then
+       gnomedir="`gnome-config --prefix`"
+       AC_SUBST(gnomedir)
+fi
+AM_CONDITIONAL(SYLPHEED_GNOME, test -d "$gnomedir")
+
+dnl Claws version
+AC_DEFINE(CLAWS, 1)
 
 dnl libtool versioning
 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
@@ -42,11 +55,13 @@ AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_CPP
 dnl AC_PROG_RANLIB
+AM_PROG_LEX
+AC_PROG_YACC
 
 SYLPHEED_ACLOCAL_INCLUDE(ac)
 
 dnl for gettext
-ALL_LINGUAS="cs de el es fr it ja ko nl pt_BR ru zh_CN.GB2312 zh_TW.Big5"
+ALL_LINGUAS="cs de el es fr hr it ja ko nl pl pt_BR ru zh_CN.GB2312 zh_TW.Big5"
 AM_GNU_GETTEXT
 dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
 localedir='${prefix}/${DATADIRNAME}/locale'
@@ -65,20 +80,21 @@ AM_PATH_GTK(1.2.6,,
 dnl Check for built-in image view support
 AC_ARG_ENABLE(gdk-pixbuf,
        [  --disable-gdk-pixbuf    Do not use gdk-pixbuf],
-       [ac_cv_disable_gdk_pixbuf=disable], [ac_cv_disable_gdk_pixbuf=no])
+       [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes])
 AC_ARG_ENABLE(imlib,
        [  --disable-imlib         Do not use imlib],
-       [ac_cv_disable_imlib=disable], [ac_cv_disable_imlib=no])
+       [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes])
 
-if test "$ac_cv_disable_gdk_pixbuf" = no; then
+if test "$ac_cv_enable_gdk_pixbuf" = yes; then
        AM_PATH_GDK_PIXBUF(0.8.0,
-               AC_DEFINE(HAVE_GDK_PIXBUF), [ac_cv_disable_gdk_pixbuf=disable])
+               [AC_DEFINE(HAVE_GDK_PIXBUF)
+                ac_cv_enable_imlib=no], [ac_cv_enable_gdk_pixbuf=no])
 fi
-if test "$ac_cv_disable_gdk_pixbuf" = disable -a "$ac_cv_disable_imlib" = no; then
+if test "$ac_cv_enable_imlib" = yes; then
        AM_PATH_GDK_IMLIB(1.9,
-               AC_DEFINE(HAVE_GDK_IMLIB), [ac_cv_disable_imlib=disable])
+               AC_DEFINE(HAVE_GDK_IMLIB), [ac_cv_enable_imlib=no])
 fi
-if test "$ac_cv_disable_gdk_pixbuf" = disable -a "$ac_cv_disable_imlib" = disable; then
+if test "$ac_cv_enable_gdk_pixbuf" = no -a "$ac_cv_enable_imlib" = no; then
        AC_MSG_WARN(*** Built-in image view will not be supported ***)
 fi
 
@@ -86,33 +102,112 @@ dnl GPGME is used to support OpenPGP
 AC_ARG_ENABLE(gpgme,
        [  --enable-gpgme          Enable GnuPG support using GPGME [default=no]],
        [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
+AC_MSG_CHECKING([whether to use GPGME])
 if test $ac_cv_enable_gpgme = yes; then
-       AM_PATH_GPGME(0.2.1, AC_DEFINE(USE_GPGME), [use_gpgme=no])
+       AC_MSG_RESULT(yes)
+       AM_PATH_GPGME(0.2.1, AC_DEFINE(USE_GPGME), [use_gpgme=no
+                                                   ac_cv_enable_gpgme=no])
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl Check for OpenSSL
+AC_ARG_ENABLE(ssl,
+       [  --enable-ssl            Enable SSL support using OpenSSL [default=no]],
+       [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=no])
+AC_MSG_CHECKING([whether to use OpenSSL])
+if test $ac_cv_enable_ssl = yes; then
+       AC_MSG_RESULT(yes)
+       AC_MSG_CHECKING([if openssl is available])
+       LIBS="$LIBS -lssl -lcrypto"
+       AC_TRY_LINK([
+#include <openssl/opensslv.h>
+],     [ return OPENSSL_VERSION_NUMBER; ],
+       [ AC_MSG_RESULT(yes)
+         AC_DEFINE(USE_SSL) ],
+       [ AC_MSG_RESULT(no)
+         LIBS="$ac_save_LIBS"
+         ac_cv_enable_ssl=no ])
+else
+       AC_MSG_RESULT(no)
 fi
 
 dnl Check for X-Face support
 AC_ARG_ENABLE(compface,
        [  --disable-compface      Do not use compface (X-Face)],
-       [ac_cv_disable_compface=disable], [ac_cv_disable_compface=no])
-if test "$ac_cv_disable_compface" = no; then
-       AC_CHECK_LIB(compface, uncompface)
+       [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
+if test "$ac_cv_enable_compface" = yes; then
+       AC_CHECK_LIB(compface, uncompface,,[ac_cv_enable_compface=no])
+fi
+
+dnl for JPilot support in addressbook
+dnl no check for libraries; these are dynamically loaded
+AC_ARG_ENABLE(jpilot,
+       [  --enable-jpilot         Enable JPilot support [default=no]],
+       [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
+AC_MSG_CHECKING([whether to use JPilot])
+if test "$ac_cv_enable_jpilot" = yes; then
+       AC_MSG_RESULT(yes)
+       AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
+                        [ LIBS="$LIBS -lpisock"
+                          AC_DEFINE(USE_JPILOT) ],
+                        [ ac_cv_enable_jpilot=no ])
+       if test "$ac_cv_enable_jpilot" = no; then
+               AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
+                                [ LIBS="$LIBS -lpisock"
+                                  ac_cv_enable_jpilot=yes
+                                  AC_DEFINE(USE_JPILOT) ])
+       fi
+       AC_MSG_CHECKING([whether jpilot is available])
+       AC_MSG_RESULT($ac_cv_enable_jpilot)
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl for LDAP support in addressbook
+dnl no check for libraries; dynamically loaded
+AC_ARG_ENABLE(ldap,
+       [  --enable-ldap           Enable LDAP support [default=no]],
+       [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
+AC_MSG_CHECKING([whether to use LDAP])
+if test "$ac_cv_enable_ldap" = yes; then
+       AC_MSG_RESULT(yes)
+       AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
+                        [ LIBS="$LIBS -lldap -llber -lpthread -lresolv"
+                          AC_DEFINE(USE_LDAP) ],
+                        [ ac_cv_enable_ldap=no ])
+       AC_MSG_CHECKING([whether ldap is available])
+       AC_MSG_RESULT($ac_cv_enable_ldap)
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl get ispell path
+dnl
+AC_PATH_PROG(ispell_path, ispell, no)
+if test "$ispell_path" != no; then
+       AC_DEFINE_UNQUOTED(ISPELL_PATH, "$ispell_path")
+       AC_SUBST(ISPELL_PATH)
+else
+       AC_DEFINE_UNQUOTED(ISPELL_PATH, "/usr/bin/ispell")
+       AC_SUBST(ISPELL_PATH)
 fi
 
 dnl Check for libjconv
 AC_ARG_ENABLE(jconv,
        [  --disable-jconv         Do not use libjconv],
-       [ac_cv_disable_jconv=disable], [ac_cv_disable_jconv=no])
-if test "$ac_cv_disable_jconv" = no; then
-       AC_CHECK_LIB(jconv, jconv_alloc_conv)
+       [ac_cv_enable_jconv=$enableval], [ac_cv_enable_jconv=yes])
+if test "$ac_cv_enable_jconv" = yes; then
+       AC_CHECK_LIB(jconv, jconv_alloc_conv,,[ac_cv_enable_jconv=no])
 fi
 
 AC_CHECK_LIB(xpg4, setlocale)
 dnl AC_CHECK_LIB(kcc, KCC_filter)
 
-dnl for GThread support
-AC_ARG_ENABLE(threads,
-       [  --enable-threads        Enable multithread support [default=no]],
-       [use_threads=$enableval], [use_threads=no])
+dnl for GThread support (currently disabled)
+dnl AC_ARG_ENABLE(threads,
+dnl    [  --enable-threads        Enable multithread support [default=no]],
+dnl    [use_threads=$enableval], [use_threads=no])
 
 AC_MSG_CHECKING([whether to use threads])
 if test x"$use_threads" = xyes ; then
@@ -131,10 +226,12 @@ fi
 dnl check for IPv6 option
 AC_ARG_ENABLE(ipv6,
        [  --enable-ipv6           Enable IPv6 support [default=no]],
-       [ac_cv_enableipv6=$enableval], [ac_cv_enableipv6=no])
+       [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=no])
 
 dnl automated checks for IPv6 support.
-if test x"$ac_cv_enableipv6" = xyes; then
+AC_MSG_CHECKING([whether to use IPv6])
+if test x"$ac_cv_enable_ipv6" = xyes; then
+       AC_MSG_RESULT(yes)
        AC_MSG_CHECKING([for IPv6 support])
        AC_CACHE_VAL(ac_cv_ipv6,[
                AC_TRY_COMPILE([#define INET6
@@ -146,7 +243,25 @@ if test x"$ac_cv_enableipv6" = xyes; then
        AC_MSG_RESULT($ac_cv_ipv6)
        if test $ac_cv_ipv6 = yes; then
                AC_DEFINE(INET6)
+       else
+               AC_MSG_WARN(*** IPv6 will not be supported ***)
+               ac_cv_enable_ipv6=no
        fi
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl PSPELL is user for spell checking
+AC_ARG_ENABLE(pspell,
+       [  --enable-pspell           Enable pspell support [default=no]],
+       [ac_cv_enable_pspell=$enableval], [ac_cv_enable_pspell=no])
+AC_MSG_CHECKING([whether to use pspell])
+if test $ac_cv_enable_pspell = yes; then
+       AC_MSG_RESULT(yes)
+       AM_PATH_PSPELL(.12.2, AC_DEFINE(USE_PSPELL), [use_pspell=no
+                                                   ac_cv_enable_pspell=no])
+else
+       AC_MSG_RESULT(no)
 fi
 
 dnl check if gdk / gtk was compiled with USE_XIM
@@ -177,14 +292,22 @@ AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
                 sys/param.h sys/utsname.h \
                 wchar.h wctype.h)
 
-
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 AC_STRUCT_TM
-AC_CHECK_TYPE(wint_t, unsigned int)
+
+dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
+dnl may be defined only in wchar.h (this happens with gcc-2.96).
+dnl So we need to use this extended macro.
+SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
+[
+#if HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+])
 
 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
 AC_CHECK_SIZEOF(unsigned short, 2)
@@ -206,7 +329,29 @@ intl/Makefile
 ac/Makefile
 po/Makefile.in
 libkcc/Makefile
+src/version.h
 src/Makefile
 manual/Makefile
+manual/en/Makefile
 manual/ja/Makefile
+tools/Makefile
 ])
+
+dnl Output the configuration summary
+echo ""
+echo "$PACKAGE $VERSION"
+echo ""
+echo "gdk-pixbuf : $ac_cv_enable_gdk_pixbuf"
+echo "gdk_imlib  : $ac_cv_enable_imlib"
+echo "GPGME      : $ac_cv_enable_gpgme"
+echo "OpenSSL    : $ac_cv_enable_ssl"
+echo "JPilot     : $ac_cv_enable_jpilot"
+echo "LDAP       : $ac_cv_enable_ldap"
+echo "compface   : $ac_cv_enable_compface"
+echo "libjconv   : $ac_cv_enable_jconv"
+echo "IPv6       : $ac_cv_enable_ipv6"
+echo "Pspell     : $ac_cv_enable_pspell"
+echo ""
+echo "The binary will be installed in $prefix/bin"
+echo ""
+echo "Configure finished, type 'make' to build."