On linux anyone can change environment variables of his process; no administrative right are needed.
In bash:
export CC="gcc" CFLAGS="-O3 -Wall"
In csh use
setenv CC "gcc"
Any program started in this shell after such command will have CC variable in its environment. (Env vars are remembered by bash, csh or other shell). You can add this command to your ~/.bashrc
file to make this setting permanent.
There are other ways to pass CC to configure too, e.g. in bash it is possible to set environment variable to single command, without remembering:
CC="gcc" CFLAGS="-O3 -Wall" ./configure ...
PS and popular ./configure CC=gcc
is not an environment variable change and is specific to configure implementation (but most configures support this)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…