s4:build: try to fix the build with the ibm checker in the build-farm
[ira/wip.git] / source4 / build / smb_build / main.pl
index f8a0cb004fea1b79f20a24b375f0638b15443be2..0d19e418270a0344925d64803fe3cf1e4b1526c7 100644 (file)
@@ -31,7 +31,9 @@ my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}
 my $subsys_output_type = ["MERGED_OBJ"];
 
 my $library_output_type;
-if ($config::config{USESHARED} eq "true") {
+my $useshared = (defined($ENV{USESHARED})?$ENV{USESHARED}:$config::config{USESHARED});
+
+if ($useshared eq "true") {
        $library_output_type = ["SHARED_LIBRARY", "MERGED_OBJ"];
 } else {
        $library_output_type = ["MERGED_OBJ"];
@@ -40,7 +42,7 @@ if ($config::config{USESHARED} eq "true") {
 }
 
 my $module_output_type;
-if ($config::config{USESHARED} eq "true") {
+if ($useshared eq "true") {
        $module_output_type = ["SHARED_LIBRARY"];
 } else {
        $module_output_type = ["MERGED_OBJ"];
@@ -71,7 +73,7 @@ foreach my $key (values %$OUTPUT) {
                $shared_libs_used = 1;
        }
        if ($key->{TYPE} eq "MODULE" and @{$key->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ" and defined($key->{INIT_FUNCTION})) {
-               $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += $key->{INIT_FUNCTION},\n");
+               $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS +=$key->{INIT_FUNCTION},\n");
        }
        $mkenv->CFlags($key);
 }