]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Update acl/ldap defines part 2
[netatalk.git] / configure.in
index 47417f4546a11bbffed2da26f4ada9fb9db8b2a0..f7c8a4c428fa7c0d8641d6ffdd6a1a8521f4b0de 100644 (file)
@@ -984,21 +984,24 @@ AC_ARG_WITH(ldap,
       *)
           with_ldap=auto
           ;;
-      esac ],
-    [with_ldap=auto])
+      esac ])
 AC_MSG_RESULT($with_ldap)
-if test x"$with_ldap" = x"no"; then
-       AC_MSG_RESULT(Disabling LDAP support)
-else
-    with_ldap=yes
-    AC_MSG_NOTICE([Checking for LDAP header and library])
-       AC_CHECK_HEADER([ldap.h],,
-        [AC_MSG_ERROR([LDAP client headers not found.])
-                   with_ldap=no])
-       AC_CHECK_LIB(ldap, ldap_init,, 
-        [AC_MSG_ERROR([LDAP client libs not found.])
-                   with_ldap=no])
+
+if test x"$with_ldap" != x"no" ; then
+       AC_CHECK_HEADER([ldap.h], with_ldap=yes,
+        [ if test x"$with_ldap" = x"yes" ; then
+            AC_MSG_ERROR([Missing LDAP headers])
+        fi
+               with_ldap=no
+        ])
+       AC_CHECK_LIB(ldap, ldap_init, with_ldap=yes,
+        [ if test x"$with_ldap" = x"yes" ; then
+            AC_MSG_ERROR([Missing LDAP library])
+        fi
+               with_ldap=no
+        ])
 fi
+
 if test x"$with_ldap" = x"yes"; then
        AC_DEFINE(HAVE_LDAP,1,[Whether LDAP is available])
 fi