This replaces the manipulation of CFLAGS plus passing CFLAGS=-Werror
to configure. It applies to both C and C++ code.
Note that CFLAGS is no longer modified. Instead the WARNING_FLAGS are
added to the relevant Automake variables of each directory. The
advantage is that one can set CFLAGS on the make invocation without
affecting the rest of the flags, which is IMHO more in line with the