diff options
author | dgp <dgp@users.sourceforge.net> | 2012-05-24 16:50:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-05-24 16:50:40 (GMT) |
commit | 145ea8bbc6e1d499365d3e7ea81386aef956e32b (patch) | |
tree | 4251a9956293cba5d933f821e66ea739b15f7dca /unix/configure.in | |
parent | e451e666af76a6917a4c5c054b87c4c6f39d9484 (diff) | |
parent | 68d4dd76ebfda8029af039e6f6fd403ca851ce21 (diff) | |
download | tcl-145ea8bbc6e1d499365d3e7ea81386aef956e32b.zip tcl-145ea8bbc6e1d499365d3e7ea81386aef956e32b.tar.gz tcl-145ea8bbc6e1d499365d3e7ea81386aef956e32b.tar.bz2 |
merge 8.5
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/unix/configure.in b/unix/configure.in index b3df242..441c98f 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -726,6 +726,24 @@ elif test $tcl_cv_stack_grows_up = yes; then fi #-------------------------------------------------------------------- +# The check below checks whether the cpuid instruction is usable. +#-------------------------------------------------------------------- + +AC_CACHE_CHECK([whether the cpuid instruction is usable], tcl_cv_cpuid, [ + AC_TRY_LINK(, [ + int index,regsPtr[4]; + __asm__ __volatile__("mov %%ebx, %%edi \n\t" + "cpuid \n\t" + "mov %%ebx, %%esi \n\t" + "mov %%edi, %%ebx \n\t" + : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3]) + : "a"(index) : "edi"); + ], tcl_cv_cpuid=yes, tcl_cv_cpuid=no)]) +if test $tcl_cv_cpuid = yes; then + AC_DEFINE(HAVE_CPUID, 1, [Is the cpuid instruction usable?]) +fi + +#-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. #-------------------------------------------------------------------- |