How can I compile an autotools project with statically linked dependancies?

Posted by flyx on Stack Overflow See other posts from Stack Overflow or by flyx
Published on 2010-05-22T19:34:10Z Indexed on 2010/05/22 19:40 UTC
Read the original article Hit count: 209

There's an open source library I want to use. As I want to spread my software as binary package, I do not want the library to have dependancies on other libraries, so I need to link the dependancies statically.

Now as the library is open source and there are no binaries provided, I compile it myself. The library uses autotools, and I didn't find any useful documentation on how to link dependancies statically. What I did try is to call the configure script with --enable-static, but this apparently only tells configure to compile a static version of the library - but what I need is a dynamic library that includes all the libraries it depends on.

So, I need a way to either tell configure to link against dependancies statically, or a way to post-process the built library to include all dependancies. Can anyone tell me how to do this?

Oh, and if it matters: I'm on 64bit Snow Leopard.

© Stack Overflow or respective owner

Related posts about autotools

Related posts about static-linking