Allan McRae <[email protected]> on Sun, 2015/12/06 10:33: > On 06/12/15 06:33, Christian Hesse wrote: > > Allan McRae <[email protected]> on Sun, 2015/11/29 09:10: > >> On 30/12/14 02:53, Christian Hesse wrote: > >>> From: Christian Hesse <[email protected]> > >>> > >>> Programs linked against libalpm (for example packagekit) may want to use > >>> preprocessor macros to check version and choose correct API. This adds > >>> version information to alpm.h. > >>> > >>> Signed-off-by: Christian Hesse <[email protected]> > >> > >> Follow-up on an old patch... Is the version provided by pkg-config > >> file not enough? > > > > The version provided by pkg-config is fine if you want to make configure > > check for a required version. But that does not help if you want to > > support older libalpm in third party software and API changes, no? For > > example packagekit dropped support for pacman < 4.2 (libalpm < 9) with > > the last API change. > > Isn't that the whole point of the configure check?
I do not get the point... With pkg-config I can check the version and break
with something like:
configure: error: Package requirements (libalpm >= 8.2.0) were not met:
But I would like to support the older code with something like this:
#if ALPM_VERSION_NUMBER < 0x090000
/* legacy code here */
#else
/* for recent library */
#endif
I can't do that with pkg-config, no?
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
pgpwUFtqZRGIN.pgp
Description: OpenPGP digital signature
