r19882: Fix static link flags in pkg-config files. Should allow running
authorJelmer Vernooij <jelmer@samba.org>
Fri, 24 Nov 2006 17:05:04 +0000 (17:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:28:31 +0000 (14:28 -0500)
pidl tests on systems without shared libs.
(This used to be commit fb623be4ff09c2fb0546edc0892ad3a59d58f274)

source4/build/smb_build/makefile.pm

index 3d5b5223d542a8b50ea74f1f4ea3249cd93f3ac6..b86dbb591d7ec77d6760ac5bcad37af79d150cde 100644 (file)
@@ -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($_);