- allow to avoid deps on shared extensions on build time
[m6w6/ext-http] / config.m4
index 555bbc7185d84f8c7e04e2f36cbb48bc0b4223ce..0fc8c7f6c774f25eb3fc85914f10b6c0881571c8 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -13,6 +13,9 @@ PHP_ARG_WITH([http-zlib-compression], [whether to enable zlib encodings support]
 PHP_ARG_WITH([http-magic-mime], [whether to enable response content type guessing],
 [  --with-http-magic-mime[=LIBMAGICDIR]
                            HTTP: with magic mime response content type guessing], "no", "no")
+PHP_ARG_WITH([http-shared-deps], [whether to depend on shared extensions],
+[  --with-http-shared-deps HTTP: disable to not depend on shared extensions
+                           like SPL, hash, iconv and session], $PHP_HTTP, $PHP_HTTP)
 
 if test "$PHP_HTTP" != "no"; then
 
@@ -31,6 +34,12 @@ if test "$PHP_HTTP" != "no"; then
                ])
        ])
 
+       if test "PHP_HTTP_SHARED_DEPS" != "no"; then
+               AC_DEFINE([HTTP_SHARED_DEPS], [1], [ ])
+       else
+               AC_DEFINE([HTTP_SHARED_DEPS], [0], [ ])
+       endif
+
 dnl -------
 dnl HEADERS
 dnl -------
@@ -159,6 +168,11 @@ dnl ----
                        [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]
+               )
        fi
 
 dnl ----