mike Mon May 21 13:34:39 2007 UTC
Modified files:
/php-src/ext/curl config.m4
Log:
MFB: first check the SSL lib string in libcurl and then the header
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.37&r2=1.38&diff_format=u
Index: php-src/ext/curl/config.m4
diff -u php-src/ext/curl/config.m4:1.37 php-src/ext/curl/config.m4:1.38
--- php-src/ext/curl/config.m4:1.37 Sat May 19 19:36:35 2007
+++ php-src/ext/curl/config.m4 Mon May 21 13:34:39 2007
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.37 2007/05/19 19:36:35 mike Exp $
+dnl $Id: config.m4,v 1.38 2007/05/21 13:34:39 mike Exp $
dnl
PHP_ARG_WITH(curl, for cURL support,
@@ -60,50 +60,51 @@
save_LDFLAGS="$LDFALGS"
LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
- AC_CHECK_HEADER([openssl/crypto.h], [
- 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_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);
}
- ],[
- AC_MSG_RESULT([yes])
+ return 1;
+ }
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_CHECK_HEADER([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_CHECK_HEADER([gcrypt.h], [
- 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_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);
}
- ], [
- AC_MSG_RESULT([yes])
+ 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"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php