diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-08-08 15:57:50 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-08-08 15:57:50 +0200 |
commit | c6cc345552c504dbfe23837e80464fb094370aab (patch) | |
tree | fb391fa92f43b77ee938e07cad29666862174966 /m4/zp_lynx_doc.m4 | |
parent | 6f7e9419e480d068861a9dc4ff0c8d92c8621774 (diff) |
Make use of common ZP_LYNX_DOC macro.
Instead of reproducing the same code on each configure.ac use the
common macro.
Diffstat (limited to 'm4/zp_lynx_doc.m4')
-rw-r--r-- | m4/zp_lynx_doc.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/zp_lynx_doc.m4 b/m4/zp_lynx_doc.m4 new file mode 100644 index 0000000..955a6ca --- /dev/null +++ b/m4/zp_lynx_doc.m4 @@ -0,0 +1,24 @@ +dnl Macro for enabling LYNX-based documentation generation + +AC_DEFUN([ZP_LYNX_DOC], [ + AC_ARG_ENABLE(lynx, + AS_HELP_STRING([--disable-lynx], + [Turn off lynx usage for documentation generation]),, + [enable_lynx=yes]) + + case "${enable_lynx}" in + yes) + AC_CHECK_PROG(have_lynx, lynx, yes, no) + + if test x$have_lynx = xno ; then + AC_MSG_WARN([*** lynx not found, plain text README will not be built ***]) + fi + ;; + no) + have_lynx=no ;; + *) + AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;; + esac + + AM_CONDITIONAL([USE_LYNX], [test "x$have_lynx" = xyes]) +]) |