fix pointer advancement
[m6w6/ext-ares] / config.m4
index 06af4773cc2f5b5e8df7a0210d6ef4093e6cdb7c..cab790830542d71799dc7135ca187aa78e81e0e1 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -61,6 +61,7 @@ if test "$PHP_ARES" != "no"; then
        if test $PHP_ARES_LIB = "unknown"; then
                AC_MSG_ERROR(could neither find libares nor libcares)
        elif test $PHP_ARES_LIB = "cares"; then
+               AC_DEFINE([PHP_ARES_CARES], [1], [ ])
                AC_DEFINE_UNQUOTED([PHP_ARES_LIBNAME], "c-ares (CURL)", [ ])
                AC_DEFINE([PHP_ARES_EXPAND_LEN_TYPE], [long], [ ])
        else
@@ -105,6 +106,14 @@ if test "$PHP_ARES" != "no"; then
                [AC_DEFINE([HAVE_ARES_SET_LOCAL_IP6], [1], [ ])], [ ],
                [$PHP_ARES_LIBADD -L$PHP_ARES_DIR/$PHP_LIBDIR]
        )
+       PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_inet_ntop,
+               [AC_DEFINE([HAVE_ARES_INET_NTOP], [1], [ ])], [ ],
+               [$PHP_ARES_LIBADD -L$PHP_ARES_DIR/$PHP_LIBDIR]
+       )
+       PHP_CHECK_LIBRARY($PHP_ARES_LIB, ares_inet_pton,
+               [AC_DEFINE([HAVE_ARES_INET_NTOP], [1], [ ])], [ ],
+               [$PHP_ARES_LIBADD -L$PHP_ARES_DIR/$PHP_LIBDIR]
+       )
        
        dnl ##########
        dnl check new c-ares callback API