summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in11
-rw-r--r--source3/aclocal.m45
-rw-r--r--source3/configure.in25
3 files changed, 28 insertions, 13 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 95a4cee98f..7117281900 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -672,11 +672,11 @@ MAKEDIR = || exec false; \
# but since we also require "make install prefix=/opt/samba" *not* to
# rebuild it's a bit hard.
-dynconfig.o: dynconfig.c Makefile
+dynconfig.o: dynconfig.c Makefile modules_clean
@echo Compiling $*.c
@$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
-dynconfig.po: dynconfig.c Makefile
+dynconfig.po: dynconfig.c Makefile modules_clean
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAG@
@@ -987,7 +987,7 @@ bin/mysql.@SHLIBEXT@: $(MYSQL_OBJ)
bin/ldapsam.@SHLIBEXT@: passdb/pdb_ldap.o
@echo "Building plugin $@"
- @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_ldap.o \
+ @$(SHLD) $(LDSHFLAGS) -o $@ @LDAP_LIBS@ passdb/pdb_ldap.o \
@SONAMEFLAG@`basename $@`
bin/tdbsam.@SHLIBEXT@: passdb/pdb_tdb.o
@@ -1188,6 +1188,11 @@ clean: delheaders python_clean
-rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) .headers.stamp
+# This is quite ugly actually.. But we need to make
+# sure the changes to include/config.h are used.
+modules_clean:
+ @-rm -f @MODULES_CLEAN@ auth/auth.o passdb/pdb_interface.o rpc_server/srv_pipe_hnd.o lib/iconv.o
+
# Making this target will just make sure that the prototype files
# exist, not necessarily that they are up to date. Since they're
# removed by "make clean" this will always be run when you do anything
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index 744acf6a1b..f470e2e8b0 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -37,7 +37,7 @@ fi
])
dnl Mark specified module as shared
-dnl SMB_MODULE(name,static_files,shared_files,subsystem)
+dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared)
AC_DEFUN(SMB_MODULE,
[
AC_MSG_CHECKING([how to build $1])
@@ -53,15 +53,18 @@ AC_DEFUN(SMB_MODULE,
AC_DEFINE([$1][_init], [init_module], [Whether to build $1 as shared module])
$4_MODULES="$$4_MODULES $3"
AC_MSG_RESULT([shared])
+ [$6]
elif test x"$DEST" = xSTATIC; then
[init_static_modules_]translit([$4], [A-Z], [a-z])="$[init_static_modules_]translit([$4], [A-Z], [a-z]) $1_init();"
string_static_modules="$string_static_modules $1"
$4_STATIC="$$4_STATIC $2"
AC_SUBST($4_STATIC)
+ [$5]
AC_MSG_RESULT([static])
else
AC_MSG_RESULT([not])
fi
+ MODULES_CLEAN="$MODULES_CLEAN $2 $3"
])
AC_DEFUN(SMB_SUBSYSTEM,
diff --git a/source3/configure.in b/source3/configure.in
index 1c046e81a9..733037b977 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2241,12 +2241,12 @@ if test x"$with_ldap_support" = x"yes"; then
##################################################################
# we might need the lber lib on some systems. To avoid link errors
# this test must be before the libldap test
- AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"])
+ AC_CHECK_LIB(lber, ber_scanf, [LDAP_LIBS="$LIBS -llber"])
########################################################
# 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";
+ AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LDAP_LIBS="$LIBS -lldap";
AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])])
AC_CHECK_HEADERS([ldap.h lber.h], [default_modules="$default_modules pdb_ldap"])
@@ -2260,19 +2260,21 @@ if test x"$with_ldap_support" = x"yes"; then
#include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ])
AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc, [Number of arguments to ldap_set_rebind_proc])
fi
+
+ if test x"$with_ads_support" = x"yes"; then
+ LIBS="$LIBS $LDAP_LIBS"
+ fi
fi
+AC_SUBST(LDAP_LIBS)
+
########################################################
# Compile with MySQL support?
AM_PATH_MYSQL([0.11.0],[default_modules="$default_modules pdb_mysql"],[])
-CFLAGS="$CFLAGS $MYSQL_CFLAGS"
-LIBS="$LIBS $MYSQL_LIBS"
########################################################
# Compile with XML support?
AM_PATH_XML2([2.0.0],[default_modules="$default_modules pdb_xml"],[])
-CFLAGS="$CFLAGS $XML_CFLAGS"
-LIBS="$LIBS $XML_LIBS"
#################################################
# check for automount support
@@ -3349,9 +3351,12 @@ AC_ARG_WITH(shared-modules,
done
fi ])
-SMB_MODULE(pdb_xml, modules/xml.o, bin/xml.so, PDB)
-SMB_MODULE(pdb_mysql, modules/mysql.o, bin/mysql.so, PDB)
-SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o, bin/ldapsam.so, PDB)
+SMB_MODULE(pdb_xml, modules/xml.o, bin/xml.so, PDB,
+ [ CFLAGS="$CFLAGS $XML_CFLAGS"; LIBS="$LIBS $XML_LIBS" ] )
+SMB_MODULE(pdb_mysql, modules/mysql.o, bin/mysql.so, PDB,
+ [ CFLAGS="$CFLAGS $MYSQL_CFLAGS"; LIBS="$LIBS $MYSQL_LIBS" ] )
+SMB_MODULE(pdb_ldap, passdb/pdb_ldap.o, bin/ldapsam.so, PDB,
+ [ LIBS="$LIBS $LDAP_LIBS" ] )
SMB_MODULE(pdb_smbpasswd, passdb/pdb_smbpasswd.o, bin/smbpasswd.so, PDB)
SMB_MODULE(pdb_tdbsam, passdb/pdb_tdb.o, bin/tdbsam.so, PDB)
SMB_MODULE(pdb_nisplussam, passdb/pdb_nisplus.o, bin/nisplussam.so, PDB)
@@ -3390,6 +3395,8 @@ SMB_SUBSYSTEM(VFS)
AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])
+AC_SUBST(MODULES_CLEAN)
+
#################################################
# do extra things if we are running insure