From 9a1f380d5b49d18b598891ad1e65a6c06fe6b251 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 24 Nov 2006 17:05:04 +0000 Subject: r19882: Fix static link flags in pkg-config files. Should allow running pidl tests on systems without shared libs. (This used to be commit fb623be4ff09c2fb0546edc0892ad3a59d58f274) --- source4/build/smb_build/makefile.pm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 3d5b5223d5..b86dbb591d 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -415,17 +415,24 @@ sub PkgConfig($$$) if (defined($ctx->{PUBLIC_DEPENDENCIES})) { foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) { - next unless ($other->{$_}->{TYPE} eq "LIBRARY"); + next if ($other->{$_}->{ENABLE} eq "NO"); + if ($other->{$_}->{TYPE} eq "LIBRARY") { + s/^LIB//g; + $_ = lc($_); - s/^LIB//g; - $_ = lc($_); + $pubs .= "$_ "; + } else { + s/^LIB//g; + $_ = lc($_); - $pubs .= "$_ "; + $privlibs .= "-l$_ "; + } } } if (defined($ctx->{PRIVATE_DEPENDENCIES})) { foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) { + next if ($other->{$_}->{ENABLE} eq "NO"); if ($other->{$_}->{TYPE} eq "LIBRARY") { s/^LIB//g; $_ = lc($_); -- cgit