diff --git a/Makefile.am b/Makefile.am index ff72ec68..15e64a06 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,11 +159,13 @@ awesome_message_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) if HAVE_XMLTO if HAVE_ASCIIDOC +if XMLTO_MAN_WORKS man_MANS += awesome.1 man_MANS += awesome-client.1 man_MANS += awesomerc.1 endif endif +endif EXTRA_DIST += awesome.1.txt EXTRA_DIST += awesome-client.1.txt diff --git a/configure.ac b/configure.ac index 36b352ec..5c9d947a 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,44 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$ASCIIDOC" != "x:"]) AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x:"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x:"]) +xmlto_man_works=no +if test ="x$XMLTO" != "x:"; then dnl try generating an example man page + rm -f conf-example.1 + cat>conf-example.1.xml< + + + +conf-example +1 + + +conf-example +'configure' time test for working 'xmlto man' + + +foo + + +DESCRIPTION +bar + + +MANEOF + AC_MSG_CHECKING([whether xmlto can create a man page]) + if ${XMLTO} man conf-example.1.xml >/dev/null 2>&1 && test -s conf-example.1; then + xmlto_man_works=yes + AC_MSG_RESULT([yes]) + rm -f conf-example.1 conf-example.1.xml + else + AC_MSG_RESULT([no]) + AC_MSG_WARN([awesome man page generation requires 'xmlto man', but it does not work. +Do you need to (properly) install http://docbook.sourceforge.net/projects/xsl/?]) + fi +fi +AM_CONDITIONAL([XMLTO_MAN_WORKS], [test "x$xmlto_man_works" = "xyes"]) + AM_CONDITIONAL([USING_GCC], [test "x$GCC" = "xyes"]) AC_CANONICAL_HOST