summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-04 04:24:26 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-04 04:24:26 +0000
commitab1b4b5869efbcd3fa323698ad3a28466b07fe62 (patch)
treedfbf9f011103456168ce2eae90469cf6834e9895 /ext/extmk.rb.in
parent8c85fc1ec9b1c4d137b66b43aed79180825b6ea5 (diff)
* 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
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in18
1 files changed, 5 insertions, 13 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 1ff6fe5..b7db0a3 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