From 079950d33769e083d5251a254787e61d11345fb2 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 5 Oct 2023 11:47:58 +0200 Subject: Fix MATE_DESKTOP_CHECK_VERSION Not that I know anybody that wants it though. --- configure.ac | 4 ---- libmate-desktop/mate-desktop.h.in | 8 ++++---- libmate-desktop/meson.build | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 7f6616a..9cf7e07 100644 --- a/configure.ac +++ b/configure.ac @@ -59,10 +59,6 @@ AC_SUBST(MATE_DATE) AC_SUBST(MATE_DATE_COMMENT_START) AC_SUBST(MATE_DATE_COMMENT_END) -AC_DEFINE(MATE_MAJOR, [mate_platform], [Define to the major version]) -AC_DEFINE(MATE_MINOR, [mate_minor], [Define to the minor version]) -AC_DEFINE(MATE_MICRO, [mate_micro], [Define to the micro version]) - RELEASE_YEAR=`date +%Y` if test "x$SOURCE_DATE_EPOCH" != "x"; then RELEASE_YEAR=`date -u -d "@$SOURCE_DATE_EPOCH" +%Y` diff --git a/libmate-desktop/mate-desktop.h.in b/libmate-desktop/mate-desktop.h.in index fba608f..e63bd38 100644 --- a/libmate-desktop/mate-desktop.h.in +++ b/libmate-desktop/mate-desktop.h.in @@ -27,10 +27,10 @@ #define __MATE_DESKTOP_H__ #define MATE_DESKTOP_CHECK_VERSION(major,minor,micro) \ - (MATE_MAJOR > (major) || \ - (MATE_MAJOR == (major) && MATE_MINOR > (minor)) || \ - (MATE_MAJOR == (major) && MATE_MINOR == (minor) && \ - MATE_MICRO >= (micro))) + (@MATE_PLATFORM@ > (major) || \ + (@MATE_PLATFORM@ == (major) && @MATE_MINOR@ > (minor)) || \ + (@MATE_PLATFORM@ == (major) && @MATE_MINOR@ == (minor) && \ + @MATE_MICRO@ >= (micro))) #define MATE_DESKTOP_VERSION "@PACKAGE_VERSION@" diff --git a/libmate-desktop/meson.build b/libmate-desktop/meson.build index e0e94ae..4d1cc5f 100644 --- a/libmate-desktop/meson.build +++ b/libmate-desktop/meson.build @@ -2,6 +2,9 @@ libmdt_inc = include_directories('.') version_conf = configuration_data() version_conf.set('PACKAGE_VERSION', matedt_version) +version_conf.set('MATE_PLATFORM', mate_platform) +version_conf.set('MATE_MINOR', mate_minor) +version_conf.set('MATE_MICRO', mate_micro) mate_desktop_header_file = configure_file( input: 'mate-desktop.h.in', -- cgit v1.2.1