* Makefile.am (CFLAGS, CXXFLAGS): Append $(CFLAGS_EXTRA).
* configure.ac: Add AC_SUBST(CFLAGS_EXTRA).
AM_CXXFLAGS = @GC_CFLAGS@
AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
+CFLAGS += $(CFLAGS_EXTRA)
+CXXFLAGS += $(CFLAGS_EXTRA)
+
## FIXME: relies on internal code generated by automake.
## FIXME: ./configure --enable-dependency-tracking should be used
#all_objs = @addobjs@ $(libgc_la_OBJECTS)
GC_CFLAGS=${gc_cflags}
AC_SUBST(GC_CFLAGS)
+# Extra user-defined flags to pass both to C and C++ compilers.
+AC_SUBST([CFLAGS_EXTRA])
+
AC_ARG_ENABLE(threads,
[AC_HELP_STRING([--enable-threads=TYPE], [choose threading package])],
THREADS=$enableval,