From: Pieter Lexis Date: Tue, 20 Jan 2015 07:10:35 +0000 (+0100) Subject: Add optional linkchecker for documentation X-Git-Tag: rec-3.7.0-rc2~49^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b43f4f8a41f0fd0f093e7746c4e83f7bd9b866a0;p=thirdparty%2Fpdns.git Add optional linkchecker for documentation * This allows all internal links (including anchors) in the documentation to be verified. --- diff --git a/configure.ac b/configure.ac index 6604febd71..b1972524dc 100644 --- a/configure.ac +++ b/configure.ac @@ -102,6 +102,7 @@ PDNS_WITH_SQLITE3 PDNS_CHECK_PANDOC PDNS_CHECK_MKDOCS +PDNS_CHECK_LINKCHECKER dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T diff --git a/docs/Makefile.am b/docs/Makefile.am index 5a1a4e1b3d..2af0ddc76e 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -43,6 +43,17 @@ $(MANPAGES_TARGET): exit 1 endif +if HAVE_LINKCHECKER +check-links: html + linkchecker --anchors \ + --ignore-url=.eot$ \ + --ignore-url=\.svg \ + --ignore-url=mailto \ + --ignore-url=.ttf$ \ + --ignore-url=woff$ \ + html/index.html +endif + clean: rm -rf html *.8 *.1 diff --git a/m4/pdns_check_linkchecker.m4 b/m4/pdns_check_linkchecker.m4 new file mode 100644 index 0000000000..38d70c871f --- /dev/null +++ b/m4/pdns_check_linkchecker.m4 @@ -0,0 +1,9 @@ +AC_DEFUN([PDNS_CHECK_LINKCHECKER], [ + AC_CHECK_PROG([LINKCHECKER], [linkchecker], [linkchecker], [no]) + + AS_IF([test "x$LINKCHECKER" = "xno"], [ + AC_MSG_WARN([linkchecker is missing, unable to verify links in the documentation.]) + ]) + AM_CONDITIONAL([HAVE_LINKCHECKER], [test "x$LINKCHECKER" != "xno"]) +]) +