curl-config tells us which libraries it has compiled with. So we should use it.

This commit is contained in:
foobar 2001-05-27 18:52:33 +00:00
parent d1735d5ed5
commit 43e41ddb93

View File

@ -34,21 +34,22 @@ if test "$PHP_CURL" != "no"; then
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)
CURL_LIBS=`$CURL_CONFIG --libs`
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_SUBST(CURL_SHARED_LIBADD)
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/lib, CURL_SHARED_LIBADD)
AC_CHECK_LIB(curl,curl_easy_perform,
[
AC_DEFINE(HAVE_CURL,1,[ ])
],[
AC_MSG_ERROR(Try adding --with-openssl[=DIR] into your configure line.)
AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
])
PHP_EXTENSION(curl, $ext_shared)
PHP_SUBST(CURL_SHARED_LIBADD)
fi