The documented way to override variables when running configure
is to specify their values as arguments to configure
, as explained by ./configure --help
:
`configure' configures transmission 3.00 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
In your case,
./configure --disable-cli --disable-mac --disable-daemon --enable-utp --with-gtk --with-crypto=openssl CFLAGS='-O2 -march=native' CXXFLAGS='-O2 -march=native' CC=gcc-10 CPP='gcc-10 -E' CXX=g++-10
configure
takes environment variables into account by default, which is why setting them also works. In both cases, the values set are preserved in config.status
(if the variables are marked as “precious”) and taken into account with config.status --recheck
. The Autoconf documentation recommends specifying variables as arguments rather than relying on the environment.