Skip to contentSkip to conversation

configure: Detect and don't try to use older libcurl

PATCH Applied Peter Maydell 2 participants 2 messages Jun 9, 2011 – Jun 13, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Detect and don't try to use older libcurl

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.

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index d38b952..03d693a 100755
@@ -1709,7 +1709,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`
Signature · 1 line
1.7.1
#1 lore raw
Quoted 4 lines · Peter Maydell

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.

Applied, thanks.

Quoted 22 lines
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index d38b952..03d693a 100755
@@ -1709,7 +1709,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`
Signature · 1 line
1.7.1