diff options
author | Alejandro Colomar <alx@nginx.com> | 2023-07-21 13:58:37 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-10-25 13:38:01 +0200 |
commit | 2549de1f5ff81653d5176fe20ebb3814c64d103f (patch) | |
tree | d1dc74dd79f32178b5f0ced2ccb84ef0681dc82a | |
parent | fd4f4e4c5943c3bcd09e3bdcbeefc263aa2f1937 (diff) | |
download | unit-2549de1f5ff81653d5176fe20ebb3814c64d103f.tar.gz unit-2549de1f5ff81653d5176fe20ebb3814c64d103f.tar.bz2 |
Auto: zlib: compiling with zlib.
Signed-off-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r-- | auto/zlib | 23 | ||||
-rwxr-xr-x | configure | 5 |
2 files changed, 26 insertions, 2 deletions
diff --git a/auto/zlib b/auto/zlib new file mode 100644 index 00000000..dab30d38 --- /dev/null +++ b/auto/zlib @@ -0,0 +1,23 @@ + +# Copyright (C) Alejandro Colomar +# Copyright (C) NGINX, Inc. + + +NXT_ZLIB_CFLAGS="$(pkgconf --cflags-only-I zlib 2>/dev/null || echo "")" +NXT_ZLIB_LIBS="$(pkgconf --libs zlib 2>/dev/null || echo "-lz")" + + +nxt_feature="zlib" +nxt_feature_name=NXT_HAVE_ZLIB +nxt_feature_run=no +nxt_feature_incs=$NXT_ZLIB_CFLAGS +nxt_feature_libs=$NXT_ZLIB_LIBS +nxt_feature_test="#include <stdio.h> + + #include <zlib.h> + + int main(void) { + puts(zlibVersion()); + return 0; + }" +. auto/feature @@ -127,6 +127,7 @@ NXT_LIBRT= . auto/unix . auto/os/conf . auto/ssltls +. auto/zlib if [ $NXT_REGEX = YES ]; then . auto/pcre @@ -168,11 +169,11 @@ END NXT_LIB_AUX_CFLAGS="$NXT_OPENSSL_CFLAGS $NXT_GNUTLS_CFLAGS \\ $NXT_CYASSL_CFLAGS $NXT_POLARSSL_CFLAGS \\ - $NXT_PCRE_CFLAGS" + $NXT_PCRE_CFLAGS $NXT_ZLIB_CFLAGS" NXT_LIB_AUX_LIBS="$NXT_OPENSSL_LIBS $NXT_GNUTLS_LIBS \\ $NXT_CYASSL_LIBS $NXT_POLARSSL_LIBS \\ - $NXT_PCRE_LIB" + $NXT_PCRE_LIB $NXT_ZLIB_LIBS" if [ $NXT_NJS != NO ]; then . auto/njs |