2014-03-26 10:11:48 +00:00
|
|
|
AC_DEFUN([AX_INTEL_FEATURES],
|
2014-03-21 12:07:32 +00:00
|
|
|
[
|
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-msse, ax_cv_support_sse_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_sse_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSE_FLAGS="-msse -DINTEL_SSE"
|
|
|
|
AC_SUBST(INTEL_SSE_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSE_FLAGS"
|
2014-03-21 12:07:32 +00:00
|
|
|
AC_DEFINE(HAVE_SSE,,[Support SSE (Streaming SIMD Extensions) instructions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-msse2, ax_cv_support_sse2_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_sse2_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSE2_FLAGS="-msse2 -DINTEL_SSE2"
|
|
|
|
AC_SUBST(INTEL_SSE2_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSE2_FLAGS"
|
2014-03-21 12:07:32 +00:00
|
|
|
AC_DEFINE(HAVE_SSE2,,[Support SSE2 (Streaming SIMD Extensions 2) instructions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_sse3_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSE3_FLAGS="-mssse3 -DINTEL_SSE3"
|
|
|
|
AC_SUBST(INTEL_SSE3_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSE3_FLAGS"
|
2014-03-21 12:07:32 +00:00
|
|
|
AC_DEFINE(HAVE_SSE3,,[Support SSE3 (Streaming SIMD Extensions 3) instructions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-mpclmul, ax_cv_support_pclmuldq_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_pclmuldq_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_PCLMUL_FLAGS="-mpclmul -DINTEL_SSE4_PCLMUL"
|
|
|
|
AC_SUBST(INTEL_PCLMUL_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_PCLMUL_FLAGS"
|
|
|
|
AC_DEFINE(HAVE_PCLMUL,,[Support (PCLMUL) Carry-Free Muliplication])
|
2014-03-21 12:07:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-mssse3, ax_cv_support_ssse3_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_ssse3_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSSE3_FLAGS="-mssse3 -DINTEL_SSSE3"
|
|
|
|
AC_SUBST(INTEL_SSSE3_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSSE3_FLAGS"
|
2014-03-21 12:07:32 +00:00
|
|
|
AC_DEFINE(HAVE_SSSE3,,[Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_sse41_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSE4_1_FLAGS="-msse4.1 -DINTEL_SSE4"
|
|
|
|
AC_SUBST(INTEL_SSE4_1_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSE4_1_FLAGS"
|
|
|
|
AC_DEFINE(HAVE_SSE4_1,,[Support SSE4.1 (Streaming SIMD Extensions 4.1) instructions])
|
2014-03-21 12:07:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AX_CHECK_COMPILE_FLAG(-msse4.2, ax_cv_support_sse42_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_sse42_ext" = x"yes"; then
|
2014-03-26 10:11:48 +00:00
|
|
|
INTEL_SSE4_2_FLAGS="-msse4.2 -DINTEL_SSE4"
|
|
|
|
AC_SUBST(INTEL_SSE4_2_FLAGS)
|
|
|
|
INTEL_FLAGS="$INTEL_FLAGS $INTEL_SSE4_2_FLAGS"
|
|
|
|
AC_DEFINE(HAVE_SSE4_2,,[Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions])
|
2014-03-21 12:07:32 +00:00
|
|
|
fi
|
|
|
|
|
2014-03-26 10:11:48 +00:00
|
|
|
AC_SUBST(INTEL_FLAGS)
|
2014-03-21 12:07:32 +00:00
|
|
|
])
|