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

login
register
mail settings
Submitter Peter Maydell
Date June 9, 2011, 9:54 p.m.
Message ID <1307656469-29424-1-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/99816/
State New
Headers show

Comments

Peter Maydell - June 9, 2011, 9:54 p.m.
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>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Edgar Iglesias - June 13, 2011, 7:24 p.m.
On Thu, Jun 09, 2011 at 10:54:29PM +0100, Peter Maydell wrote:
> 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.


> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  configure |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/configure b/configure
> index d38b952..03d693a 100755
> --- a/configure
> +++ b/configure
> @@ -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`
> -- 
> 1.7.1
> 
>

Patch

diff --git a/configure b/configure
index d38b952..03d693a 100755
--- a/configure
+++ b/configure
@@ -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`