]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix Solaris not being able to find modules without pkg-config.
authorPeter Powell <petpow@saberuk.com>
Thu, 27 Feb 2014 17:05:08 +0000 (17:05 +0000)
committerPeter Powell <petpow@saberuk.com>
Thu, 27 Feb 2014 17:05:08 +0000 (17:05 +0000)
make/utilities.pm

index 9281246fbbc1d320ff8df941b9c2387911d92646..7ef3e3c119d3b89c63bf0de031352ac476a5f3ff 100644 (file)
@@ -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);