Changing *FLAGS in configure.ac vs. caching with subprojects
问题 Say I wish to add a specific flag to CFLAGS within my configure script, that should propagate to all subprojects' configure scripts: CFLAGS+=" -Dfoobar" export CFLAGS AC_CONFIG_SUBDIRS([sub]) This works when configure is invoked trivially. As soon as one of the following happens: CFLAGS is exported in the environment when configure is invoked CFLAGS is set on configure command-line caching is used ( configure -C ) This approach no longer works. In the first two cases, the exported CFLAGS is