ensure options are applied before the headers are set
[m6w6/ext-http] / config9.m4
1 dnl config.m4 for pecl/http
2 dnl $Id: config9.m4 242664 2007-09-18 19:13:37Z mike $
3 dnl vim: noet ts=4 sw=4
4
5 PHP_ARG_WITH([http], [whether to enable extended HTTP support],
6 [ --with-http Enable extended HTTP support])
7 PHP_ARG_WITH([http-zlib-dir], [],
8 [ --with-http-zlib-dir[=DIR] HTTP: where to find zlib], $PHP_HTTP, $PHP_HTTP)
9 PHP_ARG_WITH([http-libcurl-dir], [],
10 [ --with-http-libcurl-dir[=DIR] HTTP: where to find libcurl], $PHP_HTTP, $PHP_HTTP)
11 PHP_ARG_WITH([http-libevent-dir], [],
12 [ --with-http-libevent-dir[=DIR] HTTP: where to find libevent], $PHP_HTTP_LIBCURL_DIR, "")
13 PHP_ARG_WITH([http-libidn-dir], [],
14 [ --with-http-libidn-dir=[=DIR] HTTP: where to find libidn], $PHP_HTTP_LIBCURL_DIR, "")
15
16 if test "$PHP_HTTP" != "no"; then
17
18 HTTP_HAVE_A_REQUEST_LIB=false
19
20 ifdef([AC_PROG_EGREP], [
21 AC_PROG_EGREP
22 ], [
23 AC_CHECK_PROG(EGREP, egrep, egrep)
24 ])
25 ifdef([AC_PROG_SED], [
26 AC_PROG_SED
27 ], [
28 ifdef([LT_AC_PROG_SED], [
29 LT_AC_PROG_SED
30 ], [
31 AC_CHECK_PROG(SED, sed, sed)
32 ])
33 ])
34
35 AC_PROG_CPP
36
37 if test "$PHP_HTTP_SHARED_DEPS" != "no"; then
38 AC_DEFINE([PHP_HTTP_SHARED_DEPS], [1], [ ])
39 else
40 AC_DEFINE([PHP_HTTP_SHARED_DEPS], [0], [ ])
41 fi
42
43 dnl
44 dnl HTTP_SHARED_DEP(name[, code-if-yes[, code-if-not]])
45 dnl
46 AC_DEFUN([HTTP_SHARED_DEP], [
47 extname=$1
48 haveext=$[PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)
49
50 AC_MSG_CHECKING([whether to add a dependency on ext/$extname])
51 if test "$PHP_HTTP_SHARED_DEPS" = "no"; then
52 AC_MSG_RESULT([no])
53 $3
54 elif test "$haveext"; then
55 AC_MSG_RESULT([yes])
56 AC_DEFINE([PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__), [1], [ ])
57 ifdef([PHP_ADD_EXTENSION_DEP], [
58 PHP_ADD_EXTENSION_DEP([http], $1, true)
59 ])
60 $2
61 else
62 AC_MSG_RESULT([no])
63 $3
64 fi
65 ])
66
67 dnl
68 dnl HTTP_HAVE_PHP_EXT(name[, code-if-yes[, code-if-not]])
69 dnl
70 AC_DEFUN([HTTP_HAVE_PHP_EXT], [
71 extname=$1
72 haveext=$[PHP_]translit($1,a-z_-,A-Z__)
73 AC_MSG_CHECKING([for ext/$extname support])
74 if test -x "$PHP_EXECUTABLE"; then
75 grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
76 if test "$grepext" = "$extname"; then
77 [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
78 AC_MSG_RESULT([yes])
79 $2
80 else
81 [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=
82 AC_MSG_RESULT([no])
83 $3
84 fi
85 elif test "$haveext" != "no" && test "x$haveext" != "x"; then
86 [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
87 AC_MSG_RESULT([yes])
88 $2
89 else
90 [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=
91 AC_MSG_RESULT([no])
92 $3
93 fi
94 ])
95
96
97 dnl ----
98 dnl STDC
99 dnl ----
100 AC_TYPE_OFF_T
101 AC_TYPE_MBSTATE_T
102 dnl getdomainname() is declared in netdb.h on some platforms: AIX, OSF
103 AC_CHECK_HEADERS([netdb.h unistd.h wchar.h wctype.h arpa/inet.h])
104 PHP_CHECK_FUNC(gethostname, nsl)
105 PHP_CHECK_FUNC(getdomainname, nsl)
106 PHP_CHECK_FUNC(mbrtowc)
107 PHP_CHECK_FUNC(mbtowc)
108 PHP_CHECK_FUNC(iswalnum)
109 PHP_CHECK_FUNC(inet_pton)
110
111 dnl ----
112 dnl IDN
113 dnl ----
114
115 AC_MSG_CHECKING([for idna.h])
116 IDNA_DIR=
117 for i in "$PHP_HTTP_LIBIDN_DIR" "$IDN_DIR" /usr/local /usr /opt; do
118 if test -f "$i/include/idna.h"; then
119 IDNA_DIR=$i
120 break;
121 fi
122 done
123 if test "x$IDNA_DIR" = "x"; then
124 AC_MSG_RESULT([not found])
125 else
126 AC_MSG_RESULT([found in $IDNA_DIR])
127 AC_DEFINE([PHP_HTTP_HAVE_IDN], [1], [Have libidn support])
128 PHP_ADD_INCLUDE($IDNA_DIR/include)
129 PHP_ADD_LIBRARY_WITH_PATH(idn, $IDNA_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
130 fi
131
132 dnl ----
133 dnl ZLIB
134 dnl ----
135 AC_MSG_CHECKING([for zlib.h])
136 ZLIB_DIR=
137 for i in "$PHP_HTTP_ZLIB_DIR" "$PHP_ZLIB_DIR" "$PHP_ZLIB" /usr/local /usr /opt; do
138 if test -f "$i/include/zlib.h"; then
139 ZLIB_DIR=$i
140 break;
141 fi
142 done
143 if test "x$ZLIB_DIR" = "x"; then
144 AC_MSG_RESULT([not found])
145 AC_MSG_ERROR([could not find zlib.h])
146 else
147 AC_MSG_RESULT([found in $ZLIB_DIR])
148 AC_MSG_CHECKING([for zlib version >= 1.2.0.4])
149 ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/include/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
150 AC_MSG_RESULT([$ZLIB_VERSION])
151 if test `echo $ZLIB_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
152 AC_MSG_ERROR([zlib version greater or equal to 1.2.0.4 required])
153 else
154 PHP_ADD_INCLUDE($ZLIB_DIR/include)
155 PHP_ADD_LIBRARY_WITH_PATH(z, $ZLIB_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
156 fi
157 fi
158
159 dnl ----
160 dnl CURL
161 dnl ----
162
163 if test "$PHP_HTTP_LIBCURL_DIR" = "no"; then
164 AC_DEFINE([PHP_HTTP_HAVE_CURL], [0], [ ])
165 else
166 AC_MSG_CHECKING([for curl/curl.h])
167 CURL_DIR=
168 for i in "$PHP_HTTP_LIBCURL_DIR" /usr/local /usr /opt; do
169 if test -f "$i/include/curl/curl.h"; then
170 CURL_DIR=$i
171 break
172 fi
173 done
174 if test "x$CURL_DIR" = "x"; then
175 AC_MSG_RESULT([not found])
176 else
177 AC_MSG_RESULT([found in $CURL_DIR])
178
179 AC_MSG_CHECKING([for curl-config])
180 CURL_CONFIG=
181 for i in "$CURL_DIR/bin/curl-config" "$CURL_DIR/curl-config" `which curl-config`; do
182 if test -x "$i"; then
183 CURL_CONFIG=$i
184 break
185 fi
186 done
187 if test "x$CURL_CONFIG" = "x"; then
188 AC_MSG_RESULT([not found])
189 AC_MSG_ERROR([could not find curl-config])
190 else
191 AC_MSG_RESULT([found: $CURL_CONFIG])
192 fi
193
194 dnl RHEL6: 7.19.7
195 dnl SUSE11: 7.19.7
196 dnl Debian wheezy: 7.26.0
197 dnl Debian sqeeze: 7.21.0
198 dnl Debian ancient 7.18.2
199 AC_MSG_CHECKING([for curl version >= 7.18.2])
200 CURL_VERSION=`$CURL_CONFIG --version | $SED -e 's/[[^0-9\.]]//g'`
201 AC_MSG_RESULT([$CURL_VERSION])
202 if test `echo $CURL_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71802; then
203 AC_MSG_ERROR([libcurl version greater or equal to 7.18.2 required])
204 fi
205
206 AC_MSG_CHECKING([for HTTP2 support in libcurl])
207 if $CURL_CONFIG --features | $EGREP -q HTTP2; then
208 AC_MSG_RESULT([yes])
209 AC_DEFINE([PHP_HTTP_HAVE_HTTP2], [1], [ ])
210 else
211 AC_MSG_RESULT([no])
212 fi
213
214 dnl
215 dnl compile tests
216 dnl
217
218 save_INCLUDES="$INCLUDES"
219 INCLUDES=
220 save_LIBS="$LIBS"
221 LIBS=-lcurl
222 save_CFLAGS="$CFLAGS"
223 CFLAGS="$CFLAGS `$CURL_CONFIG --cflags`"
224 save_LDFLAGS="$LDFLAGS"
225 LDFLAGS="$ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
226
227 AC_MSG_CHECKING([for SSL support in libcurl])
228 CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
229 CURL_SSL_LIBS=""
230 if test "$CURL_SSL" = "SSL"; then
231 AC_MSG_RESULT([yes])
232 AC_DEFINE([PHP_HTTP_HAVE_SSL], [1], [ ])
233
234 AC_MSG_CHECKING([for openssl support in libcurl])
235 AC_TRY_RUN([
236 #include <curl/curl.h>
237 int main(int argc, char *argv[]) {
238 curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
239 if (data && data->ssl_version && *data->ssl_version) {
240 const char *ptr = data->ssl_version;
241 while(*ptr == ' ') ++ptr;
242 return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
243 }
244 return 1;
245 }
246 ], [
247 AC_MSG_RESULT([yes])
248 AC_CHECK_HEADER([openssl/ssl.h], [
249 AC_CHECK_HEADER([openssl/crypto.h], [
250 AC_DEFINE([PHP_HTTP_HAVE_OPENSSL], [1], [ ])
251 CURL_SSL_LIBS="ssl crypto"
252 ])
253 ])
254 ], [
255 AC_MSG_RESULT([no])
256 ], [
257 AC_MSG_RESULT([no])
258 ])
259
260 AC_MSG_CHECKING([for gnutls support in libcurl])
261 AC_TRY_RUN([
262 #include <curl/curl.h>
263 int main(int argc, char *argv[]) {
264 curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
265 if (data && data->ssl_version && *data->ssl_version) {
266 const char *ptr = data->ssl_version;
267 while(*ptr == ' ') ++ptr;
268 return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
269 }
270 return 1;
271 }
272 ], [
273 AC_MSG_RESULT([yes])
274 AC_CHECK_HEADER([gnutls.h], [
275 AC_CHECK_HEADER([gcrypt.h], [
276 AC_DEFINE([PHP_HTTP_HAVE_GNUTLS], [1], [ ])
277 CURL_SSL_LIBS="gnutls gcrypt"
278 ])
279 ])
280 ], [
281 AC_MSG_RESULT([no])
282 ], [
283 AC_MSG_RESULT([no])
284 ])
285 else
286 AC_MSG_RESULT([no])
287 fi
288
289 AC_MSG_CHECKING([for ares support in libcurl])
290 AC_TRY_RUN([
291 #include <curl/curl.h>
292 int main(int argc, char *argv[]) {
293 curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
294 if (data && data->ares && data->ares_num0) {
295 return 0;
296 }
297 return 1;
298 }
299 ], [
300 AC_MSG_RESULT([yes])
301 AC_DEFINE([PHP_HTTP_HAVE_ARES], [1], [ ])
302 ], [
303 AC_MSG_RESULT([no])
304 ], [
305 AC_MSG_RESULT([no])
306 ])
307
308 AC_MSG_CHECKING([whether CURLOPT_TLSAUTH_TYPE expects CURL_TLSAUTH_SRP or literal "SRP"])
309 AC_TRY_RUN([
310 #include <curl/curl.h>
311 int main(int argc, char *argv[]) {
312 CURL *ch = curl_easy_init();
313 return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, CURL_TLSAUTH_SRP);
314 }
315 ], [
316 AC_MSG_RESULT([CURL_TLSAUTH_SRP])
317 AC_DEFINE([PHP_HTTP_CURL_TLSAUTH_SRP], [CURL_TLSAUTH_SRP], [ ])
318 AC_DEFINE([PHP_HTTP_CURL_TLSAUTH_DEF], [CURL_TLSAUTH_NONE], [ ])
319 ], [
320 AC_TRY_RUN([
321 #include <curl/curl.h>
322 int main(int argc, char *argv[]) {
323 CURL *ch = curl_easy_init();
324 return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, "SRP");
325 }
326 ], [
327 AC_MSG_RESULT(["SRP"])
328 AC_DEFINE([PHP_HTTP_CURL_TLSAUTH_SRP], ["SRP"], [ ])
329 AC_DEFINE([PHP_HTTP_CURL_TLSAUTH_DEF], [""], [ ])
330 ], [
331 AC_MSG_RESULT([neither])
332 ], [
333 AC_MSG_RESULT([neither])
334 ])
335 ], [
336 AC_MSG_RESULT([neither])
337 ])
338
339 INCLUDES="$save_INCLUDES"
340 LIBS="$save_LIBS"
341 CFLAGS="$save_CFLAGS"
342 LDFLAGS="$save_LDFLAGS"
343
344 if test -n "$CURL_SSL_LIBS"; then
345 for CURL_SSL_LIB in $CURL_SSL_LIBS; do
346 PHP_ADD_LIBRARY_WITH_PATH([$CURL_SSL_LIB], $CURL_DIR/$PHP_LIBDIR, PHP_HTTP_SHARED_LIBADD)
347 done
348 fi
349
350 dnl end compile tests
351
352 AC_MSG_CHECKING([for bundled SSL CA info])
353 CURL_CAINFO=
354 for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/ca-bundle.crt"; do
355 if test -f "$i"; then
356 CURL_CAINFO="$i"
357 break
358 fi
359 done
360 if test "x$CURL_CAINFO" = "x"; then
361 AC_MSG_RESULT([not found])
362 else
363 AC_MSG_RESULT([$CURL_CAINFO])
364 AC_DEFINE_UNQUOTED([PHP_HTTP_CURL_CAINFO], ["$CURL_CAINFO"], [path to bundled SSL CA info])
365 fi
366
367 PHP_ADD_INCLUDE($CURL_DIR/include)
368 PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
369 PHP_EVAL_LIBLINE(`$CURL_CONFIG --libs`, HTTP_SHARED_LIBADD)
370 AC_DEFINE([PHP_HTTP_HAVE_CURL], [1], [Have libcurl support])
371 HTTP_HAVE_A_REQUEST_LIB=true
372 fi
373 fi
374
375 dnl ----
376 dnl EVENT
377 dnl ----
378
379 if test "$PHP_HTTP_LIBEVENT_DIR" = "no"; then
380 AC_DEFINE([PHP_HTTP_HAVE_EVENT], [0], [ ])
381 else
382 AC_MSG_CHECKING([for event2/event.h])
383 EVENT_DIR=
384 for i in "$PHP_HTTP_LIBEVENT_DIR" /usr/local /usr /opt; do
385 if test -f "$i/include/event.h"; then
386 EVENT_DIR=$i
387 break
388 fi
389 done
390 if test "x$EVENT_DIR" = "x"; then
391 AC_MSG_RESULT([not found])
392 AC_MSG_WARN([continuing without libevent support])
393 AC_DEFINE([PHP_HTTP_HAVE_EVENT], [0], [ ])
394 else
395 AC_MSG_RESULT([found in $EVENT_DIR])
396
397 AC_MSG_CHECKING([for libevent version, roughly])
398
399 if test -f "$EVENT_DIR/include/event2/event.h"; then
400 EVENT_VER="`$AWK '/_EVENT_VERSION/ {gsub(/\"/,\"\",$3); print $3}' < $EVENT_DIR/include/event2/event-config.h`"
401 AC_DEFINE([PHP_HTTP_HAVE_EVENT2], [1], [ ])
402 else
403 AC_DEFINE([PHP_HTTP_HAVE_EVENT2], [0], [ ])
404 if test -f "$EVENT_DIR/include/evhttp.h" && test -f "$EVENT_DIR/include/evdns.h"; then
405 if test -f "$EVENT_DIR/include/evrpc.h"; then
406 EVENT_VER="1.4 or greater"
407 else
408 EVENT_VER="1.2 or greater"
409 fi
410 else
411 EVENT_VER="1.1b or lower"
412 fi
413 fi
414 AC_DEFINE_UNQUOTED([PHP_HTTP_EVENT_VERSION], ["$EVENT_VER"], [ ])
415 AC_MSG_RESULT([$EVENT_VER])
416
417 PHP_ADD_INCLUDE($EVENT_DIR/include)
418 PHP_ADD_LIBRARY_WITH_PATH(event, $EVENT_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
419 AC_DEFINE([PHP_HTTP_HAVE_EVENT], [1], [Have libevent support for cURL])
420 fi
421 fi
422
423 dnl ----
424 dnl RAPHF
425 dnl ----
426 HTTP_HAVE_PHP_EXT([raphf], [
427 AC_MSG_CHECKING([for php_raphf.h])
428 HTTP_EXT_RAPHF_INCDIR=
429 for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../raphf; do
430 if test -d $i; then
431 if test -f $i/php_raphf.h; then
432 HTTP_EXT_RAPHF_INCDIR=$i
433 break
434 elif test -f $i/ext/raphf/php_raphf.h; then
435 HTTP_EXT_RAPHF_INCDIR=$i/ext/raphf
436 break
437 fi
438 fi
439 done
440 if test "x$HTTP_EXT_RAPHF_INCDIR" = "x"; then
441 AC_MSG_ERROR([not found])
442 else
443 AC_MSG_RESULT([$HTTP_EXT_RAPHF_INCDIR])
444 AC_DEFINE([PHP_HTTP_HAVE_PHP_RAPHF_H], [1], [Have ext/raphf support])
445 PHP_ADD_INCLUDE([$HTTP_EXT_RAPHF_INCDIR])
446 fi
447 ], [
448 AC_MSG_ERROR([Please install pecl/raphf and activate extension=raphf.$SHLIB_DL_SUFFIX_NAME in your php.ini])
449 ])
450
451 dnl ----
452 dnl PROPRO
453 dnl ----
454 HTTP_HAVE_PHP_EXT([propro], [
455 AC_MSG_CHECKING([for php_propro.h])
456 HTTP_EXT_PROPRO_INCDIR=
457 for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../propro; do
458 if test -d $i; then
459 if test -f $i/php_propro.h; then
460 HTTP_EXT_PROPRO_INCDIR=$i
461 break
462 elif test -f $i/ext/propro/php_propro.h; then
463 HTTP_EXT_PROPRO_INCDIR=$i/ext/propro
464 break
465 fi
466 fi
467 done
468 if test "x$HTTP_EXT_PROPRO_INCDIR" = "x"; then
469 AC_MSG_ERROR([not found])
470 else
471 AC_MSG_RESULT([$HTTP_EXT_PROPRO_INCDIR])
472 AC_DEFINE([PHP_HTTP_HAVE_PHP_PROPRO_H], [1], [Have ext/propro support])
473 PHP_ADD_INCLUDE([$HTTP_EXT_PROPRO_INCDIR])
474 fi
475 ], [
476 AC_MSG_ERROR([Please install pecl/propro and activate extension=propro.$SHLIB_DL_SUFFIX_NAME in your php.ini])
477 ])
478
479 PHP_ARG_WITH([http-shared-deps], [whether to depend on extensions which have been built shared],
480 [ --without-http-shared-deps HTTP: do not depend on extensions like hash
481 and iconv (when they are built shared)], $PHP_HTTP, $PHP_HTTP)
482 dnl ----
483 dnl HASH
484 dnl ----
485 HTTP_HAVE_PHP_EXT([hash], [
486 AC_MSG_CHECKING([for php_hash.h])
487 HTTP_EXT_HASH_INCDIR=
488 for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../hash; do
489 if test -d $i; then
490 if test -f $i/php_hash.h; then
491 HTTP_EXT_HASH_INCDIR=$i
492 break
493 elif test -f $i/ext/hash/php_hash.h; then
494 HTTP_EXT_HASH_INCDIR=$i/ext/hash
495 break
496 fi
497 fi
498 done
499 if test "x$HTTP_EXT_HASH_INCDIR" = "x"; then
500 AC_MSG_RESULT([not found])
501 else
502 AC_MSG_RESULT([$HTTP_EXT_HASH_INCDIR])
503 AC_DEFINE([PHP_HTTP_HAVE_PHP_HASH_H], [1], [Have ext/hash support])
504 PHP_ADD_INCLUDE([$HTTP_EXT_HASH_INCDIR])
505 fi
506 ])
507
508 dnl ----
509 dnl JSON
510 dnl ----
511 HTTP_HAVE_PHP_EXT([json])
512
513
514 dnl ----
515 dnl ICONV
516 dnl ----
517 HTTP_HAVE_PHP_EXT([iconv])
518
519 dnl ----
520 dnl DONE
521 dnl ----
522 PHP_HTTP_SOURCES="\
523 php_http_buffer.c \
524 php_http.c \
525 php_http_client.c \
526 php_http_client_curl.c \
527 php_http_client_request.c \
528 php_http_client_response.c \
529 php_http_cookie.c \
530 php_http_curl.c \
531 php_http_encoding.c \
532 php_http_env.c \
533 php_http_env_request.c \
534 php_http_env_response.c \
535 php_http_etag.c \
536 php_http_exception.c \
537 php_http_filter.c \
538 php_http_header_parser.c \
539 php_http_header.c \
540 php_http_info.c \
541 php_http_message_body.c \
542 php_http_message.c \
543 php_http_message_parser.c \
544 php_http_misc.c \
545 php_http_negotiate.c \
546 php_http_object.c \
547 php_http_options.c \
548 php_http_params.c \
549 php_http_querystring.c \
550 php_http_strlist.c \
551 php_http_url.c \
552 php_http_version.c \
553 "
554 PHP_NEW_EXTENSION([http], $PHP_HTTP_SOURCES, $ext_shared)
555
556 dnl shared extension deps
557 HTTP_SHARED_DEP([hash])
558 HTTP_SHARED_DEP([iconv])
559 HTTP_SHARED_DEP([json])
560
561 dnl extension deps
562 PHP_ADD_EXTENSION_DEP([http], [raphf], true)
563 PHP_ADD_EXTENSION_DEP([http], [propo], true)
564
565 PHP_SUBST([HTTP_SHARED_LIBADD])
566
567 PHP_HTTP_HEADERS="
568 php_http_api.h \
569 php_http_buffer.h \
570 php_http_curl_client.h \
571 php_http_curl_client_datashare.h \
572 php_http_client_datashare.h \
573 php_http_client_factory.h \
574 php_http_client.h \
575 php_http_client_interface.h \
576 php_http_curl_client_pool.h \
577 php_http_client_pool.h \
578 php_http_client_request.h \
579 php_http_client_response.h \
580 php_http_cookie.h \
581 php_http_curl.h \
582 php_http_encoding.h \
583 php_http_env.h \
584 php_http_env_request.h \
585 php_http_env_response.h \
586 php_http_etag.h \
587 php_http_exception.h \
588 php_http_filter.h \
589 php_http.h \
590 php_http_header_parser.h \
591 php_http_header.h \
592 php_http_info.h \
593 php_http_message_body.h \
594 php_http_message.h \
595 php_http_message_parser.h \
596 php_http_misc.h \
597 php_http_negotiate.h \
598 php_http_object.h \
599 php_http_options.h \
600 php_http_params.h \
601 php_http_querystring.h \
602 php_http_strlist.h \
603 php_http_url.h \
604 php_http_version.h \
605 "
606 PHP_INSTALL_HEADERS(ext/http, $PHP_HTTP_HEADERS)
607
608 AC_DEFINE([HAVE_HTTP], [1], [Have extended HTTP support])
609 fi