From 57d26f39afb3c75e24a8d240d7af32b9d2b9775a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 7 Mar 2014 09:46:44 +0100 Subject: Backport useful code from fixes for bug 1447. * configure.ac: Cehck for inet_ntop. * m4/libcurl.m4: Provide a #define for the version of the curl library. -- We do not have keyserver helpers anymore but this fixes may come handy eventually. --- m4/libcurl.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'm4') diff --git a/m4/libcurl.m4 b/m4/libcurl.m4 index f6a631bc2..49caecc76 100644 --- a/m4/libcurl.m4 +++ b/m4/libcurl.m4 @@ -65,6 +65,10 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], AC_PROG_AWK _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'" + # More recent versions of curl-config have a direct --vernum + # option, but we'd like this code to work with older versions as + # well, so just convert --version. + _libcurl_vernum_parse="eval $AWK '{printf \"0x%06X\",\$NF}'" _libcurl_try_link=yes @@ -188,6 +192,11 @@ x=CURLOPT_VERBOSE; AC_SUBST(LIBCURL_CPPFLAGS) AC_SUBST(LIBCURL) + _libcurl_vernum=`echo $_libcurl_version | $_libcurl_vernum_parse` + + AC_DEFINE_UNQUOTED(LIBCURL_VERNUM, $_libcurl_vernum, + [The version of the libcurl library in packed hex form]) + for _libcurl_feature in $_libcurl_features ; do AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1]) eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes @@ -228,6 +237,7 @@ x=CURLOPT_VERBOSE; unset _libcurl_protocol unset _libcurl_protocols unset _libcurl_version + unset _libcurl_vernum unset _libcurl_ldflags fi -- cgit v1.2.3