summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-09 07:36:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-09 07:36:03 +0000
commit74134f57b15368f250e5e96a9d78ad6dfb5fe0f6 (patch)
tree5cca9a0b47cb5766bdd6fdb3d7fd847e0447acb3
parent2e63cd97c1a1acf7cd93976c7e7531c46901e1d2 (diff)
lib/mkmf.rb: check pkg-config result
* lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from pkg-config works actually. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 179600dfaa2..1175ee1618a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 9 16:36:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
+ pkg-config works actually.
+
Wed May 9 16:01:38 2012 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 53f647aef19..78841e2bf3b 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