Description: Pass $CPPFLAGS where it might be missing
Might pass it once or twice too often, but better than never. At least
fixes Lintian warning hardening-no-fortify-functions for cadabra. But
doesn't work yet for xcadabra.
Author: Axel Beckert <abe@debian.org>

--- a/gui/Makefile.in
+++ b/gui/Makefile.in
@@ -9,17 +9,17 @@
 
 OBJS   = help.o widgets.o window.o main.o ../src/stopwatch.o
 CFLAGS = -O2 -I. -I@top_srcdir@/include `pkg-config modglue --cflags` `pkg-config --cflags gtkmm-2.4` \
-         `pkg-config --cflags pango`
+         `pkg-config --cflags pango` $(CPPFLAGS)
 SRCS   = `find . -name "*.cc"`
 TIMESTAMP = -D"RELEASE=\"${RELEASE}\"" -D"DATETIME=\"`date | sed -e 's/  / /'`\"" -DHOSTNAME=\"`hostname`\"
 
 %.o: %.cc
-	@CXX@ -Wall @CFLAGS@ -D"DESTDIR=\"@prefix@\"" ${TIMESTAMP} ${CFLAGS} -c -o $@ $<
+	@CXX@ -Wall @CFLAGS@ -D"DESTDIR=\"@prefix@\"" ${TIMESTAMP} ${CFLAGS} $(CPPFLAGS) -c -o $@ $<
 
 main.o: $(OBJS) Makefile
 
 xcadabra: $(OBJS)
-	@CXX@ -o xcadabra $+ `pkg-config modglue --libs` `pkg-config --libs gtkmm-2.4` -lpcrecpp $(LDFLAGS)
+	@CXX@ -o xcadabra $+ `pkg-config modglue --libs` `pkg-config --libs gtkmm-2.4` -lpcrecpp $(LDFLAGS) $(CPPFLAGS)
 
 xcadabra_static: $(OBJS)
 	@CXX@ -o xcadabra -static $+  -L@prefix@/lib `pkg-config modglue --libs` \
@@ -50,7 +50,7 @@
 .depend:
 	rm -f .depend
 	for i in ${SRCS}; \
-		do    g++ -E -MM -MT `echo $$i | sed -e 's/\.\///' -e 's/\.cc/\.o/'` ${CFLAGS} $$i >> .depend; \
+		do    g++ -E -MM -MT `echo $$i | sed -e 's/\.\///' -e 's/\.cc/\.o/'` ${CFLAGS} $(CPPFLAGS) $$i >> .depend; \
 		done
 
 include .depend
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -21,7 +21,7 @@
 #modules/xperm_no_nests.o 
 
 SRCS      = `find . -name "*.cc"`
-MCFLAGS   = @CFLAGS@ --std=c++11 -I. -I@top_srcdir@/src `pkg-config modglue --cflags`
+MCFLAGS   = @CFLAGS@ --std=c++11 -I. -I@top_srcdir@/src `pkg-config modglue --cflags` $(CPPFLAGS)
 TIMESTAMP = -D"RELEASE=\"${RELEASE}\"" -D"DATETIME=\"`date | sed -e 's/  / /'`\"" -DHOSTNAME=\"`hostname`\"
 
 
