The canonical way to do this is to provide values for various variables in the ./configure
invocation:
./configure CPPFLAGS="-I/path1/include -I/path2/include -I/path3/include" \
CFLAGS="-O3 -g" \
LDFLAGS="-L/path1/lib -L/path2/lib" \
LIBS="-ltensorflow -lasan"
If the C++ compiler is used, specify CXXFLAGS
instead of (or in addition to) CFLAGS
.
These variables can also be set in the environment, but recommended practice is to specify them as command-line arguments so that their values will be stored for re-use. See Forcing overrides when configuring a compile (e.g. CXXFLAGS, etc.) for details.
Note that in most cases it would be unusual to specify that many paths as flags; instead, I would expect to find --with
options to tell the configure
script where to find various dependencies. For example, --with-tensorflow=/path/to/tensorflow
which would then result in the appropriate -I
and -L
flags being set. Run
./configure --help
to see what options are available.