configure: don't put cpp flags in CFLAGS
authorJeremy Kerr <jk@ozlabs.org>
Fri, 1 Aug 2014 01:30:52 +0000 (09:30 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 1 Aug 2014 03:23:33 +0000 (11:23 +0800)
-D* should go in CPPFLAGS, not CFLAGS.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
configure.ac

index aae5e08fb285c4f1a392b3ae4bfeff7977a4b235..58aa6cf39017ae73438f901b1addf72ddc1a79e6 100644 (file)
@@ -247,8 +247,14 @@ AC_ARG_ENABLE(
 
 AS_IF(
        [test "x$enable_debug" = "xyes"],
-       [AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O0 -DDEBUG"])],
-       [AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O2 -DNDEBUG"])]
+       [
+               AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O0"])
+               AC_SUBST([DEFAULT_CPPFLAGS], ["-DDEBUG"])
+       ],
+       [
+               AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O2"])
+               AC_SUBST([DEFAULT_CPPFLAGS], ["-DNDEBUG"])
+       ]
 )