added SSL support for POP using OpenSSL
[claws.git] / configure.in
index 7d4b581a481431a036825a494f6a73dfeb1f64c1..4ee9aebcab4d9f7ccd63aab8755ac94afc344aa1 100644 (file)
@@ -4,11 +4,11 @@ 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=5
+MICRO_VERSION=0
+INTERFACE_AGE=0
+BINARY_AGE=0
+EXTRA_VERSION=claws
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
@@ -16,6 +16,14 @@ AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
 AC_DEFINE_UNQUOTED(VERSION, "$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 libtool versioning
 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
@@ -42,6 +50,8 @@ 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)
 
@@ -87,9 +97,32 @@ AC_ARG_ENABLE(gpgme,
        [  --enable-gpgme          Enable GnuPG support using GPGME [default=no]],
        [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
 if test $ac_cv_enable_gpgme = yes; then
-       AM_PATH_GPGME(0.1.4, AC_DEFINE(USE_GPGME), [use_gpgme=no])
+       AM_PATH_GPGME(0.2.1, AC_DEFINE(USE_GPGME), [use_gpgme=no])
 fi
 
+dnl Use OpenSSL for SSL connections 
+AC_MSG_CHECKING([whether to use ssl])
+AC_ARG_ENABLE(ssl,
+       [  --enable-ssl            Enable SSL support using OpenSSL [default=no]],
+       [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=no])
+if test $ac_cv_enable_ssl = yes; then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+fi
+
+if test $ac_cv_enable_ssl = yes; then
+       AC_MSG_CHECKING([whether to openssl is available])
+       LIBS="$LIBS -lssl"
+       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" ])
+fi
+         
 dnl Check for X-Face support
 AC_ARG_ENABLE(compface,
        [  --disable-compface      Do not use compface (X-Face)],
@@ -98,6 +131,34 @@ if test "$ac_cv_disable_compface" = no; then
        AC_CHECK_LIB(compface, uncompface)
 fi
 
+dnl for JPilot support in addressbook
+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)
+       LIBS="$LIBS -lpisock"
+       AC_DEFINE(USE_JPILOT)
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl for LDAP support in addressbook
+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)
+       LIBS="$LIBS -lldap -llber -lpthread -lresolv"
+       AC_DEFINE(USE_LDAP)
+else
+       AC_MSG_RESULT(no)
+fi
+
 dnl Check for libjconv
 AC_ARG_ENABLE(jconv,
        [  --disable-jconv         Do not use libjconv],
@@ -110,9 +171,9 @@ 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 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
@@ -173,7 +234,8 @@ dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h sys/param.h \
+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.
@@ -182,13 +244,22 @@ AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 AC_STRUCT_TM
-sv_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 && HAVE_WCTYPE_H)
+#if HAVE_WCHAR_H
 #include <wchar.h>
 #endif
 ])
 
+GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
+AC_CHECK_SIZEOF(unsigned short, 2)
+AC_CHECK_SIZEOF(unsigned int, 4)
+AC_CHECK_SIZEOF(unsigned long, 4)
+
 dnl Checks for library functions.
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr \