BFN
[m6w6/ext-http] / config9.m4
index 457e59859d8776f9abc6b03972d4fc9bb7e0a957..ba1b93511b551885c801bcead58a0503532346d1 100644 (file)
@@ -252,6 +252,25 @@ dnl ----
                        else
                                AC_MSG_RESULT([no])
                        fi
+                       
+                       AC_MSG_CHECKING([for ares support in libcurl])
+                       AC_TRY_RUN([
+                               #include <curl/curl.h>
+                               int main(int argc, char *argv[]) {
+                                       curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+                                       if (data && data->ares && data->ares_num0) {
+                                               return 0;
+                                       }
+                                       return 1;
+                               }
+                       ], [
+                               AC_MSG_RESULT([yes])
+                               AC_DEFINE([PHP_HTTP_HAVE_ARES], [1], [ ])
+                       ], [
+                               AC_MSG_RESULT([no])
+                       ], [
+                               AC_MSG_RESULT([no])
+                       ])
                
                        INCLUDES="$save_INCLUDES"
                        LIBS="$save_LIBS"
@@ -312,7 +331,7 @@ dnl ----
                        AC_MSG_CHECKING([for libevent version, roughly])
                        
                        if test -f "$EVENT_DIR/include/event2/event.h"; then
-                               EVENT_VER="`$EGREP _EVENT_VERSION $EVENT_DIR/include/event2/event-config.h | $AWK '{print $3}'`"
+                               EVENT_VER="`$AWK '/_EVENT_VERSION/ {gsub(/\"/,\"\",$3); print $3}' < $EVENT_DIR/include/event2/event-config.h`"
                                AC_DEFINE([PHP_HTTP_HAVE_EVENT2], [1], [ ])
                        else
                                AC_DEFINE([PHP_HTTP_HAVE_EVENT2], [0], [ ])