-
- PHP_ADD_INCLUDE($CURL_DIR/include)
- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
- PHP_EVAL_LIBLINE($CURL_LIBS, HTTP_SHARED_LIBADD)
- AC_DEFINE([HTTP_HAVE_CURL], [1], [Have cURL support])
-
- PHP_CHECK_LIBRARY(curl, curl_share_strerror,
- [AC_DEFINE([HAVE_CURL_SHARE_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_strerror,
- [AC_DEFINE([HAVE_CURL_MULTI_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_easy_strerror,
- [AC_DEFINE([HAVE_CURL_EASY_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_easy_reset,
- [AC_DEFINE([HAVE_CURL_EASY_RESET], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- dnl Debian suddenly (>=7.14.1-2) hides all symbols not starting with "curl"
- PHP_CHECK_LIBRARY(curl, Curl_getFormData,
- [AC_DEFINE([HAVE_CURL_GETFORMDATA], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- dnl New API function which obsoletes use of Curl_getFormData (>=7.15.5)
- PHP_CHECK_LIBRARY(curl, curl_formget,
- [AC_DEFINE([HAVE_CURL_FORMGET], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_setopt,
- [AC_DEFINE([HAVE_CURL_MULTI_SETOPT], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_timeout,
- [AC_DEFINE([HAVE_CURL_MULTI_TIMEOUT], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
-
- dnl persistent cURL handles
- AC_MSG_CHECKING([whether to enable per-process persistent cURL handles])
- if test "$PHP_HTTP_PERSISTENT_HANDLES" != "no"; then
- AC_DEFINE([HTTP_HAVE_PERSISTENT_HANDLES], [1], [Have per-process persistent cURL handles])
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
+
+ AC_CACHE_CHECK([for uidna_nameToASCII_UTF8], PECL_CACHE_VAR([HAVE_UIDNA_NAMETOASCII_UTF8]), [
+ AC_TRY_LINK([
+ #include <unicode/uidna.h>
+ ], [
+ uidna_nameToASCII_UTF8(0, 0, 0, 0, 0, 0, 0);
+ ], [
+ PECL_CACHE_VAR([HAVE_UIDNA_NAMETOASCII_UTF8])=yes
+ ], [
+ PECL_CACHE_VAR([HAVE_UIDNA_NAMETOASCII_UTF8])=no
+ ])
+ ])
+ if $PECL_CACHE_VAR([HAVE_UIDNA_NAMETOASCII_UTF8]); then
+ PECL_DEFINE([HAVE_IDNA2008])
+ PECL_DEFINE_FN([uidna_nameToASCII_UTF8])