On 2006-12-05 20:09-0500 Bill Hoffman wrote:

Alan W. Irwin wrote:
Therefore, I suggest the following improved proposal to take care of these
compatibility issues exactly.

1) Copy the 2.4.5 UsePkgConfig.cmake which defines the PKGCONFIG macro to
CVS with the only change being to add a message that it is an obsolete
macro.  Then you _know_ that if the user uses UsePkgConfig.cmake they will
automatically be compatible with what was done before.

2) Get rid of the emulated definition of the PKGCONFIG macro that is
currently in FindPkgConfig.cmake.  In other words, FindPkgConfig.cmake is
completely reserved for the new pkg-config stuff and does not try to emulate
the old PKGCONFIG macro.

I attach a patch to current CVS that implements this proposal.  It works
for PLplot.

Michel, does this patch work for you?

There is one problem.... The old macro had a serious bug in that \n were often embeded into the strings for library paths and caused bad makefiles to be generated. I guess we could revert
back to the old one, and add a fix for that.

That's up to you, but if it were up to me, I would simply freeze on the
2.4.5 version. (You may want to go further with the documentation of this
macro than I did in my patch to emphasize that it is deprecated and no more
changes will be made since better alternatives are available.) Everybody who
successfully uses the 2.4.5 version of PKGCONFIG now (such as the PLplot
development team, and I assume Michel as well although we haven't heard from
him yet about whether the latest patch works for him) knows the limitations
of its output (such as blank-delimited strings) and has measures in place
for dealing with it. Anybody who uses it in future for new development get
what they deserve since the documentation (assuming you make it clear its
deprecated and frozen) should have warned them.

Note, PLplot uses pkg-config in five different contexts, but there may soon
be more.  The 2.4.5 version of PKGCONFIG is adequate to our current
pkg-config needs, but I have plans to move to the recommended macros instead
(as soon as there is a release including them) because of their added
features and less concern about filtering the output.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to