summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/pkg-config14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/script/pkg-config b/source4/script/pkg-config
index 72a458b815..458cac6be2 100755
--- a/source4/script/pkg-config
+++ b/source4/script/pkg-config
@@ -124,7 +124,21 @@ foreach my $pkg (@ARGV)
push (@out, Cflags($pkg)) if ($opt_cflags);
}
+sub nub
+{
+ my @list = @_;
+ my @ret = ();
+ my %seen = ();
+ foreach (@list) {
+ next if (defined($seen{$_}));
+ push (@ret, $_);
+ $seen{$_} = 1;
+ }
+ return @ret;
+}
+
if ($#out >= 0) {
+ @out = nub(@out);
print join(' ', @out) . "\n";
}