summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-07 13:06:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-07 13:06:05 +0000
commitf51f35a32fa672ef60bba39b4ab8908f24455dee (patch)
tree1650464c3f62fd80d33c57a8678efb325c4430f5 /configure.in
parent753f4824e3f283f5b292e8fb895d9c3eee5b53ec (diff)
* configure.in (universal_binary): checks if sizes are same on all
architectures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index c7b999a31f..0f7d8050b9 100644
--- a/configure.in
+++ b/configure.in
@@ -344,6 +344,20 @@ AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(time_t, 0)
+if test "$universal_binary" = yes; then
+ for type in int long "long long" "void*" time_t; do
+ eval size='$ac_cv_sizeof_'AS_TR_SH($type)
+ if test $size = 0; then continue; fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT],
+ [sizeof($type) == $size])], [], [size=0])
+ if test $size = 0; then
+ dnl try with __LP64__
+ AC_MSG_ERROR([size of $type is unknown])
+ fi
+ done
+fi
+
dnl RUBY_REPLACE_TYPE [typename] [default type] [macro type] [included]
AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
AC_CHECK_TYPE([$1], [n=[$1]], [n=[$2]], [$4])