summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/makefile.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-20 01:19:59 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-20 01:19:59 +0100
commitb487ecdfad4518936cc542379b7f0102b38b3c62 (patch)
treebf9dfc798a2fdecea7fe4176eb5597caba092e64 /source4/build/smb_build/makefile.pm
parentad5861a795106f544f31d292ab1360e35bc79932 (diff)
downloadsamba-b487ecdfad4518936cc542379b7f0102b38b3c62.tar.gz
samba-b487ecdfad4518936cc542379b7f0102b38b3c62.tar.bz2
samba-b487ecdfad4518936cc542379b7f0102b38b3c62.zip
build: Fix handling of external pkg-config dependencies when generating pkg-config files.
(This used to be commit 88f9e11286bf0f12fc766dbf21f311e5373f0811)
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r--source4/build/smb_build/makefile.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index ce1e757c61..7e715b47eb 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -570,24 +570,21 @@ sub PkgConfig($$$)
my $pubs;
my $privs;
my $privlibs;
+ my $publibs = "";
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
next if ($other->{$_}->{ENABLE} eq "NO");
- if ($other->{$_}->{TYPE} eq "EXT_LIB") {
+ if (defined($other->{$_}->{PC_NAME})) {
+ $pubs .= "$other->{$_}->{PC_NAME} ";
+ } elsif ($other->{$_}->{TYPE} eq "EXT_LIB") {
my $e = $other->{$_};
-
my $ldflags = join(" ", @{$e->{LDFLAGS}});
$ldflags .= " " unless $ldflags eq "";
my $libs = join(" ", @{$e->{LIBS}});
$libs .= " " unless $libs eq "";
- $pubs .= $ldflags.$libs;
- } elsif ($other->{$_}->{TYPE} eq "LIBRARY") {
- s/^LIB//g;
- $_ = lc($_);
-
- $pubs .= "$_ ";
+ $publibs .= $ldflags.$libs;
} else {
s/^LIB//g;
$_ = lc($_);
@@ -626,7 +623,7 @@ sub PkgConfig($$$)
smb_build::env::PkgConfig($self,
$path,
$link_name,
- "-L\${libdir} -l$link_name",
+ "-L\${libdir} -l$link_name $publibs",
$privlibs,
"",
"$ctx->{VERSION}",