Simon Josefsson wrote:
> Thanks - I have pushed this now.
Two more nits, that I am fixing:
- The include file in the module description was incorrect.
- The indentation in the .m4 file. There is no formal standard of what
a "correct" indentation in a .m4 file. But at least we should not reuse
the same column number for nested indentation levels.
2024-12-17 Bruno Haible <[email protected]>
crc-x86_64: Tweaks.
* modules/crc-x86_64 (Include): Fix the file name.
* m4/crc-x86_64.m4 (gl_CRC_X86_64_PCLMUL): Improve indentation.
diff --git a/m4/crc-x86_64.m4 b/m4/crc-x86_64.m4
index ac1c57f9ee..fa649a5b82 100644
--- a/m4/crc-x86_64.m4
+++ b/m4/crc-x86_64.m4
@@ -1,5 +1,5 @@
# crc-x86_64.m4
-# serial 1
+# serial 2
dnl Copyright (C) 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,30 +10,32 @@ AC_DEFUN([gl_CRC_X86_64_PCLMUL]
[
ac_save_CFLAGS=$CFLAGS
CFLAGS="-mavx -mpclmul $CFLAGS"
- AC_CACHE_CHECK([if pclmul intrinsic exists], [gl_cv_crc_pclmul],[
- AC_LINK_IFELSE(
- [AC_LANG_SOURCE([[
- #include <x86intrin.h>
+ AC_CACHE_CHECK([if pclmul intrinsic exists], [gl_cv_crc_pclmul], [
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
+ #include <x86intrin.h>
- int
- main (void)
- {
- __m128i a, b;
- a = _mm_clmulepi64_si128 (a, b, 0x00);
- a = _mm_shuffle_epi8 (a, b);
- return __builtin_cpu_supports ("pclmul");
- }
- ]])
- ],[
- gl_cv_crc_pclmul=yes
- ],[
- gl_cv_crc_pclmul=no
- ])])
+ int
+ main (void)
+ {
+ __m128i a, b;
+ a = _mm_clmulepi64_si128 (a, b, 0x00);
+ a = _mm_shuffle_epi8 (a, b);
+ return __builtin_cpu_supports ("pclmul");
+ }
+ ]])
+ ], [
+ gl_cv_crc_pclmul=yes
+ ], [
+ gl_cv_crc_pclmul=no
+ ])
+ ])
if test $gl_cv_crc_pclmul = yes; then
AC_DEFINE([GL_CRC_X86_64_PCLMUL], [1],
[CRC32 calculation by pclmul hardware instruction enabled])
fi
AM_CONDITIONAL([GL_CRC_X86_64_PCLMUL],
- [test $gl_cv_crc_pclmul = yes])
+ [test $gl_cv_crc_pclmul = yes])
CFLAGS=$ac_save_CFLAGS
])
diff --git a/modules/crc-x86_64 b/modules/crc-x86_64
index 0080656819..4796de054f 100644
--- a/modules/crc-x86_64
+++ b/modules/crc-x86_64
@@ -19,7 +19,7 @@ if GL_CRC_X86_64_PCLMUL
endif
Include:
-"crc.h"
+"crc-x86_64.h"
License:
LGPL