PDA

View Full Version : Altering the default library search path




Westside guy
Jul 11, 2006, 11:54 AM
I would like to append the fink library directory /sw/lib to the list of directories that are searched automatically when I am trying to build an app (openvpn in this particular instance) from the command line. As it stands, I have to remember to set a couple variables:

CPPFLAGS="-I/sw/include" LDFLAGS="-L/sw/lib" ./configure

because otherwise the library (in this case the LZO libraries) isn't found.

This should be simple - I know how to do it in Linux - but I can't seem to find the information for OS X; so I'd appreciate any guidance.

(In case anyone is wondering why I'm bothering, when there are packages available - I want to try out the latest beta.)

Thanks for your help!



robbieduncan
Jul 11, 2006, 01:27 PM
Set the variables in your .profile. Just like you could in Linux.

Westside guy
Jul 11, 2006, 03:10 PM
Set the variables in your .profile. Just like you could in Linux.

Thanks for the reply.

I can do what you suggest - but I was hoping to actually modify the default library search path. Under a lot of Linuxes (Linices?) you can add an entry in /etc/ld.so.conf or /etc/ld.so.conf.d/ so the additional directory/directories will be searched by default.

The main issue with just setting those variables is you have to remember you've set them - otherwise if you have to make different additions or changes for building another app, you lose your libraries again.