summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-13 06:16:46 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-13 06:16:46 +0000
commit43bc8f9beb0a495a715312b39cadde520799741d (patch)
tree9601a7924ed53d8a8a9f593749635c483688fb9e /configure.in
parent24b9cf95e04bfb54d3f97dc7a2e67e7fb14b592a (diff)
* configure.in: On Windows platforms, system provided headers are
VC++ optimized. That is, C++ habits are often contaminated into various headers. Most frequent situation is the use of // comments. We bypass ANSI C mode for them. Otherwise extension libs cannot include those headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 8c50ef511e..ab53e8a2c2 100644
--- a/configure.in
+++ b/configure.in
@@ -610,10 +610,19 @@ if test "$GCC" = yes; then
RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector)
fi
- # ANSI (no XCFLAGS because this is C only)
- RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [
- RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409)
- RUBY_APPEND_OPTION(rb_cv_warnflags, -ansi -std=iso9899:199409)
+ AS_CASE(["$target_os"],[mingw*], [
+ # On Windows platforms, system provided headers are VC++
+ # optimized. That is, C++ habits are often contaminated into
+ # various headers. Most frequent situation is the use of //
+ # comments. We bypass ANSI C mode for them. Otherwise
+ # extension libs cannot include those headers.
+ ],
+ [
+ # ANSI (no XCFLAGS because this is C only)
+ RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [
+ RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409)
+ RUBY_APPEND_OPTION(rb_cv_warnflags, -ansi -std=iso9899:199409)
+ ])
])
# suppress annoying -Wstrict-overflow warnings