summaryrefslogtreecommitdiffhomepage
path: root/auto/zlib
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@nginx.com>2023-07-21 13:58:37 +0200
committerAlejandro Colomar <alx@nginx.com>2023-09-04 03:40:33 +0200
commit39db8691fe40adcfdb827c194636b87391c7c416 (patch)
treec06c80848d8fb034c41c330235cb8c91a160e2d0 /auto/zlib
parent7ecdc3d190e449f04ac69d62f437399851035028 (diff)
downloadunit-39db8691fe40adcfdb827c194636b87391c7c416.tar.gz
unit-39db8691fe40adcfdb827c194636b87391c7c416.tar.bz2
Auto: zlib: added --no-zlib.
Related to: HTTP: compress: gzip Signed-off-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to 'auto/zlib')
-rw-r--r--auto/zlib39
1 files changed, 25 insertions, 14 deletions
diff --git a/auto/zlib b/auto/zlib
index dab30d38..b4e964c3 100644
--- a/auto/zlib
+++ b/auto/zlib
@@ -3,21 +3,32 @@
# 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_HAVE_ZLIB=no
+NXT_ZLIB_CFLAGS=
+NXT_ZLIB_LIBS=
-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>
+if [ $NXT_ZLIB = YES ]; then
- #include <zlib.h>
+ NXT_ZLIB_CFLAGS="$(pkgconf --cflags-only-I zlib 2>/dev/null || echo "")"
+ NXT_ZLIB_LIBS="$(pkgconf --libs zlib 2>/dev/null || echo "-lz")"
- int main(void) {
- puts(zlibVersion());
- return 0;
- }"
-. auto/feature
+ 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
+
+ if [ $nxt_found = yes ]; then
+ NXT_HAVE_ZLIB=YES
+ fi
+fi