An update from the one I wrote years ago. That one overrides entire CFLAGS
and thus missing -O3
and all those good optimization stuff.
In short, do this first:
export cflags="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
And then build as usual: ./configure --prefix=... && make ...
.
I usually put that block of config in a script called _build
:
#!/bin/sh
<the export lines above>
exec "$@"
To use it just prefix the build commands with it: _build ./configure ... && _build ...
.