[Mono-list] Fwd: Re: newbie:installing monodevelop
Miguel de Icaza
miguel at novell.com
Tue Jun 12 11:46:31 EDT 2007
> As we are in the topic : are "pc" files related to the Suse "culture"
> ? I have a ton of them in a pkgconfig directoy in the Mono/Suse
> VMWare image (some .pc file contains what seems to be gcc options
> like -lX11 or -I ....)
"pc" files originated from the Gnome culture, they are part of
pkg-config, which was a mechanism to find what C flags and library flags
were required.
pkg-config was a more general purpose version of the earlier
"gnome-config" program. gnome-config was shell, pkg-config was
rewritten in C and dropped the "gnome" program that offended certain
sensibilities.
gnome-config in turn was a reusable implementation of a system that
first appeared in Tk. I can no longer remember how it worked in Tk,
but it solved the same issue: which flags did you need to compile the
code and which libraries did you need to link a program that used Tk.
The Tk system was only designed for dealing with Tk, while gnome-config
goal was to be a general-purpose framework for library developers to
publish this information and have multiple tools use it.
Another original benefit of gnome-config and pkg-config that people did
not register is that it was possible to write configure scripts like
this:
if pkg-config --modversion 1.2 mono; then
echo you have mono 1.2
else
echo you do not have mono, or a recent enough version
fi
It had the advantage of not requiring the early mess that was popular in
1999-2000 when most people had a mix of m4 files that were a mix from
the system and the local install (conflicting m4 files, automake not
running, aclocal doing the wrong thing).
So we were able to move away from:
LIBRARY_CHECK_SOME_VERSION
in the configure files that required a "library.m4" in the proper path,
setting the proper ACLOCAL_FLAGS variable to list the directory (and
ensure that the developer never had duplicate ones: ignoring things like
precedence, which has always been a mistake) to a much simpler and saner
word.
I have no idea how the m4 file disaster crept up again, but someone
decided that using "if pkg-config --flag version" was too hard, and they
replaced it with a new .m4 file so people these days use
PKG_CONFIG_CHECK(bla bla bla) or something along those lines.
The main is minimized in that pkg-config is now standard, but still,
there was no need for it, and it remain as ugly as it was 5 years ago.
Succinct developer will continue to use if with the barebones setup of
pkg-config, but am afraid it is too late culture-wise to turn the clock
back into those saner days. The meme is out.
Miguel.
More information about the Mono-list
mailing list