--- /home/work/curl-7.19.6/CMakeLists.txt	2009-10-15 14:05:31.000000000 +0300
+++ CMakeLists.txt	2009-10-15 14:11:04.000000000 +0300
@@ -138,6 +138,7 @@
 if(HTTP_ONLY)
   set(CURL_DISABLE_FTP ON)
   set(CURL_DISABLE_LDAP ON)
+  set(CURL_DISABLE_LDAPS ON)
   set(CURL_DISABLE_TELNET ON)
   set(CURL_DISABLE_DICT ON)
   set(CURL_DISABLE_FILE ON)
@@ -261,10 +262,11 @@
 check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
 
 # Check for LDAP
-check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
-# if(NOT HAVE_LIBLDAP)
-# SET(CURL_DISABLE_LDAP ON)
-# endif(NOT HAVE_LIBLDAP)
+if (NOT CURL_DISABLE_LDAP)
+    check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
+else ()
+    SET (HAVE_LIBLDAP )
+endif ()
 
 # Check for symbol dlopen (same as HAVE_LIBDL)
 check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)

