configure: Detect and don't try to use older libcurl
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 9 Jun 2011 21:54:29 +0000 (22:54 +0100)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Mon, 13 Jun 2011 19:16:27 +0000 (21:16 +0200)
Older versions of libcurl don't have some of the features we try to
use, in particular curl_multi_setopt(). Check for this in the 'is
libcurl available?' configure test so we disable curl support if the
library is too old.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
configure

index 663b557ad0e978dbc3aee0646c00cfa9fccb21dc..c931ae860aab2e6184fae1d98e08dafc9c8ed2db 100755 (executable)
--- a/configure
+++ b/configure
@@ -1710,7 +1710,7 @@ fi
 if test "$curl" != "no" ; then
   cat > $TMPC << EOF
 #include <curl/curl.h>
-int main(void) { return curl_easy_init(); }
+int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }
 EOF
   curl_cflags=`$curlconfig --cflags 2>/dev/null`
   curl_libs=`$curlconfig --libs 2>/dev/null`