Skip to content

Commit 235fe69

Browse files
emmatypingAA-Turner
andcommitted
Use AC_COMPILE_IFELSE and checking message when looking for zstd
Co-authored-by: Adam Turner <[email protected]>
1 parent f3dd7f7 commit 235fe69

File tree

2 files changed

+39
-34
lines changed

2 files changed

+39
-34
lines changed

configure

+30-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+9-2
Original file line numberDiff line numberDiff line change
@@ -5394,12 +5394,19 @@ PKG_CHECK_MODULES([LIBZSTD], [libzstd >= 1.4.5], [have_libzstd=yes], [
53945394
LIBS="$LIBS $LIBZSTD_LIBS"
53955395
AC_CHECK_HEADERS([zstd.h zdict.h], [
53965396
PY_CHECK_LIB([zstd], [ZDICT_finalizeDictionary], [
5397-
AC_RUN_IFELSE([AC_LANG_PROGRAM([@%:@include "zstd.h"], [
5397+
AC_MSG_CHECKING([ZSTD_VERSION_NUMBER >= 1.4.5])
5398+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include "zstd.h"], [
53985399
#if ZSTD_VERSION_NUMBER < 10405
53995400
exit(1);
54005401
#endif
54015402
])
5402-
], [have_libzstd=yes], [have_libzstd=no])
5403+
], [
5404+
AC_MSG_RESULT([yes])
5405+
have_libzstd=yes
5406+
], [
5407+
AC_MSG_RESULT([no])
5408+
have_libzstd=no
5409+
])
54035410
], [have_libzstd=no])
54045411
], [have_libzstd=no])
54055412
AS_VAR_IF([have_libzstd], [yes], [

0 commit comments

Comments
 (0)