From 13e064e4e16aeae9479e1002c3e3fa1ba2cf303c Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 17 May 2013 21:38:51 +0900 Subject: [PATCH] Add code to detect rst2html.py or rst2html --- Makefile.am | 11 ++++++++--- configure.ac | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5f91757d..da7ec3e7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,18 @@ SUBDIRS = po intl lib deps src doc test ACLOCAL_AMFLAGS = -I m4 --install +RST2HTML = @RST2HTML@ EXTRA_DIST = config.rpath mingw-config android-config android-make\ build_osx_release.sh -dist_doc_DATA = README README.rst README.html +dist_doc_DATA = README README.rst + +if HAVE_RST2HTML +dist_doc_DATA += README.html +README.html: README.rst + $(RST2HTML) README.rst > README.html +endif # HAVE_RST2HTML dist_noinst_DATA = LICENSE.OpenSSL -README.html: README.rst - rst2html README.rst > README.html diff --git a/configure.ac b/configure.ac index b0c22b11..fd95e3c0 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,10 @@ AC_PATH_PROG([ASCIIDOC], [asciidoc]) AC_SUBST([ASCIIDOC]) AM_CONDITIONAL([HAVE_ASCIIDOC], [ test "x$ASCIIDOC" != "x" ]) +AC_PATH_PROGS([RST2HTML], [rst2html.py rst2html]) +AC_SUBST([RST2HTML]) +AM_CONDITIONAL([HAVE_RST2HTML], [ test "x$RST2HTML" != "x" ]) + # Setting language choice AC_LANG([C++])