summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/main.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-16 21:50:31 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:41 +0100
commit013a762ca2b27255ddb03fbd675d5083b9c4724b (patch)
tree2df2002b10fb6c79ffb489b63ef5613a24a79b69 /source4/build/smb_build/main.pl
parentafafeca8149fedbceb0f6c411e6e0ee364739c55 (diff)
downloadsamba-013a762ca2b27255ddb03fbd675d5083b9c4724b.tar.gz
samba-013a762ca2b27255ddb03fbd675d5083b9c4724b.tar.bz2
samba-013a762ca2b27255ddb03fbd675d5083b9c4724b.zip
r26005: Notice the user about LD_LIBRARY_PATH or equivalent when building with shared libs.
(This used to be commit 44529b24467ac94d47d14a53177554b39a80da1a)
Diffstat (limited to 'source4/build/smb_build/main.pl')
-rw-r--r--source4/build/smb_build/main.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index f6038bb078..3ac5c26e1a 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -54,6 +54,8 @@ foreach my $key (values %$OUTPUT) {
$mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}});
}
+my $shared_libs_used = 0;
+
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
@@ -62,6 +64,10 @@ foreach my $key (values %$OUTPUT) {
and defined($key->{VERSION});
$mkenv->SharedLibrary($key) if $key->{TYPE} eq "LIBRARY" and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
+ if ($key->{TYPE} eq "LIBRARY" and
+ ${$key->{OUTPUT_TYPE}}[0] eq "SHARED_LIBRARY") {
+ $shared_libs_used = 1;
+ }
$mkenv->SharedModule($key) if $key->{TYPE} eq "MODULE" and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
@@ -77,7 +83,13 @@ header::create_smb_build_h($OUTPUT, "include/build.h");
cflags::create_cflags($OUTPUT, $config::config{srcdir},
$config::config{builddir}, "extra_cflags.txt");
-
summary::show($OUTPUT, \%config::config);
+if ($shared_libs_used) {
+ print <<EOF;
+To run binaries without installing, set the following environment variable:
+ $config::config{LIB_PATH_VAR}=$config::config{builddir}/bin/shared
+EOF
+}
+
1;