private static string pkgconfig(string package)
{
#if NO_SYSTEM_PROCESS
throw new System.NotSupportedException();
#else
Process process;
try
{
process = Builtins.shellp("pkg-config", String.Format("--libs {0}", package));
}
catch (Exception e)
{
throw new ApplicationException(StringResources.BooC_PkgConfigNotFound, e);
}
process.WaitForExit();
if (process.ExitCode != 0)
{
throw new ApplicationException(string.Format(StringResources.BooC_PkgConfigReportedErrors, process.StandardError.ReadToEnd()));
}
return process.StandardOutput.ReadToEnd();
#endif
}