summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index d4d5846bfc..6fec4bd8f4 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1709,12 +1709,13 @@ SRC
# default to package specific config command, as a last resort.
get = proc {|opt| `#{pkgconfig} --#{opt}`.strip}
end
+ orig_ldflags = $LDFLAGS
if get and try_ldflags(ldflags = get['libs'])
cflags = get['cflags']
libs = get['libs-only-l']
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
$CFLAGS += " " << cflags
- $LDFLAGS += " " << ldflags
+ $LDFLAGS = [orig_ldflags, ldflags].join(' ')
$libs += " " << libs
Logging::message "package configuration for %s\n", pkg
Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",