Skip to content

Commit 8fdc7f7

Browse files
committed
Actually properly set _zstd module status based on version
1 parent 90b9172 commit 8fdc7f7

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

configure

Lines changed: 11 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5415,7 +5415,8 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
54155415
])
54165416
])
54175417

5418-
define([TEST_ZSTD_VERSION],[
5418+
have_libzstd=no
5419+
AC_DEFUN([TEST_ZSTD_VERSION],[
54195420
AC_MSG_CHECKING([if libzstd is new enough])
54205421
54215422
dnl TODO(emmatyping): check if we can set a C define for the minimum version
@@ -5428,7 +5429,9 @@ define([TEST_ZSTD_VERSION],[
54285429
#if ZSTD_VERSION_NUMBER < 10405
54295430
exit(1);
54305431
#endif
5431-
])], [have_libzstd=yes], [have_libzstd=no])
5432+
])], [py__zstd_too_old=no], [py__zstd_too_old=yes])
5433+
dnl Important to record that we have libzstd
5434+
have_libzstd=yes
54325435
])
54335436

54345437
PKG_CHECK_MODULES([LIBZSTD], [libzstd], [TEST_ZSTD_VERSION()], [
@@ -8094,7 +8097,7 @@ PY_STDLIB_MOD([_bz2], [], [test "$have_bzip2" = yes],
80948097
[$BZIP2_CFLAGS], [$BZIP2_LIBS])
80958098
PY_STDLIB_MOD([_lzma], [], [test "$have_liblzma" = yes],
80968099
[$LIBLZMA_CFLAGS], [$LIBLZMA_LIBS])
8097-
PY_STDLIB_MOD([_zstd], [], [test "$have_libzstd" = yes],
8100+
PY_STDLIB_MOD([_zstd], [test "$py__zstd_too_old" = no], [test "$have_libzstd" = yes],
80988101
[$LIBZSTD_CFLAGS], [$LIBZSTD_LIBS])
80998102

81008103
dnl OpenSSL bindings

0 commit comments

Comments
 (0)