- AC_MSG_CHECKING([for ext/$extname support])
- if test -x "$PHP_EXECUTABLE"; then
- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$`
- if test "$grepext" = "$extname"; then
- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
- AC_MSG_RESULT([yes])
- $2
- else
- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=
- AC_MSG_RESULT([no])
- $3
- fi
- elif test "$haveext" != "no" && test "x$haveext" != "x"; then
- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1
- AC_MSG_RESULT([yes])
- $2
- else
- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=
- AC_MSG_RESULT([no])
- $3
- fi
- ])
-
-
-dnl ----
-dnl STDC
-dnl ----
- AC_CHECK_HEADERS([netdb.h unistd.h])
- PHP_CHECK_FUNC(gethostname, nsl)
- PHP_CHECK_FUNC(getdomainname, nsl)
- PHP_CHECK_FUNC(getservbyport, nsl)
- PHP_CHECK_FUNC(getservbyname, nsl)
-
-dnl ----
-dnl ZLIB
-dnl ----
- AC_MSG_CHECKING([for zlib.h])
- ZLIB_DIR=
- for i in "$PHP_HTTP_ZLIB_DIR" "$PHP_ZLIB_DIR" "$PHP_ZLIB" /usr/local /usr /opt; do
- if test -f "$i/include/zlib.h"; then
- ZLIB_DIR=$i
- break;
- fi
- done
- if test "x$ZLIB_DIR" = "x"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([could not find zlib.h])
- else
- AC_MSG_RESULT([found in $ZLIB_DIR])
- AC_MSG_CHECKING([for zlib version >= 1.2.0.4])
- ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/include/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
- AC_MSG_RESULT([$ZLIB_VERSION])
- if test `echo $ZLIB_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
- AC_MSG_ERROR([zlib version greater or equal to 1.2.0.4 required])
- else
- PHP_ADD_INCLUDE($ZLIB_DIR/include)
- PHP_ADD_LIBRARY_WITH_PATH(z, $ZLIB_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
- AC_DEFINE([PHP_HTTP_HAVE_ZLIB], [1], [Have zlib support])
- fi
+ dnl CURL
+ PHP_ARG_WITH([http-libcurl-dir], [whether/where to check for libcurl],
+ [ --with-http-libcurl-dir[=DIR] HTTP: where to find libcurl], $PHP_HTTP, no)
+ if test "$PHP_HTTP_LIBCURL_DIR" != "no"; then
+ PECL_CHECK_LIBCURL([$PHP_HTTP_LIBCURL_DIR], [7.18.2])
+ PECL_HAVE_LIBCURL_PROTOCOL([HTTP], [
+ PECL_HAVE_LIBCURL_FEATURE([HTTP2])
+ PECL_HAVE_LIBCURL_ARES
+ PECL_HAVE_LIBCURL_SSL
+ PECL_HAVE_LIBCURL_CA
+ PECL_DEFINE([HAVE_CLIENT])
+ ])
+ PECL_CHECK_DONE(libcurl, [$PECL_VAR([HAVE_LIBCURL_PROTOCOL_HTTP])])