8000 GH-132983: Support finding libzstd without pkg-config by emmatyping · Pull Request #133550 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-132983: Support finding libzstd without pkg-config #133550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use AC_COMPILE_IFELSE and checking mess 8000 age when looking for zstd
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
  • Loading branch information
emmatyping and AA-Turner committed May 7, 2025
commit 235fe6941f5dbe0235885f7e65782854154da33f
62 changes: 30 additions & 32 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5394,12 +5394,19 @@ PKG_CHECK_MODULES([LIBZSTD], [libzstd >= 1.4.5], [have_libzstd=yes], [
LIBS="$LIBS $LIBZSTD_LIBS"
AC_CHECK_HEADERS([zstd.h zdict.h], [
PY_CHECK_LIB([zstd], [ZDICT_finalizeDictionary], [
AC_RUN_IFELSE([AC_LANG_PROGRAM([@%:@include "zstd.h"], [
AC_MSG_CHECKING([ZSTD_VERSION_NUMBER >= 1.4.5])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include "zstd.h"], [
#if ZSTD_VERSION_NUMBER < 10405
exit(1);
#endif
])
], [have_libzstd=yes], [have_libzstd=no])
], [
AC_MSG_RESULT([yes])
have_libzstd=yes
], [
AC_MSG_RESULT([no])
have_libzstd=no
])
], [have_libzstd=no])
], [have_libzstd=no])
AS_VAR_IF([have_libzstd], [yes], [
Expand Down
Loading
0