]> Savannah Git Hosting - gnulib.git/commitdiff
crc: make it a maintainer setting rather than a user setting.
authorSimon Josefsson <simon@josefsson.org>
Thu, 31 Oct 2024 12:10:34 +0000 (13:10 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 31 Oct 2024 12:10:34 +0000 (13:10 +0100)
* m4/crc.m4 (gl_CRC_SLICE_BY_8): Drop AC_ARG_ENABLE.

ChangeLog
m4/crc.m4

index 42367f81354f99a45338fc919494073632c104b3..b0719c23bf2512f2267d5a195003bf1369f95748 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-31  Simon Josefsson  <simon@josefsson.org>
+
+       crc: make it a maintainer setting rather than a user setting.
+       * m4/crc.m4 (gl_CRC_SLICE_BY_8): Drop AC_ARG_ENABLE.
+
 2024-10-27  Sam Russell  <sam.h.russell@gmail.com>
 
        crc: New optimised slice-by-8 implementation
index 0007b7274e7390b865502bbe1be06b62396b967a..f62987e78e6465530355b6b38696d3f4b9b20dd5 100644 (file)
--- a/m4/crc.m4
+++ b/m4/crc.m4
@@ -1,22 +1,25 @@
 # crc.m4
-# serial 3
-dnl Copyright (C) 2024-2024 Free Software Foundation, Inc.
+# serial 4
+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,
 dnl with or without modifications, as long as this notice is preserved.
 dnl This file is offered as-is, without any warranty.
 
+# For use by maintainer's after gl_EARLY in configure.ac.
+AC_DEFUN([gl_DISABLE_CRC_SLICE_BY_8],
+[
+  gl_crc_slice_by_8=no
+])
+
 AC_DEFUN([gl_CRC_SLICE_BY_8],
 [
   AC_MSG_CHECKING([whether to enable CRC slice-by-8 algorithm])
-  AC_ARG_ENABLE([crc-slice-by-8],
-    [AS_HELP_STRING([[--disable-crc-slice-by-8]],
-       [disable CRC slice-by-8 algorithm])],
-    [enable_crc_slice_by_8=$enableval],
-    [enable_crc_slice_by_8=yes])
-
-  if test $enable_crc_slice_by_8 = yes; then
+  if test x"$gl_crc_slice_by_8" != x"no"; then
+      AC_MSG_RESULT([yes])
       AC_DEFINE([GL_CRC_SLICE_BY_8], [1],
-      [Define to get faster but larger CRC32 operation.])
+                [Define to get faster but larger CRC32 operation.])
+  else
+      AC_MSG_RESULT([no])
   fi
 ])