From 008559fa85b489bbc27f970f95d51e8781ace8a1 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 1 Sep 2015 01:39:13 -0400 Subject: [PATCH] configure.ac: check for asciidoc and xmlto MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit asciidoc and xmlto are now needed to build the lttng(1) man pages from AsciiDoc sources. This is only checked if the --enable-build-man-pages is passed to ./configure; otherwise, the man pages are still installed if their troff version exists, which should always be the case in tarball distributions so that the user does not need asciidoc and xmlto. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- configure.ac | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4e5e4f222..fd65ba234 100644 --- a/configure.ac +++ b/configure.ac @@ -488,6 +488,35 @@ if test "x$test_java_agent_jul" = "xyes" || test "x$test_java_agent_log4j" = "xy fi fi +# set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file +# is not distributed in tarballs +AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no]) +AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"]) + +# enable building man pages +AC_ARG_ENABLE( + build-man-pages, + AS_HELP_STRING( + [--enable-build-man-pages], + [Build man pages (already built in a distributed tarball)] + ), + [enable_build_man_pages=yes], + [enable_build_man_pages=no] +) + +# export man page build condition +AM_CONDITIONAL([BUILD_MAN_PAGES], [test "x$enable_build_man_pages" != "xno"]) + +# check for asciidoc and xmlto if we enabled building the man pages +AS_IF([test "x$enable_build_man_pages" = "xyes"], [ + AC_PATH_PROG([ASCIIDOC], [asciidoc], [no]) + AC_PATH_PROG([XMLTO], [xmlto], [no]) + + AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [ + AC_MSG_ERROR([Both asciidoc and xmlto are needed to build the LTTng man pages.]) + ]) +]) + # Python agent test UST_PYTHON_AGENT="lttngust" @@ -995,6 +1024,8 @@ AS_IF([test ! -z "$PYTHON3_AGENT"],[ AS_ECHO("Disabled") ]) +AS_ECHO() + #Python binding enabled/disabled AS_ECHO_N("Python binding: ") AS_IF([test "x${enable_python_binding:-yes}" = xyes], [ @@ -1003,8 +1034,31 @@ AS_IF([test "x${enable_python_binding:-yes}" = xyes], [ AS_ECHO("Disabled") ]) -# If we build the sessiond, print the paths it will use AS_ECHO() + +# man pages build enabled/disabled +AS_ECHO_N("Build man pages: ") +AS_IF([test "x$enable_build_man_pages" = "xyes"], [ + AS_ECHO("Yes") +], [ + AS_IF([test "x$in_git_repo" = "xyes"], [ + AS_ECHO("No") + ], [ + AS_ECHO("Already built") + ]) +]) + +# man pages install enabled/disabled (always true in tarball) +AS_ECHO_N("Install man pages: ") +AS_IF([test "x$enable_build_man_pages" = "xno" && test "x$in_git_repo" = "xyes"], [ + AS_ECHO("No") +], [ + AS_ECHO("Yes") +]) + +AS_ECHO() + +# If we build the sessiond, print the paths it will use AS_ECHO_N("The lttng command will search for the lttng-sessiond executable at: ") AS_IF([test "$SESSIOND_BIN" = ""],[ AS_ECHO_N("`eval eval echo $bindir`") -- 2.34.1