- HTTP_CHECK_CONFIG(libicu, [$ICU_CONFIG], [--version], [--cppflags], [--ldflags-searchpath], [--ldflags-libsonly])
- AC_MSG_CHECKING([for uidna_IDNToASCII])
- AC_TRY_LINK([
- #include <unicode/uidna.h>
- ], [
- uidna_IDNToASCII(0, 0, 0, 0, 0, 0, 0);
- ], [
- AC_MSG_RESULT([yes])
- PHP_HTTP_HAVE_ICU=true
- AC_DEFINE([PHP_HTTP_HAVE_IDNA2003], [1], [ ])
- AC_DEFINE([HAVE_UIDNA_IDNTOASCII], [1], [ ])
- ], [
- AC_MSG_RESULT([no])
- ])
- AC_MSG_CHECKING([for uidna_nameToASCII_UTF8])
- AC_TRY_LINK([
- #include <unicode/uidna.h>
- ], [
- uidna_nameToASCII_UTF8(0, 0, 0, 0, 0, 0, 0);
- ], [
- AC_MSG_RESULT([yes])
- PHP_HTTP_HAVE_ICU=true
- AC_DEFINE([PHP_HTTP_HAVE_IDNA2008], [1], [ ])
- AC_DEFINE([HAVE_UIDNA_NAMETOASCII_UTF8], [1], [ ])
- ], [
- AC_MSG_RESULT([no])
- ])
- HTTP_CHECK_DONE(libicu, [$PHP_HTTP_HAVE_LIBICU])
- ;;
- esac
-
-dnl ----
-dnl ZLIB
-dnl ----
- HTTP_CHECK_CUSTOM(zlib, ["$PHP_HTTP_ZLIB_DIR" "$PHP_ZLIB_DIR" "$PHP_ZLIB"], zlib.h, z,
- [$($EGREP "define ZLIB_VERSION" "$path/include/zlib.h" | $SED -e 's/@<:@^0-9\.@:>@//g')])
- HTTP_HAVE_VERSION(zlib, 1.2.0.4)
- HTTP_CHECK_DONE(zlib, test -n "$PHP_HTTP_ZLIB_VERSION")
-
-dnl ----
-dnl CURL
-dnl ----
-
- AC_PATH_PROG([CURL_CONFIG], [curl-config], false, [$PHP_HTTP_LIBCURL_DIR/bin:$PATH:/usr/local/bin])
-
- if $CURL_CONFIG --protocols | $EGREP -q HTTP; then
- HTTP_CHECK_CONFIG(libcurl, $CURL_CONFIG,
- [--version | $SED -e 's/@<:@^0-9\.@:>@//g'],
- [--cflags],
- [--libs | $EGREP -o -- '-L@<:@^ @:>@* ?'],
- [--libs | $EGREP -o -- '-l@<:@^ @:>@* ?']
- )
- HTTP_HAVE_VERSION(libcurl, 7.18.2)
-
- AC_MSG_CHECKING([for HTTP2 support in libcurl])
- if $CURL_CONFIG --feature | $EGREP -q HTTP2; then
- AC_MSG_RESULT([yes])
- AC_DEFINE([PHP_HTTP_HAVE_HTTP2], [1], [ ])
- else
- AC_MSG_RESULT([no])
- fi
-
- AC_MSG_CHECKING([for SSL support in libcurl])
- if $CURL_CONFIG --feature | $EGREP -q SSL; then
- AC_MSG_RESULT([yes])
- AC_DEFINE([PHP_HTTP_HAVE_SSL], [1], [ ])
-
- HTTP_CURL_SSL_LIB_CHECK(OpenSSL, [
- AC_CHECK_HEADER([openssl/ssl.h], [
- AC_CHECK_HEADER([openssl/crypto.h], [
- AC_DEFINE([PHP_HTTP_HAVE_OPENSSL], [1], [ ])
- LIBS="$LIBS -lssl -lcrypto"
- ])
- ])
- ])
- HTTP_CURL_SSL_LIB_CHECK(GnuTLS, [
- AC_CHECK_HEADER([gnutls.h], [
- AC_CHECK_HEADER([gcrypt.h], [
- AC_DEFINE([PHP_HTTP_HAVE_GNUTLS], [1], [ ])
- LIBS="$LIBS -lgnutls -lgcrypt"
- ])
- ])
- ])
- HTTP_CURL_SSL_LIB_CHECK(NSS, [
- AC_DEFINE([PHP_HTTP_HAVE_NSS], [1], [ ])
- ])
- HTTP_CURL_SSL_LIB_CHECK(SecureTransport, [
- AC_DEFINE([PHP_HTTP_HAVE_DARWINSSL], [1], [ ])
- ])
- HTTP_CURL_SSL_LIB_CHECK(GSKit, [
- AC_DEFINE([PHP_HTTP_HAVE_GSKIT], [1], [ ])