2 * Copyright © 2009 Christian Persch
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by the
6 * Free Software Foundation; either version 2.1 of the License, or (at your
7 * option) any later version.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * @short_description: Library version checks
26 * These macros enable compile time checks of the library version.
32 * The major version number of the EV library
33 * (e.g. in version 3.1.4 this is 3).
36 #define EV_MAJOR_VERSION (@EV_MAJOR_VERSION@)
41 * The minor version number of the EV library
42 * (e.g. in version 3.1.4 this is 1).
44 #define EV_MINOR_VERSION (@EV_MINOR_VERSION@)
49 * The micro version number of the EV library
50 * (e.g. in version 3.1.4 this is 4).
52 #define EV_MICRO_VERSION (@EV_MICRO_VERSION@)
56 * @major: required major version
57 * @minor: required minor version
58 * @micro: required micro version
60 * Macro to check the library version at compile time.
61 * It returns <literal>1</literal> if the version of EV is greater or
62 * equal to the required one, and <literal>0</literal> otherwise.
64 #define EV_CHECK_VERSION(major,minor,micro) \
65 (EV_MAJOR_VERSION > (major) || \
66 (EV_MAJOR_VERSION == (major) && EV_MINOR_VERSION > (minor)) || \
67 (EV_MAJOR_VERSION == (major) && EV_MINOR_VERSION == (minor) && EV_MICRO_VERSION >= (micro)))
69 #endif /* #ifndef EV_VERSION_H */