diff options
| author | Christian Heimes <christian@python.org> | 2021-11-09 17:42:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-09 16:42:53 +0100 |
| commit | 5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc (patch) | |
| tree | 6a4539f3ca532d6664d57857497994137bad2ba1 /configure.ac | |
| parent | 185533639d6eddd42a28f9e3517067bd877e34c5 (diff) | |
| download | cpython-git-5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc.tar.gz | |
bpo-45763: Detect compression build deps in configure (GH-29483)
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 7361d89a69..a7e5f2bd54 100644 --- a/configure.ac +++ b/configure.ac @@ -3830,9 +3830,26 @@ if test "$ac_cv_have_lchflags" = yes ; then AC_DEFINE(HAVE_LCHFLAGS, 1, [Define to 1 if you have the 'lchflags' function.]) fi -# Check for compression libraries -dnl Check if system zlib has *Copy() functions -AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_ZLIB_COPY, 1, [Define if the zlib library has inflateCopy])) +dnl Check for compression libraries +AC_CHECK_HEADERS([zlib.h], [ + save_LIBS="$LIBS" + AC_CHECK_LIB([z], [gzread]) + LIBS="$save_LIBS" + AC_CHECK_LIB([z], [inflateCopy], [AC_DEFINE(HAVE_ZLIB_COPY, 1, [Define if the zlib library has inflateCopy])]) + LIBS="$save_LIBS" +]) + +AC_CHECK_HEADERS([bzlib.h], [ + save_LIBS="$LIBS" + AC_CHECK_LIB([bz2], [BZ2_bzCompress]) + LIBS="$save_LIBS" +]) + +AC_CHECK_HEADERS([lzma.h], [ + save_LIBS="$LIBS" + AC_CHECK_LIB([lzma], [lzma_easy_encoder]) + LIBS="$save_LIBS" +]) PY_CHECK_FUNC([hstrerror], [#include <netdb.h>]) |
