gnome-config inside configure.in with libraries that depend on libraries that depend on ....
- From: Chema Celorio <chema ximian com>
- To: gnome-hackers gnome org
- Subject: gnome-config inside configure.in with libraries that depend on libraries that depend on ....
- Date: Sat, 17 Feb 2001 21:36:20 -0600
[short version]
If your application is depending on a library that depends
on another library, and you use gnome-config --libs to get
the libraries and include files. It is a good idea to explicitly
add the other library to the gnome-config line.
So if your application "foo" has something like :
EXTRA_GNOME_LIBS="'gnome-config --libs gal"
it is better to have :
EXTRA_GNOME_LIBS="'gnome-config --libs gdk_pixbuf print gal'"
because gal depends on gnome-print, and gnome-print depends
on gdk_pixbuf.
----------------------------
[long version]
Here is why :
[I am using gal & gnome-print as an example, this applies
to all libraries that depend on other libraries.]
when gal creates galConf.sh, it calls gnome-config with "--libs
print" to get all the libraries that gnome-print needs. When an
application calls "gnome-config --libs gal" it gets those libraries.
Which include the libraries that gnome-print dependen on when
gal was "made".
The problem is that when a dependency is added to gnome-print
and gnome-config --libs gal is called, the new dependency is
not included when linking and the application fails to load.
Because galConf.sh is obsolete, gal does not know of the new
dependency.
We had this problem when we added libunicode to gnome-print
and will have this problem again when we add libgpa in the
default build for gnome-print.
I sense that somebody (Havoc ;-) ) is thinking now
"this will be solved when we use ... foo" but it is a problem
right now, so if we use gnome-config. It is best to take
this aproach for now.
What happens if we fail to do this ? Is the world going to be
over ?
No, the world is not over.
if we fail to do this, when a new dependency is added to say
gdk_pixbuf. Your app "foo" is going to stop working if you
build from source (I don't know what happens if you use RPM's
or debs but I guess it is a problem too). Because it will not
link with the new dependency.
So you would have to build & install gdk_pixbuf, build and install
gnome-print and then build and install foo.
regards,
Chema
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]