aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrian Nord <NightNord@gmail.com>2009-11-04 14:03:44 +0100
committerDaniel Lezcano <dlezcano@fr.ibm.com>2009-11-04 14:03:44 +0100
commit5c8f9bd849ffe4aec6510c3ae531571f2397b908 (patch)
treec6f8c99b9db57a007557118f61d07db7666a36e1
parentlxc /cgroup/name/ not removed at container end (diff)
downloadlxc-5c8f9bd849ffe4aec6510c3ae531571f2397b908.tar.gz
lxc-5c8f9bd849ffe4aec6510c3ae531571f2397b908.tar.bz2
lxc-5c8f9bd849ffe4aec6510c3ae531571f2397b908.zip
configure.ac - allow user to switch off/on documentation generation
Andrian Nord <NightNord@gmail.com>: >> > > As documentation requires docbook2man to be installed, which is not, >> > > otherwise, required for proper LXC work or compilation process, it >> > > might be usefull to be able to switch it off. Michel Normand <normand@fr.ibm.com>: > > For me, it is Ok to add a --enable/disable/-doc, > > but not make configure to fail if no option specified > > and no docbook2man package. > > > > For me it should be optionnal. > > I like the current behaviour where configure is running without option > > and is enabling/disabling by itself the doc building. > > Could you send a new patch with this idea ? Andrian Nord <NightNord@gmail.com>: Of course. You mean, that you what default behaviour to remain auto-detection? That is: --enable-doc: require docbook2man or fail, generate mans --enable-doc=auto, or not specified (default): check for docbook2man, generate mans if found, silently ignore if not found (I suppose diagnostic message is redundant, as information already contains into ./configure --help) --disable-doc: never check for docbook2man and don't gen mans Here comes a patch what do this, as far as I see (I'm sorry for violating post-rules in previous mail, now I'll do all right, I hope. Should I attach patch anyway, as it might be usefull for applying?) Signed-off-by: Andrian Nord <NightNord@gmail.com> Acked-by: Michel Normand <normand@fr.ibm.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r--configure.ac28
1 files changed, 14 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index db34876..e44d40a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,8 +11,20 @@ AC_CANONICAL_HOST
AM_PROG_CC_C_O
AC_GNU_SOURCE
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
-AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
-AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
+
+AC_ARG_ENABLE([doc],
+ [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
+ [], [enable_doc=auto])
+
+if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
+ AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
+
+ test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
+ AC_MSG_ERROR([docbook2man required by man request, but not found])
+fi
+
+AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
+
AS_AC_EXPAND(PREFIX, $prefix)
AS_AC_EXPAND(LIBDIR, $libdir)
AS_AC_EXPAND(BINDIR, $bindir)
@@ -108,18 +120,6 @@ AC_CONFIG_FILES([
AC_CONFIG_COMMANDS([default],[[]],[[]])
AC_OUTPUT
-if test "x$DOCBOOK" = "xno"; then
- AC_MSG_NOTICE([
-
-Warning:
---------
-The docbook tool is not installed, the man pages won't be regenerated.
-If you need to update the manpages, install docbook and rerun 'configure'.
-
-])
-
-fi
-
if test "x$SETCAP" = "xno"; then
AC_MSG_NOTICE([