summaryrefslogtreecommitdiffstats
path: root/win/configure.in
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-12-20 10:28:47 (GMT)
committernijtmans <nijtmans>2010-12-20 10:28:47 (GMT)
commitf4896c75acae1daf0de3083f043e2774af381f39 (patch)
treeadd8b93d686ed26ce3a50a4738cca50838e9e9d9 /win/configure.in
parent12bacc8dbf73d87fe93142111922f28ff19c322a (diff)
downloadtcl-f4896c75acae1daf0de3083f043e2774af381f39.zip
tcl-f4896c75acae1daf0de3083f043e2774af381f39.tar.gz
tcl-f4896c75acae1daf0de3083f043e2774af381f39.tar.bz2
Explicitely test for intrinsics support in compiler, before assuming only MSVC has it.
Diffstat (limited to 'win/configure.in')
-rw-r--r--win/configure.in25
1 files changed, 24 insertions, 1 deletions
diff --git a/win/configure.in b/win/configure.in
index 3ffe9f2..50f5de4 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tcl installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.127 2010/12/10 15:44:53 nijtmans Exp $
+# RCS: @(#) $Id: configure.in,v 1.128 2010/12/20 10:28:47 nijtmans Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.59)
@@ -272,6 +272,29 @@ if test "$tcl_cv_mwmo_alertable" = "no"; then
[Defined when MWMO_ALERTABLE is missing from winuser.h])
fi
+# See if the compiler supports intrinsics.
+
+AC_CACHE_CHECK(for intrinsics support in compiler,
+ tcl_cv_intrinsics,
+AC_TRY_COMPILE([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <intrin.h>
+],
+[
+ unsigned int regs[4];
+ __cpuid(&regs,0);
+ __debugbreak();
+],
+ tcl_cv_intrinsics=yes,
+ tcl_cv_intrinsics=no)
+)
+if test "$tcl_cv_intrinsics" = "yes"; then
+ AC_DEFINE(HAVE_INTRIN_H, 1,
+ [Defined when the compilers supports intrinsics])
+fi
+
#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------