cURL / Mailing Lists / curl-library / Single Mail


Re: autoconf Macro & curl-config

From: Daniel Stenberg <>
Date: Fri, 11 Oct 2002 10:32:59 +0200 (MET DST)

On Thu, 10 Oct 2002, Nick Humfrey wrote:

> This probably isn't the best autoconf macro but it works for me.

Ok, looked fine enough. I would however use a little more traditional
autoconf'isms in it, so it would make something like this:

dnl -------
dnl set my_cv_curl_vers to the version of libcurl or NONE
dnl if libcurl is not found or is too old


 AC_MSG_CHECKING([for curl >= $check])

 if eval curl-config --version 2>/dev/null >/dev/null; then
   ver=`curl-config --version | sed -e "s/libcurl //g"`
   hex_ver=`curl-config --vernum | tr 'a-f' 'A-F'`
   ok=`echo "ibase=16; if($hex_ver>=$check_hex) $hex_ver else 0" | bc`

   if test x$ok != x0; then
     AC_MSG_WARN([$ver is too old. Need version $check or higher.])
   AC_MSG_WARN([curl-config was not found])

 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2002-10-11