kjdev/apache-mod-brotli

autoconf: Include statements should be in CPPFLAGS, not CFLAGS

Closed this issue · 1 comments

When updating brotli from an older version, build may fail with error: ‘BROTLI_DECODER_PARAM_LARGE_WINDOW’ undeclared because the Include statements for the brotli headers use the installed location first when invoking the compiler. This can be fixed by moving the include statement for brotli's own header files from AM_CFLAGS to AM_CPPFLAGS.

diff --git a/src/ext/brotli-1.0.3/Makefile.in b/src/ext/brotli-1.0.3/Makefile.in
index 75dac8d617..44068c093e 100644
--- brotli-1.0.3/Makefile.in
+++ brotli-1.0.3/Makefile.in
@@ -495,7 +495,7 @@ BROTLI_INCLUDE = \
 
 brotliincludedir = $(includedir)/brotli
 brotliinclude_HEADERS = $(BROTLI_INCLUDE)
-AM_CFLAGS = -I$(top_srcdir)/c/include
+AM_CPPFLAGS = -I$(top_srcdir)/c/include
 brotli_SOURCES = $(BROTLI_CLI_C)
 brotli_LDADD = libbrotlidec.la libbrotlienc.la libbrotlicommon.la -lm
 #brotli_LDFLAGS = -static

wrong project, sorry.