summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-28 09:22:19 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-28 09:22:19 +0000
commit8a453df391e3ec1c527f3bb311b6174907c892ea (patch)
treee60d48ea996ff4da4d7311af956c2101f32b3ea4 /lib
parenta33f0de6a93f31f5f456e62a291d56bf0d913922 (diff)
merges r21748 from trunk into ruby_1_9_1.
* lib/mkmf.rb (try_func): got rid of c-mode confusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 401b569f7d..0f6f61d984 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -524,12 +524,13 @@ end
def try_func(func, libs, headers = nil, &b)
headers = cpp_include(headers)
- try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b)
+ try_link(<<"SRC", libs, &b) or
#{headers}
/*top*/
#{MAIN_DOES_NOTHING}
int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
SRC
+ try_link(<<"SRC", libs, &b)
#{headers}
/*top*/
#{MAIN_DOES_NOTHING}
@@ -1316,11 +1317,7 @@ def configuration(srcdir)
SHELL = /bin/sh
#### Start of system configuration section. ####
-#{
-if $extmk
- "top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/")
-end
-}
+#{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote}
topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{CONFIG["hdrdir"].quote}