summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-16 11:06:30 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-16 11:06:30 +0000
commita667fe79ead7714c8c563da882a4bb5f9fd1d6f4 (patch)
tree41d5298cab3079ef1e43d3fe798eedb4e67255d5 /configure.ac
parent88cb22e979d28bbb81519ab06c85b2d4776def11 (diff)
configure.ac: move the checks of _XOPEN_SOURCE on Solaris
* configure.ac (solaris*): Move the checks of _XOPEN_SOURCE to the location before r63443, to cover non-GCC compilers on Solaris. This partly reverts r63443. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac66
1 files changed, 33 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index dfe9e2a4a8..13065140a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -592,39 +592,6 @@ AS_IF([test "$GCC" = yes], [
], [ansi_options=])
test "x${ansi_options}" = x || break
done
- AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
- AC_TRY_COMPILE([#include <unistd.h>
- #ifndef _XOPEN_SOURCE
- #error _XOPEN_SOURCE is not defined
- #endif
- ], [],
- [given_xopen_source=yes], [given_xopen_source=no])
- AC_MSG_RESULT($given_xopen_source)
- AS_IF([test $given_xopen_source = no], [
- AC_MSG_CHECKING(appropriate _XOPEN_SOURCE value to define)
- define_xopen_source=""
- for tmp_xpg in 7 6 5; do
- AS_IF([test x"$define_xopen_source" != x], [
- break
- ])
- RUBY_WERROR_FLAG([AC_TRY_COMPILE([
- #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
- ], [],
- [define_xopen_source=${tmp_xpg}00], [])
- ])
- done
- AS_IF([test x"$define_xopen_source" = x], [
- define_xopen_source=no
- ])
- AC_MSG_RESULT($define_xopen_source)
- AS_IF([test x"$define_xopen_source" != xno], [
- RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
- ])
- ])
],
[
# ANSI (no XCFLAGS because this is C only)
@@ -865,6 +832,39 @@ main()
ac_cv_c_inline=no],
[solaris*], [ LIBS="-lm $LIBS"
ac_cv_func_vfork=no
+ AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
+ AC_TRY_COMPILE([#include <unistd.h>
+ #ifndef _XOPEN_SOURCE
+ #error _XOPEN_SOURCE is not defined
+ #endif
+ ], [],
+ [given_xopen_source=yes], [given_xopen_source=no])
+ AC_MSG_RESULT($given_xopen_source)
+ AS_IF([test $given_xopen_source = no], [
+ AC_MSG_CHECKING(appropriate _XOPEN_SOURCE value to define)
+ define_xopen_source=""
+ for tmp_xpg in 7 6 5; do
+ AS_IF([test x"$define_xopen_source" != x], [
+ break
+ ])
+ RUBY_WERROR_FLAG([AC_TRY_COMPILE([
+ #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
+ ], [],
+ [define_xopen_source=${tmp_xpg}00], [])
+ ])
+ done
+ AS_IF([test x"$define_xopen_source" = x], [
+ define_xopen_source=no
+ ])
+ AC_MSG_RESULT($define_xopen_source)
+ AS_IF([test x"$define_xopen_source" != xno], [
+ RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
+ ])
+ ])
],
[haiku*], [
LIBS="$LIBS" # m lib is include in root