(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Installation : (Answer) How do I specify additional compiler include/lib search directories?

env CPPFLAGS=-I/usr/mylocal/include LDFLAGS=-L/usr/mylocal/lib ./configure

Details are provided in the release INSTALL document

If you're linking against shared libraries and they reside in non-standard locations, you may also need to tell the runtime dynamic linker where to find them, otherwise the resulting executable files won't run. The steps are operating-system dependent but usually involve setting an environment variable before attempting to run the programs.

For Linux, Solaris, Irix, and other SVR4-derived systems you use the LD_LIBRARY_PATH environment variable. For AIX use LIBPATH, for HP-UX use SHLIB_PATH.

LD_LIBRARY_PATH=/usr/mylocal/lib; export LD_LIBRARY_PATH

Don't forget to make veryclean after changing your environment.
Even using the correct CPPFLAGS and LDFLAGS environment variables it is possible that configure misses to find the library matching the headers indicated by the CPPFLAGS var. It is possible to force configure to not look at specific library versions using something like: env ol_cv_db_db_4_dot_2=no ./configure ... (in this case it should not look at db-4.2 libraries)
[Append to This Answer]
Previous: (Answer) How do I install OpenLDAP?
Next: (Answer) Is OpenLDAP thread safe?
This document is: http://www.openldap.org/faq/index.cgi?file=43
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org