]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Update README.md, add a lot of missing info, and reorder some of it.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Tue, 11 Nov 2025 16:17:35 +0000 (17:17 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 11 Nov 2025 19:53:36 +0000 (20:53 +0100)
Add missing parameter to configure help text.
Update descriptions and reorganize some options in CMake

CMakeLists.txt
README.md
configure

index 15654f49bde0079703aa49a8a3009efbb51d7976..cbe245a43f715a4eb00df995e331fde655bbe597 100644 (file)
@@ -89,7 +89,7 @@ endif()
 #
 option(WITH_GZFILEOP "Compile with support for gzFile related functions" ON)
 option(ZLIB_COMPAT "Compile with zlib compatible API" OFF)
-option(ZLIB_ALIASES "Provide zlib compatible targets" ON)
+option(ZLIB_ALIASES "Provide zlib compatible CMake targets" ON)
 option(WITH_OPTIM "Build with optimisation" ON)
 option(WITH_ALL_FALLBACKS "Build all generic fallback functions (Useful for Gbench)" OFF)
 option(WITH_REDUCED_MEM "Reduced memory usage for special cases (reduces performance)" OFF)
@@ -112,9 +112,9 @@ set(WITH_SANITIZER AUTO CACHE STRING "Enable sanitizer support")
 set_property(CACHE WITH_SANITIZER PROPERTY STRINGS "Memory" "Address" "Undefined" "Thread")
 
 if(BASEARCH_ARM_FOUND)
+    cmake_dependent_option(WITH_ARMV6 "Build with ARMv6 SIMD" ON "NOT ARCH MATCHES \"aarch64\"" OFF)
     option(WITH_ARMV8 "Build with ARMv8 CRC32 intrinsics" ON)
     option(WITH_NEON "Build with NEON intrinsics" ON)
-    cmake_dependent_option(WITH_ARMV6 "Build with ARMv6 SIMD" ON "NOT ARCH MATCHES \"aarch64\"" OFF)
 
     # Provided for backward compatibility
     if(DEFINED WITH_ACLE)
@@ -1593,13 +1593,14 @@ endif()
 
 add_feature_info(WITH_GZFILEOP WITH_GZFILEOP "Compile with support for gzFile related functions")
 add_feature_info(ZLIB_COMPAT ZLIB_COMPAT "Compile with zlib compatible API")
-add_feature_info(ZLIB_ENABLE_TESTS ZLIB_ENABLE_TESTS "Build test binaries")
-add_feature_info(ZLIBNG_ENABLE_TESTS ZLIBNG_ENABLE_TESTS "Test zlib-ng specific API")
+add_feature_info(ZLIB_ALIASES ZLIB_ALIASES "Compile with zlib compatible CMake targets")
+add_feature_info(ZLIB_ENABLE_TESTS ZLIB_ENABLE_TESTS "Enable options for building tests")
+add_feature_info(ZLIBNG_ENABLE_TESTS ZLIBNG_ENABLE_TESTS "Build test binaries")
 add_feature_info(WITH_SANITIZER WITH_SANITIZER "Enable sanitizer support")
-add_feature_info(WITH_GTEST WITH_GTEST "Build gtest_zlib")
+add_feature_info(WITH_GTEST WITH_GTEST "Build tests using Gtest framework")
 add_feature_info(WITH_FUZZERS WITH_FUZZERS "Build test/fuzz")
-add_feature_info(WITH_BENCHMARKS WITH_BENCHMARKS "Build test/benchmarks")
-add_feature_info(WITH_BENCHMARK_APPS WITH_BENCHMARK_APPS "Build application benchmarks")
+add_feature_info(WITH_BENCHMARKS WITH_BENCHMARKS "Build benchmarks using Google Benchmark framework")
+add_feature_info(WITH_BENCHMARK_APPS WITH_BENCHMARK_APPS "Build application benchmarks (currently libpng)")
 add_feature_info(WITH_ALL_FALLBACKS WITH_ALL_FALLBACKS "Build all generic fallback functions")
 add_feature_info(WITH_OPTIM WITH_OPTIM "Build with optimisation")
 add_feature_info(WITH_NEW_STRATEGIES WITH_NEW_STRATEGIES "Use new strategies")
@@ -1613,9 +1614,9 @@ add_feature_info(WITH_INFLATE_STRICT WITH_INFLATE_STRICT "Build with strict infl
 add_feature_info(WITH_INFLATE_ALLOW_INVALID_DIST WITH_INFLATE_ALLOW_INVALID_DIST "Build with zero fill for inflate invalid distances")
 
 if(BASEARCH_ARM_FOUND)
+    add_feature_info(WITH_ARMV6 WITH_ARMV6 "Build with ARMv6 SIMD")
     add_feature_info(WITH_ARMV8 WITH_ARMV8 "Build with ARMv8 CRC32 intrinsics")
     add_feature_info(WITH_NEON WITH_NEON "Build with NEON intrinsics")
-    add_feature_info(WITH_ARMV6 WITH_ARMV6 "Build with ARMv6 SIMD")
 elseif(BASEARCH_PPC_FOUND)
     add_feature_info(WITH_ALTIVEC WITH_ALTIVEC "Build with AltiVec optimisations")
     add_feature_info(WITH_POWER8 WITH_POWER8 "Build with optimisations for POWER8")
@@ -1624,22 +1625,22 @@ elseif(BASEARCH_RISCV_FOUND)
     add_feature_info(WITH_RVV WITH_RVV "Build with RVV intrinsics")
     add_feature_info(WITH_RISCV_ZBC WITH_RISCV_ZBC "Build with RISCV ZBC")
 elseif(BASEARCH_S360_FOUND)
+    add_feature_info(WITH_CRC32_VX WITH_CRC32_VX "Build with vectorized CRC32 on IBM Z")
     add_feature_info(WITH_DFLTCC_DEFLATE WITH_DFLTCC_DEFLATE "Build with DFLTCC intrinsics for compression on IBM Z")
     add_feature_info(WITH_DFLTCC_INFLATE WITH_DFLTCC_INFLATE "Build with DFLTCC intrinsics for decompression on IBM Z")
-    add_feature_info(WITH_CRC32_VX WITH_CRC32_VX "Build with vectorized CRC32 on IBM Z")
 elseif(BASEARCH_LOONGARCH_FOUND)
     add_feature_info(WITH_CRC32_LA WITH_CRC32_LA "Build with vectorized CRC32 on LoongArch")
     add_feature_info(WITH_LSX WITH_LSX "Build with vectorized LSX on LoongArch")
     add_feature_info(WITH_LASX WITH_LASX "Build with vectorized LASX on LoongArch")
 elseif(BASEARCH_X86_FOUND)
-    add_feature_info(WITH_AVX2 WITH_AVX2 "Build with AVX2")
-    add_feature_info(WITH_AVX512 WITH_AVX512 "Build with AVX512")
-    add_feature_info(WITH_AVX512VNNI WITH_AVX512VNNI "Build with AVX512 VNNI")
     add_feature_info(WITH_SSE2 WITH_SSE2 "Build with SSE2")
     add_feature_info(WITH_SSSE3 WITH_SSSE3 "Build with SSSE3")
     add_feature_info(WITH_SSE41 WITH_SSE41 "Build with SSE41")
     add_feature_info(WITH_SSE42 WITH_SSE42 "Build with SSE42")
     add_feature_info(WITH_PCLMULQDQ WITH_PCLMULQDQ "Build with PCLMULQDQ")
+    add_feature_info(WITH_AVX2 WITH_AVX2 "Build with AVX2")
+    add_feature_info(WITH_AVX512 WITH_AVX512 "Build with AVX512")
+    add_feature_info(WITH_AVX512VNNI WITH_AVX512VNNI "Build with AVX512 VNNI")
     add_feature_info(WITH_VPCLMULQDQ WITH_VPCLMULQDQ "Build with VPCLMULQDQ")
 endif()
 
index 81d967fb039ecd0f3dcf0e96e50ec9e43c635625..922462cbc393131e28515e86d2f38871703c5761 100644 (file)
--- a/README.md
+++ b/README.md
@@ -19,11 +19,11 @@ Features
 * Modern C11 syntax and a clean code layout
 * Deflate medium and quick algorithms based on Intel’s zlib fork
 * Support for CPU intrinsics when available
-  * Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX, LSX, LASX
-  * CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ARMv8, & IBM Z, LoongArch
-  * Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX & VSX, LSX, LASX
-  * Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV, LSX, LASX
-  * Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX, LSX, LASX
+  * Adler32 implementation using SSSE3, SSE4.2, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX, LSX, LASX, RVV
+  * CRC32-B implementation using SSE2, SSE4.1, (V)PCLMULQDQ, ARMv8, Power8, IBM Z, LoongArch, ZBC
+  * Slide hash implementations using SSE2, AVX2, ARMv6, Neon, Power8, VMX & VSX, LSX, LASX
+  * Compare256 implementations using SSE2, AVX2, AVX512, Neon, Power9, LSX, LASX, RVV
+  * Inflate chunk copying using SSE2, SSSE3, AVX2, AVX512, Neon, Power8, VSX, LSX, LASX, RVV
   * Support for hardware-accelerated deflate using IBM Z DFLTCC
 * Safe unaligned memory read/writes and large bit buffer improvements
 * Includes improvements from Cloudflare and Intel forks
@@ -97,18 +97,17 @@ Build Options
 | CMake                      | configure                | Description                                                                         | Default |
 |:---------------------------|:-------------------------|:------------------------------------------------------------------------------------|---------|
 | ZLIB_COMPAT                | --zlib-compat            | Compile with zlib compatible API                                                    | OFF     |
-| ZLIB_ENABLE_TESTS          |                          | Build test binaries                                                                 | ON      |
+| ZLIB_ALIASES               |                          | Provide zlib compatible CMake targets                                               | ON      |
+| ZLIB_ENABLE_TESTS          |                          | Tests masterswitch, does not enable any tests by itself                             | ON      |
+| ZLIBNG_ENABLE_TESTS        |                          | Build test binaries                                                                 | ON      |
 | WITH_GZFILEOP              | --without-gzfileops      | Compile with support for gzFile related functions                                   | ON      |
 | WITH_OPTIM                 | --without-optimizations  | Build with optimisations                                                            | ON      |
 | WITH_NEW_STRATEGIES        | --without-new-strategies | Use new strategies                                                                  | ON      |
-| WITH_NATIVE_INSTRUCTIONS   |                          | Compiles with full instruction set supported on this host (gcc/clang -march=native) | OFF     |
-| WITH_RUNTIME_CPU_DETECTION |                          | Compiles with runtime CPU detection                                                 | ON      |
-| WITH_SANITIZER             |                          | Build with sanitizer (memory, address, undefined)                                   | OFF     |
-| WITH_GTEST                 |                          | Build gtest_zlib                                                                    | ON      |
-| WITH_FUZZERS               |                          | Build test/fuzz                                                                     | OFF     |
-| WITH_BENCHMARKS            |                          | Build test/benchmarks                                                               | OFF     |
-| WITH_MAINTAINER_WARNINGS   |                          | Build with project maintainer warnings                                              | OFF     |
-| WITH_CODE_COVERAGE         |                          | Enable code coverage reporting                                                      | OFF     |
+| WITH_CRC32_CHORBA          |                          | Build with Chorba optimized CRC32                                                   | ON      |
+| WITH_REDUCED_MEM           | --with-reduced-mem       | Reduce zlib-ng memory usage, affects performance and compression ratio              | OFF     |
+| WITH_GTEST                 |                          | Build tests using GTest framework                                                   | ON      |
+| WITH_BENCHMARKS            |                          | Build benchmarks using Google Benchmark framework                                   | OFF     |
+| INSTALL_UTILS              |                          | Copy minigzip and minideflate during install                                        | OFF     |
 
 
 Install
@@ -193,30 +192,40 @@ zlib was originally created by Jean-loup Gailly (compression) and Mark Adler (de
 Advanced Build Options
 ----------------------
 
-| CMake                           | configure             | Description                                                         | Default                |
-|:--------------------------------|:----------------------|:--------------------------------------------------------------------|------------------------|
-| WITH_AVX2                       |                       | Build with AVX2 intrinsics                                          | ON                     |
-| WITH_AVX512                     |                       | Build with AVX512 intrinsics                                        | ON                     |
-| WITH_AVX512VNNI                 |                       | Build with AVX512VNNI intrinsics                                    | ON                     |
-| WITH_SSE2                       |                       | Build with SSE2 intrinsics                                          | ON                     |
-| WITH_SSSE3                      |                       | Build with SSSE3 intrinsics                                         | ON                     |
-| WITH_SSE42                      |                       | Build with SSE42 intrinsics                                         | ON                     |
-| WITH_PCLMULQDQ                  |                       | Build with PCLMULQDQ intrinsics                                     | ON                     |
-| WITH_VPCLMULQDQ                 | --without-vpclmulqdq  | Build with VPCLMULQDQ intrinsics                                    | ON                     |
-| WITH_ARMV8                      | --without-armv8       | Build with ARMv8 intrinsics                                         | ON                     |
-| WITH_NEON                       | --without-neon        | Build with NEON intrinsics                                          | ON                     |
-| WITH_ARMV6                      | --without-armv6       | Build with ARMv6 intrinsics                                         | ON                     |
-| WITH_ALTIVEC                    | --without-altivec     | Build with AltiVec (VMX) intrinsics                                 | ON                     |
-| WITH_POWER8                     | --without-power8      | Build with POWER8 optimisations                                     | ON                     |
-| WITH_RVV                        |                       | Build with RVV intrinsics                                           | ON                     |
-| WITH_CRC32_VX                   | --without-crc32-vx    | Build with vectorized CRC32 on IBM Z                                | ON                     |
-| WITH_DFLTCC_DEFLATE             | --with-dfltcc-deflate | Build with DFLTCC intrinsics for compression on IBM Z               | OFF                    |
-| WITH_DFLTCC_INFLATE             | --with-dfltcc-inflate | Build with DFLTCC intrinsics for decompression on IBM Z             | OFF                    |
-| WITH_INFLATE_STRICT             |                       | Build with strict inflate distance checking                         | OFF                    |
-| WITH_INFLATE_ALLOW_INVALID_DIST |                       | Build with zero fill for inflate invalid distances                  | OFF                    |
-| INSTALL_UTILS                   |                       | Copy minigzip and minideflate during install                        | OFF                    |
-| ZLIBNG_ENABLE_TESTS             |                       | Test zlib-ng specific API                                           | ON                     |
-| WITH_ALL_FALLBACKS              |                       | Build with all c-fallbacks (useful for Gbench comparisons)          | OFF                    |
+| CMake                           | configure             | Description                                                                         | Default  |
+|:--------------------------------|:----------------------|:------------------------------------------------------------------------------------|----------|
+| WITH_NATIVE_INSTRUCTIONS        |                       | Compiles with full instruction set supported on this host (gcc/clang -march=native) | OFF      |
+| WITH_RUNTIME_CPU_DETECTION      |                       | Compiles with runtime CPU detection                                                 | ON       |
+| WITH_SSE2                       |                       | x86: Build with SSE2 intrinsics                                                     | ON       |
+| WITH_SSSE3                      |                       | x86: Build with SSSE3 intrinsics                                                    | ON       |
+| WITH_SSE41                      |                       | x86: Build with SSE41 intrinsics                                                    | ON       |
+| WITH_SSE42                      |                       | x86: Build with SSE42 intrinsics                                                    | ON       |
+| WITH_PCLMULQDQ                  |                       | x86: Build with PCLMULQDQ intrinsics                                                | ON       |
+| WITH_AVX2                       |                       | x86: Build with AVX2 intrinsics                                                     | ON       |
+| WITH_AVX512                     |                       | x86: Build with AVX512 intrinsics                                                   | ON       |
+| WITH_AVX512VNNI                 |                       | x86: Build with AVX512VNNI intrinsics                                               | ON       |
+| WITH_VPCLMULQDQ                 |                       | x86: Build with VPCLMULQDQ intrinsics                                               | ON       |
+| WITH_ARMV6                      | --without-armv6       | arm: Build with ARMv6 intrinsics                                                    | ON       |
+| WITH_ARMV8                      | --without-armv8       | arm: Build with ARMv8 intrinsics                                                    | ON       |
+| WITH_NEON                       | --without-neon        | arm: Build with NEON intrinsics                                                     | ON       |
+| WITH_ALTIVEC                    | --without-altivec     | ppc: Build with AltiVec (VMX) intrinsics                                            | ON       |
+| WITH_POWER8                     | --without-power8      | ppc: Build with POWER8 intrinsics                                                   | ON       |
+| WITH_POWER9                     | --without-power9      | ppc: Build with POWER9 intrinsics                                                   | ON       |
+| WITH_RVV                        | --without-rvv         | riscv: Build with RVV intrinsics                                                    | ON       |
+| WITH_RISCV_ZBC                  | --without-zbc         | riscv: Build with RiscV ZBC intrinsics                                              | ON       |
+| WITH_CRC32_VX                   | --without-crc32-vx    | s390x: Build with vectorized CRC32 on IBM Z                                         | ON       |
+| WITH_DFLTCC_DEFLATE             | --with-dfltcc-deflate | s390x: Build with DFLTCC intrinsics for compression on IBM Z                        | OFF      |
+| WITH_DFLTCC_INFLATE             | --with-dfltcc-inflate | s390x: Build with DFLTCC intrinsics for decompression on IBM Z                      | OFF      |
+| WITH_LSX                        |                       | loongarch: Build with LSX intrinsics                                                | ON       |
+| WITH_CRC32_LA                   | --without-crc32-la    | loongarch: Build with vectorized CRC32                                              | ON       |
+| WITH_INFLATE_STRICT             |                       | Build with strict inflate distance checking                                         | OFF      |
+| WITH_INFLATE_ALLOW_INVALID_DIST |                       | Build with zero fill for inflate invalid distances                                  | OFF      |
+| WITH_BENCHMARK_APPS             |                       | Build benchmark apps (currently libpng)                                             | OFF      |
+| WITH_ALL_FALLBACKS              |                       | Build with all c-fallbacks (useful for Gbench comparisons)                          | OFF      |
+| WITH_MAINTAINER_WARNINGS        |                       | Build with project maintainer warnings                                              | OFF      |
+| WITH_SANITIZER                  |                       | Build with sanitizer (memory, address, undefined)                                   | OFF      |
+| WITH_FUZZERS                    |                       | Build test/fuzz                                                                     | OFF      |
+| WITH_CODE_COVERAGE              |                       | Enable code coverage reporting                                                      | OFF      |
 
 
 Related Projects
index 9cec2d03742fecd22df11a4b526735b790501f9a..e51e21bff2269d7b94d419b93c6972b5b9b5cfd2 100755 (executable)
--- a/configure
+++ b/configure
@@ -178,16 +178,19 @@ case "$1" in
       echo '    [--without-gzfileops]       Compiles without the gzfile parts of the API enabled' | tee -a configure.log
       echo '    [--without-optimizations]   Compiles without support for optional instruction sets' | tee -a configure.log
       echo '    [--without-new-strategies]  Compiles without using new additional deflate strategies' | tee -a configure.log
+      echo '    [--without-vpclmulqdq]      Compiles without x86 VPCLMUL instruction set' | tee -a configure.log
+      echo '    [--without-armv6]           Compiles without ARMv6 SIMD instruction set' | tee -a configure.log
       echo '    [--without-armv8]           Compiles without ARMv8 CRC32 instruction set' | tee -a configure.log
       echo '    [--without-neon]            Compiles without ARM Neon SIMD instruction set' | tee -a configure.log
-      echo '    [--without-armv6]           Compiles without ARMv6 SIMD instruction set' | tee -a configure.log
       echo '    [--without-rvv]             Compiles without RISC-V RVV instruction set' | tee -a configure.log
       echo '    [--without-zbc]             Compiles without RISC-V ZBC instruction set' | tee -a configure.log
       echo '    [--without-altivec]         Compiles without PPC AltiVec support' | tee -a configure.log
       echo '    [--without-power8]          Compiles without Power8 instruction set' | tee -a configure.log
+      echo '    [--without-power9]          Compiles without Power9 instruction set' | tee -a configure.log
       echo '    [--with-dfltcc-deflate]     Use DEFLATE CONVERSION CALL instruction for compression on IBM Z' | tee -a configure.log
       echo '    [--with-dfltcc-inflate]     Use DEFLATE CONVERSION CALL instruction for decompression on IBM Z' | tee -a configure.log
       echo '    [--without-crc32-vx]        Build without vectorized CRC32 on IBM Z' | tee -a configure.log
+      echo '    [--without-crc32-la]        Build without vectorized CRC32 on Loongarch' | tee -a configure.log
       echo '    [--with-reduced-mem]        Reduced memory usage for special cases (reduces performance)' | tee -a configure.log
         exit 0 ;;
     -p*=* | --prefix=*) prefix=$(echo $1 | sed 's/.*=//'); shift ;;