Hello Simon, just a note:
* Simon Josefsson wrote on Mon, Nov 17, 2008 at 01:09:49PM CET: > > What mechanism propagates the CFLAGS setting to sub-directories? I used > > to add -W etc to CFLAGS in the top-level configure.ac, and they were > > propagated into lib/Makefile and libextra/Makefile without problem. One > > solution I thought about was if I could mark WARN_CFLAGS as a similar > > variable to CFLAGS somehow. > > For the record, I found the solution to this problem, and it was to put > > export WARN_CFLAGS > > in the top-level configure.ac and to put > > AC_SUBST([WARN_CFLAGS]) > > in sub-ordinate configure.ac's. While this works, it is probably better to add "WARN_CFLAGS=$WARN_CFLAGS" to ac_configure_args. That way, the settings get saved in the subordinate config.status file, and if a rerun (config.status --recheck) happens to be triggered in the sub package, then the flag settings won't be lost. In order for arbitrary contents of WARN_CFLAGS to survive here, appropriate quoting has to be used. "$ac_configure_args" is eval'ed when used inside Autoconf. Unfortunately, all that is not documented, so it's best to look at Autoconf code for examples. Cheers, Ralf
