diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-28 16:22:41 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-28 16:22:41 +0100 |
commit | f176b7fda8800ac6bb1582be60162420b70a71d9 (patch) | |
tree | 4a73a2f96e69aa59c14d960aebdda52c747e65f1 /make/utilities.pm | |
parent | 60b5933a7e0973c0043b72a10d66226c9d1b423c (diff) | |
parent | ea5093fec09abfc3d7684ad6c15b5acccc691d2d (diff) |
Merge pull request #783 from SaberUK/insp20+solaris-hates-posix
Fix Solaris not being able to find modules without pkg-config.
Diffstat (limited to 'make/utilities.pm')
-rw-r--r-- | make/utilities.pm | 6 |
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); |