Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/pkg-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ def have_package(pkg, major=nil, minor=0, micro=0)
Shellwords.shellwords(libraries))
dldflags = dldflags.map {|s| /\s/ =~ s ? "\"#{s}\"" : s }.join(" ")
$libs += " " + libraries
if /mswin/ =~ RUBY_PLATFORM
$DLDFLAGS += " " + dldflags
else
$LDFLAGS += " " + dldflags
end
# mkmf uses $LDFLAGS for both have_func()/try_link() and the
# final link (mswin's Makefile puts $(ldflags) into DLDFLAGS
# too), so /libpath: must go there on mswin as well. With
# $DLDFLAGS only, every link check against the package fails.
$LDFLAGS += " " + dldflags
$CFLAGS += " " + cflags_only_other(pkg)
if defined?($CXXFLAGS)
$CXXFLAGS += " " + cflags_only_other(pkg)
Expand Down