Andreas Volz <[EMAIL PROTECTED]> writes: > I build my library with GNU autotools and link to it with the pkg-config > --uninstalled option without installing it. In this case a la-file > (libmhgui.la) is created. I've some problems to understand how libtool > generated the dependency_libs field. In my package is a > --with-x/--without-x option from AC_PATH_X. But the la-file has the X > libraries in its dependency_libs field. So how does libtool generate > this field?
Well, you say that the correct field is: > # Libraries that this one depends upon. > dependency_libs=' /home/andreas/src/MakeHuman/cvs/animorph/src/libanimorph.la > -l glut -lGLU -lGL -lpng I expect that one of glut, GLU, and GL depend on the X libraries, and hence when libtool resolves transitive dependencies through the .la files, it pulls in the other libraries. This is one of the problems with .la files currently. It doesn't have the correct semantics to distinguish between static builds (and builds on platforms with deficient shared library handling) where all transitive dependencies have to be pulled into the link line and shared builds on modern platforms where transitive dependencies do not have to be pulled in and in fact generally *shouldn't* since they make library migrations harder. pkg-config does have this logic and some packages have started not installing libtool .la files and recommending that people just use pkg-config to get the right link lines to avoid this. That being said, the addition of extra dependencies is generally only a problem if you're building OS packages and have to be careful about adding too many dependencies. If you're just building software for local use, it doesn't really matter. -- Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/> _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
