kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=1f7ef0225e852fea869595b1204d249130288ac3
commit 1f7ef0225e852fea869595b1204d249130288ac3 Author: Kim Woelders <[email protected]> Date: Sun Sep 26 17:25:58 2021 +0200 Imlib.h: Add version macros --- configure.ac | 8 ++++++++ src/lib/{Imlib2.h => Imlib2.h.in} | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index cdc663d..0996595 100644 --- a/configure.ac +++ b/configure.ac @@ -373,12 +373,20 @@ EC_C_WARNINGS() EC_C_VISIBILITY(yes) EC_C_ASAN() +VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'` +VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'` +VERSION_MICRO=`echo $VERSION | awk -F. '{print $3}'` +AC_SUBST(VERSION_MAJOR) +AC_SUBST(VERSION_MINOR) +AC_SUBST(VERSION_MICRO) + AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile imlib2.pc src/Makefile src/lib/Makefile +src/lib/Imlib2.h src/bin/Makefile src/modules/Makefile src/modules/filters/Makefile diff --git a/src/lib/Imlib2.h b/src/lib/Imlib2.h.in similarity index 99% rename from src/lib/Imlib2.h rename to src/lib/Imlib2.h.in index cd27178..376eb8f 100644 --- a/src/lib/Imlib2.h +++ b/src/lib/Imlib2.h.in @@ -1,6 +1,13 @@ #ifndef __IMLIB_API_H #define __IMLIB_API_H 1 +#define IMLIB2_VERSION_MAJOR @VERSION_MAJOR@ +#define IMLIB2_VERSION_MINOR @VERSION_MINOR@ +#define IMLIB2_VERSION_MICRO @VERSION_MICRO@ + +#define IMLIB2_VERSION_(maj, min, mic) (10000 * (maj) + 100 * (min) + (mic)) +#define IMLIB2_VERSION IMLIB2_VERSION_(IMLIB2_VERSION_MAJOR, IMLIB2_VERSION_MINOR, IMLIB2_VERSION_MICRO) + #ifdef EAPI #undef EAPI #endif --
