Bug 19283

Summary: typo in check for version of freetype in configure script
Product: cairo Reporter: Pavel Petrovic <ppetrovic>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.8.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Pavel Petrovic 2008-12-25 09:14:49 UTC
On line 29483 of configure script in cairo 1.8.6, the script is checking
for version of freetype, however, awk results with syntax error, thus
making the configure fail completely and refuse produce makefile.

It seems that the script is only missing \$X references in printf() call.

Current version:

{printf("%d\n", 10000* + 100* + )};


The following fix produced correct behavior:

{printf("%d\n", 10000*\$0 + 100*\$1 + \$2)};


Here is the output of configure with the current version:

...
checking for freetype-config... /usr/local/bin/freetype-config
checking freetype2 libtool version... awk: {printf("%d\n", 10000* + 100* + );}
awk:                                 ^ syntax error
awk: {printf("%d\n", 10000* + 100* + );}
awk:                                 ^ syntax error
9.7.3 - Too old
checking whether cairo's FreeType font backend feature could be enabled... no (9.7.3 found; version 9.7.3 from release 2.1.9 required)
...

configure: error: Cairo requires at least one native font backend.  Please install FreeType and fontconfig and try again.


I used the official cairo 1.8.6 tar.gz distribution.
Have a nice day.
Comment 1 Pavel Petrovic 2008-12-25 09:26:24 UTC
> Current version:
> 
> {printf("%d\n", 10000* + 100* + )};
> 
> 
> The following fix produced correct behavior:
> 
> {printf("%d\n", 10000*\$0 + 100*\$1 + \$2)};

sorry, it did result in configure completing correctly, but the line
should probably look like this:

{printf("%d\n", 10000*$1 + 100*$2 + $3)};

(and the same is on the following line).
Comment 2 Chris Wilson 2009-01-02 07:45:58 UTC
This is fixed by:
commit 333158ec85cf3c610cc8965fc3f99d72b534cc2e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jan 2 15:36:39 2009 +0000

    [configure] Replace awk comparator with an aclocal version
    
on trunk, but I need to decide how to apply this to 1.8.
Comment 3 Chris Wilson 2009-06-03 01:15:52 UTC
Pushed to 1.8: 7f08a2c241bf2c615317cd6741c3e560a8bef1e6

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.