r18893: Attempt to fix the Solaris build
authorVolker Lendecke <vlendec@samba.org>
Mon, 25 Sep 2006 05:35:51 +0000 (05:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:14:43 +0000 (12:14 -0500)
source/configure.in

index d88d491b8661ec21f977b784be6af608cf4a45f9..0808729fa3230bbfe65a21601c3c5e277c3d5ccc 100644 (file)
@@ -3106,6 +3106,7 @@ if test x"$with_ldap_support" != x"no"; then
   AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $smb_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc])
 
   AC_CHECK_FUNC_EXT(ldap_dn2ad_canonical,$LDAP_LIBS)   
+  AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
   
   if test x"$ac_cv_lib_ext_ldap_ldap_init" = x"yes"; then
     AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])
@@ -3114,7 +3115,11 @@ if test x"$with_ldap_support" != x"no"; then
     default_shared_modules="$default_shared_modules";
     SMBLDAP="lib/smbldap.o"
     SMBLDAPUTIL="lib/smbldap_util.o"
-    LDBLDAP="lib/ldb/ldb_ldap/ldb_ldap.o"
+    if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
+      AC_MSG_WARN(Disabling ldb_ldap support (requires ldap_initialize))
+    else
+      LDBLDAP="lib/ldb/ldb_ldap/ldb_ldap.o"
+    fi
     with_ldap_support=yes
     AC_MSG_CHECKING(whether LDAP support is used)
     AC_MSG_RESULT(yes)