configure.in: refine __builtin_choose_expr check

* configure.in (__builtin_choose_expr): check more precisely the
  results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-02-16 05:14:48 +00:00
Родитель 16294913f7
Коммит 1917960510
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -2183,8 +2183,16 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap64, [__builtin_bswap64(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clz, [__builtin_clz(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clz, [__builtin_clz(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clzl, [__builtin_clzl(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clzl, [__builtin_clzl(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clzll, [__builtin_clzll(0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_clzll, [__builtin_clzll(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr, [__builtin_choose_expr(0, 0, 0)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr, [
RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr_constant_p, [__builtin_choose_expr(__builtin_constant_p(foo), 0, 0)]) [int x[__extension__(__builtin_choose_expr(1, 1, -1))]];
[int y[__extension__(__builtin_choose_expr(0, -1, 1))]];
])
if test x$rb_cv_builtin___builtin_choose_expr = xyes; then
RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr_constant_p, [
[int x[__extension__(__builtin_choose_expr(__builtin_constant_p(1), 1, -1))]];
[int y[__extension__(__builtin_choose_expr(__builtin_constant_p(foo), -1, 1))]];
])
fi
RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatible_p(int, int)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatible_p(int, int)])
if test "$ac_cv_func_qsort_r" != no; then if test "$ac_cv_func_qsort_r" != no; then