summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-03-23 22:45:59 +0100
committerRichard Braun <rbraun@sceen.net>2017-03-23 23:00:27 +0100
commit5c5efc7d176a08a3486811f3a3a9c37e21e7a67d (patch)
treea37a01d3b0009691dafc47f9a2ab4578a1080746 /tools
parentd7130c4ea367ed0ee560df6c0095d57ad7ccf0e0 (diff)
Make the build system handle Asciidoc documentation
Asciidoc was selected because of its text-based lightweight markup nature, its extensibility and configurability, and the range of available output formats. Most importantly, it's an acceptable way to write Unix man pages and guides. Despite the surprising lack of pre-existing autotools support, it was quite easy to implement correctly.
Diffstat (limited to 'tools')
-rw-r--r--tools/m4/ax_check_a2x.m45
-rw-r--r--tools/m4/ax_check_asciidoc.m45
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/m4/ax_check_a2x.m4 b/tools/m4/ax_check_a2x.m4
new file mode 100644
index 00000000..438e2478
--- /dev/null
+++ b/tools/m4/ax_check_a2x.m4
@@ -0,0 +1,5 @@
+AC_DEFUN([AX_CHECK_A2X],
+ [AC_ARG_VAR([A2X], [path to a2x command])
+ AC_CHECK_PROG([A2X], [a2x], [a2x])
+ AS_IF([test x"$A2X" = x], [$1])
+ AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != x])])
diff --git a/tools/m4/ax_check_asciidoc.m4 b/tools/m4/ax_check_asciidoc.m4
new file mode 100644
index 00000000..5f6132ac
--- /dev/null
+++ b/tools/m4/ax_check_asciidoc.m4
@@ -0,0 +1,5 @@
+AC_DEFUN([AX_CHECK_ASCIIDOC],
+ [AC_ARG_VAR([ASCIIDOC], [path to asciidoc command])
+ AC_CHECK_PROG([ASCIIDOC], [asciidoc], [asciidoc])
+ AS_IF([test x"$ASCIIDOC" = x], [$1])
+ AM_CONDITIONAL([HAVE_ASCIIDOC], [test x"$ASCIIDOC" != x])])