@@ -5386,32 +5386,14 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
5386
5386
] )
5387
5387
] )
5388
5388
5389
- have_libzstd=no
5390
- AC_DEFUN ( [ TEST_ZSTD_VERSION] ,[
5391
- AC_MSG_CHECKING ( [ if libzstd is new enough] )
5392
-
5393
- dnl TODO(emmatyping): check if we can set a C define for the minimum version
5394
- dnl to re-use here and in the header compile check
5395
-
5396
- dnl This is checked when both a package is found and we do fallback searches
5397
- dnl If you update the minimum version here, you should update the compile
5398
- dnl check in Modules/_zstd/_zstdmodule.h
5399
- AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( [ @%:@ include "zstd.h"] , [
5400
- #if ZSTD_VERSION_NUMBER < 10405
5401
- exit(1);
5402
- #endif
5403
- ] ) ] , [ py__zstd_too_old=no] , [ py__zstd_too_old=yes] )
5404
- dnl Important to record that we have libzstd
5405
- have_libzstd=yes
5406
- ] )
5407
-
5408
- PKG_CHECK_MODULES([ LIBZSTD] , [ libzstd] , [ TEST_ZSTD_VERSION()] , [
5389
+ dnl zstd 1.4.5 added ZDICT_finalizeDictionary
5390
+ PKG_CHECK_MODULES([ LIBZSTD] , [ libzstd >= 1.4.5] , [ have_libzstd=yes] , [
5409
5391
WITH_SAVE_ENV([
5410
5392
CPPFLAGS="$CPPFLAGS $LIBZSTD_CFLAGS"
5411
5393
LIBS="$LIBS $LIBZSTD_LIBS"
5412
5394
AC_CHECK_HEADERS ( [ zstd.h zdict.h] , [
5413
- AC_CHECK_LIB ( [ zstd] , [ ZDICT_finalizeDictionary] ,
5414
- [ TEST_ZSTD_VERSION() ] , [ have_libzstd=no] )
5395
+ PY_CHECK_LIB ([ zstd] , [ ZDICT_finalizeDictionary] ,
5396
+ [ have_libzstd=yes ] , [ have_libzstd=no] )
5415
5397
] , [ have_libzstd=no] )
5416
5398
AS_VAR_IF ( [ have_libzstd] , [ yes] , [
5417
5399
LIBZSTD_CFLAGS=${LIBZSTD_CFLAGS-""}
@@ -8072,7 +8054,7 @@ PY_STDLIB_MOD([_bz2], [], [test "$have_bzip2" = yes],
8072
8054
[ $BZIP2_CFLAGS] , [ $BZIP2_LIBS] )
8073
8055
PY_STDLIB_MOD([ _lzma] , [ ] , [ test "$have_liblzma" = yes] ,
8074
8056
[ $LIBLZMA_CFLAGS] , [ $LIBLZMA_LIBS] )
8075
- PY_STDLIB_MOD([ _zstd] , [ test "$py__zstd_too_old" = no ] , [ test "$have_libzstd" = yes] ,
8057
+ PY_STDLIB_MOD([ _zstd] , [ ] , [ test "$have_libzstd" = yes] ,
8076
8058
[ $LIBZSTD_CFLAGS] , [ $LIBZSTD_LIBS] )
8077
8059
8078
8060
dnl OpenSSL bindings
0 commit comments