This is probably going to be long and somewhat complex. I am involved with a library project that has used the Autotools for some time. We primarily focus on Linux and other UNIX platforms as well as build using Mingw32 for Win32. All of this works well with shared libraries.
We have a downstream application author who wishes to link against a static build of our library. He is insistent that users of Win32 and OS/X platforms would not be able to deal with installing our shared library and he does not wish to have to support those issues. So be it. He says that we broke his ability to build against our library statically a few releases ago. Between the release that worked and the later releases we moved our "backend" libraries into their own subdirectory rather than leaving them in /usr/local/lib. Our library architecture consists of a single "frontend" C library ABI with multiple "backend" libraries (37 as of the current release). In the old version the Makefile.am files for all libraries used the "lib_LTLIBRARIES" variable which put all the backend .la, .so. and .a files in libdir. The patch retained the same variable for the frontend library's Makefile.am and changed the backend Makefile.am files to use "pkglib_LTLIBRARIES" which seems more proper and cleans things up since the backend libraries are not directly usable by programs. For some reason, that I have yet to understand, his static build succeeded with all the backends in libdir but fails with them in pkgdir. In my opinion, it would be better to be able to provide him with a single .a library that includes the entirety of the frontend and backend libraries. Right now I am at a loss on how to accomplish this with Libtool. Perhaps Libtool is not the way to accomplish this as suggested by the Automake documentation and perhaps a specific Makefile target is needed to build the single archive? Thanks! - Nate >> . -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Ham radio, Linux, bikes, and more: http://www.n0nb.us _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool