Re: Dependency libraries and ABI

Owen Taylor <otaylor redhat com> writes:

>  - Omit dependency libraries from the pkg-config output lines if we
>    think we are on a platform that support shared library dependencies.
>    We could autodetect this or, more simply, have a configuration
>    option --disable-direct-dependencies (or something.)
>    [ This breaks static linking, of course, but not many people want to 
>    static link. In the future, we can enhance pkg-config to have some
>    special support for static-linking-only dependencies. ]
>    This means that will pull in, but the
>    app won't pull it in explicitely, so as long as the app isn't
>    using Xft directly, we can change GTK+ to link against

Remving -lXft from the .pc file won't be enough, because libtool
stores this dependency in its .la file and may pull -lXft in again
for every binary/library (transitivly) linked with -lpangoxft. As
long as libtool is involved and libtool's .la files are not removed
after installation, more things linked against gtk may be linked against
Xft (at least on Linux or Solaris, libtool on other platform may vary),
regardless of what is in the .pc file:

> libtool --version (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52)
> libtool --mode=link gcc -o foo foo.c -L/gnome2 -lgtk-x11-1.3
gcc -o foo foo.c  -L/gnome-2/lib /gnome-2/lib/ /gnome-2/lib/ /gnome-2/lib/ -L/usr/X11R6/lib -L/usr/lib /gnome-2/lib/ /gnome-2/lib/ -lXft -lXrender -lXext -lX11 /usr/lib/ /gnome-2/lib/ /gnome-2/lib/ /gnome-2/lib/ /gnome-2/lib/ -ldl /gnome-2/lib/ -lm -Wl,--rpath -Wl,/gnome-2/lib -Wl,--rpath -Wl,/gnome-2/lib

Mirko Streckenbach.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]