X-Git-Url: https://git.draconx.ca/gitweb/rarpd-dx.git/blobdiff_plain/97a182920cd28f822aa3fcdd74ace01cf7b0a495..5194bc4801cbd0626e868107cc28e955cd1cbf92:/m4/xsltproc.m4
diff --git a/m4/xsltproc.m4 b/m4/xsltproc.m4
new file mode 100644
index 0000000..2e0dbe4
--- /dev/null
+++ b/m4/xsltproc.m4
@@ -0,0 +1,33 @@
+dnl Copyright © 2023 Nick Bowler
+dnl
+dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+dnl This is free software: you are free to do what the fuck you want to.
+dnl There is NO WARRANTY, to the extent permitted by law.
+
+dnl CHECK_XSLTPROC
+dnl
+dnl Check whether xsltproc can be run to compile the rarpd man page.
+dnl
+dnl If found, sets XSLTPROC and the cache variable dx_cv_xsltproc_works=yes
+AC_DEFUN([CHECK_XSLTPROC],
+[AC_CHECK_PROGS([XSLTPROC], [xsltproc], [not found])
+AS_IF([test x"$XSLTPROC" != x"not found"],
+ [AC_CACHE_CHECK([whether $XSLTPROC works], [dx_cv_xsltproc_works],
+[dx_cv_xsltproc_works=no
+cat >conftest.xsl <<'EOF'
+
+
+
+
+hello
+
+EOF
+cat >conftest.xml <<'EOF'
+
+
+EOF
+$XSLTPROC --nonet conftest.xsl conftest.xml >conftest.out 2>&AS_MESSAGE_LOG_FD &&
+ { read var