@ 260915.5

240404.1 · 55e849b7c97b096411789073c5d3271bbc5db5de

released 5.1.3

fix #380

reading declarations

Makefile.in

@@ -92,7 +92,14 @@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_regex.m4 \+	$(top_srcdir)/m4/ax_check_brotlilib.m4 \+	$(top_srcdir)/m4/ax_check_bz2lib.m4 \ 	$(top_srcdir)/m4/ax_check_bzip3lib.m4 \+	$(top_srcdir)/m4/ax_check_lz4lib.m4 \+	$(top_srcdir)/m4/ax_check_lzmalib.m4 \+	$(top_srcdir)/m4/ax_check_pcre2.m4 \+	$(top_srcdir)/m4/ax_check_zlib.m4 \+	$(top_srcdir)/m4/ax_check_zstdlib.m4 \ 	$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \@@ -261,8 +268,6 @@ AWK = @AWK@ BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@-BROTLI_CFLAGS = @BROTLI_CFLAGS@-BROTLI_LIBS = @BROTLI_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@@@ -299,10 +304,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@-LZ4_CFLAGS = @LZ4_CFLAGS@-LZ4_LIBS = @LZ4_LIBS@-LZMA_CFLAGS = @LZMA_CFLAGS@-LZMA_LIBS = @LZMA_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@@@ -314,8 +315,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@-PCRE2_CFLAGS = @PCRE2_CFLAGS@-PCRE2_LIBS = @PCRE2_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@@@ -333,11 +332,7 @@ SIMD_AVX512BW_FLAGS = @SIMD_AVX512BW_FLAGS@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@-ZLIB_CFLAGS = @ZLIB_CFLAGS@-ZLIB_LIBS = @ZLIB_LIBS@ ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@-ZSTD_CFLAGS = @ZSTD_CFLAGS@-ZSTD_LIBS = @ZSTD_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@

README.md

