jani Sat May 2 19:53:48 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/curl config.m4 Log: MFH:- Fixed bug #48132 (configure fails to test curl ssl support if --disable-rpath is set) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.28.2.3.2.7.2.1&r2=1.28.2.3.2.7.2.2&diff_format=u Index: php-src/ext/curl/config.m4 diff -u php-src/ext/curl/config.m4:1.28.2.3.2.7.2.1 php-src/ext/curl/config.m4:1.28.2.3.2.7.2.2 --- php-src/ext/curl/config.m4:1.28.2.3.2.7.2.1 Fri Nov 7 21:14:46 2008 +++ php-src/ext/curl/config.m4 Sat May 2 19:53:48 2009 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.28.2.3.2.7.2.1 2008/11/07 21:14:46 felipe Exp $ +dnl $Id: config.m4,v 1.28.2.3.2.7.2.2 2009/05/02 19:53:48 jani Exp $ dnl PHP_ARG_WITH(curl, for cURL support, @@ -48,75 +48,80 @@ else AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support) fi + + PHP_ADD_INCLUDE($CURL_DIR/include) + PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD) AC_MSG_CHECKING([for SSL support in libcurl]) CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL` if test "$CURL_SSL" = "SSL"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support]) + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support]) - save_CFLAGS="$CFLAGS" - CFLAGS="`$CURL_CONFIG --cflags`" - save_LDFLAGS="$LDFLAGS" - LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR" + save_CFLAGS="$CFLAGS" + CFLAGS="`$CURL_CONFIG --cflags`" - AC_PROG_CPP - AC_MSG_CHECKING([for openssl 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->ssl_version && *data->ssl_version) { - const char *ptr = data->ssl_version; - while(*ptr == ' ') ++ptr; - return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1); - } - return 1; - } - ],[ - AC_MSG_RESULT([yes]) - AC_CHECK_HEADERS([openssl/crypto.h], [ - AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support]) + AC_PROG_CPP + AC_MSG_CHECKING([for openssl 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->ssl_version && *data->ssl_version) { + const char *ptr = data->ssl_version; + + while(*ptr == ' ') ++ptr; + return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1); + } + return 1; +} + ],[ + AC_MSG_RESULT([yes]) + AC_CHECK_HEADERS([openssl/crypto.h], [ + AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support]) + ]) + ], [ + AC_MSG_RESULT([no]) + ], [ + AC_MSG_RESULT([no]) ]) - ], [ - AC_MSG_RESULT([no]) - ], [ - AC_MSG_RESULT([no]) - ]) - AC_MSG_CHECKING([for gnutls 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->ssl_version && *data->ssl_version) { - const char *ptr = data->ssl_version; - while(*ptr == ' ') ++ptr; - return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1); - } - return 1; - } - ], [ - AC_MSG_RESULT([yes]) - AC_CHECK_HEADER([gcrypt.h], [ - AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support]) + AC_MSG_CHECKING([for gnutls 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->ssl_version && *data->ssl_version) { + const char *ptr = data->ssl_version; + + while(*ptr == ' ') ++ptr; + return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1); + } + return 1; +} +], [ + AC_MSG_RESULT([yes]) + AC_CHECK_HEADER([gcrypt.h], [ + AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support]) + ]) + ], [ + AC_MSG_RESULT([no]) + ], [ + AC_MSG_RESULT([no]) ]) - ], [ - AC_MSG_RESULT([no]) - ], [ - AC_MSG_RESULT([no]) - ]) - CFLAGS="$save_CFLAGS" - LDFLAGS="$save_LDFLAGS" + CFLAGS="$save_CFLAGS" else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) fi - PHP_ADD_INCLUDE($CURL_DIR/include) - PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD) - PHP_CHECK_LIBRARY(curl,curl_easy_perform, [ AC_DEFINE(HAVE_CURL,1,[ ])
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php