diff options
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | nice/nice.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 7a18409..a4a5d3a 100644 --- a/meson.build +++ b/meson.build @@ -78,6 +78,10 @@ add_project_arguments('-D_GNU_SOURCE', '-DHAVE_CONFIG_H', '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_' + glib_req_minmax_str, '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_' + glib_req_minmax_str, + '-DNICE_VERSION_MAJOR=' + version_major, + '-DNICE_VERSION_MINOR=' + version_minor, + '-DNICE_VERSION_MICRO=' + version_micro, + '-DNICE_VERSION_NANO=' + version_nano, language: 'c') cdata = configuration_data() diff --git a/nice/nice.h b/nice/nice.h index 5587ec4..bb63129 100644 --- a/nice/nice.h +++ b/nice/nice.h @@ -39,6 +39,14 @@ #ifndef _NICE_H #define _NICE_H +#define NICE_CHECK_VERSION(major, minor, micro) \ + (NICE_VERSION_MAJOR > (major) || \ + (NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR > (minor)) || \ + (NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR == (minor) && \ + NICE_VERSION_MICRO >= (micro)) || \ + (NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR == (minor) && \ + NICE_VERSION_MICRO + 1 == (micro) && NICE_VERSION_NANO > 0)) + #include "agent.h" #include "interfaces.h" |