From 820210551ab20e05341c3f80cd5b2fea7103b0b7 Mon Sep 17 00:00:00 2001
From: Brendan Long <self@brendanlong.com>
Date: Tue, 31 Dec 2013 12:52:17 -0600
Subject: [PATCH] Define disabled feature macros as 0 instead of undefined.

This prevents false positives with gcc's -Wundef.
---
 build/configure.ac.features | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/build/configure.ac.features b/build/configure.ac.features
index e4a2aaf..e37dd35 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -257,9 +257,11 @@ CAIRO_CONFIG_COMMANDS([src/cairo-features.h],
 		echo "#define $FEATURE 1"
 	done | LANG=C sort
 	echo ''
-	for FEATURE in $CAIRO_NO_FEATURES; do
-		echo "/*#undef $FEATURE */"
-	done | LANG=C sort
+	for FEATURE in `echo $CAIRO_NO_FEATURES | tr " " "\n" | LANG=C sort`; do
+		echo "#ifndef $FEATURE"
+		echo "#define $FEATURE 0"
+		echo "#endif"
+	done
 	echo ''
 	echo '#endif'
 ],[dnl
-- 
1.8.4.2

