Reported by Michel Boaventura <michel@michelboaventura.com>.
* libxml2 (http://xmlsoft.org/).
+Installing the following packages will allow your PSPP binary to write
+OpenDocument text (ODT) files:
+
+ * libxml2 (http://xmlsoft.org/).
+
The following packages are optional.
* libncurses (http://www.gnu.org/software/ncurses/). Without it,
PSPP development is ongoing. It already supports a large subset of
SPSS's syntax. Its statistical procedure support is currently
limited, but growing. At your option, PSPP will produce statistical
-reports in ASCII, PostScript, PDF, HTML, or SVG formats.
+reports in ASCII, PostScript, PDF, HTML, SVG, or OpenDocument formats.
Instructions for PSPP installation are in INSTALL, including a list of
prerequisite packages and other PSPP-specific information. Full
fi
AM_CONDITIONAL(PSQL_SUPPORT, test -n "$PG_CONFIG")
-dnl Checks needed for Gnumeric reader
-gnm_support=yes;
-PKG_CHECK_MODULES(LIBXML2, libxml-2.0,,
- [PSPP_OPTIONAL_PREREQ([libxml2]); gnm_support=no;]);
-AC_SEARCH_LIBS(gzopen,z,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
-AC_CHECK_HEADERS(zlib.h,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
-
-if test x"$gnm_support" = x"yes" ; then
- AC_DEFINE([GNM_SUPPORT], 1,
- [Define to 1 if building in support for reading Gnumeric files.])
+dnl Check for libxml2
+PKG_CHECK_MODULES(
+ [LIBXML2], [libxml-2.0],
+ [HAVE_LIBXML2=yes],
+ [HAVE_LIBXML2=no
+ PSPP_OPTIONAL_PREREQ([libxml2])])
+
+dnl Check for zlib.
+AC_SEARCH_LIBS(
+ [gzopen], [z],
+ [HAVE_ZLIB=yes],
+ [HAVE_ZLIB=no
+ PSPP_OPTIONAL_PREREQ([zlib])])
+AC_CHECK_HEADERS(
+ [zlib.h],
+ [],
+ [HAVE_ZLIB=no
+ PSPP_OPTIONAL_PREREQ([zlib])])
+
+dnl Gnumeric support requires libxml2 and zlib.
+if test $HAVE_LIBXML2 = yes && test $HAVE_ZLIB = yes; then
+ GNM_SUPPORT=yes
+ AC_DEFINE(
+ [GNM_SUPPORT], [1],
+ [Define to 1 if building in support for reading Gnumeric files.])
+else
+ GNM_SUPPORT=no
fi
-AM_CONDITIONAL(GNM_SUPPORT, test x"$gnm_support" = x"yes")
+AM_CONDITIONAL([GNM_SUPPORT], [test $GNM_SUPPORT = yes])
+
+dnl ODT support requires libxml2.
+if test $HAVE_LIBXML2 = yes; then
+ AC_DEFINE(
+ [ODT_SUPPORT], [1],
+ [Define to 1 if building in support for writing ODT files.])
+fi
+AM_CONDITIONAL([ODT_SUPPORT], [test $HAVE_LIBXML2 = yes])
AC_ARG_WITH(
gui_tools,
@option{-o @var{file}} on the PSPP command line. If @var{file} does
not end in @file{.odt}, you must also specify @option{-O format=odt}.
+ODT support is only available if your installation of PSPP was
+compiled with the libxml2 library.
+
The OpenDocument output format does not have any configurable options.
@node Comma-Separated Value Output Options
src/output/message-item.h \
src/output/msglog.c \
src/output/msglog.h \
- src/output/odt.c \
src/output/options.c \
src/output/options.h \
src/output/output-item-provider.h \
src/output/charts/roc-chart-cairo.c \
src/output/charts/scree-cairo.c
endif
+if ODT_SUPPORT
+src_output_liboutput_la_SOURCES += src/output/odt.c
+endif
EXTRA_DIST += src/output/OChangeLog
extern const struct output_driver_factory txt_driver_factory;
extern const struct output_driver_factory list_driver_factory;
extern const struct output_driver_factory html_driver_factory;
-extern const struct output_driver_factory odt_driver_factory;
extern const struct output_driver_factory csv_driver_factory;
+#ifdef ODT_SUPPORT
+extern const struct output_driver_factory odt_driver_factory;
+#endif
#ifdef HAVE_CAIRO
extern const struct output_driver_factory pdf_driver_factory;
extern const struct output_driver_factory ps_driver_factory;
&txt_driver_factory,
&list_driver_factory,
&html_driver_factory,
- &odt_driver_factory,
&csv_driver_factory,
+#ifdef ODT_SUPPORT
+ &odt_driver_factory,
+#endif
#ifdef HAVE_CAIRO
&pdf_driver_factory,
&ps_driver_factory,