From 013a762ca2b27255ddb03fbd675d5083b9c4724b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 16 Nov 2007 21:50:31 +0100 Subject: r26005: Notice the user about LD_LIBRARY_PATH or equivalent when building with shared libs. (This used to be commit 44529b24467ac94d47d14a53177554b39a80da1a) --- source4/build/m4/check_ld.m4 | 1 + source4/build/smb_build/main.pl | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'source4/build') diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4 index 88d3e49e0c..3b69057a69 100644 --- a/source4/build/m4/check_ld.m4 +++ b/source4/build/m4/check_ld.m4 @@ -105,6 +105,7 @@ AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS AC_LIBREPLACE_MDLD AC_LIBREPLACE_MDLD_FLAGS +AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR ####################################################### # test whether building a shared library actually works 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 <