summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-28 01:55:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:08 -0500
commitbc141c795767cc765731c607f1fb047811da6e03 (patch)
treeecfc5163d2e58a679240fded98b9d08ab6134328
parent4818967242c7f502661193428f6217e8caa43e20 (diff)
downloadsamba-bc141c795767cc765731c607f1fb047811da6e03.tar.gz
samba-bc141c795767cc765731c607f1fb047811da6e03.tar.bz2
samba-bc141c795767cc765731c607f1fb047811da6e03.zip
r15304: Fix smbd build, more updates on getting --enable-dso to build again
(This used to be commit 3ef9326386ba1c210166302cbcf02d2ed3f19944)
-rw-r--r--source4/auth/config.mk11
-rw-r--r--source4/auth/credentials/config.mk2
-rw-r--r--source4/auth/gensec/config.mk2
-rw-r--r--source4/build/m4/rewrite.m44
-rw-r--r--source4/build/smb_build/TODO4
-rw-r--r--source4/build/smb_build/header.pm2
-rw-r--r--source4/build/smb_build/input.pm7
-rw-r--r--source4/build/smb_build/main.pl12
-rw-r--r--source4/build/smb_build/makefile.pm1
-rw-r--r--source4/build/smb_build/output.pm6
-rw-r--r--source4/librpc/config.mk6
-rw-r--r--source4/smb_server/config.mk12
-rw-r--r--source4/smb_server/smb/negprot.c1
-rw-r--r--source4/smb_server/smb/receive.c1
-rw-r--r--source4/smb_server/smb/request.c1
-rw-r--r--source4/smb_server/smb2/keepalive.c1
-rw-r--r--source4/smb_server/smb2/negprot.c1
-rw-r--r--source4/smb_server/smb2/receive.c1
-rw-r--r--source4/smb_server/smb2/sesssetup.c1
-rw-r--r--source4/smb_server/smb2/tcon.c1
-rw-r--r--source4/smb_server/smb_server.c1
21 files changed, 40 insertions, 38 deletions
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index 7e2a0ea2cc..018bc61ecc 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -6,11 +6,8 @@ include credentials/config.mk
[SUBSYSTEM::auth_sam]
PRIVATE_PROTO_HEADER = auth_sam.h
-OBJ_FILES = \
- sam.o \
- auth_sam_reply.o
-PUBLIC_DEPENDENCIES = \
- SAMDB
+OBJ_FILES = sam.o auth_sam_reply.o
+PUBLIC_DEPENDENCIES = SAMDB
#######################
# Start MODULE auth_sam
@@ -39,9 +36,7 @@ OBJ_FILES = auth_anonymous.o
INIT_FUNCTION = auth_winbind_init
SUBSYSTEM = auth
OBJ_FILES = auth_winbind.o
-PUBLIC_DEPENDENCIES = \
- LIBWINBIND-CLIENT \
- NDR_NETLOGON LIBNDR
+PUBLIC_DEPENDENCIES = LIBWINBIND-CLIENT NDR_NETLOGON LIBNDR
# End MODULE auth_winbind
#######################
diff --git a/source4/auth/credentials/config.mk b/source4/auth/credentials/config.mk
index 1f6a07ae01..8df9e26c7b 100644
--- a/source4/auth/credentials/config.mk
+++ b/source4/auth/credentials/config.mk
@@ -8,7 +8,7 @@ OBJ_FILES = credentials.o \
credentials_krb5.o \
credentials_ntlm.o
PUBLIC_DEPENDENCIES = \
- HEIMDAL LIBCLI_AUTH SECRETS
+ LIBCLI_AUTH SECRETS LIBCRYPTO HEIMDAL_GSSAPI
# End SUBSYSTEM CREDENTIALS
#################################
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index 2aad8eb4b1..3906c93065 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -8,7 +8,7 @@ PUBLIC_HEADERS = gensec.h spnego.h
PUBLIC_PROTO_HEADER = gensec_proto.h
OBJ_FILES = gensec.o
PUBLIC_DEPENDENCIES = \
- CREDENTIALS LIBSAMBA-UTIL
+ CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO
# End SUBSYSTEM gensec
#################################
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 2002bae353..deac542e2b 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -1,11 +1,10 @@
dnl Checks for programs.
dnl Unique-to-Samba variables we'll be playing with.
-DYNEXP=
-
AC_SUBST(SHLIBEXT)
AC_SUBST(LDSHFLAGS)
AC_SUBST(SONAMEFLAG)
+AC_SUBST(DYNEXP)
AC_SUBST(PICFLAG)
AC_SYS_LARGEFILE
@@ -103,6 +102,7 @@ AC_SUBST(BLDSHARED)
BLDSHARED="false"
# these are the defaults, good for lots of systems
+DYNEXP=
HOST_OS="$host_os"
LDSHFLAGS="-shared"
SONAMEFLAG=""
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO
index c21c3b8082..cc15e9099a 100644
--- a/source4/build/smb_build/TODO
+++ b/source4/build/smb_build/TODO
@@ -1,8 +1,8 @@
+- replace StrnCpy() with strlcpy()
+- Add --export-dynamic for each subsystem that has modules
- let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them
- include extra_flags.txt using Makefile construction if
supported by current make
-- change default subsystem/library build type to STATIC_LIBRARY
- - fix order of UNIQUE_DEPENDENCIES
- make --enable-dso the default
- fix module loading for selftest during non-developer builds
- clearer distinction between dcerpc and ndr. seperate interface tables?
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
index b2a71969af..7a0e40fda5 100644
--- a/source4/build/smb_build/header.pm
+++ b/source4/build/smb_build/header.pm
@@ -27,7 +27,7 @@ sub _prepare_build_h($)
my @defines = ();
my $output = "";
- foreach my $key (values %{$depend}) {
+ foreach my $key (values %$depend) {
my $DEFINE = ();
next if ($key->{TYPE} ne "LIBRARY" and
$key->{TYPE} ne "MODULE" and
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 3084381661..8f7e5e4838 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -71,8 +71,6 @@ sub check_module($$$)
if ($mod->{OUTPUT_TYPE} eq "SHARED_LIBRARY") {
$mod->{INSTALLDIR} = "MODULESDIR/$mod->{SUBSYSTEM}";
- push (@{$mod->{PRIVATE_DEPENDENCIES}}, $mod->{SUBSYSTEM}) unless
- $INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "BINARY";
} else {
push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
}
@@ -114,7 +112,6 @@ sub check_binary($$)
$bin->{OUTPUT_TYPE} = "BINARY";
}
-
sub import_integrated($$)
{
my ($lib, $depend) = @_;
@@ -200,6 +197,7 @@ sub check($$$$$)
foreach my $k (keys %$INPUT) {
my $part = $INPUT->{$k};
+ $part->{LINK_FLAGS} = [];
$part->{FULL_OBJ_LIST} = ["\$($part->{TYPE}_$part->{NAME}_OBJ_LIST)"];
check_subsystem($INPUT, $part, $subsys_ot) if ($part->{TYPE} eq "SUBSYSTEM");
@@ -209,6 +207,9 @@ sub check($$$$$)
}
foreach my $part (values %$INPUT) {
+ if (defined($part->{INIT_FUNCTIONS})) {
+ push (@{$part->{LINK_FLAGS}}, "\$(DYNEXP)");
+ }
import_integrated($part, $INPUT);
}
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 61c9214086..d89be4bebf 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -19,14 +19,6 @@ use strict;
my $INPUT = {};
my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
-my $subsystem_output_type;
-
-if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) {
- $subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE};
-} else {
- $subsystem_output_type = "STATIC_LIBRARY";
-}
-
my $library_output_type;
if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) {
$library_output_type = $ENV{LIBRARY_OUTPUT_TYPE};
@@ -46,9 +38,9 @@ if (defined($ENV{"MODULE_OUTPUT_TYPE"})) {
}
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
- $subsystem_output_type, $library_output_type, $module_output_type);
+ "STATIC_LIBRARY", $library_output_type, $module_output_type);
my $OUTPUT = output::create_output($DEPEND, \%config::config);
-$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsystem_output_type;
+$config::config{SUBSYSTEM_OUTPUT_TYPE} = "STATIC_LIBRARY";
$config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type;
$config::config{MODULE_OUTPUT_TYPE} = $module_output_type;
my $mkenv = new smb_build::makefile(\%config::config, $mkfile);
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 3f0f29f208..bf12de628f 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -144,6 +144,7 @@ STLD_FLAGS=-rc
SHLD=$self->{config}->{CC}
SHLD_FLAGS=$self->{config}->{LDSHFLAGS} $self->{config}->{LDFLAGS} -L\$(builddir)/bin
SHLIBEXT=$self->{config}->{SHLIBEXT}
+DYNEXP=$self->{config}->{DYNEXP}
XSLTPROC=$self->{config}->{XSLTPROC}
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 0f66ef91fe..85c78cf3b4 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -33,7 +33,7 @@ sub generate_shared_library($)
my $lib_name;
$lib->{DEPEND_LIST} = [];
- $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"];
+ push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
$link_name = lc($lib->{NAME});
$lib_name = $link_name;
@@ -83,7 +83,7 @@ sub generate_static_library($)
$link_name =~ s/^LIB//;
$lib->{LIBRARY_NAME} = "lib".lc($link_name).".a";
- $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"];
+ push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
$lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}";
$lib->{OUTPUT} = "-l".lc($link_name);
@@ -94,7 +94,7 @@ sub generate_binary($)
my $bin = shift;
$bin->{DEPEND_LIST} = [];
- $bin->{LINK_FLAGS} = ["\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)"];
+ push(@{$bin->{LINK_FLAGS}}, "\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
$bin->{RELEASEDIR} = "bin/install";
$bin->{DEBUGDIR} = "bin/";
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 750c6572a4..51057b5a0a 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -294,7 +294,7 @@ VERSION = 0.0.1
SO_VERSION = 0
OBJ_FILES = gen_ndr/ndr_netlogon.o
PUBLIC_HEADERS = gen_ndr/netlogon.h
-PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA
+PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA NDR_SECURITY
[LIBRARY::NDR_TRKWKS]
VERSION = 0.0.1
@@ -605,11 +605,11 @@ OBJ_FILES = \
rpc/dcerpc_sock.o \
rpc/dcerpc_connect.o
PUBLIC_DEPENDENCIES = \
- SOCKET LIBSMB \
+ SOCKET LIBSMB LIBCLI_SMB2 \
LIBNDR NDR_DCERPC \
RPC_NDR_EPMAPPER \
NDR_SCHANNEL RPC_NDR_NETLOGON \
- gensec
+ gensec LIBCLI_AUTH
# End SUBSYSTEM dcerpc
################################################
diff --git a/source4/smb_server/config.mk b/source4/smb_server/config.mk
index 8e3d469e49..6130d7ce9f 100644
--- a/source4/smb_server/config.mk
+++ b/source4/smb_server/config.mk
@@ -1,12 +1,16 @@
# SMB server subsystem
+#
+[MODULE::SERVICE_SMB]
+INIT_FUNCTION = server_service_smb_init
+SUBSYSTEM = service
+OBJ_FILES = smb_server.o
+PRIVATE_PROTO_HEADER = service_smb_proto.h
+PRIVATE_DEPENDENCIES = SMB_SERVER
#######################
# Start SUBSYSTEM SMB
-[MODULE::SMB_SERVER]
-INIT_FUNCTION = server_service_smb_init
-SUBSYSTEM = service
+[SUBSYSTEM::SMB_SERVER]
OBJ_FILES = \
- smb_server.o \
tcon.o \
session.o \
management.o
diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c
index 4a14ccb5d8..5f1e75447b 100644
--- a/source4/smb_server/smb/negprot.c
+++ b/source4/smb_server/smb/negprot.c
@@ -23,6 +23,7 @@
#include "smb_server/smb_server.h"
#include "libcli/smb2/smb2.h"
#include "smb_server/smb2/smb2_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smbd/service_stream.h"
#include "lib/stream/packet.h"
diff --git a/source4/smb_server/smb/receive.c b/source4/smb_server/smb/receive.c
index aff5e88285..ee728e0ec5 100644
--- a/source4/smb_server/smb/receive.c
+++ b/source4/smb_server/smb/receive.c
@@ -24,6 +24,7 @@
#include "system/time.h"
#include "smbd/service_stream.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "ntvfs/ntvfs.h"
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index 3c5b8c10c7..21f89f40f9 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smbd/service_stream.h"
#include "lib/stream/packet.h"
#include "ntvfs/ntvfs.h"
diff --git a/source4/smb_server/smb2/keepalive.c b/source4/smb_server/smb2/keepalive.c
index 65d21babd9..ca8983d5e2 100644
--- a/source4/smb_server/smb2/keepalive.c
+++ b/source4/smb_server/smb2/keepalive.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/smb2/smb2.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smb_server/smb2/smb2_server.h"
static NTSTATUS smb2srv_keepalive_backend(struct smb2srv_request *req)
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index 6aab25427f..351c9e718f 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -24,6 +24,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smb_server/smb2/smb2_server.h"
#include "smbd/service_stream.h"
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c
index 46923988bb..e27e622a4a 100644
--- a/source4/smb_server/smb2/receive.c
+++ b/source4/smb_server/smb2/receive.c
@@ -24,6 +24,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smb_server/smb2/smb2_server.h"
#include "lib/stream/packet.h"
diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c
index b263196165..6d94d43155 100644
--- a/source4/smb_server/smb2/sesssetup.c
+++ b/source4/smb_server/smb2/sesssetup.c
@@ -24,6 +24,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smb_server/smb2/smb2_server.h"
#include "smbd/service_stream.h"
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index 836c13a019..8d6c002d50 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -22,6 +22,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "smb_server/smb2/smb2_server.h"
static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, struct smb2_tree_connect *io)
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 927609226b..ef8967f0b2 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -24,6 +24,7 @@
#include "smbd/service_stream.h"
#include "smbd/service.h"
#include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
#include "lib/messaging/irpc.h"
#include "lib/stream/packet.h"
#include "libcli/smb2/smb2.h"