Skip to content

Fix autogen.sh CFLAGS="foo bar"

Dan Eble requested to merge dev/eble/autogen-cflags into master

I recently added an eval to autogen.sh to remove extra quotes when setting internal CFLAGS for the --ci option. I did not notice at the time that this complicated providing CFLAGS="foo bar" as an argument to the script, requiring extra quoting to get through the eval.

This changes the approach to pass the CI CFLAGS through the environment.

I've tested the following cases by looking at the generated value of CONFIG_CXXFLAGS in config.make.

autogen.sh                                  | default
autogen.sh --ci                             | CI CFLAGS replace default
CFLAGS=-O3 autogen.sh --ci                  | -O3 precedes CI CFLAGS
CFLAGS=-O3 autogen.sh --ci CFLAGS="-O1 -Og" | -O1 -Og (no CI CFLAGS)

See commit e7c771f9.

Edited by Dan Eble

Merge request reports