-
- 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_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]
- )
+
+ 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])
+ fi
+ PECL_CHECK_DONE(libicu, [$PECL_VAR([HAVE_LIBICU])])