summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-24 16:45:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:31 -0500
commitd25f2ba3dc87dc9eb343e9a6caced475ef956bd5 (patch)
tree15751b9c93c1da22e477e0948961893c855e5616 /source4/build/smb_build
parentf98b34d0f20e2c105f0a31c12a549d0ec29b48bb (diff)
downloadsamba-d25f2ba3dc87dc9eb343e9a6caced475ef956bd5.tar.gz
samba-d25f2ba3dc87dc9eb343e9a6caced475ef956bd5.tar.bz2
samba-d25f2ba3dc87dc9eb343e9a6caced475ef956bd5.zip
r19881: Add private library flags when linking to static libraries.
(This used to be commit 72f1ffc0ef56753deba716cf9d31d44c95e7cc33)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/env.pm5
-rw-r--r--source4/build/smb_build/makefile.pm16
2 files changed, 15 insertions, 6 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
index 1466a8679c..eb798f5ad0 100644
--- a/source4/build/smb_build/env.pm
+++ b/source4/build/smb_build/env.pm
@@ -53,9 +53,9 @@ sub _set_config($$)
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
-sub PkgConfig($$$$$$$$$$$)
+sub PkgConfig($$$$$$$$$$$$)
{
- my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
+ my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
print __FILE__.": creating $path\n";
@@ -83,6 +83,7 @@ sub PkgConfig($$$$$$$$$$$)
print OUT "Requires.private: $privdep\n" if defined($privdep);
print OUT "Version: $version\n";
print OUT "Libs: $libs\n";
+ print OUT "Libs.private: $privlibs\n" if (defined($privlibs));
print OUT "Cflags: -I\${includedir} $cflags\n";
close(OUT);
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 63bf3c0916..3d5b5223d5 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -411,6 +411,7 @@ sub PkgConfig($$$)
my $pubs;
my $privs;
+ my $privlibs;
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
@@ -425,12 +426,17 @@ sub PkgConfig($$$)
if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
- next unless ($other->{$_}->{TYPE} eq "LIBRARY");
+ if ($other->{$_}->{TYPE} eq "LIBRARY") {
+ s/^LIB//g;
+ $_ = lc($_);
- s/^LIB//g;
- $_ = lc($_);
+ $privs .= "$_ ";
+ } else {
+ s/^LIB//g;
+ $_ = lc($_);
- $privs .= "$_ ";
+ $privlibs .= "-l$_ ";
+ }
}
}
@@ -438,6 +444,7 @@ sub PkgConfig($$$)
$path,
$link_name,
"-L\${libdir} -l$link_name",
+ $privlibs,
"",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},
@@ -455,6 +462,7 @@ sub PkgConfig($$$)
"bin/pkgconfig/$link_name-uninstalled.pc",
$link_name,
"-Lbin/shared -Lbin/static -l$link_name",
+ $privlibs,
"-I. -Iinclude -Ilib -Ilib/replace",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},