Bug 41 - Add fontconfig/fontconfig.h.in
Summary: Add fontconfig/fontconfig.h.in
Status: RESOLVED WONTFIX
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.1
Hardware: All All
: high enhancement
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-03 05:07 UTC by Tony Graham
Modified: 2003-03-02 15:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tony Graham 2003-03-03 05:07:27 UTC
Having the version number in configure.in and fontconfig/fontconfig.h makes
version mismatches possible.  Adding a fontconfig.h.in means that the version
number only needs to appear in configure.in.

$ diff -u /usr/local/src/download/fontconfig-configure.in.ref
/usr/local/src/download/fontconfig-configure.in
--- /usr/local/src/download/fontconfig-configure.in.ref	Mon Mar  3 10:39:18 2003
+++ /usr/local/src/download/fontconfig-configure.in	Mon Mar  3 11:29:47 2003
@@ -27,13 +27,12 @@
 dnl                               Versioning              
 dnl ==========================================================================
 
-dnl The version number is also in fontconfig/fontconfig.h
 AC_INIT(ChangeLog,1.0.3,fontconfig@fontconfig.org)
 
-FONTCONFIG_HEADER=fontconfig/fontconfig.h
-FONTCONFIG_MAJOR=`awk '/^#define FC_MAJOR/ { print $3 }' $FONTCONFIG_HEADER`
-FONTCONFIG_MINOR=`awk '/^#define FC_MINOR/ { print $3 }' $FONTCONFIG_HEADER`
-FONTCONFIG_REVISION=`awk '/^#define FC_REVISION/ { print $3 }' $FONTCONFIG_HEADER`
+FONTCONFIG_MAJOR=1
+FONTCONFIG_MINOR=0
+FONTCONFIG_REVISION=3
+
 FONTCONFIG_VERSION="$FONTCONFIG_MAJOR.$FONTCONFIG_MINOR.$FONTCONFIG_REVISION"
 
 AC_SUBST(FONTCONFIG_MAJOR)
@@ -292,6 +291,7 @@
 AC_OUTPUT([
 Makefile 
 fontconfig/Makefile
+fontconfig/fontconfig.h
 fc-lang/Makefile
 src/Makefile
 fc-cache/Makefile
$ diff fontconfig/fontconfig.h fontconfig/fontconfig.h.in
38,40c38,40
< #define FC_MAJOR	1
< #define FC_MINOR	0
< #define FC_REVISION	3
---
> #define FC_MAJOR	@FONTCONFIG_MAJOR@
> #define FC_MINOR	@FONTCONFIG_MINOR@
> #define FC_REVISION	@FONTCONFIG_REVISION@
$
Comment 1 Keith Packard 2003-03-03 10:13:08 UTC
I decided that it was more important to have the raw fontconfig.h file in CVS
and not be edited by configure than to avoid duplicating the revision numbers. 
I've added big warnings in both places to let people know they need to be kept
in sync.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.