2008-05-16 [paul] 3.4.0cvs46
[claws.git] / configure.ac
index ecca649a0873c0f53be172af63ec8a520fe6908d..40c01a62c85295e9f712c6d17ba1637c6ea1064a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=2
+EXTRA_VERSION=46
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -482,6 +482,15 @@ dnl check if GDB is somewhere
        AC_MSG_RESULT($ac_cv_enable_crash_dialog)
 fi
 
+dnl generic umpc
+AC_ARG_ENABLE(generic-umpc,
+       [  --enable-generic-umpc   Enable generic UMPC code [default=no]],
+       [ac_cv_enable_generic_umpc=$enableval], [ac_cv_enable_generic_umpc=no])
+if test $ac_cv_enable_generic_umpc = yes; then
+       AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
+       AC_MSG_RESULT($ac_cv_enable_generic_umpc)
+fi
+
 dnl Maemo platform
 AC_ARG_ENABLE(maemo,
        [  --enable-maemo   build for the Maemo platform [default=no]],
@@ -502,11 +511,16 @@ if test $ac_cv_enable_maemo = yes; then
                else
                        AC_DEFINE(MAEMO, 1, Build for maemo)
                        AC_DEFINE(CHINOOK, 1, Maemo chinook)
+                       AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
+                       ac_cv_enable_generic_umpc=yes
                fi
        else
                AC_DEFINE(MAEMO, 1, Build for maemo)
+               AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
+               ac_cv_enable_generic_umpc=yes
        fi
 fi
+
 PKG_CHECK_MODULES(CONIC, conic, ac_cv_enable_conic=yes,
          ac_cv_enable_conic=no)
 AC_SUBST(CONIC_CFLAGS)
@@ -646,6 +660,29 @@ else
                if test "$ac_cv_have_tls" = yes; then
                        AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
                fi
+               dnl As of OpenLDAP API version 3000 a number of functions has
+               dnl been deprecated. As Claws-mail compiles and runs on many
+               dnl platforms and many versions of OpenLDAP we need to be able
+               dnl to switch between the old and new API because new API has
+               dnl added new functions replacing old ones and at the same time
+               dnl old functions has been changed.
+               dnl If cross-compiling defaults to enable deprecated features
+               dnl for maximum portability
+               AC_MSG_CHECKING([The API version of OpenLDAP])
+               AC_RUN_IFELSE(
+                       [AC_LANG_PROGRAM(
+                        [#include <ldap.h>],
+                        [if (LDAP_API_VERSION >= 3000)
+                                       return 1
+                       ])],
+                       [AC_MSG_RESULT([version < 3000])
+                        AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
+                       [AC_MSG_RESULT([version >= 3000])
+                        AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
+                       [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
+                        AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
+                        AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
+               )
        fi
 fi
 
@@ -1033,6 +1070,7 @@ echo "LibSM             : $ac_cv_enable_libsm"
 echo "NetworkManager    : $enable_networkmanager_support"
 echo "Manual            : $ac_cv_enable_manual"
 echo "Plugins           : $PLUGINS"
+echo "Generic UMPC code : $ac_cv_enable_generic_umpc"
 echo "Maemo  build      : $ac_cv_enable_maemo"
 echo "Config dir        : $ac_cv_with_config_dir"
 echo ""