From 74134f57b15368f250e5e96a9d78ad6dfb5fe0f6 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 9 May 2012 07:36:03 +0000 Subject: 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 --- lib/mkmf.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/mkmf.rb') 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 -- cgit v1.2.3