@@ -5401,7 +5401,7 @@ in markdown:   -    ugrep 5.1.2                       April 3, 2024                         UGREP(1)+    ugrep 5.1.3                       April 4, 2024                         UGREP(1)  🔝 [Back to table of contents](#toc) 

aclocal.m4

@@ -1485,6 +1485,13 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR  m4_include([m4/ax_boost_regex.m4])+m4_include([m4/ax_check_brotlilib.m4])+m4_include([m4/ax_check_bz2lib.m4]) m4_include([m4/ax_check_bzip3lib.m4])+m4_include([m4/ax_check_lz4lib.m4])+m4_include([m4/ax_check_lzmalib.m4])+m4_include([m4/ax_check_pcre2.m4])+m4_include([m4/ax_check_zlib.m4])+m4_include([m4/ax_check_zstdlib.m4]) m4_include([m4/ax_cxx_compile_stdcxx.m4]) m4_include([m4/ax_pthread.m4])

bin/win32/ug.exe

Binary file changed

bin/win32/ugrep.exe

Binary file changed

bin/win64/ug.exe

Binary file changed

bin/win64/ugrep.exe

Binary file changed

config.h.in

@@ -28,25 +28,25 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Use libbrotlidec compression library */+/* Define to 1 if you have `brotli' library (-lbrotlidec -lbrotlienc) */ #undef HAVE_LIBBROTLI -/* Use bzip2 compression library */+/* Define to 1 if you have `bz2' library (-lbz2) */ #undef HAVE_LIBBZ2  /* Define to 1 if you have `bzip3' library (-lbzip3) */ #undef HAVE_LIBBZIP3 -/* Use liblz4 compression library */+/* Define to 1 if you have `lz4' library (-llz4) */ #undef HAVE_LIBLZ4 -/* Use liblzma compression library */+/* Define to 1 if you have `lzma' library (-llzma) */ #undef HAVE_LIBLZMA -/* Use libz compression library */+/* Define to 1 if you have `z' library (-lz) */ #undef HAVE_LIBZ -/* Use libzstd compression library */+/* Define to 1 if you have `zstd' library (-lzstd) */ #undef HAVE_LIBZSTD  /* Define to 1 if you have a working `mmap' system call. */@@ -58,7 +58,7 @@ /* Define if O_NOATIME open flag is supported */ #undef HAVE_O_NOATIME -/* Use PCRE2 (Perl Compatible Regular Expression Library) */+/* Define to 1 if you have `PCRE2' library (-lpcre2-8) */ #undef HAVE_PCRE2  /* Define if you have POSIX threads libraries and header files. */

configure

@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles.-# Generated by GNU Autoconf 2.71 for ugrep 5.1.2.+# Generated by GNU Autoconf 2.71 for ugrep 5.1.3. # # Report bugs to <https://github.com/Genivia/ugrep/issues>. #@@ -613,8 +613,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ugrep' PACKAGE_TARNAME='ugrep'-PACKAGE_VERSION='5.1.2'-PACKAGE_STRING='ugrep 5.1.2'+PACKAGE_VERSION='5.1.3'+PACKAGE_STRING='ugrep 5.1.3' PACKAGE_BUGREPORT='https://github.com/Genivia/ugrep/issues' PACKAGE_URL='https://ugrep.com' @@ -672,18 +672,6 @@ BASH_COMPLETION_LIBS BASH_COMPLETION_CFLAGS ENABLE_7ZIP_FALSE ENABLE_7ZIP_TRUE-BROTLI_LIBS-BROTLI_CFLAGS-ZSTD_LIBS-ZSTD_CFLAGS-LZ4_LIBS-LZ4_CFLAGS-LZMA_LIBS-LZMA_CFLAGS-ZLIB_LIBS-ZLIB_CFLAGS-PCRE2_LIBS-PCRE2_CFLAGS SIMD_AVX512BW_FLAGS SIMD_AVX2_FLAGS SIMD_FLAGS@@ -813,16 +801,16 @@ enable_dependency_tracking enable_sse2 enable_avx2 enable_neon-enable_pcre2+with_pcre2 with_boost_regex-enable_zlib-enable_bzip2-enable_lzma-enable_lz4-enable_zstd-enable_brotli+with_zlib+with_bzlib+with_lzma+with_lz4+with_zstd+with_brotli with_bzip3-with_7zip+enable_7zip with_bash_completion_dir with_fish_completion_dir with_zsh_completion_dir@@ -850,18 +838,6 @@ CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR-PCRE2_CFLAGS-PCRE2_LIBS-ZLIB_CFLAGS-ZLIB_LIBS-LZMA_CFLAGS-LZMA_LIBS-LZ4_CFLAGS-LZ4_LIBS-ZSTD_CFLAGS-ZSTD_LIBS-BROTLI_CFLAGS-BROTLI_LIBS BASH_COMPLETION_CFLAGS BASH_COMPLETION_LIBS FISH_COMPLETION_CFLAGS@@ -1414,7 +1390,7 @@ if test "$ac_init_help" = "long"; then   # Omit some internal or obsolete options to make the list less imposing.   # This message is too long to be a string in the A/UX 3.1 sh.   cat <<_ACEOF-\`configure' configures ugrep 5.1.2 to adapt to many kinds of systems.+\`configure' configures ugrep 5.1.3 to adapt to many kinds of systems.  Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1485,7 +1461,7 @@ fi  if test -n "$ac_init_help"; then   case $ac_init_help in-     short | recursive ) echo "Configuration of ugrep 5.1.2:";;+     short | recursive ) echo "Configuration of ugrep 5.1.3:";;    esac   cat <<\_ACEOF @@ -1502,34 +1478,8 @@ Optional Features:   --disable-sse2          disable SSE2 CPU extensions   --disable-avx2          disable AVX2/AVX512BW CPU extensions   --disable-neon          disable NEON CPU extensions--  --enable-pcre2          use PCRE2 for option -P-                          [defaults to enabled if PCRE2 is installed]-  --disable-pcre2         do not use PCRE2--  --enable-zlib           Use zlib to enable searching inside compressed files.-                          [defaults to enabled if zlib is installed]-  --disable-zlib          Do not use zlib--  --enable-bzip2          Use libbz2 to enable searching inside BZ and BZ2 compressed files.-                          [defaults to enabled if libbz2 is installed]-  --disable-bzip2         Do not use bzip2--  --enable-lzma           Use liblzma to enable searching inside LZMA and XZ compressed files.-                          [defaults to enabled if liblzma is installed]-  --disable-lzma          Do not use liblzma--  --enable-lz4            Use liblz4 to enable searching inside LZ4 compressed files.-                          [defaults to enabled if liblz4 is installed]-  --disable-lz4           Do not use liblz4--  --enable-zstd           Use libzstd to enable searching inside ZST compressed files.-                          [defaults to enabled if libzstd is installed]-  --disable-zstd          Do not use libzstd--  --enable-brotli         use libbrotlidec to enable searching inside BR compressed files.-                          [defaults to enabled if libbrotlidec is installed]-  --disable-brotli        do not use libbrotlidec+  --disable-7zip          to disable 7zip and no longer search .7z files (7z+                          requires more memory and takes long to decompress)   --disable-auto-color    disable automatic colors, otherwise colors are                           enabled by default   --enable-color          deprecated, use --disable-auto-color@@ -1546,19 +1496,38 @@ Optional Features: Optional Packages:   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)+  --with-pcre2=DIR        root directory path of PCRE2 installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-pcre2         to disable PCRE2 usage completely   --with-boost-regex[=special-lib]                           use the Regex library from boost - it is possible to                           specify a path to include/boost and                           lib/libboost_regex-mt e.g.                           --with-boost-regex=/opt/local-  --with-bzip3            Use libbzip3 to enable searching inside BZ3-                          compressed files+  --with-zlib=DIR         root directory path of zlib installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-zlib          to disable zlib usage completely+  --with-bzlib=DIR        root directory path of bzlib installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-bzlib         to disable bzlib usage completely+  --with-lzma=DIR         root directory path of lzma installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-lzma          to disable lzma usage completely+  --with-lz4=DIR          root directory path of lz4 installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-lz4           to disable lz4 usage completely+  --with-zstd=DIR         root directory path of zstd installation [defaults to+                          /usr/local or /usr if not found in /usr/local]+  --without-zstd          to disable zstd usage completely+  --with-brotli=DIR       root directory path of brotli library installation+                          [defaults to /usr/local or /usr if not found in+                          /usr/local]+  --without-brotli        to disable brotli library usage completely+  --with-bzip3            to enable bzip3 library to decompress .bz3 files   --with-bzip3=DIR        root directory path of bzip3 library installation                           [defaults to /usr/local or /usr if not found in                           /usr/local]   --without-bzip3         to disable bzip3 library usage completely-  --without-7zip          do not search 7ZIP compressed files (7zip requires-                          more memory and takes long to decompress)   --with-bash-completion-dir=PATH                           install the bash auto-completion script in this                           directory. [default=yes]@@ -1591,20 +1560,6 @@ Some influential environment variables:               directories to add to pkg-config's search path   PKG_CONFIG_LIBDIR               path overriding pkg-config's built-in search path-  PCRE2_CFLAGS-              C compiler flags for PCRE2, overriding pkg-config-  PCRE2_LIBS  linker flags for PCRE2, overriding pkg-config-  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config-  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config-  LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config-  LZMA_LIBS   linker flags for LZMA, overriding pkg-config-  LZ4_CFLAGS  C compiler flags for LZ4, overriding pkg-config-  LZ4_LIBS    linker flags for LZ4, overriding pkg-config-  ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config-  ZSTD_LIBS   linker flags for ZSTD, overriding pkg-config-  BROTLI_CFLAGS-              C compiler flags for BROTLI, overriding pkg-config-  BROTLI_LIBS linker flags for BROTLI, overriding pkg-config   BASH_COMPLETION_CFLAGS               C compiler flags for BASH_COMPLETION, overriding pkg-config   BASH_COMPLETION_LIBS@@ -1682,7 +1637,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then   cat <<\_ACEOF-ugrep configure 5.1.2+ugrep configure 5.1.3 generated by GNU Autoconf 2.71  Copyright (C) 2021 Free Software Foundation, Inc.@@ -2219,7 +2174,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ugrep $as_me 5.1.2, which was+It was created by ugrep $as_me 5.1.3, which was generated by GNU Autoconf 2.71.  Invocation command line was    $ $0$ac_configure_args_raw@@ -3706,7 +3661,7 @@ fi  # Define the identity of the package.  PACKAGE='ugrep'- VERSION='5.1.2'+ VERSION='5.1.3'   printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h@@ -8772,9 +8727,9 @@ fi  # SIMD_FLAGS applies to all source code SIMD_FLAGS=-# SIMD_AVX2_FLAGS applies to lib/matcher_avx2.cpp which is selected based on a runtime AVX2 check+# SIMD_AVX2_FLAGS only applies to lib/matcher_avx2.cpp which is selected based on a runtime AVX2 check SIMD_AVX2_FLAGS=-# SIMD_AVX512BW_FLAGS applies to lib/matcher_avx512bw.cpp which is selected based on a runtime AVX512BW check+# SIMD_AVX512BW_FLAGS only applies to lib/matcher_avx512bw.cpp which is selected based on a runtime AVX512BW check SIMD_AVX512BW_FLAGS=  if test "x$cross_compiling" = "xyes"; then@@ -8919,11 +8874,11 @@ else $as_nop fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext           if test "x$mneon_ok" = "xyes"; then-          SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"+            SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"           else-# this is iffy,,,-          CXXFLAGS="-march=native -mfpu=neon"-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext+            # this part is a bit iffy,,,+            CXXFLAGS="-march=native -mfpu=neon"+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h.  */ #include <arm_neon.h> int@@ -8941,9 +8896,9 @@ else $as_nop   mneon_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext-          if test "x$mneon_ok" = "xyes"; then-          SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON"-          fi+            if test "x$mneon_ok" = "xyes"; then+              SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON"+            fi           fi           CXXFLAGS=$save_CXXFLAGS         fi@@ -8959,55 +8914,6 @@ printf "%s\n" "$mneon_ok" >&6; }     ;;   esac -# # cross compiling to a host CPU, check support for SIMD CPU extension compile flags-# case $host_cpu in-#   i[[3456]]86*|x86_64*|amd64*)-#     # enable SSE2/AVX2/AVX512BW extensions-#     if ! test "x$with_no_sse2" = "xyes"; then-#       AX_CHECK_COMPILE_FLAG([-msse2],-#                             [msse2_ok=yes],-#                             [msse2_ok=no])-#       if test "x$msse2_ok" = "xyes"; then-#         SIMD_FLAGS="-msse2 -DHAVE_SSE2"-#         if ! test "x$with_no_avx2" = "xyes"; then-#           AX_CHECK_COMPILE_FLAG([-mavx512bw],-#                                 [mavx_ok=yes],-#                                 [mavx_ok=no])-#           if test "x$mavx_ok" = "xyes"; then-#             SIMD_FLAGS="-msse2 -DHAVE_AVX512BW"-#             SIMD_AVX2_FLAGS="-mavx2"-#             SIMD_AVX512BW_FLAGS="-mavx512bw"-#           else-#             AX_CHECK_COMPILE_FLAG([-mavx2],-#                                   [mavx_ok=yes],-#                                   [mavx_ok=no])-#             if test "x$mavx_ok" = "xyes"; then-#               SIMD_FLAGS="-msse2 -DHAVE_AVX2"-#               SIMD_AVX2_FLAGS="-mavx2"-#             fi-#           fi-#         fi-#       fi-#     fi-#   ;;-#   armv5*|armv6*)-#   ;;-#   arm*)-#     # enable arm >= 7 neon extensions with option -mfpu=neon-#     if ! test "x$with_no_neon" = "xyes"; then-#       AX_CHECK_COMPILE_FLAG([-mfpu=neon],-#                             [SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"],-#                             [SIMD_FLAGS=""])-#     fi-#   ;;-#   aarch64*)-#     # enable AArch64 neon extensions-#     if ! test "x$with_no_neon" = "xyes"; then-#       SIMD_FLAGS="-DHAVE_NEON"-#     fi-#   ;;-# esac- else    if ! test "x$with_no_sse2" = "xyes"; then@@ -9322,103 +9228,256 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # PCRE2 or Boost Regex ################################################################################ -# Check whether --enable-pcre2 was given.-if test ${enable_pcre2+y}+#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PCRE2 is wanted" >&5+printf %s "checking if PCRE2 is wanted... " >&6; }+pcre2_places="/usr/local /usr /opt/homebrew /opt/local /sw"++# Check whether --with-pcre2 was given.+if test ${with_pcre2+y} then :-  enableval=$enable_pcre2;+  withval=$with_pcre2; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    pcre2_places="$withval $pcre2_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi+else+  pcre2_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+fi+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi -if test "x$enable_pcre2" != "xno"-then :+#+# Locate PCRE2, if wanted+#+if test -n "${pcre2_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for PCRE2_HOME in ${pcre2_places} ; do+    if test -f "${PCRE2_HOME}/include/pcre2.h"; then break; fi+    PCRE2_HOME=""+  done +  PCRE2_OLD_LDFLAGS=$LDFLAGS+  PCRE2_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${PCRE2_HOME}"; then+    LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8" >&5-printf %s "checking for libpcre2-8... " >&6; }+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5+printf %s "checking for pcre2_compile_8 in -lpcre2-8... " >&6; }+if test ${ac_cv_lib_pcre2_8_pcre2_compile_8+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lpcre2-8  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if test -n "$PCRE2_CFLAGS"; then-    pkg_cv_PCRE2_CFLAGS="$PCRE2_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_PCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char pcre2_compile_8 ();+int+main (void)+{+return pcre2_compile_8 ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_pcre2_8_pcre2_compile_8=yes+else $as_nop+  ac_cv_lib_pcre2_8_pcre2_compile_8=no fi-if test -n "$PCRE2_LIBS"; then-    pkg_cv_PCRE2_LIBS="$PCRE2_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_PCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS fi- else-    pkg_failed=untried+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_8_pcre2_compile_8" >&5+printf "%s\n" "$ac_cv_lib_pcre2_8_pcre2_compile_8" >&6; }+if test "x$ac_cv_lib_pcre2_8_pcre2_compile_8" = xyes+then :+  pcre2_cv_libpcre2=yes+else $as_nop+  pcre2_cv_libpcre2=no fi +  ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "#define PCRE2_CODE_UNIT_WIDTH 8+"+if test "x$ac_cv_header_pcre2_h" = xyes+then :+  pcre2_cv_pcre2_h=yes+else $as_nop+  pcre2_cv_pcre2_h=no+fi +  case "8" in+  *16*)+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_16 in -lpcre2-16" >&5+printf %s "checking for pcre2_compile_16 in -lpcre2-16... " >&6; }+if test ${ac_cv_lib_pcre2_16_pcre2_compile_16+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lpcre2-16  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char pcre2_compile_16 ();+int+main (void)+{+return pcre2_compile_16 ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_pcre2_16_pcre2_compile_16=yes+else $as_nop+  ac_cv_lib_pcre2_16_pcre2_compile_16=no+fi+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_16_pcre2_compile_16" >&5+printf "%s\n" "$ac_cv_lib_pcre2_16_pcre2_compile_16" >&6; }+if test "x$ac_cv_lib_pcre2_16_pcre2_compile_16" = xyes+then :+  pcre2_cv_libpcre2_16=yes+else $as_nop+  pcre2_cv_libpcre2_16=no+fi -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no+    ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "#define PCRE2_CODE_UNIT_WIDTH 16+"+if test "x$ac_cv_header_pcre2_h" = xyes+then :+  pcre2_cv_pcre2_16_h=yes+else $as_nop+  pcre2_cv_pcre2_16_h=no fi-        if test $_pkg_short_errors_supported = yes; then-	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8" 2>&1`-        else-	        PCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$PCRE2_PKG_ERRORS" >&5 +    if test "$pcre2_cv_libpcre2_16" = "no" || test "$pcre2_cv_pcre2_16_h" = "no"; then+      pcre2_cv_libpcre2=no+    fi+    ;;+  esac+  case "8" in+  *32*)+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_32 in -lpcre2-32" >&5+printf %s "checking for pcre2_compile_32 in -lpcre2-32... " >&6; }+if test ${ac_cv_lib_pcre2_32_pcre2_compile_32+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lpcre2-32  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char pcre2_compile_32 ();+int+main (void)+{+return pcre2_compile_32 ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_pcre2_32_pcre2_compile_32=yes+else $as_nop+  ac_cv_lib_pcre2_32_pcre2_compile_32=no+fi+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_32_pcre2_compile_32" >&5+printf "%s\n" "$ac_cv_lib_pcre2_32_pcre2_compile_32" >&6; }+if test "x$ac_cv_lib_pcre2_32_pcre2_compile_32" = xyes+then :+  pcre2_cv_libpcre2_32=yes+else $as_nop+  pcre2_cv_libpcre2_32=no+fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+    ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "#define PCRE2_CODE_UNIT_WIDTH 32+"+if test "x$ac_cv_header_pcre2_h" = xyes+then :+  pcre2_cv_pcre2_32_h=yes+else $as_nop+  pcre2_cv_pcre2_32_h=no+fi -    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+    if test "$pcre2_cv_libpcre2_32" = "no" || test "$pcre2_cv_pcre2_32_h" = "no"; then+      pcre2_cv_libpcre2=no+    fi+  esac+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -else-	PCRE2_CFLAGS=$pkg_cv_PCRE2_CFLAGS-	PCRE2_LIBS=$pkg_cv_PCRE2_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  if test "$pcre2_cv_libpcre2" = "yes" && test "$pcre2_cv_pcre2_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"+                LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"+                LIBS="-lpcre2-8 $LIBS"  printf "%s\n" "#define HAVE_PCRE2 1" >>confdefs.h -    have_pcre2=yes-    CPPFLAGS="$CPPFLAGS $PCRE2_CFLAGS"-    LIBS="$LIBS $PCRE2_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "recommended PCRE2 library not found: checking for Boost.Regex"+  fi fi -fi -if test "x$have_pcre2" != "xyes"; then+if test "x$pcre2_cv_libpcre2" != "xyes" || test "x$pcre2_cv_pcre2_h" != "xyes"; then   # PCRE2 was not found: check for alternative Boost Regex library and header  @@ -9515,649 +9574,805 @@ fi # Compression libraries ################################################################################ -# Check whether --enable-zlib was given.-if test ${enable_zlib+y}-then :-  enableval=$enable_zlib;-fi+#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if zlib is wanted" >&5+printf %s "checking if zlib is wanted... " >&6; }+zlib_places="/usr/local /usr /opt/homebrew /opt/local /sw" -if test "x$enable_zlib" != "xno"+# Check whether --with-zlib was given.+if test ${with_zlib+y} then :---pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5-printf %s "checking for zlib... " >&6; }--if test -n "$ZLIB_CFLAGS"; then-    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5-  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried-fi-if test -n "$ZLIB_LIBS"; then-    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5-  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes+  withval=$with_zlib; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    zlib_places="$withval $zlib_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi else-  pkg_failed=yes+  zlib_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; } fi- else-    pkg_failed=untried+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi +#+# Locate zlib, if wanted+#+if test -n "${zlib_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for ZLIB_HOME in ${zlib_places} ; do+    if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi+    ZLIB_HOME=""+  done +  ZLIB_OLD_LDFLAGS=$LDFLAGS+  ZLIB_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${ZLIB_HOME}"; then+    LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5+printf %s "checking for inflateEnd in -lz... " >&6; }+if test ${ac_cv_lib_z_inflateEnd+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lz  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char inflateEnd ();+int+main (void)+{+return inflateEnd ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_z_inflateEnd=yes+else $as_nop+  ac_cv_lib_z_inflateEnd=no fi-        if test $_pkg_short_errors_supported = yes; then-	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`-        else-	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$ZLIB_PKG_ERRORS" >&5---    # zlib is recommended, but required if --enable-zlib is given-    if test -z "$enable_zlib"+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5+printf "%s\n" "$ac_cv_lib_z_inflateEnd" >&6; }+if test "x$ac_cv_lib_z_inflateEnd" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Recommended zlib not found: ugrep option -z is disabled" >&5-printf "%s\n" "$as_me: WARNING: Recommended zlib not found: ugrep option -z is disabled" >&2;}+  zlib_cv_libz=yes else $as_nop-  as_fn_error $? "zlib not found. Is the devel package installed?" "$LINENO" 5-+  zlib_cv_libz=no fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--    # zlib is recommended, but required if --enable-zlib is given-    if test -z "$enable_zlib"+  ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"+if test "x$ac_cv_header_zlib_h" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Recommended zlib not found: ugrep option -z is disabled" >&5-printf "%s\n" "$as_me: WARNING: Recommended zlib not found: ugrep option -z is disabled" >&2;}+  zlib_cv_zlib_h=yes else $as_nop-  as_fn_error $? "zlib not found. Is the devel package installed?" "$LINENO" 5-+  zlib_cv_zlib_h=no fi -else-	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS-	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu++  if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"+                LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"+                LIBS="-lz $LIBS"  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h -    have_libz=yes-    CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"-    LIBS="$LIBS $ZLIB_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "recommended zlib not found: ugrep option -z is disabled"+  fi fi -fi -# compression libraries are only used when zlib is available to enable ugrep option -z-if test "x$have_libz" = "xyes" ; then+if test -n "${zlib_places}"; then++#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if bzlib is wanted" >&5+printf %s "checking if bzlib is wanted... " >&6; }+bzlib_places="/usr/local /usr /opt/homebrew /opt/local /sw" -# Check whether --enable-bzip2 was given.-if test ${enable_bzip2+y}+# Check whether --with-bzlib was given.+if test ${with_bzlib+y} then :-  enableval=$enable_bzip2;+  withval=$with_bzlib; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    bzlib_places="$withval $bzlib_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi+else+  bzlib_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; }+fi+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi -if test "x$enable_bzip2" != "xno"-then :+#+# Locate bzlib, if wanted+#+if test -n "${bzlib_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for BZ2LIB_HOME in ${bzlib_places} ; do+    if test -f "${BZ2LIB_HOME}/include/bzlib.h"; then break; fi+    BZ2LIB_HOME=""+  done -  # Check for libbz2 library and header-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing BZ2_bzRead" >&5-printf %s "checking for library containing BZ2_bzRead... " >&6; }-if test ${ac_cv_search_BZ2_bzRead+y}+  BZ2LIB_OLD_LDFLAGS=$LDFLAGS+  BZ2LIB_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${BZ2LIB_HOME}"; then+    LDFLAGS="$LDFLAGS -L${BZ2LIB_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${BZ2LIB_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzRead in -lbz2" >&5+printf %s "checking for BZ2_bzRead in -lbz2... " >&6; }+if test ${ac_cv_lib_bz2_BZ2_bzRead+y} then :   printf %s "(cached) " >&6 else $as_nop-  ac_func_search_save_LIBS=$LIBS+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lbz2  $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h.  */ -namespace conftest {-  extern "C" int BZ2_bzRead ();-}+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char BZ2_bzRead (); int main (void) {-return conftest::BZ2_bzRead ();+return BZ2_bzRead ();   ;   return 0; } _ACEOF-for ac_lib in '' bz2-do-  if test -z "$ac_lib"; then-    ac_res="none required"-  else-    ac_res=-l$ac_lib-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"-  fi-  if ac_fn_cxx_try_link "$LINENO"+if ac_fn_c_try_link "$LINENO" then :-  ac_cv_search_BZ2_bzRead=$ac_res+  ac_cv_lib_bz2_BZ2_bzRead=yes+else $as_nop+  ac_cv_lib_bz2_BZ2_bzRead=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \-    conftest$ac_exeext-  if test ${ac_cv_search_BZ2_bzRead+y}-then :-  break+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS fi-done-if test ${ac_cv_search_BZ2_bzRead+y}+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzRead" >&5+printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzRead" >&6; }+if test "x$ac_cv_lib_bz2_BZ2_bzRead" = xyes then :-+  bzlib_cv_libbz2=yes else $as_nop-  ac_cv_search_BZ2_bzRead=no-fi-rm conftest.$ac_ext-LIBS=$ac_func_search_save_LIBS+  bzlib_cv_libbz2=no fi-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_BZ2_bzRead" >&5-printf "%s\n" "$ac_cv_search_BZ2_bzRead" >&6; }-ac_res=$ac_cv_search_BZ2_bzRead-if test "$ac_res" != no-then :-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -    # Check bzip2 header-    ac_fn_cxx_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"+  ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" if test "x$ac_cv_header_bzlib_h" = xyes then :---printf "%s\n" "#define HAVE_LIBBZ2 1" >>confdefs.h--+  bzlib_cv_bzlib_h=yes else $as_nop--      # bzip2 is recommended, but required if --enable-bzip2 is given-      if test -z "$enable_bzip2"-then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files" >&5-printf "%s\n" "$as_me: WARNING: Recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files" >&2;}-else $as_nop-  as_fn_error $? "libbz2 not found. Is the devel package installed?" "$LINENO" 5-+  bzlib_cv_bzlib_h=no fi -fi+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +  if test "$bzlib_cv_libbz2" = "yes" && test "$bzlib_cv_bzlib_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # -fi+                CPPFLAGS="$CPPFLAGS -I${BZ2LIB_HOME}/include"+                LDFLAGS="$LDFLAGS -L${BZ2LIB_HOME}/lib"+                LIBS="-lbz2 $LIBS" +printf "%s\n" "#define HAVE_LIBBZ2 1" >>confdefs.h -fi -# Check whether --enable-lzma was given.-if test ${enable_lzma+y}-then :-  enableval=$enable_lzma;+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files"+  fi fi -if test "x$enable_lzma" != "xno"-then : +#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lzma is wanted" >&5+printf %s "checking if lzma is wanted... " >&6; }+lzma_places="/usr/local /usr /opt/homebrew /opt/local /sw" -pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5-printf %s "checking for liblzma... " >&6; }--if test -n "$LZMA_CFLAGS"; then-    pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5-  ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_LZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried-fi-if test -n "$LZMA_LIBS"; then-    pkg_cv_LZMA_LIBS="$LZMA_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5-  ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_LZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes+# Check whether --with-lzma was given.+if test ${with_lzma+y}+then :+  withval=$with_lzma; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    lzma_places="$withval $lzma_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi else-  pkg_failed=yes+  lzma_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; } fi- else-    pkg_failed=untried+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi +#+# Locate lzma, if wanted+#+if test -n "${lzma_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for LZMA_HOME in ${lzma_places} ; do+    if test -f "${LZMA_HOME}/include/lzma.h"; then break; fi+    LZMA_HOME=""+  done +  LZMA_OLD_LDFLAGS=$LDFLAGS+  LZMA_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${LZMA_HOME}"; then+    LDFLAGS="$LDFLAGS -L${LZMA_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${LZMA_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5+printf %s "checking for lzma_code in -llzma... " >&6; }+if test ${ac_cv_lib_lzma_lzma_code+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-llzma  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char lzma_code ();+int+main (void)+{+return lzma_code ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_lzma_lzma_code=yes+else $as_nop+  ac_cv_lib_lzma_lzma_code=no fi-        if test $_pkg_short_errors_supported = yes; then-	        LZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1`-        else-	        LZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$LZMA_PKG_ERRORS" >&5---    # liblzma is recommended, but required if --enable-lzma is given-    if test -z "$enable_lzma"+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5+printf "%s\n" "$ac_cv_lib_lzma_lzma_code" >&6; }+if test "x$ac_cv_lib_lzma_lzma_code" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files" >&5-printf "%s\n" "$as_me: WARNING: Recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files" >&2;}+  lzma_cv_liblzma=yes else $as_nop-  as_fn_error $? "liblzma not found. Is the devel package installed?" "$LINENO" 5-+  lzma_cv_liblzma=no fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--    # liblzma is recommended, but required if --enable-lzma is given-    if test -z "$enable_lzma"+  ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"+if test "x$ac_cv_header_lzma_h" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files" >&5-printf "%s\n" "$as_me: WARNING: Recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files" >&2;}+  lzma_cv_lzma_h=yes else $as_nop-  as_fn_error $? "liblzma not found. Is the devel package installed?" "$LINENO" 5-+  lzma_cv_lzma_h=no fi -else-	LZMA_CFLAGS=$pkg_cv_LZMA_CFLAGS-	LZMA_LIBS=$pkg_cv_LZMA_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu++  if test "$lzma_cv_liblzma" = "yes" && test "$lzma_cv_lzma_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${LZMA_HOME}/include"+                LDFLAGS="$LDFLAGS -L${LZMA_HOME}/lib"+                LIBS="-llzma $LIBS"  printf "%s\n" "#define HAVE_LIBLZMA 1" >>confdefs.h -    CPPFLAGS="$CPPFLAGS $LZMA_CFLAGS"-    LIBS="$LIBS $LZMA_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files"+  fi fi -fi -# Check whether --enable-lz4 was given.-if test ${enable_lz4+y}-then :-  enableval=$enable_lz4;-fi+#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lz4 is wanted" >&5+printf %s "checking if lz4 is wanted... " >&6; }+lz4_places="/usr/local /usr /opt/homebrew /opt/local /sw" -if test "x$enable_lz4" != "xno"+# Check whether --with-lz4 was given.+if test ${with_lz4+y} then :---pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5-printf %s "checking for liblz4... " >&6; }--if test -n "$LZ4_CFLAGS"; then-    pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5-  ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried-fi-if test -n "$LZ4_LIBS"; then-    pkg_cv_LZ4_LIBS="$LZ4_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5-  ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes+  withval=$with_lz4; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    lz4_places="$withval $lz4_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi else-  pkg_failed=yes+  lz4_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; } fi- else-    pkg_failed=untried+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi +#+# Locate lz4, if wanted+#+if test -n "${lz4_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for LZ4_HOME in ${lz4_places} ; do+    if test -f "${LZ4_HOME}/include/lz4.h"; then break; fi+    LZ4_HOME=""+  done +  LZ4_OLD_LDFLAGS=$LDFLAGS+  LZ4_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${LZ4_HOME}"; then+    LDFLAGS="$LDFLAGS -L${LZ4_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${LZ4_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LZ4_createStreamDecode in -llz4" >&5+printf %s "checking for LZ4_createStreamDecode in -llz4... " >&6; }+if test ${ac_cv_lib_lz4_LZ4_createStreamDecode+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-llz4  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char LZ4_createStreamDecode ();+int+main (void)+{+return LZ4_createStreamDecode ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_lz4_LZ4_createStreamDecode=yes+else $as_nop+  ac_cv_lib_lz4_LZ4_createStreamDecode=no fi-        if test $_pkg_short_errors_supported = yes; then-	        LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`-        else-	        LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$LZ4_PKG_ERRORS" >&5---    # liblz4 is optional by default, but required if --enable-lz4 is given-    if test -z "$enable_lz4"+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_createStreamDecode" >&5+printf "%s\n" "$ac_cv_lib_lz4_LZ4_createStreamDecode" >&6; }+if test "x$ac_cv_lib_lz4_LZ4_createStreamDecode" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional liblz4 not found: ugrep option -z cannot search .lz4 files" >&5-printf "%s\n" "$as_me: Optional liblz4 not found: ugrep option -z cannot search .lz4 files" >&6;}+  lz4_cv_liblz4=yes else $as_nop-  as_fn_error $? "liblz4 not found. Is the devel package installed?" "$LINENO" 5-+  lz4_cv_liblz4=no fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--    # liblz4 is optional by default, but required if --enable-lz4 is given-    if test -z "$enable_lz4"+  ac_fn_c_check_header_compile "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"+if test "x$ac_cv_header_lz4_h" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional liblz4 not found: ugrep option -z cannot search .lz4 files" >&5-printf "%s\n" "$as_me: Optional liblz4 not found: ugrep option -z cannot search .lz4 files" >&6;}+  lz4_cv_lz4_h=yes else $as_nop-  as_fn_error $? "liblz4 not found. Is the devel package installed?" "$LINENO" 5-+  lz4_cv_lz4_h=no fi -else-	LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS-	LZ4_LIBS=$pkg_cv_LZ4_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu++  if test "$lz4_cv_liblz4" = "yes" && test "$lz4_cv_lz4_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${LZ4_HOME}/include"+                LDFLAGS="$LDFLAGS -L${LZ4_HOME}/lib"+                LIBS="-llz4 $LIBS"  printf "%s\n" "#define HAVE_LIBLZ4 1" >>confdefs.h -    CPPFLAGS="$CPPFLAGS $LZ4_CFLAGS"-    LIBS="$LIBS $LZ4_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "optional liblz4 not found: install if you want ugrep option -z to search .lz4 files"+  fi fi -fi -# Check whether --enable-zstd was given.-if test ${enable_zstd+y}-then :-  enableval=$enable_zstd;-fi+#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if zstd is wanted" >&5+printf %s "checking if zstd is wanted... " >&6; }+zstd_places="/usr/local /usr /opt/homebrew /opt/local /sw" -if test "x$enable_zstd" != "xno"+# Check whether --with-zstd was given.+if test ${with_zstd+y} then :---pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libzstd" >&5-printf %s "checking for libzstd... " >&6; }--if test -n "$ZSTD_CFLAGS"; then-    pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried-fi-if test -n "$ZSTD_LIBS"; then-    pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes+  withval=$with_zstd; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    zstd_places="$withval $zstd_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi else-  pkg_failed=yes+  zstd_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; } fi- else-    pkg_failed=untried+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi +#+# Locate zstd, if wanted+#+if test -n "${zstd_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for ZSTD_HOME in ${zstd_places} ; do+    if test -f "${ZSTD_HOME}/include/zstd.h"; then break; fi+    ZSTD_HOME=""+  done +  ZSTD_OLD_LDFLAGS=$LDFLAGS+  ZSTD_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${ZSTD_HOME}"; then+    LDFLAGS="$LDFLAGS -L${ZSTD_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${ZSTD_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5+printf %s "checking for ZSTD_decompressStream in -lzstd... " >&6; }+if test ${ac_cv_lib_zstd_ZSTD_decompressStream+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lzstd  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char ZSTD_decompressStream ();+int+main (void)+{+return ZSTD_decompressStream ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO"+then :+  ac_cv_lib_zstd_ZSTD_decompressStream=yes+else $as_nop+  ac_cv_lib_zstd_ZSTD_decompressStream=no fi-        if test $_pkg_short_errors_supported = yes; then-	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd" 2>&1`-        else-	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$ZSTD_PKG_ERRORS" >&5---    # libzstd is optional by default, but required if --enable-zstd is given-    if test -z "$enable_zstd"+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5+printf "%s\n" "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; }+if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional libzstd not found: ugrep option -z cannot search .zst files" >&5-printf "%s\n" "$as_me: Optional libzstd not found: ugrep option -z cannot search .zst files" >&6;}+  zstd_cv_libzstd=yes else $as_nop-  as_fn_error $? "libzstd not found. Is the devel package installed?" "$LINENO" 5-+  zstd_cv_libzstd=no fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--    # libzstd is optional by default, but required if --enable-zstd is given-    if test -z "$enable_zstd"+  ac_fn_c_check_header_compile "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"+if test "x$ac_cv_header_zstd_h" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional libzstd not found: ugrep option -z cannot search .zst files" >&5-printf "%s\n" "$as_me: Optional libzstd not found: ugrep option -z cannot search .zst files" >&6;}+  zstd_cv_zstd_h=yes else $as_nop-  as_fn_error $? "libzstd not found. Is the devel package installed?" "$LINENO" 5-+  zstd_cv_zstd_h=no fi -else-	ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS-	ZSTD_LIBS=$pkg_cv_ZSTD_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu++  if test "$zstd_cv_libzstd" = "yes" && test "$zstd_cv_zstd_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${ZSTD_HOME}/include"+                LDFLAGS="$LDFLAGS -L${ZSTD_HOME}/lib"+                LIBS="-lzstd $LIBS"  printf "%s\n" "#define HAVE_LIBZSTD 1" >>confdefs.h -    CPPFLAGS="$CPPFLAGS $ZSTD_CFLAGS"-    LIBS="$LIBS $ZSTD_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "optional libzstd not found: install if you want ugrep option -z to search .zst files"+  fi fi -fi -# Check whether --enable-brotli was given.-if test ${enable_brotli+y}-then :-  enableval=$enable_brotli;-fi+#+# Handle user hints+#+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if brotli is wanted" >&5+printf %s "checking if brotli is wanted... " >&6; }+brotli_places="/usr/local /usr /opt/homebrew /opt/local /sw" -if test "x$enable_brotli" != "xno"+# Check whether --with-brotli was given.+if test ${with_brotli+y} then :---pkg_failed=no-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbrotlidec" >&5-printf %s "checking for libbrotlidec... " >&6; }--if test -n "$BROTLI_CFLAGS"; then-    pkg_cv_BROTLI_CFLAGS="$BROTLI_CFLAGS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbrotlidec\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libbrotlidec") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_BROTLI_CFLAGS=`$PKG_CONFIG --cflags "libbrotlidec" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes-else-  pkg_failed=yes-fi- else-    pkg_failed=untried-fi-if test -n "$BROTLI_LIBS"; then-    pkg_cv_BROTLI_LIBS="$BROTLI_LIBS"- elif test -n "$PKG_CONFIG"; then-    if test -n "$PKG_CONFIG" && \-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbrotlidec\""; } >&5-  ($PKG_CONFIG --exists --print-errors "libbrotlidec") 2>&5-  ac_status=$?-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5-  test $ac_status = 0; }; then-  pkg_cv_BROTLI_LIBS=`$PKG_CONFIG --libs "libbrotlidec" 2>/dev/null`-		      test "x$?" != "x0" && pkg_failed=yes+  withval=$with_brotli; if test "$withval" != "no" ; then+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; }+  if test -d "$withval"+  then+    brotli_places="$withval $brotli_places"+  else+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5+printf "%s\n" "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}+  fi else-  pkg_failed=yes+  brotli_places=""+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5+printf "%s\n" "no" >&6; } fi- else-    pkg_failed=untried+else $as_nop+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5+printf "%s\n" "yes" >&6; } fi +#+# Locate brotli, if wanted+#+if test -n "${brotli_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for BROTLI_HOME in ${brotli_places} ; do+    if test -f "${BROTLI_HOME}/include/brotli/decode.h"; then break; fi+    BROTLI_HOME=""+  done +  BROTLI_OLD_LDFLAGS=$LDFLAGS+  BROTLI_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${BROTLI_HOME}"; then+    LDFLAGS="$LDFLAGS -L${BROTLI_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${BROTLI_HOME}/include"+  fi+  ac_ext=c+ac_cpp='$CPP $CPPFLAGS'+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $pkg_failed = yes; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then-        _pkg_short_errors_supported=yes-else-        _pkg_short_errors_supported=no-fi-        if test $_pkg_short_errors_supported = yes; then-	        BROTLI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbrotlidec" 2>&1`-        else-	        BROTLI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbrotlidec" 2>&1`-        fi-	# Put the nasty error message in config.log where it belongs-	echo "$BROTLI_PKG_ERRORS" >&5-+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BrotliDecoderCreateInstance in -lbrotlidec" >&5+printf %s "checking for BrotliDecoderCreateInstance in -lbrotlidec... " >&6; }+if test ${ac_cv_lib_brotlidec_BrotliDecoderCreateInstance+y}+then :+  printf %s "(cached) " >&6+else $as_nop+  ac_check_lib_save_LIBS=$LIBS+LIBS="-lbrotlidec  $LIBS"+cat confdefs.h - <<_ACEOF >conftest.$ac_ext+/* end confdefs.h.  */ -    # libbrotlidec is optional by default, but required if --enable-brotli is given-    if test -z "$enable_brotli"+/* Override any GCC internal prototype to avoid an error.+   Use char because int might match the return type of a GCC+   builtin and then its argument prototype would still apply.  */+char BrotliDecoderCreateInstance ();+int+main (void)+{+return BrotliDecoderCreateInstance ();+  ;+  return 0;+}+_ACEOF+if ac_fn_c_try_link "$LINENO" then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional libbrotlidec not found: ugrep option -z cannot search .br files" >&5-printf "%s\n" "$as_me: Optional libbrotlidec not found: ugrep option -z cannot search .br files" >&6;}-elif as_fn_error $? "libbrotlidec not found. Is the devel package installed?" "$LINENO" 5+  ac_cv_lib_brotlidec_BrotliDecoderCreateInstance=yes+else $as_nop+  ac_cv_lib_brotlidec_BrotliDecoderCreateInstance=no+fi+rm -f core conftest.err conftest.$ac_objext conftest.beam \+    conftest$ac_exeext conftest.$ac_ext+LIBS=$ac_check_lib_save_LIBS+fi+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_brotlidec_BrotliDecoderCreateInstance" >&5+printf "%s\n" "$ac_cv_lib_brotlidec_BrotliDecoderCreateInstance" >&6; }+if test "x$ac_cv_lib_brotlidec_BrotliDecoderCreateInstance" = xyes then :-+  brotli_cv_libbrotli=yes+else $as_nop+  brotli_cv_libbrotli=no fi -elif test $pkg_failed = untried; then-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5-printf "%s\n" "no" >&6; }--    # libbrotlidec is optional by default, but required if --enable-brotli is given-    if test -z "$enable_brotli"+  ac_fn_c_check_header_compile "$LINENO" "brotli/decode.h" "ac_cv_header_brotli_decode_h" "$ac_includes_default"+if test "x$ac_cv_header_brotli_decode_h" = xyes then :-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Optional libbrotlidec not found: ugrep option -z cannot search .br files" >&5-printf "%s\n" "$as_me: Optional libbrotlidec not found: ugrep option -z cannot search .br files" >&6;}-elif as_fn_error $? "libbrotlidec not found. Is the devel package installed?" "$LINENO" 5-then :-+  brotli_cv_brotli_h=yes+else $as_nop+  brotli_cv_brotli_h=no fi -else-	BROTLI_CFLAGS=$pkg_cv_BROTLI_CFLAGS-	BROTLI_LIBS=$pkg_cv_BROTLI_LIBS-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5-printf "%s\n" "yes" >&6; }+  ac_ext=cpp+ac_cpp='$CXXCPP $CPPFLAGS'+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu++  if test "$brotli_cv_libbrotli" = "yes" && test "$brotli_cv_brotli_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    # +                CPPFLAGS="$CPPFLAGS -I${BROTLI_HOME}/include"+                LDFLAGS="$LDFLAGS -L${BROTLI_HOME}/lib"+                LIBS="-lbrotlidec -lbrotlienc $LIBS"  printf "%s\n" "#define HAVE_LIBBROTLI 1" >>confdefs.h -    CPPFLAGS="$CPPFLAGS $BROTLI_CFLAGS"-    LIBS="$LIBS $BROTLI_LIBS" +  else+    #+    # If either header or library was not found, action-if-not-found+    #+    echo "optional brotli library not found: install if you want ugrep option -z to search .br files"+  fi fi -fi   # Check whether --with-bzip3 was given.@@ -10168,16 +10383,10 @@ else $as_nop   with_bzip3_library="" fi -if test -n "$with_bzip3_library"-then :--  if test "x$with_bzip3" = "xyes"-then :-+if test "x$with_bzip3_library" != "x"; then+  if test "x$with_bzip3" = "xyes"; then     unset with_bzip3--fi-  # libbzip3 is optional by default and not checked and enabled unless --with-bzip3 is given+  fi   # # Handle user hints #@@ -10306,29 +10515,23 @@ printf "%s\n" "#define HAVE_LIBBZIP3 1" >>confdefs.h     #     # If either header or library was not found, action-if-not-found     #--    as_fn_error $? "\"libbzip3 not found: ugrep option -z cannot search .bz3 files\"" "$LINENO" 5-+    echo "optional libbzip3 not found: install if you want ugrep option -z to search .bz3 files"   fi fi - fi --# Check whether --with-7zip was given.-if test ${with_7zip+y}+# Check whether --enable-7zip was given.+if test ${enable_7zip+y} then :-  withval=$with_7zip; with_7zip="$enableval"+  enableval=$enable_7zip; with_7zip="$enableval" else $as_nop   with_7zip="yes" fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-7zip" >&5 printf %s "checking for --disable-7zip... " >&6; }-if test "x$with_7zip" = "xyes"-then :-+if test "x$with_7zip" = "xyes"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }   CPPFLAGS="$CPPFLAGS -I../lzma/C"@@ -10337,17 +10540,13 @@ printf "%s\n" "no" >&6; }  printf "%s\n" "#define HAVE_7ZIP 1" >>confdefs.h --else $as_nop-+else+  EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }-  EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"- fi  fi-  if test "x$with_7zip" = "xyes"; then   ENABLE_7ZIP_TRUE=   ENABLE_7ZIP_FALSE='#'@@ -10370,9 +10569,7 @@ else $as_nop   with_bash_completion_dir="yes" fi -if test "x$with_bash_completion_dir" = "xyes"-then :-+if test "x$with_bash_completion_dir" = "xyes"; then  pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bash-completion >= 2.0" >&5@@ -10444,11 +10641,8 @@ else printf "%s\n" "yes" >&6; } 	BASH_COMPLETION_DIR="`pkg-config --define-variable=datadir=$datadir --variable=completionsdir bash-completion`" fi--else $as_nop-+else   BASH_COMPLETION_DIR="$with_bash_completion_dir"- fi   if test "x$with_bash_completion_dir" != "xno"; then@@ -10469,9 +10663,7 @@ else $as_nop   with_fish_completion_dir="yes" fi -if test "x$with_fish_completion_dir" = "xyes"-then :-+if test "x$with_fish_completion_dir" = "xyes"; then  pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fish >= 3.0" >&5@@ -10543,11 +10735,8 @@ else printf "%s\n" "yes" >&6; } 	FISH_COMPLETION_DIR="`pkg-config --define-variable=datadir=$datadir --variable=completionsdir fish`" fi--else $as_nop-+else   FISH_COMPLETION_DIR="$with_fish_completion_dir"- fi   if test "x$with_fish_completion_dir" != "xno"; then@@ -10568,15 +10757,10 @@ else $as_nop   with_zsh_completion_dir="yes" fi -if test "x$with_zsh_completion_dir" = "xyes"-then :-+if test "x$with_zsh_completion_dir" = "xyes"; then   ZSH_COMPLETION_DIR="$datadir/zsh/site-functions"--else $as_nop-+else   ZSH_COMPLETION_DIR="$with_zsh_completion_dir"- fi   if test "x$with_zsh_completion_dir" != "xno"; then@@ -10603,19 +10787,14 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-grep-path" >&5 printf %s "checking for --with-grep-path... " >&6; }-if test -n "$with_grep_path"-then :-+if test "x$with_grep_path" != "x"; then   GREP_PATH="$with_grep_path"   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$with_grep_path\"" >&5 printf "%s\n" "\"$with_grep_path\"" >&6; }--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; }   GREP_PATH="${datadir}/ugrep/patterns"- fi  @@ -10630,18 +10809,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-grep-colors" >&5 printf %s "checking for --with-grep-colors... " >&6; }-if test -n "$with_grep_colors"-then :-+if test "x$with_grep_colors" != "x"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$with_grep_colors\"" >&5 printf "%s\n" "\"$with_grep_colors\"" >&6; }   EXTRA_CFLAGS="-DDEFAULT_GREP_COLORS=\"\\\"$with_grep_colors\\\"\" ${EXTRA_CFLAGS}"--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; }- fi  # Check whether --enable-auto-color was given.@@ -10654,18 +10828,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-auto-color" >&5 printf %s "checking for --disable-auto-color... " >&6; }-if test "x$with_no_auto_color" = "xno"-then :-+if test "x$with_no_auto_color" = "xno"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }   EXTRA_CFLAGS="-DWITH_COLOR ${EXTRA_CFLAGS}"--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }- fi  # Check whether --enable-color was given.@@ -10676,17 +10845,12 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-color" >&5 printf %s "checking for --enable-color... " >&6; }-if test "x$with_no_auto_color" = "xno"-then :-+if test "x$with_no_auto_color" = "xno"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }- fi  # Check whether --enable-pretty was given.@@ -10699,18 +10863,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-pretty" >&5 printf %s "checking for --enable-pretty... " >&6; }-if test "x$with_pretty" = "xyes"-then :-+if test "x$with_pretty" = "xyes"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }   EXTRA_CFLAGS="-DWITH_PRETTY ${EXTRA_CFLAGS}"--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }- fi  # Check whether --enable-pager was given.@@ -10723,18 +10882,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-pager" >&5 printf %s "checking for --enable-pager... " >&6; }-if test "x$with_pager" = "xyes"-then :-+if test "x$with_pager" = "xyes"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }   EXTRA_CFLAGS="-DWITH_PAGER ${EXTRA_CFLAGS}"--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }- fi  # Check whether --enable-hidden was given.@@ -10747,18 +10901,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-hidden" >&5 printf %s "checking for --enable-hidden... " >&6; }-if test "x$with_hidden" = "xno"-then :-+if test "x$with_hidden" = "xno"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }   EXTRA_CFLAGS="-DWITH_HIDDEN ${EXTRA_CFLAGS}"- fi  # Check whether --enable-mmap was given.@@ -10771,18 +10920,13 @@ fi  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-mmap" >&5 printf %s "checking for --disable-mmap... " >&6; }-if test "x$with_no_mmap" = "xno"-then :-+if test "x$with_no_mmap" = "xno"; then   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }--else $as_nop-+else   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }   EXTRA_CFLAGS="-DWITH_NO_MMAP ${EXTRA_CFLAGS}"- fi  @@ -11341,7 +11485,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log="-This file was extended by ugrep $as_me 5.1.2, which was+This file was extended by ugrep $as_me 5.1.3, which was generated by GNU Autoconf 2.71.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES@@ -11414,7 +11558,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\-ugrep config.status 5.1.2+ugrep config.status 5.1.3 configured by $0, generated by GNU Autoconf 2.71,   with options \\"\$ac_cs_config\\" 

configure.ac

@@ -1,4 +1,4 @@-AC_INIT([ugrep],[5.1.2],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com])+AC_INIT([ugrep],[5.1.3],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip]) AC_CONFIG_HEADERS([config.h]) AC_COPYRIGHT([Copyright (C) 2019-2024 Robert van Engelen, Genivia Inc.])@@ -80,9 +80,9 @@ AC_ARG_ENABLE(neon,  # SIMD_FLAGS applies to all source code SIMD_FLAGS=-# SIMD_AVX2_FLAGS applies to lib/matcher_avx2.cpp which is selected based on a runtime AVX2 check+# SIMD_AVX2_FLAGS only applies to lib/matcher_avx2.cpp which is selected based on a runtime AVX2 check SIMD_AVX2_FLAGS=-# SIMD_AVX512BW_FLAGS applies to lib/matcher_avx512bw.cpp which is selected based on a runtime AVX512BW check+# SIMD_AVX512BW_FLAGS only applies to lib/matcher_avx512bw.cpp which is selected based on a runtime AVX512BW check SIMD_AVX512BW_FLAGS=  if test "x$cross_compiling" = "xyes"; then@@ -136,27 +136,27 @@ if test "x$cross_compiling" = "xyes"; then       if ! test "x$with_no_neon" = "xyes"; then         AC_MSG_CHECKING([whether ${CXX} supports ARM NEON/AArch64 intrinsics])         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])],-            [mneon_ok=yes],-            [mneon_ok=no])+                          [mneon_ok=yes],+                          [mneon_ok=no])         if test "x$mneon_ok" = "xyes"; then           SIMD_FLAGS="-DHAVE_NEON"         else           save_CXXFLAGS=$CXXFLAGS           CXXFLAGS="-mfpu=neon"           AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])],-              [mneon_ok=yes],-              [mneon_ok=no])+                            [mneon_ok=yes],+                            [mneon_ok=no])           if test "x$mneon_ok" = "xyes"; then-          SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"+            SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"           else-# this is iffy,,,-          CXXFLAGS="-march=native -mfpu=neon"-          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])],-              [mneon_ok=yes],-              [mneon_ok=no])-          if test "x$mneon_ok" = "xyes"; then-          SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON"-          fi+            # this part is a bit iffy,,,+            CXXFLAGS="-march=native -mfpu=neon"+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[uint64x2_t n; uint64_t m = vgetq_lane_u64(n, 0);]])],+                              [mneon_ok=yes],+                              [mneon_ok=no])+            if test "x$mneon_ok" = "xyes"; then+              SIMD_FLAGS="-march=native -mfpu=neon -DHAVE_NEON"+            fi           fi           CXXFLAGS=$save_CXXFLAGS         fi@@ -171,55 +171,6 @@ if test "x$cross_compiling" = "xyes"; then     ;;   esac -# # cross compiling to a host CPU, check support for SIMD CPU extension compile flags-# case $host_cpu in-#   i[[3456]]86*|x86_64*|amd64*)-#     # enable SSE2/AVX2/AVX512BW extensions-#     if ! test "x$with_no_sse2" = "xyes"; then-#       AX_CHECK_COMPILE_FLAG([-msse2],-#                             [msse2_ok=yes],-#                             [msse2_ok=no])-#       if test "x$msse2_ok" = "xyes"; then-#         SIMD_FLAGS="-msse2 -DHAVE_SSE2"-#         if ! test "x$with_no_avx2" = "xyes"; then-#           AX_CHECK_COMPILE_FLAG([-mavx512bw],-#                                 [mavx_ok=yes],-#                                 [mavx_ok=no])-#           if test "x$mavx_ok" = "xyes"; then-#             SIMD_FLAGS="-msse2 -DHAVE_AVX512BW"-#             SIMD_AVX2_FLAGS="-mavx2"-#             SIMD_AVX512BW_FLAGS="-mavx512bw"-#           else-#             AX_CHECK_COMPILE_FLAG([-mavx2],-#                                   [mavx_ok=yes],-#                                   [mavx_ok=no])-#             if test "x$mavx_ok" = "xyes"; then-#               SIMD_FLAGS="-msse2 -DHAVE_AVX2"-#               SIMD_AVX2_FLAGS="-mavx2"-#             fi-#           fi-#         fi-#       fi-#     fi-#   ;;-#   armv5*|armv6*)-#   ;;-#   arm*)-#     # enable arm >= 7 neon extensions with option -mfpu=neon-#     if ! test "x$with_no_neon" = "xyes"; then-#       AX_CHECK_COMPILE_FLAG([-mfpu=neon],-#                             [SIMD_FLAGS="-mfpu=neon -DHAVE_NEON"],-#                             [SIMD_FLAGS=""])-#     fi-#   ;;-#   aarch64*)-#     # enable AArch64 neon extensions-#     if ! test "x$with_no_neon" = "xyes"; then-#       SIMD_FLAGS="-DHAVE_NEON"-#     fi-#   ;;-# esac- else    if ! test "x$with_no_sse2" = "xyes"; then@@ -331,22 +282,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ # PCRE2 or Boost Regex ################################################################################ -AC_ARG_ENABLE([pcre2],[-  --enable-pcre2          use PCRE2 for option -P-                          @<:@defaults to enabled if PCRE2 is installed@:>@-  --disable-pcre2         do not use PCRE2])-AS_IF([test "x$enable_pcre2" != "xno"],[-  PKG_CHECK_MODULES([PCRE2],[libpcre2-8],[-    AC_DEFINE([HAVE_PCRE2],[1],[Use PCRE2 (Perl Compatible Regular Expression Library)])-    have_pcre2=yes-    CPPFLAGS="$CPPFLAGS $PCRE2_CFLAGS"-    LIBS="$LIBS $PCRE2_LIBS"-  ],[-    AC_MSG_RESULT(no)-  ])-])+AX_CHECK_PCRE2([8], [], [echo "recommended PCRE2 library not found: checking for Boost.Regex"]) -if test "x$have_pcre2" != "xyes"; then+if test "x$pcre2_cv_libpcre2" != "xyes" || test "x$pcre2_cv_pcre2_h" != "xyes"; then   # PCRE2 was not found: check for alternative Boost Regex library and header   AX_BOOST_REGEX   AC_DEFINE([BOOST_REGEX_STANDALONE],[1],[Signal to boost lib that it is being used without the rest of boost])@@ -356,153 +294,50 @@ fi # Compression libraries ################################################################################ -AC_ARG_ENABLE([zlib],[-  --enable-zlib           Use zlib to enable searching inside compressed files.-                          @<:@defaults to enabled if zlib is installed@:>@-  --disable-zlib          Do not use zlib])-AS_IF([test "x$enable_zlib" != "xno"],[-  PKG_CHECK_MODULES([ZLIB],[zlib],[-    AC_DEFINE([HAVE_LIBZ],[1],[Use libz compression library])-    have_libz=yes-    CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"-    LIBS="$LIBS $ZLIB_LIBS"-  ],[-    # zlib is recommended, but required if --enable-zlib is given-    AS_IF([test -z "$enable_zlib" ],-      [AC_MSG_WARN([Recommended zlib not found: ugrep option -z is disabled])],-      [AC_MSG_ERROR([zlib not found. Is the devel package installed?])]-    )-  ])-])+AX_CHECK_ZLIB([], [echo "recommended zlib not found: ugrep option -z is disabled"]) -# compression libraries are only used when zlib is available to enable ugrep option -z-if test "x$have_libz" = "xyes" ; then--AC_ARG_ENABLE([bzip2],[-  --enable-bzip2          Use libbz2 to enable searching inside BZ and BZ2 compressed files.-                          @<:@defaults to enabled if libbz2 is installed@:>@-  --disable-bzip2         Do not use bzip2])-AS_IF([test "x$enable_bzip2" != "xno"],[-  # Check for libbz2 library and header-  AC_SEARCH_LIBS([BZ2_bzRead],[bz2],[-    # Check bzip2 header-    AC_CHECK_HEADER([bzlib.h],[-      AC_DEFINE([HAVE_LIBBZ2],[1],[Use bzip2 compression library])-    ],[-      # bzip2 is recommended, but required if --enable-bzip2 is given-      AS_IF([test -z "$enable_bzip2" ],-        [AC_MSG_WARN([Recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files])],-        [AC_MSG_ERROR([libbz2 not found. Is the devel package installed?])]-      )-    ])-  ])-])+if test -n "${zlib_places}"; then -AC_ARG_ENABLE([lzma],[-  --enable-lzma           Use liblzma to enable searching inside LZMA and XZ compressed files.-                          @<:@defaults to enabled if liblzma is installed@:>@-  --disable-lzma          Do not use liblzma])-AS_IF([test "x$enable_lzma" != "xno"],[-  PKG_CHECK_MODULES([LZMA],[liblzma],[-    AC_DEFINE([HAVE_LIBLZMA],[1],[Use liblzma compression library])-    CPPFLAGS="$CPPFLAGS $LZMA_CFLAGS"-    LIBS="$LIBS $LZMA_LIBS"-  ],[-    # liblzma is recommended, but required if --enable-lzma is given-    AS_IF([test -z "$enable_lzma" ],-      [AC_MSG_WARN([Recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files])],-      [AC_MSG_ERROR([liblzma not found. Is the devel package installed?])]-    )-  ])-])+AX_CHECK_BZ2LIB([], [echo "recommended libbz2 not found: ugrep option -z cannot search .bz and .bz2 files"]) -AC_ARG_ENABLE([lz4],[-  --enable-lz4            Use liblz4 to enable searching inside LZ4 compressed files.-                          @<:@defaults to enabled if liblz4 is installed@:>@-  --disable-lz4           Do not use liblz4])-AS_IF([test "x$enable_lz4" != "xno"],[-  PKG_CHECK_MODULES([LZ4],[liblz4],[-    AC_DEFINE([HAVE_LIBLZ4],[1],[Use liblz4 compression library])-    CPPFLAGS="$CPPFLAGS $LZ4_CFLAGS"-    LIBS="$LIBS $LZ4_LIBS"-  ],[-    # liblz4 is optional by default, but required if --enable-lz4 is given-    AS_IF([test -z "$enable_lz4" ],-      [AC_MSG_NOTICE([Optional liblz4 not found: ugrep option -z cannot search .lz4 files])],-      [AC_MSG_ERROR([liblz4 not found. Is the devel package installed?])]-    )-  ])-])+AX_CHECK_LZMALIB([], [echo "recommended liblzma not found: ugrep option -z cannot search .lzma and .xz files"]) -AC_ARG_ENABLE([zstd],[-  --enable-zstd           Use libzstd to enable searching inside ZST compressed files.-                          @<:@defaults to enabled if libzstd is installed@:>@-  --disable-zstd          Do not use libzstd])-AS_IF([test "x$enable_zstd" != "xno"],[-  PKG_CHECK_MODULES([ZSTD],[libzstd],[-    AC_DEFINE([HAVE_LIBZSTD],[1],[Use libzstd compression library])-    CPPFLAGS="$CPPFLAGS $ZSTD_CFLAGS"-    LIBS="$LIBS $ZSTD_LIBS"-  ],[-    # libzstd is optional by default, but required if --enable-zstd is given-    AS_IF([test -z "$enable_zstd" ],-      [AC_MSG_NOTICE([Optional libzstd not found: ugrep option -z cannot search .zst files])],-      [AC_MSG_ERROR([libzstd not found. Is the devel package installed?])]-    )-  ])-])+AX_CHECK_LZ4LIB([], [echo "optional liblz4 not found: install if you want ugrep option -z to search .lz4 files"]) -AC_ARG_ENABLE([brotli],[-  --enable-brotli         use libbrotlidec to enable searching inside BR compressed files.-                          @<:@defaults to enabled if libbrotlidec is installed@:>@-  --disable-brotli        do not use libbrotlidec])-AS_IF([test "x$enable_brotli" != "xno"],[-  PKG_CHECK_MODULES([BROTLI],[libbrotlidec],[-    AC_DEFINE([HAVE_LIBBROTLI],[1],[Use libbrotlidec compression library])-    CPPFLAGS="$CPPFLAGS $BROTLI_CFLAGS"-    LIBS="$LIBS $BROTLI_LIBS"-  ],[-    # libbrotlidec is optional by default, but required if --enable-brotli is given-    AS_IF([test -z "$enable_brotli" ],-      [AC_MSG_NOTICE([Optional libbrotlidec not found: ugrep option -z cannot search .br files])],-      [AC_MSG_ERROR([libbrotlidec not found. Is the devel package installed?])],)-  ])-])+AX_CHECK_ZSTDLIB([], [echo "optional libzstd not found: install if you want ugrep option -z to search .zst files"])++AX_CHECK_BROTLILIB([], [echo "optional brotli library not found: install if you want ugrep option -z to search .br files"])  AC_ARG_WITH(bzip3,   [AS_HELP_STRING([--with-bzip3],-                  [Use libbzip3 to enable searching inside BZ3 compressed files])],+                  [to enable bzip3 library to decompress .bz3 files])],   [with_bzip3_library="$withval"],   [with_bzip3_library=""])-AS_IF([test -n "$with_bzip3_library"],[-  AS_IF([test "x$with_bzip3" = "xyes"],[+if test "x$with_bzip3_library" != "x"; then+  if test "x$with_bzip3" = "xyes"; then     unset with_bzip3-  ])-  # libbzip3 is optional by default and not checked and enabled unless --with-bzip3 is given-  AX_CHECK_BZIP3LIB([],[-    AC_MSG_ERROR(["libbzip3 not found: ugrep option -z cannot search .bz3 files"])-  ])-])+  fi+  AX_CHECK_BZIP3LIB([], [echo "optional libbzip3 not found: install if you want ugrep option -z to search .bz3 files"])+fi -AC_ARG_WITH(7zip,-  [AS_HELP_STRING([--without-7zip],-                  [do not search 7ZIP compressed files (7zip requires more memory and takes long to decompress)])],+AC_ARG_ENABLE(7zip,+  [AS_HELP_STRING([--disable-7zip],+                  [to disable 7zip and no longer search .7z files (7z requires more memory and takes long to decompress)])],   [with_7zip="$enableval"],   [with_7zip="yes"]) AC_MSG_CHECKING(for --disable-7zip)-AS_IF([test "x$with_7zip" = "xyes"],[+if test "x$with_7zip" = "xyes"; then   AC_MSG_RESULT(no)   CPPFLAGS="$CPPFLAGS -I../lzma/C"   LDFLAGS="$LDFLAGS -L../lzma/C"   LIBS="-lviiz $LIBS"-  AC_DEFINE(HAVE_7ZIP,[1],[Define if built with 7ZIP support])-],[-  AC_MSG_RESULT(yes)+  AC_DEFINE(HAVE_7ZIP,1,[ Define if built with 7ZIP support])+else   EXTRA_CFLAGS="-DWITH_NO_7ZIP ${EXTRA_CFLAGS}"-])-+  AC_MSG_RESULT(yes) fi +fi AM_CONDITIONAL([ENABLE_7ZIP],[test "x$with_7zip" = "xyes"])  ################################################################################@@ -514,14 +349,14 @@ AC_ARG_WITH([bash-completion-dir],                   [install the bash auto-completion script in this directory. @<:@default=yes@:>@])],   [with_bash_completion_dir="$withval"],   [with_bash_completion_dir="yes"])-AS_IF([test "x$with_bash_completion_dir" = "xyes"],[+if test "x$with_bash_completion_dir" = "xyes"; then   PKG_CHECK_MODULES([BASH_COMPLETION],                     [bash-completion >= 2.0],                     [BASH_COMPLETION_DIR="`pkg-config --define-variable=datadir=$datadir --variable=completionsdir bash-completion`"],                     [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"])-],[+else   BASH_COMPLETION_DIR="$with_bash_completion_dir"-])+fi AC_SUBST(BASH_COMPLETION_DIR) AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"]) @@ -530,14 +365,14 @@ AC_ARG_WITH([fish-completion-dir],                   [install the fish auto-completion script in this directory. @<:@default=yes@:>@])],   [with_fish_completion_dir="$withval"],   [with_fish_completion_dir="yes"])-AS_IF([test "x$with_fish_completion_dir" = "xyes"],[+if test "x$with_fish_completion_dir" = "xyes"; then   PKG_CHECK_MODULES([FISH_COMPLETION],                     [fish >= 3.0],                     [FISH_COMPLETION_DIR="`pkg-config --define-variable=datadir=$datadir --variable=completionsdir fish`"],                     [FISH_COMPLETION_DIR="$datadir/fish/vendor_completions.d"])-],[+else   FISH_COMPLETION_DIR="$with_fish_completion_dir"-])+fi AC_SUBST(FISH_COMPLETION_DIR) AM_CONDITIONAL([ENABLE_FISH_COMPLETION],[test "x$with_fish_completion_dir" != "xno"]) @@ -546,11 +381,11 @@ AC_ARG_WITH([zsh-completion-dir],                   [install the zsh auto-completion script in this directory. @<:@default=yes@:>@])],   [with_zsh_completion_dir="$withval"],   [with_zsh_completion_dir="yes"])-AS_IF([test "x$with_zsh_completion_dir" = "xyes"],[+if test "x$with_zsh_completion_dir" = "xyes"; then   ZSH_COMPLETION_DIR="$datadir/zsh/site-functions"-],[+else   ZSH_COMPLETION_DIR="$with_zsh_completion_dir"-])+fi AC_SUBST(ZSH_COMPLETION_DIR) AM_CONDITIONAL([ENABLE_ZSH_COMPLETION],[test "x$with_zsh_completion_dir" != "xno"]) @@ -564,13 +399,13 @@ AC_ARG_WITH(grep-path,   [with_grep_path="$withval"],   [with_grep_path=""]) AC_MSG_CHECKING(for --with-grep-path)-AS_IF([test -n "$with_grep_path"],[+if test "x$with_grep_path" != "x"; then   GREP_PATH="$with_grep_path"   AC_MSG_RESULT("$with_grep_path")-],[+else   AC_MSG_RESULT()   GREP_PATH="${datadir}/ugrep/patterns"-])+fi AC_SUBST(GREP_PATH)  AC_ARG_WITH(grep-colors,@@ -579,12 +414,12 @@ AC_ARG_WITH(grep-colors,   [with_grep_colors="$withval"],   [with_grep_colors=""]) AC_MSG_CHECKING(for --with-grep-colors)-AS_IF([test -n "$with_grep_colors"],[+if test "x$with_grep_colors" != "x"; then   AC_MSG_RESULT("$with_grep_colors")   EXTRA_CFLAGS="-DDEFAULT_GREP_COLORS=\"\\\"$with_grep_colors\\\"\" ${EXTRA_CFLAGS}"-],[+else   AC_MSG_RESULT()-])+fi  AC_ARG_ENABLE(auto-color,   [AS_HELP_STRING([--disable-auto-color],@@ -592,12 +427,12 @@ AC_ARG_ENABLE(auto-color,   [with_no_auto_color="yes"],   [with_no_auto_color="no"]) AC_MSG_CHECKING(for --disable-auto-color)-AS_IF([test "x$with_no_auto_color" = "xno"],[+if test "x$with_no_auto_color" = "xno"; then   AC_MSG_RESULT(no)   EXTRA_CFLAGS="-DWITH_COLOR ${EXTRA_CFLAGS}"-],[+else   AC_MSG_RESULT(yes)-])+fi  AC_ARG_ENABLE(color,   [AS_HELP_STRING([--enable-color],@@ -605,11 +440,11 @@ AC_ARG_ENABLE(color,   [],   []) AC_MSG_CHECKING(for --enable-color)-AS_IF([test "x$with_no_auto_color" = "xno"],[+if test "x$with_no_auto_color" = "xno"; then   AC_MSG_RESULT(yes)-],[+else   AC_MSG_RESULT(no)-])+fi  AC_ARG_ENABLE(pretty,   [AS_HELP_STRING([--enable-pretty],@@ -617,12 +452,12 @@ AC_ARG_ENABLE(pretty,   [with_pretty="$enable_pretty"],   [with_pretty="no"]) AC_MSG_CHECKING(for --enable-pretty)-AS_IF([test "x$with_pretty" = "xyes"],[+if test "x$with_pretty" = "xyes"; then   AC_MSG_RESULT(yes)   EXTRA_CFLAGS="-DWITH_PRETTY ${EXTRA_CFLAGS}"-],[+else   AC_MSG_RESULT(no)-])+fi  AC_ARG_ENABLE(pager,   [AS_HELP_STRING([--enable-pager],@@ -630,12 +465,12 @@ AC_ARG_ENABLE(pager,   [with_pager="$enable_pager"],   [with_pager="no"]) AC_MSG_CHECKING(for --enable-pager)-AS_IF([test "x$with_pager" = "xyes"],[+if test "x$with_pager" = "xyes"; then   AC_MSG_RESULT(yes)   EXTRA_CFLAGS="-DWITH_PAGER ${EXTRA_CFLAGS}"-],[+else   AC_MSG_RESULT(no)-])+fi  AC_ARG_ENABLE(hidden,   [AS_HELP_STRING([--enable-hidden],@@ -643,12 +478,12 @@ AC_ARG_ENABLE(hidden,   [with_hidden="$enable_hidden"],   [with_hidden="no"]) AC_MSG_CHECKING(for --enable-hidden)-AS_IF([test "x$with_hidden" = "xno"],[+if test "x$with_hidden" = "xno"; then   AC_MSG_RESULT(no)-],[+else   AC_MSG_RESULT(yes)   EXTRA_CFLAGS="-DWITH_HIDDEN ${EXTRA_CFLAGS}"-])+fi  AC_ARG_ENABLE(mmap,   [AS_HELP_STRING([--disable-mmap],@@ -656,12 +491,12 @@ AC_ARG_ENABLE(mmap,   [with_no_mmap="yes"],   [with_no_mmap="no"]) AC_MSG_CHECKING(for --disable-mmap)-AS_IF([test "x$with_no_mmap" = "xno"],[+if test "x$with_no_mmap" = "xno"; then   AC_MSG_RESULT(no)-],[+else   AC_MSG_RESULT(yes)   EXTRA_CFLAGS="-DWITH_NO_MMAP ${EXTRA_CFLAGS}"-])+fi  AC_SUBST(EXTRA_CFLAGS) 

lib/Makefile.in

@@ -91,7 +91,14 @@ host_triplet = @host@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_regex.m4 \+	$(top_srcdir)/m4/ax_check_brotlilib.m4 \+	$(top_srcdir)/m4/ax_check_bz2lib.m4 \ 	$(top_srcdir)/m4/ax_check_bzip3lib.m4 \+	$(top_srcdir)/m4/ax_check_lz4lib.m4 \+	$(top_srcdir)/m4/ax_check_lzmalib.m4 \+	$(top_srcdir)/m4/ax_check_pcre2.m4 \+	$(top_srcdir)/m4/ax_check_zlib.m4 \+	$(top_srcdir)/m4/ax_check_zstdlib.m4 \ 	$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \@@ -222,8 +229,6 @@ AWK = @AWK@ BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@-BROTLI_CFLAGS = @BROTLI_CFLAGS@-BROTLI_LIBS = @BROTLI_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@@@ -260,10 +265,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@-LZ4_CFLAGS = @LZ4_CFLAGS@-LZ4_LIBS = @LZ4_LIBS@-LZMA_CFLAGS = @LZMA_CFLAGS@-LZMA_LIBS = @LZMA_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@@@ -275,8 +276,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@-PCRE2_CFLAGS = @PCRE2_CFLAGS@-PCRE2_LIBS = @PCRE2_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@@@ -294,11 +293,7 @@ SIMD_AVX512BW_FLAGS = @SIMD_AVX512BW_FLAGS@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@-ZLIB_CFLAGS = @ZLIB_CFLAGS@-ZLIB_LIBS = @ZLIB_LIBS@ ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@-ZSTD_CFLAGS = @ZSTD_CFLAGS@-ZSTD_LIBS = @ZSTD_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@

lzma/C/Makefile.in

@@ -91,7 +91,14 @@ host_triplet = @host@ subdir = lzma/C ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_regex.m4 \+	$(top_srcdir)/m4/ax_check_brotlilib.m4 \+	$(top_srcdir)/m4/ax_check_bz2lib.m4 \ 	$(top_srcdir)/m4/ax_check_bzip3lib.m4 \+	$(top_srcdir)/m4/ax_check_lz4lib.m4 \+	$(top_srcdir)/m4/ax_check_lzmalib.m4 \+	$(top_srcdir)/m4/ax_check_pcre2.m4 \+	$(top_srcdir)/m4/ax_check_zlib.m4 \+	$(top_srcdir)/m4/ax_check_zstdlib.m4 \ 	$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \@@ -207,8 +214,6 @@ AWK = @AWK@ BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@-BROTLI_CFLAGS = @BROTLI_CFLAGS@-BROTLI_LIBS = @BROTLI_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@@@ -245,10 +250,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@-LZ4_CFLAGS = @LZ4_CFLAGS@-LZ4_LIBS = @LZ4_LIBS@-LZMA_CFLAGS = @LZMA_CFLAGS@-LZMA_LIBS = @LZMA_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@@@ -260,8 +261,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@-PCRE2_CFLAGS = @PCRE2_CFLAGS@-PCRE2_LIBS = @PCRE2_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@@@ -279,11 +278,7 @@ SIMD_AVX512BW_FLAGS = @SIMD_AVX512BW_FLAGS@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@-ZLIB_CFLAGS = @ZLIB_CFLAGS@-ZLIB_LIBS = @ZLIB_LIBS@ ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@-ZSTD_CFLAGS = @ZSTD_CFLAGS@-ZSTD_LIBS = @ZSTD_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@

m4/ax_check_brotlilib.m4

new file mode 100644@@ -0,0 +1,138 @@+# SYNOPSIS+#+#   AX_CHECK_BROTLILIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed brotli library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-brotli=DIR is specified,+#   it will try to find it in DIR/include/brotli/decode.h and+#   DIR/lib/libbrotlidec. If --without-brotli is specified, the library is+#   not searched at all.+#+#   If either the header file (brotli/decode.h) or the library (libbrotlidec)+#   is not found, shell commands 'action-if-not-found' is run. If+#   'action-if-not-found' is not specified, the configuration exits on error,+#   asking for a valid brotli library installation directory or+#   --without-brotli.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${BROTLI_HOME}/include' to CPFLAGS, appends+#   '-L${BROTLI_HOME}/lib' to LDFLAGS, prepends '-lbrotlidec' and+#   '-lbrotlienc' to LIBS, and calls AC_DEFINE(HAVE_LIBBROTLI). You should use+#   autoheader to include a definition for this symbol in a config.h file.+#   Sample usage in a C/C++ source is as follows:+#+#     #ifdef HAVE_LIBBROTLI+#     #include <brotli/decode.h>+#     #include <brotli/encode.h>+#     #endif /* HAVE_LIBBROTLI */+#+# LICENSE+#+#   Copyright (c) 2023 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_BROTLILIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if brotli is wanted)+brotli_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([brotli],+[  --with-brotli=DIR       root directory path of brotli library installation+                          @<:@defaults to /usr/local or /usr if not found in+                          /usr/local@:>@+  --without-brotli        to disable brotli library usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    brotli_places="$withval $brotli_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  brotli_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate brotli, if wanted+#+if test -n "${brotli_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for BROTLI_HOME in ${brotli_places} ; do+    if test -f "${BROTLI_HOME}/include/brotli/decode.h"; then break; fi+    BROTLI_HOME=""+  done++  BROTLI_OLD_LDFLAGS=$LDFLAGS+  BROTLI_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${BROTLI_HOME}"; then+    LDFLAGS="$LDFLAGS -L${BROTLI_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${BROTLI_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([brotlidec], [BrotliDecoderCreateInstance], [brotli_cv_libbrotli=yes], [brotli_cv_libbrotli=no])+  AC_CHECK_HEADER([brotli/decode.h], [brotli_cv_brotli_h=yes], [brotli_cv_brotli_h=no])+  AC_LANG_POP([C])+  if test "$brotli_cv_libbrotli" = "yes" && test "$brotli_cv_brotli_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${BROTLI_HOME}/include"+                LDFLAGS="$LDFLAGS -L${BROTLI_HOME}/lib"+                LIBS="-lbrotlidec -lbrotlienc $LIBS"+                AC_DEFINE([HAVE_LIBBROTLI], [1],+                          [Define to 1 if you have `brotli' library (-lbrotlidec -lbrotlienc)])+               ],[+                # Restore variables+                LDFLAGS="$BROTLI_OLD_LDFLAGS"+                CPPFLAGS="$BROTLI_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid brotli library installation with --with-brotli=DIR or disable brotli usage with --without-brotli])+                ])+  fi+fi+])

m4/ax_check_bz2lib.m4

new file mode 100644@@ -0,0 +1,134 @@+# SYNOPSIS+#+#   AX_CHECK_BZ2LIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed bzlib/bz2 library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-bzlib=DIR is specified,+#   it will try to find it in DIR/include/bzlib.h and DIR/lib/libbz2. If+#   --without-bzlib is specified, the library is not searched at all.+#+#   If either the header file (bzlib.h) or the library (libbz2) is not found,+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is+#   not specified, the configuration exits on error, asking for a valid bzlib+#   installation directory or --without-bzlib.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${BZ2LIB_HOME}/include' to CPFLAGS, appends+#   '-L${BZ2LIB_HOME}/lib' to LDFLAGS, prepends '-lbz2' to LIBS, and calls+#   AC_DEFINE(HAVE_LIBBZ2). You should use autoheader to include a definition+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as+#   follows:+#+#     #ifdef HAVE_LIBBZ2+#     #include <bzlib.h>+#     #endif /* HAVE_LIBBZ2 */+#+# LICENSE+#+#   Copyright (c) 2019 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_BZ2LIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if bzlib is wanted)+bzlib_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([bzlib],+[  --with-bzlib=DIR        root directory path of bzlib installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-bzlib         to disable bzlib usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    bzlib_places="$withval $bzlib_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  bzlib_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate bzlib, if wanted+#+if test -n "${bzlib_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for BZ2LIB_HOME in ${bzlib_places} ; do+    if test -f "${BZ2LIB_HOME}/include/bzlib.h"; then break; fi+    BZ2LIB_HOME=""+  done++  BZ2LIB_OLD_LDFLAGS=$LDFLAGS+  BZ2LIB_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${BZ2LIB_HOME}"; then+    LDFLAGS="$LDFLAGS -L${BZ2LIB_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${BZ2LIB_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([bz2], [BZ2_bzRead], [bzlib_cv_libbz2=yes], [bzlib_cv_libbz2=no])+  AC_CHECK_HEADER([bzlib.h], [bzlib_cv_bzlib_h=yes], [bzlib_cv_bzlib_h=no])+  AC_LANG_POP([C])+  if test "$bzlib_cv_libbz2" = "yes" && test "$bzlib_cv_bzlib_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${BZ2LIB_HOME}/include"+                LDFLAGS="$LDFLAGS -L${BZ2LIB_HOME}/lib"+                LIBS="-lbz2 $LIBS"+                AC_DEFINE([HAVE_LIBBZ2], [1],+                          [Define to 1 if you have `bz2' library (-lbz2)])+               ],[+                # Restore variables+                LDFLAGS="$BZ2LIB_OLD_LDFLAGS"+                CPPFLAGS="$BZ2LIB_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid bzlib installation with --with-bzlib=DIR or disable bzlib usage with --without-bzlib])+                ])+  fi+fi+])

m4/ax_check_lz4lib.m4

new file mode 100644@@ -0,0 +1,134 @@+# SYNOPSIS+#+#   AX_CHECK_LZ4LIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed lz4 library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-lz4=DIR is specified,+#   it will try to find it in DIR/include/lz4.h and DIR/lib/liblz4.a. If+#   --without-lz4 is specified, the library is not searched at all.+#+#   If either the header file (lz4.h) or the library (liblz4) is not found,+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is+#   not specified, the configuration exits on error, asking for a valid lz4+#   installation directory or --without-lz4.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${LZ4_HOME}/include' to CPFLAGS, appends+#   '-L${LZ4_HOME}/lib' to LDFLAGS, prepends '-llz4' to LIBS, and calls+#   AC_DEFINE(HAVE_LIBLZ4). You should use autoheader to include a definition+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as+#   follows:+#+#     #ifdef HAVE_LIBLZ4+#     #include <lz4.h>+#     #endif /* HAVE_LIBLZ4 */+#+# LICENSE+#+#   Copyright (c) 2020 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_LZ4LIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if lz4 is wanted)+lz4_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([lz4],+[  --with-lz4=DIR          root directory path of lz4 installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-lz4           to disable lz4 usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    lz4_places="$withval $lz4_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  lz4_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate lz4, if wanted+#+if test -n "${lz4_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for LZ4_HOME in ${lz4_places} ; do+    if test -f "${LZ4_HOME}/include/lz4.h"; then break; fi+    LZ4_HOME=""+  done++  LZ4_OLD_LDFLAGS=$LDFLAGS+  LZ4_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${LZ4_HOME}"; then+    LDFLAGS="$LDFLAGS -L${LZ4_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${LZ4_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([lz4], [LZ4_createStreamDecode], [lz4_cv_liblz4=yes], [lz4_cv_liblz4=no])+  AC_CHECK_HEADER([lz4.h], [lz4_cv_lz4_h=yes], [lz4_cv_lz4_h=no])+  AC_LANG_POP([C])+  if test "$lz4_cv_liblz4" = "yes" && test "$lz4_cv_lz4_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${LZ4_HOME}/include"+                LDFLAGS="$LDFLAGS -L${LZ4_HOME}/lib"+                LIBS="-llz4 $LIBS"+                AC_DEFINE([HAVE_LIBLZ4], [1],+                          [Define to 1 if you have `lz4' library (-llz4)])+               ],[+                # Restore variables+                LDFLAGS="$LZ4_OLD_LDFLAGS"+                CPPFLAGS="$LZ4_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid lz4 installation with --with-lz4=DIR or disable lz4 usage with --without-lz4])+                ])+  fi+fi+])

m4/ax_check_lzmalib.m4

new file mode 100644@@ -0,0 +1,134 @@+# SYNOPSIS+#+#   AX_CHECK_LZMALIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed lzma library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-lzma=DIR is specified,+#   it will try to find it in DIR/include/lzma.h and DIR/lib/liblzma. If+#   --without-lzma is specified, the library is not searched at all.+#+#   If either the header file (lzma.h) or the library (liblzma) is not found,+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is+#   not specified, the configuration exits on error, asking for a valid lzma+#   installation directory or --without-lzma.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${LZMA_HOME}/include' to CPFLAGS, appends+#   '-L${LZMA_HOME}/lib' to LDFLAGS, prepends '-llzma' to LIBS, and calls+#   AC_DEFINE(HAVE_LIBLZMA). You should use autoheader to include a definition+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as+#   follows:+#+#     #ifdef HAVE_LIBLZMA+#     #include <lzma.h>+#     #endif /* HAVE_LIBLZMA */+#+# LICENSE+#+#   Copyright (c) 2019 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_LZMALIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if lzma is wanted)+lzma_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([lzma],+[  --with-lzma=DIR         root directory path of lzma installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-lzma          to disable lzma usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    lzma_places="$withval $lzma_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  lzma_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate lzma, if wanted+#+if test -n "${lzma_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for LZMA_HOME in ${lzma_places} ; do+    if test -f "${LZMA_HOME}/include/lzma.h"; then break; fi+    LZMA_HOME=""+  done++  LZMA_OLD_LDFLAGS=$LDFLAGS+  LZMA_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${LZMA_HOME}"; then+    LDFLAGS="$LDFLAGS -L${LZMA_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${LZMA_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([lzma], [lzma_code], [lzma_cv_liblzma=yes], [lzma_cv_liblzma=no])+  AC_CHECK_HEADER([lzma.h], [lzma_cv_lzma_h=yes], [lzma_cv_lzma_h=no])+  AC_LANG_POP([C])+  if test "$lzma_cv_liblzma" = "yes" && test "$lzma_cv_lzma_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${LZMA_HOME}/include"+                LDFLAGS="$LDFLAGS -L${LZMA_HOME}/lib"+                LIBS="-llzma $LIBS"+                AC_DEFINE([HAVE_LIBLZMA], [1],+                          [Define to 1 if you have `lzma' library (-llzma)])+               ],[+                # Restore variables+                LDFLAGS="$LZMA_OLD_LDFLAGS"+                CPPFLAGS="$LZMA_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid lzma installation with --with-lzma=DIR or disable lzma usage with --without-lzma])+                ])+  fi+fi+])

m4/ax_check_pcre2.m4

new file mode 100644@@ -0,0 +1,159 @@+# SYNOPSIS+#+#   AX_CHECK_PCRE2([bits], [action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed libpcre2-8 library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-pcre2=DIR is specified,+#   it will try to find it in DIR/include/pcre2.h and DIR/lib/libpcre2-8. If+#   --without-pcre2 is specified, the library is not searched at all.+#+#   If 'bits' is empty or '8', PCRE2 8-bit character support is checked only.+#   If 'bits' contains '16', PCRE2 8-bit and 16-bit character support are+#   checked. If 'bits' contains '32', PCRE2 8-bit and 32-bit character support+#   are checked. When 'bits' contains both '16' and '32', PCRE2 8-bit, 16-bit,+#   and 32-bit character support is checked.+#+#   If either the header file (pcre2.h), or the library (libpcre2-8) is not+#   found, or the specified PCRE2 character bit width is not supported, shell+#   commands 'action-if-not-found' is run. If 'action-if-not-found' is not+#   specified, the configuration exits on error, asking for a valid PCRE2+#   installation directory or --without-pcre2.+#+#   If both header file and library are found, and the specified PCRE2 bit+#   widths are supported, shell commands 'action-if-found' is run. If+#   'action-if-found' is not specified, the default action appends+#   '-I${PCRE2_HOME}/include' to CPFLAGS, appends '-L$PCRE2_HOME}/lib' to+#   LDFLAGS, prepends '-lpcre2-8' to LIBS, and calls AC_DEFINE(HAVE_PCRE2). You+#   should use autoheader to include a definition for this symbol in a config.h+#   file. Sample usage in a C/C++ source is as follows:+#+#     #ifdef HAVE_PCRE2+#     #define PCRE2_CODE_UNIT_WIDTH 8+#     #include <pcre2.h>+#     #endif /* HAVE_PCRE2 */+#+# LICENSE+#+#   Copyright (c) 2020 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_PCRE2],+#+# Handle user hints+#+[AC_MSG_CHECKING(if PCRE2 is wanted)+pcre2_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([pcre2],+[  --with-pcre2=DIR        root directory path of PCRE2 installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-pcre2         to disable PCRE2 usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    pcre2_places="$withval $pcre2_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  pcre2_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate PCRE2, if wanted+#+if test -n "${pcre2_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for PCRE2_HOME in ${pcre2_places} ; do+    if test -f "${PCRE2_HOME}/include/pcre2.h"; then break; fi+    PCRE2_HOME=""+  done++  PCRE2_OLD_LDFLAGS=$LDFLAGS+  PCRE2_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${PCRE2_HOME}"; then+    LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([pcre2-8], [pcre2_compile_8], [pcre2_cv_libpcre2=yes], [pcre2_cv_libpcre2=no])+  AC_CHECK_HEADER([pcre2.h], [pcre2_cv_pcre2_h=yes], [pcre2_cv_pcre2_h=no], [#define PCRE2_CODE_UNIT_WIDTH 8])+  case "$1" in+  *16*)+    AC_CHECK_LIB([pcre2-16], [pcre2_compile_16], [pcre2_cv_libpcre2_16=yes], [pcre2_cv_libpcre2_16=no])+    AC_CHECK_HEADER([pcre2.h], [pcre2_cv_pcre2_16_h=yes], [pcre2_cv_pcre2_16_h=no], [#define PCRE2_CODE_UNIT_WIDTH 16])+    if test "$pcre2_cv_libpcre2_16" = "no" || test "$pcre2_cv_pcre2_16_h" = "no"; then+      pcre2_cv_libpcre2=no+    fi+    ;;+  esac+  case "$1" in+  *32*)+    AC_CHECK_LIB([pcre2-32], [pcre2_compile_32], [pcre2_cv_libpcre2_32=yes], [pcre2_cv_libpcre2_32=no])+    AC_CHECK_HEADER([pcre2.h], [pcre2_cv_pcre2_32_h=yes], [pcre2_cv_pcre2_32_h=no], [#define PCRE2_CODE_UNIT_WIDTH 32])+    if test "$pcre2_cv_libpcre2_32" = "no" || test "$pcre2_cv_pcre2_32_h" = "no"; then+      pcre2_cv_libpcre2=no+    fi+  esac+  AC_LANG_POP([C])+  if test "$pcre2_cv_libpcre2" = "yes" && test "$pcre2_cv_pcre2_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$2],[+                CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"+                LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"+                LIBS="-lpcre2-8 $LIBS"+                AC_DEFINE([HAVE_PCRE2], [1],+                          [Define to 1 if you have `PCRE2' library (-lpcre2-$1)])+               ],[+                # Restore variables+                LDFLAGS="$PCRE2_OLD_LDFLAGS"+                CPPFLAGS="$PCRE2_OLD_CPPFLAGS"+                $2+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$3],[+                AC_MSG_ERROR([either specify a valid PCRE2 installation with --with-pcre2=DIR or disable PCRE2 usage with --without-pcre2])+                ])+  fi+fi+])

m4/ax_check_zlib.m4

new file mode 100644@@ -0,0 +1,140 @@+# ===========================================================================+#      https://www.gnu.org/software/autoconf-archive/ax_check_zlib.html+# ===========================================================================+#+# SYNOPSIS+#+#   AX_CHECK_ZLIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed zlib library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,+#   it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If+#   --without-zlib is specified, the library is not searched at all.+#+#   If either the header file (zlib.h) or the library (libz) is not found,+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is+#   not specified, the configuration exits on error, asking for a valid zlib+#   installation directory or --without-zlib.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends+#   '-L${ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls+#   AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as+#   follows:+#+#     #ifdef HAVE_LIBZ+#     #include <zlib.h>+#     #endif /* HAVE_LIBZ */+#+# LICENSE+#+#   Copyright (c) 2008 Loic Dachary <loic@senga.org>+#   Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 16++AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])+AC_DEFUN([AX_CHECK_ZLIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if zlib is wanted)+zlib_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([zlib],+[  --with-zlib=DIR         root directory path of zlib installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-zlib          to disable zlib usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    zlib_places="$withval $zlib_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  zlib_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate zlib, if wanted+#+if test -n "${zlib_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for ZLIB_HOME in ${zlib_places} ; do+    if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi+    ZLIB_HOME=""+  done++  ZLIB_OLD_LDFLAGS=$LDFLAGS+  ZLIB_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${ZLIB_HOME}"; then+    LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])+  AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])+  AC_LANG_POP([C])+  if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"+                LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"+                LIBS="-lz $LIBS"+                AC_DEFINE([HAVE_LIBZ], [1],+                          [Define to 1 if you have `z' library (-lz)])+               ],[+                # Restore variables+                LDFLAGS="$ZLIB_OLD_LDFLAGS"+                CPPFLAGS="$ZLIB_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])+                ])+  fi+fi+])

m4/ax_check_zstdlib.m4

new file mode 100644@@ -0,0 +1,134 @@+# SYNOPSIS+#+#   AX_CHECK_ZSTDLIB([action-if-found], [action-if-not-found])+#+# DESCRIPTION+#+#   This macro searches for an installed zstd library. If nothing was+#   specified when calling configure, it searches first in /usr/local and+#   then in /usr, /opt/local and /sw. If the --with-zstd=DIR is specified,+#   it will try to find it in DIR/include/zstd.h and DIR/lib/libzstd. If+#   --without-zstd is specified, the library is not searched at all.+#+#   If either the header file (zstd.h) or the library (libzstd) is not found,+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is+#   not specified, the configuration exits on error, asking for a valid zstd+#   installation directory or --without-zstd.+#+#   If both header file and library are found, shell commands+#   'action-if-found' is run. If 'action-if-found' is not specified, the+#   default action appends '-I${ZSTD_HOME}/include' to CPFLAGS, appends+#   '-L${ZSTD_HOME}/lib' to LDFLAGS, prepends '-lzstd' to LIBS, and calls+#   AC_DEFINE(HAVE_LIBZSTD). You should use autoheader to include a definition+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as+#   follows:+#+#     #ifdef HAVE_LIBZSTD+#     #include <zstd.h>+#     #endif /* HAVE_LIBZSTD */+#+# LICENSE+#+#   Copyright (c) 2021 Robert van Engelen <engelen@acm.org>+#+#   This program is free software; you can redistribute it and/or modify it+#   under the terms of the GNU General Public License as published by the+#   Free Software Foundation; either version 2 of the License, or (at your+#   option) any later version.+#+#   This program is distributed in the hope that it will be useful, but+#   WITHOUT ANY WARRANTY; without even the implied warranty of+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General+#   Public License for more details.+#+#   You should have received a copy of the GNU General Public License along+#   with this program. If not, see <https://www.gnu.org/licenses/>.+#+#   As a special exception, the respective Autoconf Macro's copyright owner+#   gives unlimited permission to copy, distribute and modify the configure+#   scripts that are the output of Autoconf when processing the Macro. You+#   need not follow the terms of the GNU General Public License when using+#   or distributing such scripts, even though portions of the text of the+#   Macro appear in them. The GNU General Public License (GPL) does govern+#   all other use of the material that constitutes the Autoconf Macro.+#+#   This special exception to the GPL applies to versions of the Autoconf+#   Macro released by the Autoconf Archive. When you make and distribute a+#   modified version of the Autoconf Macro, you may extend this special+#   exception to the GPL to apply to your modified version as well.++#serial 1++AC_DEFUN([AX_CHECK_ZSTDLIB],+#+# Handle user hints+#+[AC_MSG_CHECKING(if zstd is wanted)+zstd_places="/usr/local /usr /opt/homebrew /opt/local /sw"+AC_ARG_WITH([zstd],+[  --with-zstd=DIR         root directory path of zstd installation @<:@defaults to+                          /usr/local or /usr if not found in /usr/local@:>@+  --without-zstd          to disable zstd usage completely],+[if test "$withval" != "no" ; then+  AC_MSG_RESULT(yes)+  if test -d "$withval"+  then+    zstd_places="$withval $zstd_places"+  else+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])+  fi+else+  zstd_places=""+  AC_MSG_RESULT(no)+fi],+[AC_MSG_RESULT(yes)])+#+# Locate zstd, if wanted+#+if test -n "${zstd_places}"+then+  # check the user supplied or any other more or less 'standard' place:+  #   Most UNIX systems      : /usr/local and /usr+  #   MacPorts / Fink on OSX : /opt/local respectively /sw+  for ZSTD_HOME in ${zstd_places} ; do+    if test -f "${ZSTD_HOME}/include/zstd.h"; then break; fi+    ZSTD_HOME=""+  done++  ZSTD_OLD_LDFLAGS=$LDFLAGS+  ZSTD_OLD_CPPFLAGS=$CPPFLAGS+  if test -n "${ZSTD_HOME}"; then+    LDFLAGS="$LDFLAGS -L${ZSTD_HOME}/lib"+    CPPFLAGS="$CPPFLAGS -I${ZSTD_HOME}/include"+  fi+  AC_LANG_PUSH([C])+  AC_CHECK_LIB([zstd], [ZSTD_decompressStream], [zstd_cv_libzstd=yes], [zstd_cv_libzstd=no])+  AC_CHECK_HEADER([zstd.h], [zstd_cv_zstd_h=yes], [zstd_cv_zstd_h=no])+  AC_LANG_POP([C])+  if test "$zstd_cv_libzstd" = "yes" && test "$zstd_cv_zstd_h" = "yes"+  then+    #+    # If both library and header were found, action-if-found+    #+    m4_ifblank([$1],[+                CPPFLAGS="$CPPFLAGS -I${ZSTD_HOME}/include"+                LDFLAGS="$LDFLAGS -L${ZSTD_HOME}/lib"+                LIBS="-lzstd $LIBS"+                AC_DEFINE([HAVE_LIBZSTD], [1],+                          [Define to 1 if you have `zstd' library (-lzstd)])+               ],[+                # Restore variables+                LDFLAGS="$ZSTD_OLD_LDFLAGS"+                CPPFLAGS="$ZSTD_OLD_CPPFLAGS"+                $1+               ])+  else+    #+    # If either header or library was not found, action-if-not-found+    #+    m4_default([$2],[+                AC_MSG_ERROR([either specify a valid zstd installation with --with-zstd=DIR or disable zstd usage with --without-zstd])+                ])+  fi+fi+])

man/ug.1

@@ -1,4 +1,4 @@-.TH UGREP "1" "April 03, 2024" "ugrep 5.1.2" "User Commands"+.TH UGREP "1" "April 04, 2024" "ugrep 5.1.3" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS

man/ugrep.1

@@ -1,4 +1,4 @@-.TH UGREP "1" "April 03, 2024" "ugrep 5.1.2" "User Commands"+.TH UGREP "1" "April 04, 2024" "ugrep 5.1.3" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS

src/Makefile.in

@@ -92,7 +92,14 @@ bin_PROGRAMS = ugrep$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_regex.m4 \+	$(top_srcdir)/m4/ax_check_brotlilib.m4 \+	$(top_srcdir)/m4/ax_check_bz2lib.m4 \ 	$(top_srcdir)/m4/ax_check_bzip3lib.m4 \+	$(top_srcdir)/m4/ax_check_lz4lib.m4 \+	$(top_srcdir)/m4/ax_check_lzmalib.m4 \+	$(top_srcdir)/m4/ax_check_pcre2.m4 \+	$(top_srcdir)/m4/ax_check_zlib.m4 \+	$(top_srcdir)/m4/ax_check_zstdlib.m4 \ 	$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \@@ -200,8 +207,6 @@ AWK = @AWK@ BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@-BROTLI_CFLAGS = @BROTLI_CFLAGS@-BROTLI_LIBS = @BROTLI_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@@@ -238,10 +243,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@-LZ4_CFLAGS = @LZ4_CFLAGS@-LZ4_LIBS = @LZ4_LIBS@-LZMA_CFLAGS = @LZMA_CFLAGS@-LZMA_LIBS = @LZMA_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@@@ -253,8 +254,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@-PCRE2_CFLAGS = @PCRE2_CFLAGS@-PCRE2_LIBS = @PCRE2_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@@@ -272,11 +271,7 @@ SIMD_AVX512BW_FLAGS = @SIMD_AVX512BW_FLAGS@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@-ZLIB_CFLAGS = @ZLIB_CFLAGS@-ZLIB_LIBS = @ZLIB_LIBS@ ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@-ZSTD_CFLAGS = @ZSTD_CFLAGS@-ZSTD_LIBS = @ZSTD_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@

src/ugrep.hpp

@@ -37,8 +37,8 @@ #ifndef UGREP_HPP #define UGREP_HPP -// DO NOT ALTER THIS LINE: the makemake.sh script updates the version-#define UGREP_VERSION "5.1.2"+// DO NOT ALTER THIS LINE: updated by makemake.sh and we need it physically here for MSVC++ build from source+#define UGREP_VERSION "5.1.3"  // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP