dovecot-2.2: Add macros DOVECOT_VERSION_{MAJOR,MINOR} to config....

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 5 00:13:33 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/e294e416f5ba
changeset: 16180:e294e416f5ba
user:      Dennis Schridde <devurandom at gmx.net>
date:      Sun Oct 30 12:23:28 2011 +0100
description:
Add macros DOVECOT_VERSION_{MAJOR,MINOR} to config.h to allow version checks in the preprocessor

Version number set as PACKAGE_VERSION is assumed to be D.D* with D=digits

diffstat:

 configure.in |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r e511408bd991 -r e294e416f5ba configure.in
--- a/configure.in	Wed Mar 20 21:13:20 2013 +0200
+++ b/configure.in	Sun Oct 30 12:23:28 2011 +0100
@@ -287,6 +287,9 @@
 AC_DEFINE_UNQUOTED(DOVECOT_STRING, "$PACKAGE_STRING", Dovecot string)
 AC_DEFINE_UNQUOTED(DOVECOT_VERSION, "$PACKAGE_VERSION", Dovecot version)
 
+AC_DEFINE([DOVECOT_VERSION_MAJOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\1]), [Dovecot major version])
+AC_DEFINE([DOVECOT_VERSION_MINOR], regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\)], [\2]), [Dovecot minor version])
+
 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
   sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
   sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h sys/fs/quota_common.h \


More information about the dovecot-cvs mailing list