mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Add a compile check for the cURL version and fix the compile in general.
This commit is contained in:
parent
da22505333
commit
ffc997f149
3 changed files with 17 additions and 1 deletions
|
@ -23,6 +23,21 @@ if test "$PHP_CURL" != "no"; then
|
||||||
easy.h should be in <curl-dir>/include/curl/)
|
easy.h should be in <curl-dir>/include/curl/)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CURL_CONFIG="curl-config"
|
||||||
|
AC_MSG_CHECKING(for cURL greater than 7.7.3)
|
||||||
|
|
||||||
|
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
|
||||||
|
CURL_CONFIG=${CURL_DIR}/bin/curl-config
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl_version_full=`$CURL_CONFIG --version`
|
||||||
|
curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
||||||
|
if test "$curl_version" -ge 7007003; then
|
||||||
|
AC_MSG_RESULT($curl_version_full)
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR(cURL version 7.7.3 or later is required to compile php with cURL support)
|
||||||
|
fi
|
||||||
|
|
||||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||||
|
|
||||||
PHP_SUBST(CURL_SHARED_LIBADD)
|
PHP_SUBST(CURL_SHARED_LIBADD)
|
||||||
|
|
|
@ -187,7 +187,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||||
REGISTER_CURL_CONSTANT("CURLOPT_CONNECTTIMEOUT", CURLOPT_CONNECTTIMEOUT);
|
REGISTER_CURL_CONSTANT("CURLOPT_CONNECTTIMEOUT", CURLOPT_CONNECTTIMEOUT);
|
||||||
REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYPEER", CURLOPT_SSL_VERIFYPEER);
|
REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYPEER", CURLOPT_SSL_VERIFYPEER);
|
||||||
REGISTER_CURL_CONSTANT("CURLOPT_CAINFO", CURLOPT_CAINFO);
|
REGISTER_CURL_CONSTANT("CURLOPT_CAINFO", CURLOPT_CAINFO);
|
||||||
REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSER", CURLOPT_BINARY);
|
REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSER", CURLOPT_BINARYTRANSFER);
|
||||||
|
|
||||||
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
|
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
|
||||||
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_LEAST_RECENTLY_USED", CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
|
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_LEAST_RECENTLY_USED", CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
|
||||||
|
|
|
@ -57,6 +57,7 @@ typedef struct {
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
smart_str buf;
|
smart_str buf;
|
||||||
int method;
|
int method;
|
||||||
|
int type;
|
||||||
} php_curl_write;
|
} php_curl_write;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue