diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-10-06 00:39:14 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-10-06 00:39:14 -0700 |
commit | dac73a51981632908ce86cff26af5b0bcfcdd770 (patch) | |
tree | 968d4cf0ced8d6c141759909bc36ae5981e2d3ba | |
parent | cfa048b4aa351068415c5e2711731246a9c19322 (diff) |
Set Xft.h version numbers from configure.ac
Keep the two in sync automatically instead of manually
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | include/X11/Xft/Xft.h.in (renamed from include/X11/Xft/Xft.h) | 15 |
3 files changed, 22 insertions, 14 deletions
@@ -41,9 +41,7 @@ Support fontconfig 2.2 release which doesn't include FC_HINT_STYLE. To release a version of this library: - 1. Update the version numbers - configure.ac - Xft.h + 1. Update the version number in configure.ac 2. Fix the README Change version number Set the date diff --git a/configure.ac b/configure.ac index 35a3c7f..cd76278 100644 --- a/configure.ac +++ b/configure.ac @@ -25,9 +25,7 @@ AC_PREREQ([2.57]) dnl dnl This is the package version number, not the shared library -dnl version. This same version number must appear in Xft.h -dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's -dnl not possible to extract the version number here from Xft.h +dnl version. This version number will be substituted into Xft.h dnl Please bump the minor library number at each release as well. dnl AC_INIT(libXft, 2.1.13, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXft) @@ -46,6 +44,19 @@ AC_PROG_CC AC_PROG_LIBTOOL XORG_DEFAULT_OPTIONS +# Set library version for Xft.h from package version set in AC_INIT +# copied from PACKAGE_VERSION_* settings in XORG_VERSION +AC_CONFIG_HEADERS([include/X11/Xft/Xft.h]) +AC_DEFINE_UNQUOTED([XFT_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of Xft]) +AC_DEFINE_UNQUOTED([XFT_MINOR], + [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`], + [Minor version of Xft]) +AC_DEFINE_UNQUOTED([XFT_REVISION], + [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`], + [Micro revision of Xft]) + # # Check for Xrender # diff --git a/include/X11/Xft/Xft.h b/include/X11/Xft/Xft.h.in index 569807c..d66f2ec 100644 --- a/include/X11/Xft/Xft.h +++ b/include/X11/Xft/Xft.h.in @@ -24,14 +24,13 @@ #define _XFT_H_ /* - * Current Xft version number. This same number - * must appear in the Xft configure.ac file. Yes, - * it'a a pain to synchronize version numbers like this. - */ - -#define XFT_MAJOR 2 -#define XFT_MINOR 1 -#define XFT_REVISION 13 + * Current Xft version number, set from version in the Xft configure.ac file. + */ + +#undef XFT_MAJOR /* Will be substituted by configure */ +#undef XFT_MINOR /* Will be substituted by configure */ +#undef XFT_REVISION /* Will be substituted by configure */ + #define XFT_VERSION ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION)) #define XftVersion XFT_VERSION |