nisse@lysator.liu.se (Niels Möller) writes:
If you know exactly what your doing, setting those variables directly is the most robust way. However, it's better to put them on configure's command line,
./configure LDFLAGS=...
rather than
LDFLAGS=... ./configure
because otherwise they will be lost whenever configure is rerun, typically by ./config.status --recheck is run. (Variables on the command line are supported since autoconf 2.5something, it won't work with configurescripts created by autoconf-2.13).
<nitpick-mode>
Actually, for variables declared as precious (using AC_ARG_VAR or automatic, as is the case for CFLAGS, CPPFLAGS, LDFLAGD, CC et cetera, IIRC), that is handled automatically nowadays, so it doesn't matter whatever one does ./configure LDFLAGS=... or LDFLAGS=... ./configure. Still, the recommended way is to pass to pass parameters as flags (e.g. ./configure LDFLAGS=...).
</nitpick-mode>
/Pontus