From 2eede08188f626d42c1bba3a3726fc7c5e44c3e9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 May 2009 20:29:09 +0200 Subject: build-system: introduce macros PA_MAJOR, PA_MINOR, PA_CHECK_VERSION This is mostly based on Christian Persch's work but moves the version macros into the main header file. https://bugs.freedesktop.org/show_bug.cgi?id=21655 --- src/canberra.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src') diff --git a/src/canberra.h b/src/canberra.h index b4ceb27..c3e55c2 100644 --- a/src/canberra.h +++ b/src/canberra.h @@ -34,6 +34,30 @@ extern "C" { #define __attribute__(x) #endif +/** + * CA_MAJOR: + * + * Evaluates to the major version number of libcanberra. + */ +#define CA_MAJOR (@CA_MAJOR@) + +/** + * CA_MINOR: + * + * Evaluates to the minor version number of libcanberra. + */ +#define CA_MINOR (@CA_MINOR@) + +/** + * CA_CHECK_VERSION: + * + * Evaluates to TRUE when the library version is newer than the + * specified parameters. + */ +#define CA_CHECK_VERSION(major,minor) \ + (CA_MAJOR > (major) || \ + (CA_MAJOR == (major) && CA_MINOR >= (minor))) + /** * CA_PROP_MEDIA_NAME: * -- cgit