diff --git a/ChangeLog b/ChangeLog index 179600dfaa..1175ee1618 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 9 16:36:01 2012 Nobuyoshi Nakada + + * lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from + pkg-config works actually. + Wed May 9 16:01:38 2012 Shugo Maeda * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by 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