From: Philippe Proulx Date: Tue, 1 Sep 2015 05:39:13 +0000 (-0400) Subject: configure.ac: check for asciidoc and xmlto X-Git-Tag: v2.8.0-rc1~60 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=008559fa85b489bbc27f970f95d51e8781ace8a1 configure.ac: check for asciidoc and xmlto 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 --- 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`")