diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-16 03:57:50 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-16 03:57:50 +0000 |
commit | a311beea6774650186148aa19b85f6e538098086 (patch) | |
tree | 70c3387a876882ac62dd315fd7f019077616af11 /configure.ac | |
parent | 8629c5874ffddb00d8ba08952026a1e713749c2a (diff) | |
download | ruby-a311beea6774650186148aa19b85f6e538098086.tar.gz |
configure.ac: revert r63438
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 09cf8687fa..f467a85ee9 100644 --- a/configure.ac +++ b/configure.ac @@ -836,7 +836,16 @@ main() AS_IF([test x"$define_xopen_source" != x], [ break ]) - RUBY_WERROR_FLAG([AC_TRY_COMPILE([ + # Both AC_TRY_CPP and AC_TRY_COMPILE should pass + # because some options may not be set to CPPFLAGS. + AC_TRY_CPP([ + #define _XOPEN_SOURCE ${tmp_xpg}00 + #include <unistd.h> + #ifndef _XPG${tmp_xpg} + #error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00 + #endif + ], [ + AC_TRY_COMPILE([ #define _XOPEN_SOURCE ${tmp_xpg}00 #include <unistd.h> #ifndef _XPG${tmp_xpg} @@ -844,7 +853,7 @@ main() #endif ], [], [define_xopen_source=${tmp_xpg}00], []) - ]) + ], []) done AS_IF([test x"$define_xopen_source" = x], [ define_xopen_source=no @@ -852,16 +861,6 @@ main() AC_MSG_RESULT($define_xopen_source) AS_IF([test x"$define_xopen_source" != xno], [ RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source) - # On Solaris, with gcc, "-std=gnu99" would be needed - # for using "-D_XOPEN_SOURCE=nnn" when nnn >= 600. - # ("-std=gnu99" have been added to both $warnflags and - # $strict_warnflags. During the above AC_TRY_COMPILE, - # $warnflags is effective, but the value will later be - # replaced with $rb_cv_warnflags.) - AS_CASE(["${warnflags}"], - [*-std=gnu99*], [ - RUBY_APPEND_OPTIONS(CPPFLAGS, -std=gnu99) - ]) ]) ]) ], |