if userland is 32 bit.
* include/cln/config.h.in: Simplify __x86_64__ selection.
* src/base/digitseq/cl_asm_x86_64_.cc: Remove.
+2006-06-13 Richard B. Kreckel <kreckel@ginac.de>
+
+ * m4/general.m4 (CL_CANONICAL_HOST_CPU): Force host_cpu=i386 for x86_64
+ if userland is 32 bit.
+ * include/cln/config.h.in: Simplify __x86_64__ selection.
+ * src/base/digitseq/cl_asm_x86_64_.cc: Remove.
+
2006-06-09 Richard B. Kreckel <kreckel@ginac.de>
* src/base/digitseq/cl_DS.h (struct DS): Change len type to uintC.
#undef __i386__
#endif
-// Take care not to define both __i386__ and __x86_64__ on those systems with
-// 64 bit kernel and 32 bit userland:
#ifndef __x86_64__
-#ifndef __i386__
#undef __x86_64__
#endif
-#endif
#ifndef __m68k__
#undef __m68k__
host_cpu=sparc
fi
;;
+dnl AMD64 running Linux have 'uname -m' = "x86_64" even if userland is purely
+dnl 32-bit.
+ x86_64 )
+ AC_CACHE_CHECK([for 64-bit userland on x86-64], cl_cv_host_x86_64, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#if !defined __x86_64__
+# error __x86_64__ not defined
+#endif
+]])
+], [cl_cv_host_x86_64=yes], [cl_cv_host_x86_64=no])
+])
+if test $cl_cv_host_x86_64 = yes; then
+ host_cpu=x86_64
+else
+ host_cpu=i386
+fi
+ ;;
esac
dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
cat >> confdefs.h <<EOF
+++ /dev/null
-#ifdef __i386__
-// This is most probably a x86_64 system with 32 bit userland.
-#include "cl_asm_i386_.cc"
-#else
-// Nothing here yet.
-#endif