Allow overriding shared library policy using environment variable.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 3 Sep 2008 20:26:02 +0000 (22:26 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 3 Sep 2008 20:26:02 +0000 (22:26 +0200)
source/build/smb_build/main.pl

index f8a0cb004fea1b79f20a24b375f0638b15443be2..3c84a91a59e9f8641dafc765d987dc9eb0d61d7f 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"];