aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-07-25 20:57:20 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-07-25 20:57:20 +0300
commite1c8f1d01f4a4e2136173edab2dc63c71ef038f4 (patch)
tree5be144fa02344637b1d0c941019c1e25e35ad3e2 /configure.ac
parentUpdate THANKS. (diff)
downloadxz-e1c8f1d01f4a4e2136173edab2dc63c71ef038f4.tar.xz
liblzma: Add lzma_memcmplen() for fast memory comparison.
This commit just adds the function. Its uses will be in separate commits. This hasn't been tested much yet and it's perhaps a bit early to commit it but if there are bugs they should get found quite quickly. Thanks to Jun I Jin from Intel for help and for pointing out that string comparison needs to be optimized in liblzma.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6787f827..2df67970 100644
--- a/configure.ac
+++ b/configure.ac
@@ -560,6 +560,7 @@ echo "Initializing gettext:"
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
+
###############################################################################
# Checks for header files.
###############################################################################
@@ -573,6 +574,9 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
[],
[AC_MSG_ERROR([Required header file(s) are missing.])])
+# This allows the use of the intrinsic functions if they are available.
+AC_CHECK_HEADERS([immintrin.h])
+
###############################################################################
# Checks for typedefs, structures, and compiler characteristics.
@@ -681,6 +685,15 @@ AM_CONDITIONAL([COND_INTERNAL_SHA256],
&& test "x$ac_cv_func_SHA256Init" != xyes \
&& test "x$ac_cv_func_CC_SHA256_Init" != xyes])
+# Check for SSE2 intrinsics.
+AC_CHECK_DECL([_mm_movemask_epi8],
+ [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
+ [Define to 1 if _mm_movemask_epi8 is available.])],
+ [],
+[#ifdef HAVE_IMMINTRIN_H
+#include <immintrin.h>
+#endif])
+
###############################################################################
# If using GCC, set some additional AM_CFLAGS: