diff --git a/Makefile.am b/Makefile.am index 2209dad..5b5f2e9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,9 +77,11 @@ endif ORG_FILES = \ src/templates_front/templator_front.org \ src/templates_text/templator_text.org \ - src/templates_hdf5/templator_hdf5.org \ trex.org +if HAVE_HDF5 +ORG_FILES += src/templates_hdf5/templator_hdf5.org +endif src_libtrexio_la_SOURCES = $(trexio_h) $(SOURCES) @@ -160,11 +162,13 @@ EXTRA_DIST += $(trexio_scm) HTML_TANGLED = docs/index.html \ docs/examples.html \ - docs/templator_hdf5.html \ docs/trex.html \ docs/README.html \ docs/templator_front.html \ docs/templator_text.html +if HAVE_HDF5 +HTML_TANGLED += docs/templator_hdf5.html +endif htmldir = $(docdir) # This $(htmlizer) file and the corresponding target rule allow to avoid circular dependency, diff --git a/configure.ac b/configure.ac index dede482..376f6c7 100644 --- a/configure.ac +++ b/configure.ac @@ -130,8 +130,7 @@ AC_ARG_WITH([hdf5], AS_HELP_STRING([--with-hdf5=PATH], [Path to HDF5 library and headers]), [ with_hdf5="$withval"], [with_hdf5="yes"]) -AS_IF([test "x$with_hdf5" == "xno"], [ - AC_DEFINE([HAVE_HDF5], 0, [Define to 1 if HDF5 is available]) ], +AS_IF([test "x$with_hdf5" == "xno"], [], [test "x$with_hdf5" != "xyes"], [ HDF5_LIBS="-lhdf5" HDF5_PATH="$with_hdf5"