Bug 25104

Summary: autoconf >= 2.62 is required
Product: xorg Reporter: Adrian Bunk <bunk>
Component: Lib/XftAssignee: Gaetan Nadon <memsize>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: alan.coopersmith, memsize
Version: 7.5 (2009.10)Keywords: patch
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch to require autoconf >= 2.62 in configure.ac none

Description Adrian Bunk 2009-11-15 13:33:40 UTC
Created attachment 31214 [details] [review]
patch to require autoconf >= 2.62 in configure.ac

The substitution done since commit dac73a51
(Set Xft.h version numbers from configure.ac)
only works with autoconf >= 2.62
Comment 1 Gaetan Nadon 2009-12-08 07:25:01 UTC
git diff cfa048b dac73a51 -- configure.ac

+# 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])

The statements AC_CONFIG_HEADERS and AC_DEFINE_UNQUOTED are part of autoconf even before 2.60. However, with 2.60, I get errors in XftGetVersion that XFT MAJOR, MINOR and REVISION are undeclared. There are no errors during configuration.

The root cause of the problem is Xft.h.in. Besides #undef XFT_MAJOR there should not be a comment there. I remember reading autoconf somewhere that rules are more strict when generating. They most likely now have made they code generator more powerful in 2.62.

I'll test this some more and submit a patch to xorg-devel list for review. If I am correct, the code is actual wrong for the intended level of automake. If we want to raise the level of autoconf to 2.62, that would be a different discussion.

Thanks for finding this.


Comment 2 Gaetan Nadon 2009-12-08 09:54:05 UTC
Commit 78ed756a343c37acb38cc230d03c334845553ab6

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.