Skip to content

Commit aec582b

Browse files
Config changes
1 parent d565713 commit aec582b

File tree

3 files changed

+85
-143
lines changed

3 files changed

+85
-143
lines changed

configure

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

configure.ac

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,36 +5323,35 @@ if test "$ac_cv_have_lchflags" = yes ; then
53235323
fi
53245324

53255325
dnl Check for compression libraries
5326-
AH_TEMPLATE([HAVE_ZLIB_COPY], [Define if the zlib library has inflateCopy])
5327-
5328-
dnl detect zlib from Emscripten emport
5329-
PY_CHECK_EMSCRIPTEN_PORT([ZLIB], [-sUSE_ZLIB])
5326+
AH_TEMPLATE([HAVE_ZLIB_COPY], [Define if the zlib library has inflateCopy; zlib 1.2.0 (2003) added inflateCopy.])
5327+
dnl 2022-03: Until we know if third party zlib modules people use (for hardware
5328+
dnl accelerators, parallelism, etc.) all support copy, lets not assume.
53305329

53315330
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
5332-
have_zlib=yes
53335331
dnl zlib 1.2.0 (2003) added inflateCopy
53345332
AC_DEFINE([HAVE_ZLIB_COPY], [1])
53355333
], [
5336-
WITH_SAVE_ENV([
5337-
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
5338-
LIBS="$LIBS $ZLIB_LIBS"
5339-
AC_CHECK_HEADERS([zlib.h], [
5340-
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
5341-
], [have_zlib=no])
5342-
AS_VAR_IF([have_zlib], [yes], [
5343-
ZLIB_CFLAGS=${ZLIB_CFLAGS-""}
5344-
ZLIB_LIBS=${ZLIB_LIBS-"-lz"}
5345-
PY_CHECK_LIB([z], [inflateCopy], [AC_DEFINE([HAVE_ZLIB_COPY], [1])])
5334+
AC_CHECK_HEADERS([zlib.h], [
5335+
WITH_SAVE_ENV([
5336+
AC_CHECK_LIB([z], [gzread], [
5337+
ZLIB_CFLAGS=${ZLIB_CFLAGS-""}
5338+
ZLIB_LIBS=${ZLIB_LIBS-"-lz"}
5339+
AC_CHECK_LIB([z], [inflateCopy], [AC_DEFINE([HAVE_ZLIB_COPY], [1])])
5340+
], [
5341+
AC_MSG_ERROR([m4_normalize([
5342+
zlib.h and libz are required. Install your OS's zlib-devel or
5343+
zlib1g-dev equivalent library or get it from https://zlib.net/.
5344+
])])
5345+
])
53465346
])
5347+
], [
5348+
AC_MSG_ERROR([m4_normalize([
5349+
zlib.h and libz are required. Install your OS's zlib-devel or
5350+
zlib1g-dev equivalent library or get it from https://zlib.net/.
5351+
])])
53475352
])
53485353
])
53495354

5350-
dnl binascii can use zlib for optimized crc32.
5351-
AS_VAR_IF([have_zlib], [yes], [
5352-
BINASCII_CFLAGS="-DUSE_ZLIB_CRC32 $ZLIB_CFLAGS"
5353-
BINASCII_LIBS="$ZLIB_LIBS"
5354-
])
5355-
53565355
dnl detect bzip2 from Emscripten emport
53575356
PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
53585357

@@ -7933,10 +7932,9 @@ PY_STDLIB_MOD([_uuid],
79337932
[$LIBUUID_CFLAGS], [$LIBUUID_LIBS])
79347933

79357934
dnl compression libs
7936-
PY_STDLIB_MOD([zlib], [], [test "$have_zlib" = yes],
7937-
[$ZLIB_CFLAGS], [$ZLIB_LIBS])
7938-
dnl binascii can use zlib for optimized crc32.
7939-
PY_STDLIB_MOD_SIMPLE([binascii], [$BINASCII_CFLAGS], [$BINASCII_LIBS])
7935+
PY_STDLIB_MOD_SIMPLE([zlib], [$ZLIB_CFLAGS], [$ZLIB_LIBS])
7936+
dnl binascii uses zlib for optimized crc32.
7937+
PY_STDLIB_MOD_SIMPLE([binascii], [$ZLIB_CFLAGS], [$ZLIB_LIBS])
79407938
PY_STDLIB_MOD([_bz2], [], [test "$have_bzip2" = yes],
79417939
[$BZIP2_CFLAGS], [$BZIP2_LIBS])
79427940
PY_STDLIB_MOD([_lzma], [], [test "$have_liblzma" = yes],

pyconfig.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,8 @@
16091609
/* Define to 1 if you have the 'writev' function. */
16101610
#undef HAVE_WRITEV
16111611

1612-
/* Define if the zlib library has inflateCopy */
1612+
/* Define if the zlib library has inflateCopy; zlib 1.2.0 (2003) added
1613+
inflateCopy. */
16131614
#undef HAVE_ZLIB_COPY
16141615

16151616
/* Define to 1 if you have the <zlib.h> header file. */

0 commit comments

Comments
 (0)