2015.04.13 19:47 "Re: [Tiff] Reliable way to detect library version", by Larry Gritz
Do you it's wise to use a combination of TIFFLIB_VERSION (which is monotonic *within* each branch, but not unique when comparing branches) and also detecting the presence of symbol TIFF_VERSION_CLASSIC, which should (I think) only exist in 4.x?
On Apr 13, 2015, at 12:37 PM, Bob Friesenhahn <firstname.lastname@example.org> wrote:
But now I see that 4.0.2 has an older date than 3.9.7.
So... what's the best/official way to reliably detect which TIFF version we have, at build time, in order to avoid compilation errors when using newer API calls that may or may not be present in the installed libtiff on the build machine?
It looks like you are out of luck. There is no reliable mechanism available other than 'configure' time checks or run-time checks (e.g. dlsym()).
The TIFFLIB_VERSION_STR from tiffvers.h is reliable, but not very useful for the C pre-processor.