summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 3ae38da6e0..4f2d1b7a68 100644
--- a/configure.in
+++ b/configure.in
@@ -1475,11 +1475,17 @@ AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
[
t=INT])
rb_cv_[$1]_convertible=${u}${t}])
- AS_CASE(["${rb_cv_[$1]_convertible}"],
- [*LL], [n="long long"],
- [*LONG], [n="long"],
- [n="int"])
- AS_CASE("${rb_cv_[$1]_convertible}", [U*], [u=+1 n="unsigned $n"], [u=-1])
+ if test "${AS_TR_SH(ac_cv_type_[$1])}" = "yes"; then
+ n="$1"
+ else
+ AS_CASE(["${rb_cv_[$1]_convertible}"],
+ [*LL], [n="long long"],
+ [*LONG], [n="long"],
+ [n="int"])
+ AS_CASE(["${rb_cv_[$1]_convertible}"],
+ [U*], [n="unsigned $n"])
+ fi
+ AS_CASE("${rb_cv_[$1]_convertible}", [U*], [u=+1], [u=-1])
AC_DEFINE_UNQUOTED(rb_[$1], $n)
AC_DEFINE_UNQUOTED([SIGNEDNESS_OF_]AS_TR_CPP($1), $u)
AC_DEFINE_UNQUOTED([$3]2NUM[(v)], [${rb_cv_[$1]_convertible}2NUM(v)])