I wish to install OpenVPN on OpenBSD 5.5 using OpenVPN source tarball.
According to the instructions here, I have to install lzo
and
add
CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
directives to "configure", sincegcc
will not find them otherwise.
I have googled extensively for guide on how to do the above on OpenBSD but there is none.
This is what I plan to do:
- Untar the source tarball to a freshly created directory
- Issue the command
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
- Issue the command
make
- Issue the command
make install
Which of the following syntax is correct?
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
or
./configure --CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
or
./configure --CFLAGS="-I/usr/local/include" --LDFLAGS="-L/usr/local/lib"
Best Answer
The correct way is:
but this may not work with all
configure
scripts. It's probably better to set environment variables such asCPATH
andLIBRARY_PATH
(seegcc
man page).An example:
in your
.profile
, for instance. TheLD_LIBRARY_PATH
can be needed in case of shared libraries if a run path is not used (this depends on the OS, the build tools and the options that are used, but it shouldn't hurt).