aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-04-29 22:50:04 +0100
committerJoão Valverde <j@v6e.pt>2016-05-10 15:15:30 +0000
commite4237b14d038899f15401fbf9ef1bda6dda874f6 (patch)
tree975479b5469550d89937c1ca4cc8106dcbf1bdab /configure.ac
parent1c862d25849de95344cf8eb88c8b811aa414c7a5 (diff)
autotools: docbook build improvements
Let the make recipe fail if a dependency is missing. That is more user-friendly (a2x: command not found) than an empty target and having to re-run configure. Test for both w3m and lynx when generating text files. If neither is available skip it. Add an explicit target to build pdf documentation. Change-Id: I760475acd7278f5ab5a782c1828a134c58cf7b42 Reviewed-on: https://code.wireshark.org/review/15229 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 13 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index 2b16f059d0..d142736925 100644
--- a/configure.ac
+++ b/configure.ac
@@ -726,34 +726,19 @@ AX_LIBSMI
#
# Check for programs used when building DocBook documentation.
#
-
-# Check for a2x (convert asciidoc to another format)
-AC_PATH_PROG(A2X, a2x)
-AC_CHECK_PROG(HAVE_A2X, a2x, "yes", "no")
-AM_CONDITIONAL(HAVE_A2X, test x$HAVE_A2X = xyes)
-
-# Check for fop (translate .fo to e.g. pdf)
-AC_PATH_PROG(FOP, fop)
-AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
-AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
-
-# TODO: HAVE_LYNX and HAVE_W3M are unused. Maybe require one of them
-# to be found when a2x is enabled? Otherwise it will fail later...
-# Check for lynx (asciidoc text format from html)
-AC_PATH_PROG(LYNX, lynx)
-AC_CHECK_PROG(HAVE_LYNX, lynx, "yes", "no")
-AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes)
-
-# Check for w3m (asciidoc text format from html)
-AC_PATH_PROG(W3M, w3m)
-AC_CHECK_PROG(HAVE_W3M, w3m, "yes", "no")
-AM_CONDITIONAL(HAVE_W3M, test x$HAVE_W3M = xyes)
-
-# Check for xsltproc
-AC_PATH_PROG(XSLTPROC, xsltproc)
-AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
-AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
-
+AC_CHECK_PROGS(XSLTPROC, xsltproc, xsltproc)
+AC_CHECK_PROGS(A2X, a2x, a2x)
+AC_CHECK_PROGS(FOP, fop, fop)
+
+# HTML to text processor
+AC_MSG_CHECKING([for an HTML to text processor])
+AS_IF([w3m -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=w3m],
+ [lynx -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=lynx],
+ [have_a2x_text=no])
+AC_MSG_RESULT([$have_a2x_text])
+AM_CONDITIONAL(HAVE_A2X_TEXT, [test "x$have_a2x_text" != xno])
+AS_IF([test $have_a2x_text = lynx], [A2X_LYNX="--lynx"])
+AC_SUBST(A2X_LYNX)
# Check for packaging utilities
# For now, we check to see if the various packaging utilites are in our