From ab1b4b5869efbcd3fa323698ad3a28466b07fe62 Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 4 Mar 2002 04:24:26 +0000 Subject: [PATCH] * ext/extmk.rb.in (dir_config): Sync with mkmf.rb: Fix a bug where --with-xx-{include,lib} is ignored when --with-xx-dir is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/extmk.rb.in | 18 +++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f95bfbdc04..4af566e71f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 4 13:19:18 2002 Akinori MUSHA + + * ext/extmk.rb.in (dir_config): Sync with mkmf.rb: Fix a bug where + --with-xx-{include,lib} is ignored when --with-xx-dir is + specified. + Fri Mar 1 11:29:10 2002 WATANABE Hirofumi * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 1ff6fe543c..b7db0a31e9 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -333,21 +333,13 @@ def create_header() end def dir_config(target, idefault=nil, ldefault=nil) - if idefault && ldefault == nil - default = idefault - idefault = default + "/include" - ldefault = default + "/lib" + if dir = with_config(target + "-dir", (idefault unless ldefault)) + idefault = dir + "/include" + ldefault = dir + "/lib" end - dir = with_config(target + "-dir", default) - - idir, ldir = if dir then [ - dir + "/include", - dir + "/lib" - ] else [ - with_config(target + "-include", idefault), - with_config(target + "-lib", ldefault) - ] end + idir = with_config(target + "-include", idefault) + ldir = with_config(target + "-lib", ldefault) if idir idircflag = "-I" + idir