aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 672b97b7ec..f6637b493d 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1717,11 +1717,21 @@ SRC
# :stopdoc:
- # Handles meta information about installed libraries. Uses your platform's
- # pkg-config program if it has one.
+ # Returns compile/link information about an installed library in a
+ # tuple of <code>[cflags, ldflags, libs]</code>, by using the
+ # command found first in the following commands:
#
- # The actual command name can be overridden by
- # <code>--with-pkg-config</code> command line option.
+ # 1. If <code>--with-{pkg}-config={command}</code> is given via
+ # command line option: <code>{command} {option}</code>
+ #
+ # 2. <code>{pkg}-config {option}</code>
+ #
+ # 3. <code>pkg-config {option} {pkg}</code>
+ #
+ # Where {option} is, for instance, <code>--cflags</code>.
+ #
+ # If an <code>option</code> argument is given, the config command is
+ # invoked with the option and a stripped output string is returned.
def pkg_config(pkg, option=nil)
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# iff package specific config command is given