summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 14:12:19 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-08-07 14:12:19 +0200
commit94c9da418edbe13963dcc5b604532e3718da233c (patch)
tree589fad43036d2b81a21f52e75160533aa4b405ec
parent8bb8c84d624edd100dbd37d5e22721aca8c08dfa (diff)
Split out the lynx documentation generation autoconf code to an m4 macro.
As many 0pointer projects use the same code, move it out on its own macro, and use that. The macro can then be shared across projects.
-rw-r--r--configure.ac19
-rw-r--r--m4/zp_lynx_doc.m424
2 files changed, 25 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 1a62085..0bd7ffb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,24 +74,7 @@ AC_TYPE_SIZE_T
AC_SYS_LARGEFILE
-# LYNX documentation generation
-AC_ARG_ENABLE(lynx,
- AS_HELP_STRING([--disable-lynx],[Turn off lynx usage for documentation generation]),
-[case "${enableval}" in
- yes) lynx=yes ;;
- no) lynx=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
-esac],[lynx=yes])
-
-if test x$lynx = xyes ; then
- 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
-fi
-
-AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
+ZP_LYNX_DOC
AC_ARG_ENABLE(examples,
AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
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])
+])