[Commits] configure.ac 1.20 1.21

miras at claws-mail.org miras at claws-mail.org
Mon Nov 14 23:06:45 CET 2011


Update of /home/claws-mail/contacts
In directory claws-mail:/tmp/cvs-serv18563

Modified Files:
	configure.ac 
Log Message:
Lots of bug fixes and read-only support for LDAP. No searching implemented though

Index: configure.ac
===================================================================
RCS file: /home/claws-mail/contacts/configure.ac,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- configure.ac	4 Oct 2011 20:21:40 -0000	1.20
+++ configure.ac	14 Nov 2011 22:06:43 -0000	1.21
@@ -57,9 +57,9 @@
 AC_SUBST(PLUGINDIR)
 AC_SUBST(BINDIR)
 
-GLIB_REQUIRED=2.10.0
-GOBJECT_REQUIRED=2.10.0
-GTK_REQUIRED=2.12.0
+GLIB_REQUIRED=2.16.0
+GOBJECT_REQUIRED=2.16.0
+GTK_REQUIRED=2.16.0
 
 AC_SUBST(GLIB_REQUIRED)
 AC_SUBST(GOBJECT_REQUIRED)
@@ -89,7 +89,6 @@
 AC_SUBST(LIBXML_CFLAGS)
 AC_SUBST(LIBXML_LIBS)
 
-
 # Checks for header files.
 AC_CHECK_HEADER(gcrypt.h,
 		[AC_CHECK_LIB(gcrypt, gcry_control,,
@@ -99,10 +98,13 @@
 		[AC_MSG_ERROR([libgcrypt not found.
 			       Get latest version here:
 			       http://www.gnupg.org/download])])
-if test x"$ac_cv_lib_gcry_control" = "xyes"; then
-    GCRYPT_LIBS="-lgcrypt"
-    AC_SUBST(GCRYPT_LIBS)
-fi
+AM_PATH_LIBGCRYPT(1.1.43,,
+    AC_MSG_ERROR([[
+***
+*** libgcrypt was not found. You may want to get it from
+*** ftp://ftp.gnupg.org/pub/gcrypt/alpha/libgcrypt/
+***
+]]))
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -175,7 +177,44 @@
 	[ac_cv_enable_ldap_plugin=$enableval], [ac_cv_enable_ldap_plugin=no])
 if test x"$ac_cv_enable_ldap_plugin" = xyes; then
 	AC_MSG_RESULT(yes)
-	PLUGINS="ldap $PLUGINS"
+	AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
+	AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
+	AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
+	AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
+				 $LDAP_LIBS)
+	
+	AC_CHECK_HEADERS(ldap.h lber.h,
+					 [ ac_cv_enable_ldap=yes ],
+					 [ ac_cv_enable_ldap=no ])
+	
+	if test "$ac_cv_enable_ldap" = yes; then
+			AC_CHECK_LIB(ldap, ldap_open,
+						 [ ac_cv_enable_ldap=yes ],
+						 [ ac_cv_enable_ldap=no ],
+						 $LDAP_LIBS)
+	
+			AC_CHECK_LIB(ldap, ldap_start_tls_s,
+						 [ ac_cv_have_tls=yes ],
+						 [ ac_cv_have_tls=no ])
+	fi
+	
+	if test "$ac_cv_enable_ldap" = yes; then
+		LDAP_LIBS="$LDAP_LIBS -lldap"
+		PLUGINS="ldap $PLUGINS"
+	else
+		AC_MSG_ERROR([Open LDAP is required. See http://www.openldap.org/])
+	fi
+	
+	if test "$ac_cv_have_tls" = yes; then
+		AC_MSG_CHECKING([Whether GNUTLS is present])
+		PKG_CHECK_MODULES([GNUTLS], gnutls, 
+						  AC_DEFINE(LDAP_TLS, [],
+						  [Is GNUTLS present on the system]))
+		AC_SUBST(GNUTLS_LIBS)
+		AC_SUBST(GNUTLS_CFLAGS)
+	fi
+	
+	AC_SUBST(LDAP_LIBS)
 else
 	AC_MSG_RESULT(no)
 fi



More information about the Commits mailing list