+### Look for existing libraries.
+# This is a bit strange this library is compiled the first time.
+echo $ac_n "checking for libldap""... $ac_c" 1>&6
+echo "configure:1034: checking for libldap" >&5
+if eval "test \"`echo '$''{'have_ldap'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1039 "configure"
+#include "confdefs.h"
+ldap.h
+int main() {
+open_ldap_connection()
+; return 0; }
+EOF
+if { (eval echo configure:1046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ have_ldap=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ have_ldap=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$have_ldap" 1>&6
+if test $have_ldap = yes; then
+ LDAP=ldap
+fi
+
+