summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-09-08 12:42:51 +0200
committerArthur de Jong <arthur@arthurdejong.org>2013-09-08 12:43:17 +0200
commit58d50bf0b3c3d0a29941eb5473a9b3cfbb7d6f35 (patch)
treecf8bd9e260d149dceb6495c564bcee4d428fbd31 /configure.ac
parentce95b418bd1454a078ab1e659d8382b9298c051c (diff)
Add configure check to see whether to install manual pages
This also reworks the manual page generation check in the configure script and avoids build errors if no tool for generating manual pages is present when working on a Git checkout.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 24 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 56d02ae..c51c770 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,12 +63,33 @@ AC_PROG_LN_S
AM_PROG_AR
# checks for tool to convert docbook to man
+genman="no"
AC_PATH_PROGS(DOCBOOK2X_MAN, docbook2x-man)
-if test "x${DOCBOOK2X_MAN}" = x
+AC_MSG_CHECKING([for tool to (re)generate man pages])
+if test "x${DOCBOOK2X_MAN}" != x
then
- AC_MSG_WARN([docbook2x-man not found: not generating man pages])
+ genman="${DOCBOOK2X_MAN}"
+fi
+AC_MSG_RESULT($genman)
+AM_CONDITIONAL([GENMAN], [test "x${genman}" != "xno"])
+if test "x${genman}" = "xno"
+then
+ AC_MSG_WARN([docbook2x-man not found: not (re)generating man pages])
+fi
+
+# check whether to install manual pages
+AC_MSG_CHECKING([whether to install man pages])
+instman="no"
+if [test "x${genman}" != "xno" || ls "${srcdir}/man/"*.? > /dev/null 2>&1]
+then
+ instman="yes"
+fi
+AC_MSG_RESULT($instman)
+AM_CONDITIONAL([INSTMAN], [test "x${instman}" != "xno"])
+if test "x${instman}" = "xno"
+then
+ AC_MSG_WARN([not installing man pages (no generator and not pre-generated)])
fi
-AM_CONDITIONAL([GENMAN], [test "x${DOCBOOK2X_MAN}" != x])
# check for Python and modules
AM_PATH_PYTHON(2.5,, [:])