1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
dnl Check for Intel architecture
AC_DEFUN([CHECK_INTELCPU],
[
AC_CACHE_CHECK(for Intel processor(s),
ac_cv_flag_intelcpu,
[
if [ uname -m | grep -q "i.86" ]; then
ac_cv_flag_intelcpu=yes
else
ac_cv_flag_intelcpu=no
fi
]
)
if test $ac_cv_flag_intelcpu = "yes"; then
AC_DEFINE([HAVE_INTELCPU], [], [Intel CPU architecture])
fi
])
AC_DEFUN([CHECK_MMX],
[
AC_MSG_CHECKING(if processor supports MMX instructions)
AC_ARG_ENABLE(mmx,
[ --disable-mmx disable use of MMX instructions [default=enabled]],
[
if test $enableval = "no"; then
ac_cv_flag_mmx="no"
else
ac_cv_flag_mmx="yes"
fi
],
[ac_cv_flag_mmx="yes"]
)
if test $ac_cv_flag_intelcpu = "yes"; then
if test $ac_cv_flag_mmx = "yes" ; then
if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then
ac_cv_flag_mmx=yes
else
ac_cv_flag_mmx=no
fi
fi
fi
if test $ac_cv_flag_mmx = "yes"; then
AC_DEFINE([HAVE_MMX], [], [Processor has MMX instruction set])
fi
AC_MSG_RESULT($ac_cv_flag_mmx)
])
|