Bug 2411

Summary: cairo.m4 for autoconf checks
Product: cairo Reporter: Jason Dorje Short <jdorje>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED NOTABUG QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: enhancement    
Priority: high CC: jwatt
Version: 0.9.3   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Cairo m4 file (version 1)

Description Jason Dorje Short 2005-01-28 23:23:15 UTC
Attached is a cairo.m4 file.  It provides an autoconf check AC_CAIRO.  This can
be used as

  AC_CAIRO(0.3, cairo_found=yes, cairo_found=no)

within programs that use autoconf.  I'd recommend that it be distributed with
cairo itself (as m4/cairo.m4 or somewhere else) so that developers using cairo
will have easy access to it.
Comment 1 Jason Dorje Short 2005-01-28 23:24:12 UTC
Created attachment 1783 [details]
Cairo m4 file (version 1)
Comment 2 Carl Worth 2005-01-31 05:35:57 UTC
What advantage would this have over using the standard pkg-config macro:

PKG_CHECK_MODULES(CAIRO, cairo)

From your description, it sounds like it has the same functionality.
Comment 3 Jason Dorje Short 2005-02-01 18:03:02 UTC
It sounds like PKG_CHECK_MODULES does provide the same functionality.  I've
never seen this macro before (I'm surprised that gtk and glib m4 files don't use
it, but maybe I just have out-of-date m4 files).
Comment 4 Owen Taylor 2005-02-06 11:54:17 UTC
I'd recommend against including such a .m4 file. We just saw an obscure
bug in Pango that occurred because it was finding the wrong version 
of glib-2.0.m4.

The glib and GTK+ m4 files predate pkg-config and are mostly there
for compatibility.

They also do some extra checks to try and make sure that the version
of GTK+/GLib found is the right one, but they don't seem to be effective;
I still get lots of Pango bug reports from mixed glib versions.
Comment 5 Carl Worth 2005-02-21 13:04:29 UTC
It sounds like we're all happy with PKG_CHECK_MODULES as opposed to
a cairo-specific macro.

One additional reason to prefer this is that a cairo-specfic
macro would give an unhelpful error message, (unrecognized macro or
whatever) to anyone trying to build cairo-dependent code from scratch,
(as opposed to building from a configure script).

I'm closing this bug.
Comment 6 Carl Worth 2005-08-22 17:14:59 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

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.