Make CPPFLAGS variables, as well as CFLAGS and LDFLAGS
[ghc.git] / configure.ac
index 28a5875..e89a2fe 100644 (file)
@@ -530,11 +530,11 @@ dnl     If gcc, make sure it's at least 2.1
 dnl
 FP_HAVE_GCC
 
-FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS])
-FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_LD_OPTS_STAGE0])
-FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_LD_OPTS_STAGE1])
+FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[CPPFLAGS])
+FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_LD_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])
+FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_LD_OPTS_STAGE1],[CONF_CPP_OPTS_STAGE1])
 # Stage 3 won't be supported by cross-compilation
-FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_LD_OPTS_STAGE2])
+FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_LD_OPTS_STAGE2],[CONF_CPP_OPTS_STAGE2])
 
 FP_GCC_EXTRA_FLAGS
 
@@ -547,6 +547,9 @@ AC_SUBST(CONF_CC_OPTS_STAGE2)
 AC_SUBST(CONF_LD_OPTS_STAGE0)
 AC_SUBST(CONF_LD_OPTS_STAGE1)
 AC_SUBST(CONF_LD_OPTS_STAGE2)
+AC_SUBST(CONF_CPP_OPTS_STAGE0)
+AC_SUBST(CONF_CPP_OPTS_STAGE1)
+AC_SUBST(CONF_CPP_OPTS_STAGE2)
 
 dnl ** figure out how to do context diffs
 FP_PROG_CONTEXT_DIFF