output: Use macro HAVE_CHARTS instead of NO_CHARTS.
authorBen Pfaff <blp@gnu.org>
Thu, 9 Jul 2009 04:52:06 +0000 (21:52 -0700)
committerBen Pfaff <blp@gnu.org>
Wed, 22 Jul 2009 04:16:31 +0000 (21:16 -0700)
Double negatives make my brain hurt, so don't use them.

src/output/chart.h
src/output/charts/automake.mk
src/output/charts/dummy-chart.c

index 93762dbd4fb311df363d56d40cb23b583879806f..fea64edfca33ce428c0f534b1ca5aabfec9159ce 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef OUTPUT_CHART_H
 #define OUTPUT_CHART_H 1
 
-#ifndef NO_CHARTS
+#ifdef HAVE_CHARTS
 #include <stdio.h>              /* Required by <plot.h>. */
 #include <plot.h>
 #endif
index 7be5705c4fe7995cc586d9eba12f824075f74079..37901171813c41ac894fb528f91c54b7dcb1989b 100644 (file)
@@ -21,14 +21,12 @@ src_output_charts_libcharts_la_SOURCES = \
        $(chart_sources)
 
 EXTRA_DIST += src/output/charts/dummy-chart.c
+AM_CPPFLAGS += -DHAVE_CHARTS=1
 else
 src_output_charts_libcharts_la_SOURCES =  \
        src/output/charts/dummy-chart.c
 
 EXTRA_DIST += $(chart_sources)
-
-AM_CPPFLAGS += -DNO_CHARTS
-
 endif
 
 EXTRA_DIST += src/output/charts/OChangeLog
index b859d0e01be0588019bacb022e18afbca8adb313..aab8026cd10714d154e334f20424b100a9d860d0 100644 (file)
@@ -28,7 +28,7 @@
 #include <gsl/gsl_histogram.h>
 #include <libpspp/compiler.h>
 
-#ifndef NO_CHARTS
+#ifdef HAVE_CHARTS
 #error This file should be used only when compiling without charts.
 #endif