summaryrefslogtreecommitdiffhomepage
path: root/auto/zlib
blob: b4e964c30416e28b2b4de822b763509adbc944ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

# Copyright (C) Alejandro Colomar
# Copyright (C) NGINX, Inc.


NXT_HAVE_ZLIB=no
NXT_ZLIB_CFLAGS=
NXT_ZLIB_LIBS=


if [ $NXT_ZLIB = YES ]; then

    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

    if [ $nxt_found = yes ]; then
        NXT_HAVE_ZLIB=YES
    fi
fi