]> granicus.if.org Git - php/commitdiff
curl-config tells us which libraries it has compiled with. So we should use it.
authorfoobar <sniper@php.net>
Sun, 27 May 2001 18:52:33 +0000 (18:52 +0000)
committerfoobar <sniper@php.net>
Sun, 27 May 2001 18:52:33 +0000 (18:52 +0000)
ext/curl/config.m4

index 3bad5d4793a86260a2cda0c25db1bc58e68c5ba6..abf345f74d454507dd124c781aa762b5efe5f4e5 100644 (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