summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-02-27 17:05:08 +0000
committerPeter Powell <petpow@saberuk.com>2014-02-27 17:05:08 +0000
commitea5093fec09abfc3d7684ad6c15b5acccc691d2d (patch)
tree4a73a2f96e69aa59c14d960aebdda52c747e65f1 /make
parent60b5933a7e0973c0043b72a10d66226c9d1b423c (diff)
Fix Solaris not being able to find modules without pkg-config.
Diffstat (limited to 'make')
-rw-r--r--make/utilities.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/make/utilities.pm b/make/utilities.pm
index 9281246fb..7ef3e3c11 100644
--- a/make/utilities.pm
+++ b/make/utilities.pm
@@ -127,7 +127,8 @@ sub pkgconfig_get_include_dirs($$$;$)
if ((!defined $v) || ($v eq ""))
{
print "\e[31mCould not find $packagename via pkg-config\e[m (\e[1;32mplease install pkg-config\e[m)\n";
- $foo = `locate "$headername" 2>/dev/null | head -n 1`;
+ my $locbin = $^O eq 'solaris' ? 'slocate' : 'locate';
+ $foo = `$locbin "$headername" 2>/dev/null | head -n 1`;
my $find = $foo =~ /(.+)\Q$headername\E/ ? $1 : '';
chomp($find);
if ((defined $find) && ($find ne "") && ($find ne $packagename))
@@ -242,7 +243,8 @@ sub pkgconfig_get_lib_dirs($$$;$)
my $foo = "";
if ((!defined $v) || ($v eq ""))
{
- $foo = `locate "$libname" | head -n 1`;
+ my $locbin = $^O eq 'solaris' ? 'slocate' : 'locate';
+ $foo = `$locbin "$libname" | head -n 1`;
$foo =~ /(.+)\Q$libname\E/;
my $find = $1;
chomp($find);