summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-14 00:59:08 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-14 00:59:08 +0000
commitca90e7d844729e9abb9b31efcc8f2eec0d866a28 (patch)
treec6ad2a86625b592d815b0836a8fd282eb7aeb74a
parentd720aebb665b2d255c98b84e87f44991c4d79e7e (diff)
merge revision(s) 36948,41777,41779 [Backport #8593]
* lib/mkmf.rb (have_framework): insert a space between options. add just one -ObjC option. * lib/mkmf.rb (have_framework): allow header file to check. [ruby-core:55745] [Bug #8593] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@42550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb27
-rw-r--r--version.h6
3 files changed, 28 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f0baed074b..49db7b60bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 14 09:56:55 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (have_framework): allow header file to check.
+ [ruby-core:55745] [Bug #8593]
+
Fri Aug 9 16:29:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (xsystem): expand environment variable in all macros not
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 80c1f49e66..f5e4e92f39 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -938,18 +938,31 @@ def have_header(header, preheaders = nil, &b)
end
# Returns whether or not the given +framework+ can be found on your system.
-# If found, a macro is passed as a preprocessor constant to the compiler using
-# the framework name, in uppercase, prepended with 'HAVE_FRAMEWORK_'.
+# If found, a macro is passed as a preprocessor constant to the compiler
+# using the framework name, in uppercase, prepended with +HAVE_FRAMEWORK_+.
#
-# For example, if have_framework('Ruby') returned true, then the HAVE_FRAMEWORK_RUBY
-# preprocessor macro would be passed to the compiler.
+# For example, if <code>have_framework('Ruby')</code> returned true, then
+# the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the
+# compiler.
#
+# If +fw+ is a pair of the framework name and its header file name
+# that header file is checked, instead of the normally used header
+# file which is named same as the framework.
def have_framework(fw, &b)
+ if Array === fw
+ fw, header = *fw
+ else
+ header = "#{fw}.h"
+ end
checking_for fw do
- src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
- if try_link(src, opt = "-framework #{fw}", &b)
+ src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
+ opt = " -framework #{fw}"
+ if try_link(src, "-ObjC#{opt}", &b)
$defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
- $LDFLAGS << " " << opt
+ # TODO: non-worse way than this hack, to get rid of separating
+ # option and its argument.
+ $LDFLAGS << " -ObjC" unless /(\A|\s)-ObjC(\s|\z)/ =~ $LDFLAGS
+ $LDFLAGS << opt
true
else
false
diff --git a/version.h b/version.h
index a16084c75a..0de06744b0 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 464
+#define RUBY_PATCHLEVEL 465
-#define RUBY_RELEASE_DATE "2013-08-09"
+#define RUBY_RELEASE_DATE "2013-08-14"
#define RUBY_RELEASE_YEAR 2013
#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 9
+#define RUBY_RELEASE_DAY 14
#include "ruby/version.h"