Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Westside guy

macrumors 603
Original poster
Oct 15, 2003
6,411
4,279
The soggy side of the Pacific NW
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!
 

Westside guy

macrumors 603
Original poster
Oct 15, 2003
6,411
4,279
The soggy side of the Pacific NW
robbieduncan said:
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.