building nginx with non-system openssl ?
bendj095124367913213465 at gmail.com
Sun Apr 4 02:44:27 MSD 2010
On Sat, Apr 3, 2010 at 3:05 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> If you want to use installed version, use:
> ./configure --with-cc-opt="-I /path/to/include" --with-ld-opt="-L /path/to/lib"
> These options are used to build OpenSSL library from sources.
> Additional options are passed to OpenSSL's ./config.
That clears it up, thanks. 'cc-opt' & 'ld-opt' were simply not clear to me.
I removed the --with-openssl= (though those _are_ vanilla sources
...), and added,
ld-opt="-L/usr/local/ssl/lib -Wl,-rpath,/usr/local/ssl/lib -lssl
-lcrypto -ldl -lz"
cc-opt="-I/usr/local/include -I/usr/local/ssl/include -I/usr/include"
to ensure both that 'my' ssl libs are found before the system libs,
and the rpath ensures the correct runtime dynamic lib links.
with those, it works,
ldd objs/nginx | egrep "ssl|crypto"
libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0xb7849000)
libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0xb76ca000)
which is exactly what i was looking to do.
> nginx do honor CFLAGS (use -r in grep, it helps), but not LDFLAGS.
actually, i _had_, just a typo in my post, but had failed to search
from TOP_DIR. :-/
in any case, nginx is up & running, and i'm working on configuring
front-end proxy behavior :-)
More information about the nginx