SofaKng
SofaKng

Reputation: 1065

How do I specify additional include and lib directories when compiling/configuring? (re: autoconf/configure)

I'm a Windows developer with only a little experiencing compiling with GNU gcc/make/autoconf, etc.

I'm trying to compile some applications on my new MacBook and I'm placing the dependencies in a separate directory:

./configure --prefix=/opt/ports
make
make install

Now when I compile/configure an application that requires a dependency located in /opt/ports, how do I specify that (i.e. lib and include directories)?

Upvotes: 1

Views: 157

Answers (1)

ganeshredcobra
ganeshredcobra

Reputation: 2091

export CPPFLAGS='-I/home/foo/sw/include/'
export LDFLAGS='-L/home/foo/sw/lib/'

Upvotes: 1

Related Questions