[PATCH] Fix build error on systems without LDAP
Anthony Liguori
anthony at codemonkey.ws
Sun Apr 6 00:16:24 GMT 2003
Sorry for breaking this with my previous Winbind patch... Didn't realize
mkproto ran with non-preprocessed source files.
Regards,
Anthony
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /cvsroot/samba/source/Makefile.in,v
retrieving revision 1.672
diff -u -r1.672 Makefile.in
--- Makefile.in 4 Apr 2003 03:09:42 -0000 1.672
+++ Makefile.in 6 Apr 2003 00:12:58 -0000
@@ -199,6 +199,8 @@
LIBADS_SERVER_OBJ = libads/util.o libads/kerberos_verify.o
+LDAP_OBJ = @USE_LDAP@ lib/ldap.o
+
SECRETS_OBJ = passdb/secrets.o
LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
@@ -275,7 +277,7 @@
PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
passdb/machine_sid.o passdb/util_sam_sid.o passdb/pdb_compat.o \
- passdb/privileges.o lib/ldap.o @PDB_STATIC@
+ passdb/privileges.o $(LDAP_OBJ) @PDB_STATIC@
XML_OBJ = modules/xml.o
MYSQL_OBJ = modules/mysql.o
@@ -599,7 +601,7 @@
$(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \
$(PROFILE_OBJ) $(UNIGRP_OBJ) $(IDMAP_OBJ) \
$(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
- lib/ldap.o
+ $(LDAP_OBJ)
WBINFO_OBJ = nsswitch/wbinfo.o libsmb/smbencrypt.o libsmb/smbdes.o $(POPT_LIB_OBJ)
Index: configure.in
===================================================================
RCS file: /cvsroot/samba/source/configure.in,v
retrieving revision 1.456
diff -u -r1.456 configure.in
--- configure.in 4 Apr 2003 23:31:09 -0000 1.456
+++ configure.in 6 Apr 2003 00:13:00 -0000
@@ -162,6 +162,7 @@
AC_SUBST(EXTRA_BIN_PROGS)
AC_SUBST(EXTRA_SBIN_PROGS)
AC_SUBST(EXTRA_ALL_TARGETS)
+AC_SUBST(USE_LDAP)
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on compiler debugging information (default=no)],
@@ -2246,6 +2247,7 @@
########################################################
# Compile with LDAP support?
+USE_LDAP="#"
with_ldap_support=yes
AC_MSG_CHECKING([whether to use LDAP])
@@ -2272,6 +2274,7 @@
# now see if we can find the ldap libs in standard paths
if test x$have_ldap != xyes; then
AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
+ USE_LDAP=""
AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])])
AC_CHECK_HEADERS([ldap.h lber.h], [default_static_modules="$default_static_modules pdb_ldap"])
More information about the samba-technical
mailing list