|
From: | Francesco Salvestrini |
Subject: | Some replacements |
Date: | Thu, 30 Jul 2009 01:15:44 +0200 |
User-agent: | KMail/1.9.10 |
Hi all, I was playing with the curl library some days ago while I stepped into the AC_CHECK_CURL on our archive. While playing with that macro I stepped into AC_CHECK_TAGLIB too. Both macros seemed too similar at the first glance ... thus I started playing around them in order to make them converge into AC_PATH_GENERIC, instead of their hardwired version-comparison code. AC_PATH_GENERIC sadly doesn't cope with 2 dotted version numbers (e.g.: the taglib version I have is 1.5) so ... I ended up fixing AC_PATH_GENERIC too. Thus I found myself hacking them all while I had the idea of using AX_COMPARE_VERSION too (which is a really useful macro IMHO) ... Since I wouldn't want to break working macro with that mess ... I ended up with the attached AX_PATH_GENERIC, AX_CHECK_CURL, AX_CHECK_TAGLIB and AX_CHECK_ORBIT2 (bonus ... :-P ). These newer versions should have a better playground because: 1) AX_PATH_GENERIC relies on AX_COMPARE_VERSION (instead of hardwiring the version comparison code as in AC_PATH_GENERIC) 2) All the derived ones (AX_CHECK_CURL, AX_CHECK_TAGLIB and AX_ORBIT2) are one-liners now (thus ... less code to fix). 3) AX_PATH_GENERIC accepts a parameter more than AC_PATH_GENERIC, the SED-REGEXP-EXTRACTOR. That parameter should be used to purify the version number that a LIBRARY-config script could output ... thus more one-liners could came easily form LIBRARY-config scripts which outputs non-conventional version numbers (e.g.: 'Foo library v1.0.0 (GNU Bar package)' -> '1.0.0') With the following configure.ac snippet: AX_LIB_CURL([7],[ echo "AAAAAAA" ],[ echo "BBBBBBB" ]) AX_LIB_CURL([8],[ echo "AAAAAAA" ],[ echo "BBBBBBB" ]) AX_LIB_CURL([7],[ AX_LIB_CURL([7.19],[ AX_LIB_CURL([7.19.3],,[ AC_MSG_ERROR([Your system lacks of libcurl >= 7.19.3]) ]) ],[ AC_MSG_ERROR([Your system lacks of libcurl >= 7.19]) ]) ],[ AC_MSG_ERROR([Your system lacks of libcurl >= 7]) ]) AX_LIB_CURL([7.19.4],,[ AC_MSG_ERROR([Your system lacks of libcurl >= 7.19.4]) ]) AX_LIB_TAGLIB([1],,[ AC_MSG_ERROR([Your system lacks of taglib >= 1]) ]) AX_LIB_TAGLIB([1.5],,[ AC_MSG_ERROR([Your system lacks of taglib >= 1.5]) ]) AX_LIB_ORBIT2([2.10],,[ AC_MSG_ERROR([Your system lacks of orbit2 >= 2.10]) ]) AX_LIB_TAGLIB([1.6],,[ AC_MSG_NOTICE([Your system lacks of taglib >= 1.6]) ]) AX_LIB_TAGLIB([2],,[ AC_MSG_ERROR([Your system lacks of taglib >= 2]) ]) The macros output is as follows: checking for curl-config... /usr/bin/curl-config checking for curl (7.19.4) >= 7... yes AAAAAAA checking for curl-config... (cached) /usr/bin/curl-config checking for curl (7.19.4) >= 8... no BBBBBBB checking for curl-config... (cached) /usr/bin/curl-config checking for curl (7.19.4) >= 7... yes checking for curl-config... (cached) /usr/bin/curl-config checking for curl (7.19.4) >= 7.19... yes checking for curl-config... (cached) /usr/bin/curl-config checking for curl (7.19.4) >= 7.19.3... yes checking for curl-config... (cached) /usr/bin/curl-config checking for curl (7.19.4) >= 7.19.4... yes checking for taglib-config... /usr/bin/taglib-config checking for taglib (1.5) >= 1... yes checking for taglib-config... (cached) /usr/bin/taglib-config checking for taglib (1.5) >= 1.5... yes checking for orbit2-config... /usr/bin/orbit2-config checking for orbit2 (2.14.16) >= 2.10... yes checking for taglib-config... (cached) /usr/bin/taglib-config checking for taglib (1.5) >= 1.6... no configure: Your system lacks of taglib >= 1.6 checking for taglib-config... (cached) /usr/bin/taglib-config checking for taglib (1.5) >= 2... no configure: error: Your system lacks of taglib >= 2 Have good night, Francesco -- "Nuclear war would really set back cable." - Ted Turner
0004-New-ORBit2-related-macro-using-AX_PATH_GENERIC.patch
Description: Text Data
0003-Renewed-version-of-AC_CHECK_TAGLIB-using-AX_PATH_GEN.patch
Description: Text Data
0001-Rearranged-AC_PATH_GENERIC-in-order-to-use-AX_COMPAR.patch
Description: Text Data
0002-Renewed-version-of-AC_CHECK_CURL-using-AX_PATH_GENER.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |