release v4.1.0
[m6w6/ext-http] / autoconf / pecl / libbrotli.m4
1
2 AC_DEFUN([PECL_CHECK_LIBBROTLI], [
3 PECL_CHECK_LIBBROTLI_COMMON([$1], [$2])
4 PECL_CHECK_DONE(libbrotlicommon, [$PECL_VAR([HAVE_LIBBROTLI_COMMON])])
5 PECL_CHECK_LIBBROTLI_DEC([$1], [$2])
6 PECL_CHECK_DONE(libbrotlidec, [$PECL_VAR([HAVE_LIBBROTLI_DEC])])
7 PECL_CHECK_LIBBROTLI_ENC([$1], [$2])
8 PECL_CHECK_DONE(libbrotlienc, [$PECL_VAR([HAVE_LIBBROTLI_ENC])])
9
10 if $PECL_VAR([HAVE_LIBBROTLI_COMMON]) \
11 && $PECL_VAR([HAVE_LIBBROTLI_DEC]) \
12 && $PECL_VAR([HAVE_LIBBROTLI_ENC]); then
13 PECL_VAR([HAVE_LIBBROTLI])=true
14 else
15 PECL_VAR([HAVE_LIBBROTLI])=false
16 fi
17 ])
18
19 AC_DEFUN([PECL_CHECK_LIBBROTLI_COMMON], [
20 PECL_CHECK_PKGCONFIG(libbrotlicommon, [$1])
21
22 PECL_HAVE_VERSION(libbrotlicommon, ifelse($2,,1.0,$2), [
23 PECL_VAR([HAVE_LIBBROTLI_COMMON])=true
24 ], [
25 PECL_VAR([HAVE_LIBBROTLI_COMMON])=false
26 ])
27 ])
28
29 AC_DEFUN([PECL_CHECK_LIBBROTLI_DEC], [
30 PECL_CHECK_PKGCONFIG(libbrotlidec, [$1])
31
32 PECL_HAVE_VERSION(libbrotlidec, ifelse($2,,1.0,$2), [
33 PECL_VAR([HAVE_LIBBROTLI_DEC])=true
34 ], [
35 PECL_VAR([HAVE_LIBBROTLI_DEC])=false
36 ])
37 ])
38
39 AC_DEFUN([PECL_CHECK_LIBBROTLI_ENC], [
40 PECL_CHECK_PKGCONFIG(libbrotlienc, [$1])
41
42 PECL_HAVE_VERSION(libbrotlienc, ifelse($2,,1.0,$2), [
43 PECL_VAR([HAVE_LIBBROTLI_ENC])=true
44 ], [
45 PECL_VAR([HAVE_LIBBROTLI_ENC])=false
46 ])
47 ])