I want to build a statically linked version of Ogg Vorbis on Ubuntu 9.10.
The Ogg Vorbis build environment seems to run on autoconf. There is a configure script which will generate a Makefile. If I give the configure script the following options:
--enable-static
--disable-shared
then statically linking <almost> works. Almost = the binary is statically linked to all necessary Ogg libraries, but it's still dynamically linked to the C library !
sven@inspiron-6000:~$ ldd ./oggenc
linux-gate.so.1 => (0x00b09000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00cef000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0029b000)
/lib/ld-linux.so.2 (0x006a8000)
When I <manually> add -static to the gcc command-line which generates oggenc, it seems to work just fine:
sven@inspiron-6000:~$ ldd oggenc
not a dynamic executable
I must confess that I know absolutely nothing about autoconf - I'm a Windows person. Ok, so shoot me !
How to I link statically without having to run the last step manually?