Friday, May 27, 2016

Set environment variables during configure

See AkiRoss's post in
http://stackoverflow.com/questions/2537271/compile-openssl-with-the-shared-option
 
Example, set CFLAGS
CFLAGS=-fPIC ./config shared --prefix=/your/path

Thursday, May 5, 2016

Set compiler library path

Make GNU programs use a configure file to test whether requirements are met/available by looking in the system default locations. In many cases, the desired libraries or tools are not installed in the system default paths. As a consequence, configure test would fail. To tell the configure script where to look for, in addition to default locations, we can set several important environment variables. Eg,

export CPPFLAGS='-I/path/to/include'
export LDFLAGS='-L/path/to/lib'
./configure
make


To check a list of environment variables, try

./configure --help
which will detail environment variables that are configurable.