Steffen Kaiser wrote:
--enable-static[=PKGS] build static libraries [default=yes]
This will just build static _libraries_, I guess; there is no configure switch for static application.
You're right; I've since remembered that the Mac has an analog of ldd (otool -L), which confirms that everything is linked dynamically:
mini:~/sw fz$ otool -L \
lib/dovecot/*.so
lib/dovecot/*/*.so
libexec/dovecot/*
sbin/dovecot*
| sort | uniq /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.5) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2) /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
If I'm reading the libtool man page correctly, this should remain binary compatible on any system where the libraries have higher 'compatibility version' numbers. Which seems to be the case going from OS X 10.4 to 10.5 -- running otool -L on the latter gives the same numbers as above except
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 111.0.0) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
I hope my understanding here is correct; else I'll try your suggestion below, for which I'm grateful. (For my use as I described it, I guess I could in fact build '-without' most of these libraries...?) Thanks,
Francois Z.
But you can try:
CFLAGS=-static ./configure
This should propagate the "-static" flag to all make's. However, I supposet that nobody tried something like this, yet, if this procedure works with the plugins for instance.