From ea5093fec09abfc3d7684ad6c15b5acccc691d2d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 27 Feb 2014 17:05:08 +0000 Subject: Fix Solaris not being able to find modules without pkg-config. --- make/utilities.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'make/utilities.pm') 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); -- cgit v1.2.3