summaryrefslogtreecommitdiffhomepage
path: root/auto
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
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')
-rw-r--r--auto/options4
-rw-r--r--auto/summary1
-rw-r--r--auto/zlib39
3 files changed, 30 insertions, 14 deletions
diff --git a/auto/options b/auto/options
index 0550c699..ef0459f3 100644
--- a/auto/options
+++ b/auto/options
@@ -20,6 +20,8 @@ NXT_PCRE_LIB=
NXT_REGEX=YES
NXT_TRY_PCRE2=YES
+NXT_ZLIB=YES
+
NXT_TLS=NO
NXT_OPENSSL=NO
NXT_GNUTLS=NO
@@ -104,6 +106,8 @@ do
--no-regex) NXT_REGEX=NO ;;
--no-pcre2) NXT_TRY_PCRE2=NO ;;
+ --no-zlib) NXT_ZLIB=NO ;;
+
--openssl) NXT_OPENSSL=YES ;;
--gnutls) NXT_GNUTLS=YES ;;
--cyassl) NXT_CYASSL=YES ;;
diff --git a/auto/summary b/auto/summary
index 3aa41669..0e87b88a 100644
--- a/auto/summary
+++ b/auto/summary
@@ -29,6 +29,7 @@ Unit configuration summary:
Unix domain sockets support: $NXT_UNIX_DOMAIN
TLS support: ............... $NXT_OPENSSL
Regex support: ............. $NXT_REGEX
+ zlib support: .............. $NXT_ZLIB
NJS support: ............... $NXT_NJS
process isolation: ......... $NXT_ISOLATION
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