summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 53f647aef1..78841e2bf3 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1655,9 +1655,8 @@ SRC
# default to package specific config command, as a last resort.
get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp}
end
- if get
+ if get and try_ldflags(ldflags = get['libs'])
cflags = get['cflags']
- ldflags = get['libs']
libs = get['libs-only-l']
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
$CFLAGS += " " << cflags