As reported by Andreas Metzler, the latest API change in lib WRaster caused
a compatibility issue because the internal version number was increased.
To correctly handle this situation, this patch does 2 things:
- do not discard the 2 last number in the "c:r:a" version, because we need them;
- when calculating the version for the mapfile, use the formula that is
suggested in libtool's documentation.
The purpose of the formula is that when API is changed, if a new function
is added then the version is not incremented to reflect that we are still
compatible with current binaries, it will be incremented only when there
is a break in compatibility.
Instead of having to maintain manually the map file for LD with the list of
symbols that we want to keep in the WRaster library (the purpose is to hide
internal symbols), this patch implements a script that parses the public
API header and extracts automatically the list of names that are supposed
to be visible to the user.
The goal is to reduce possible human errors, like for example the function
RCombineAlpha that was forgotten from the list, yet still keep the map file
feature which is considered a good practice (it reduces the risk for name
clash and the risk of mis-use of internal stuff from the library).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>