- PHP_CHECK_LIBRARY(curl, curl_share_strerror,
- [AC_DEFINE([HAVE_CURL_SHARE_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_strerror,
- [AC_DEFINE([HAVE_CURL_MULTI_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_easy_strerror,
- [AC_DEFINE([HAVE_CURL_EASY_STRERROR], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_easy_reset,
- [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]
- )
- dnl New API function which obsoletes use of Curl_getFormData (>=7.15.5)
- PHP_CHECK_LIBRARY(curl, curl_formget,
- [AC_DEFINE([HAVE_CURL_FORMGET], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_setopt,
- [AC_DEFINE([HAVE_CURL_MULTI_SETOPT], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
- PHP_CHECK_LIBRARY(curl, curl_multi_timeout,
- [AC_DEFINE([HAVE_CURL_MULTI_TIMEOUT], [1], [ ])], [ ],
- [$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR]
- )
+ AC_MSG_CHECKING([for bundled SSL CA info])
+ CURL_CAINFO=
+ for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/ca-bundle.crt"; do
+ if test -f "$i"; then
+ CURL_CAINFO="$i"
+ break
+ fi
+ done
+ if test "x$CURL_CAINFO" = "x"; then
+ AC_MSG_RESULT([not found])
+ else
+ AC_MSG_RESULT([$CURL_CAINFO])
+ AC_DEFINE_UNQUOTED([PHP_HTTP_CURL_CAINFO], ["$CURL_CAINFO"], [path to bundled SSL CA info])
+ fi
+
+ PHP_ADD_INCLUDE($CURL_DIR/include)
+ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
+ PHP_EVAL_LIBLINE(`$CURL_CONFIG --libs`, HTTP_SHARED_LIBADD)
+ AC_DEFINE([PHP_HTTP_HAVE_CURL], [1], [Have libcurl support])
+ HTTP_HAVE_A_REQUEST_LIB=true
+ fi