aboutsummaryrefslogtreecommitdiff
path: root/config/c-compiler.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r--config/c-compiler.m410
1 files changed, 6 insertions, 4 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 5171e1e6d97..2f1d228623f 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -1,5 +1,5 @@
# Macros to detect C compiler features
-# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5 2002/03/29 17:32:53 petere Exp $
+# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.6 2003/01/28 21:57:12 petere Exp $
# PGAC_C_SIGNED
@@ -54,9 +54,11 @@ main() {
}],
[Ac_cachevar=yes],
[Ac_cachevar=no],
-[Ac_cachevar=no
-dnl We will do better here with Autoconf 2.50
-AC_MSG_WARN([64 bit arithmetic disabled when cross-compiling])])])
+[# If cross-compiling, check the size reported by the compiler and
+# trust that the arithmetic works.
+AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])],
+ Ac_cachevar=yes,
+ Ac_cachevar=no)])])
Ac_define=$Ac_cachevar
if test x"$Ac_cachevar" = xyes ; then