summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/rewrite.m44
-rw-r--r--source4/build/smb_build/input.pm13
-rw-r--r--source4/build/smb_build/main.pl16
3 files changed, 27 insertions, 6 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index bd643faa53..35eda9a3a7 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -102,8 +102,11 @@ AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction)
AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep)
AC_CHECK_FUNCS(backtrace setbuffer)
+AC_SUBST(BLDSHARED)
+AC_SUBST(BLDMERGED)
# Assume non-shared by default and override below
BLDSHARED="false"
+BLDMERGED="true"
# these are the defaults, good for lots of systems
HOST_OS="$host_os"
@@ -257,6 +260,7 @@ case "$host_os" in
;;
*vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
BLDSHARED="false"
+ BLDMERGED="false"
LDSHFLAGS=""
;;
*)
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 9b3c0afc60..dd56c5d9c8 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -10,7 +10,10 @@
use strict;
package smb_build::input;
-my $subsystem_default_output_type = "MERGEDOBJ";
+use vars qw($library_output_type $subsystem_output_type);
+
+$library_output_type = "OBJ_LIST";
+$subsystem_output_type = "OBJ_LIST";
my $srcdir = ".";
sub strtrim($)
@@ -41,7 +44,7 @@ sub check_subsystem($$)
}
unless(defined($subsys->{OUTPUT_TYPE})) {
- $subsys->{OUTPUT_TYPE} = $subsystem_default_output_type;
+ $subsys->{OUTPUT_TYPE} = $subsystem_output_type;
}
}
@@ -86,7 +89,7 @@ sub check_module($$)
$mod->{ENABLE} = "YES";
push (@{$INPUT->{$mod->{SUBSYSTEM}}{REQUIRED_SUBSYSTEMS}}, $mod->{NAME});
printf("Module: %s...static\n",$mod->{NAME});
- $mod->{OUTPUT_TYPE} = $subsystem_default_output_type;
+ $mod->{OUTPUT_TYPE} = $subsystem_output_type;
} else {
$mod->{ENABLE} = "NO";
printf("Module: %s...not\n",$mod->{NAME});
@@ -103,7 +106,7 @@ sub check_library($$)
return;
}
- $lib->{OUTPUT_TYPE} = "SHARED_LIBRARY";
+ $lib->{OUTPUT_TYPE} = $library_output_type;
}
sub check_binary($$)
@@ -145,8 +148,6 @@ sub check($$)
{
my ($INPUT, $enabled) = @_;
- ($subsystem_default_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE}) if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"}));
-
foreach my $part (values %$INPUT) {
if (defined($enabled->{$part->{NAME}})) {
$part->{ENABLE} = $enabled->{$part->{NAME}};
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 0e8f81d759..3643c2d89a 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -20,6 +20,22 @@ use strict;
my $INPUT = {};
my $mkfile = smb_build::config_mk::run_config_mk($INPUT, "main.mk");
+
+if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) {
+ $smb_build::input::subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE};
+} elsif ($config::config{BLDMERGED} eq "true") {
+ $smb_build::input::subsystem_output_type = "MERGEDOBJ";
+}
+
+if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) {
+ $smb_build::input::subsystem_output_type = $ENV{LIBRARY_OUTPUT_TYPE};
+} elsif ($config::config{BLDSHARED} eq "true") {
+ # FIXME: This should really be SHARED_LIBRARY
+ $smb_build::input::subsystem_output_type = "MERGEDOBJ";
+} elsif ($config::config{BLDMERGED} eq "true") {
+ $smb_build::input::subsystem_output_type = "MERGEDOBJ";
+}
+
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled);
my $OUTPUT = output::create_output($DEPEND);
my $mkenv = new smb_build::makefile(\%config::config, $OUTPUT, $mkfile);