From 1607db3c936327386977be54ccfe71e56f15dbcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?=
 <sebastien.villemot@sciencespo.fr>
Date: Wed, 28 Jun 2017 16:55:56 +0200
Subject: [PATCH] Drop texi2html requirement (obsolete software), use texi2any
 instead.

(cherry picked from commit 1270f1243961487693882af81e7a394e47fee9ca)
---
 README.md       | 6 +++---
 configure.ac    | 7 ++-----
 doc/Makefile.am | 5 +----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 0a19dc997..9d8ce9ff0 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,7 @@ A number of tools and libraries are needed in order to recompile everything. You
   - [Beamer](http://latex-beamer.sourceforge.net/) (for some PDF presentations)
 - For building the reference manual:
   - [GNU Texinfo](http://www.gnu.org/software/texinfo/)
-  - [Texi2HTML](http://www.nongnu.org/texi2html) and [Latex2HTML](http://www.latex2html.org), if you want nice mathematical formulas in HTML output
+  - [Latex2HTML](http://www.latex2html.org), if you want nice mathematical formulas in HTML output
   - [Doxygen](http://www.stack.nl/%7Edimitri/doxygen/) (if you want to build Dynare preprocessor source documentation)
 - For Octave, the development libraries corresponding to the UMFPACK packaged with Octave
 
@@ -237,7 +237,7 @@ Alternatively, if you want to build everything, manually install the following p
 - `texlive-fonts-extra` (for ccicons)
 - `latex-beamer`
 - `texinfo`
-- `texi2html`, `latex2html`
+- `latex2html`
 - `doxygen`
 
 ## Fedora
@@ -253,7 +253,7 @@ Alternatively, if you want to build everything, manually install the following p
 - `automake`
 - `texlive`
 - `texinfo`
-- `texi2html`, `latex2html`
+- `latex2html`
 - `doxygen`
 
 ## Windows
diff --git a/configure.ac b/configure.ac
index 92573bf2e..8c3c4cd1a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -113,9 +113,6 @@ AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
 AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
 AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])
 
-AC_CHECK_PROG([TEXI2HTML], [texi2html], [texi2html])
-AM_CONDITIONAL([HAVE_TEXI2HTML], [test "x$TEXI2HTML" != "x"])
-
 AC_CHECK_PROG([LATEX2HTML], [latex2html], [latex2html])
 AM_CONDITIONAL([HAVE_LATEX2HTML], [test "x$LATEX2HTML" != "x"])
 
@@ -274,10 +271,10 @@ fi
 
 if test "x$MAKEINFO" != "x"; then
   BUILD_DYNARE_INFO="yes"
-  if test "x$TEXI2HTML" != "x" -a "x$LATEX2HTML" != "x"; then
+  if test "x$LATEX2HTML" != "x"; then
     BUILD_DYNARE_HTML_MANUAL="yes"
   else
-    BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing texi2html or latex2html)"
+    BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing latex2html)"
   fi
   BUILD_DYNARE_PDF_MANUAL="yes"
 else
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6eb8fdcc2..ce992bca2 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,15 +2,12 @@ SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa dseries-a
 
 info_TEXINFOS = dynare.texi
 
-if HAVE_TEXI2HTML
 if HAVE_LATEX2HTML
 html-local: dynare.html
 
 dynare.html: dynare.texi
 	rm -rf dynare.html
-	mkdir -p dynare.html
-	cd dynare.html && $(TEXI2HTML) --l2h --split section --prefix index ../dynare.texi
-endif
+	texi2any --html --split=section -c L2H=1 -c PREFIX=dynare.html dynare.texi
 endif
 
 PDF_TARGETS =
-- 
GitLab