From 141eefdbb69e32a6d39653dcdc70ba31f63e3871 Mon Sep 17 00:00:00 2001 From: Carsten Schoenert Date: Fri, 19 Jun 2015 19:21:05 +0200 Subject: [PATCH] a2x: adding a check for needed helper The previous commit added some asciidoc based man pages that need a2x from the asciidoc package. To ensure the build will not break due a not available a2x binary we better check before. --- configure.ac | 6 ++++++ examples/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cbb2cf88..46598bd5 100644 --- a/configure.ac +++ b/configure.ac @@ -236,6 +236,11 @@ AC_ARG_ENABLE([examples], [build_examples="yes"]) if test "x$build_examples" = "xyes"; then + AC_PATH_PROG([A2X], [a2x]) + if test "x$A2X" = "x"; then + AC_MSG_WARN([==> You want to build the examples binaries, that is also including the respective manpages but a2x was not found!]) + AC_MSG_ERROR([==> Install the package that contains the a2x binary or disable the build of the examples using --disable-examples.]) + fi BUILD_EXAMPLES="YES" fi AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$build_examples" != "x"]) @@ -372,4 +377,5 @@ else fi if test "x$build_examples" = "xyes"; then AC_MSG_RESULT([ build examples : "yes"]) + AC_MSG_RESULT([ --> a2x around : "yes" ($A2X)]) fi diff --git a/examples/Makefile.am b/examples/Makefile.am index 3df63f17..240b83ee 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -33,7 +33,7 @@ MAN5 = $(TXT5:%.txt=%.5) man5_MANS = $(MAN5) .txt.5: - a2x --doctype manpage --format manpage $< + $(A2X) --doctype manpage --format manpage $< CLEANFILES = *.5