[Top][All Lists]

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

relocatable .la files

From: C.J. Adams-Collier
Subject: relocatable .la files
Date: Sun, 18 Nov 2007 19:27:41 -0800

There was a thread some time ago (11/2004) about having a variable in .la files evaluated at runtime.  This seems like a good idea to me, and would work well with pkg-config's ${pcfiledir} variable.

It might also work to have something like `pkg-config  --libs` in the dependency_libs field of a library's .la file...

For instance, my /usr/lib/libg[dt] files include the following in their dependency_libs fields:

address@hidden:~$ grep dependency_libs /usr/lib/libg[dt]k-
/usr/lib/' /usr/lib/libpangocairo- /usr/lib/ /usr/lib/ -lfreetype -lz -lpng12 -lfontconfig -lXext -lXrender -lX11 -lXinerama -lXi -lXrandr -lXcursor -lXfixes /usr/lib/libgdk_pixbuf- /usr/lib/ -ldl /usr/lib/ /usr/lib/ /usr/lib/ -lrt -lm'
/usr/lib/' /usr/lib/ -lXext -lXinerama -lXi -lXrandr -lXcursor -lXfixes /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ -ldl /usr/lib/libglib- -lrt /usr/lib/ -lfreetype -lz -lfontconfig -lpng12 -lXrender -lX11 -lm'

The same information is returned by querying pkg-config for gtk+- x11-2.0's libraries:

$ pkg-config --libs gtk+-x11-2.0
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  

Would it be feasible to add a field to .la fies which indicated the pkg-config package name to query for linker args?

This would help our build system avoid
the madness caused by hard-coded paths in .la files.

Looking forward to your response,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]