sparklemotion/nokogiri — pull request #931 by sorah (2013-07-02 13:36:23+00:00)
Title: extconf.rb: Don't call pkg_config when using bundled libraries

This patch changes to call `pkg_config` only when `NOKOGIRI_USE_SYSTEM_LIBRARIES` specified,
because `pkg_config` isn't required when using bundled libraries.

And this works as workaround for the bug in 2.0.0-p0, 195, 247: https://bugs.ruby-lang.org/issues/8595

2.0.0-p{0,195,247}'s mkmf modifies `$LDFLAGS` after calling `pkg_config`. ([Already fixed in upstream](https://bugs.ruby-lang.org/issues/8595))

`pkg_config('libxml-2.0')` removes `-rpath` that added by extconf.rb, so compiled binary will be linked with system's installation.