X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=4e186d471ac4bd0f83efe85892401ae9292c3038;hp=b085af884047557f49dc0000814978ccefe9e83b;hb=HEAD;hpb=da1e97c944bb51fa96e89235240bc8bc8b02eeb4 diff --git a/configure.ac b/configure.ac index b085af884..0a4d726d7 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,7 @@ AS_IF([test "x$enable_Werror" = "xyes"], [ AC_PROG_GREP AC_PROG_MAKE_SET AC_PROG_SED +AC_PROG_MKDIR_P AC_PATH_PROG([report_fold], [fold]) LT_INIT @@ -316,7 +317,7 @@ AC_CHECK_FUNCS([ \ strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \ strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \ sched_getcpu sysconf sync_file_range getrandom posix_fadvise \ - arc4random + arc4random flock ]) # Check for pthread_setname_np and pthread_getname_np @@ -755,6 +756,31 @@ if test "x$test_java_agent_jul" = "xyes" || test "x$test_java_agent_log4j" = "xy fi fi +# API documentation using Doxygen +AC_ARG_ENABLE([api-doc], [ + AS_HELP_STRING([--enable-api-doc], [build HTML API documentation]) +], [api_doc=$enableval], [api_doc=no]) + +AS_IF([test "x$api_doc" = xyes], [ + DX_DOXYGEN_FEATURE(ON) + DX_DOT_FEATURE(OFF) + DX_HTML_FEATURE(ON) + DX_CHM_FEATURE(OFF) + DX_CHI_FEATURE(OFF) + DX_MAN_FEATURE(OFF) + DX_RTF_FEATURE(OFF) + DX_XML_FEATURE(OFF) + DX_PDF_FEATURE(OFF) + DX_PS_FEATURE(OFF) + DX_INIT_DOXYGEN(["LTTng control library"], [$(builddir)/Doxyfile], [output]) + + AS_IF([test -z "$DX_DOXYGEN"], [ + AC_MSG_ERROR([You need Doxygen to build the liblttng-ctl API documentation]) + ]) +]) + +AM_CONDITIONAL([API_DOC], [test "x$api_doc" = xyes]) + # enable building man pages (user's intention) AC_ARG_ENABLE( man-pages, @@ -953,6 +979,9 @@ AS_IF([test "$test_sdt_uprobe" = "autodetect"], [ AM_CONDITIONAL([TEST_SDT_UPROBE], [test "$test_sdt_uprobe" = "yes"]) +AC_ARG_ENABLE([lib-lttng-ctl], AS_HELP_STRING([--disable-lib-lttng-ctl], + [Disable the build of liblttng-ctl (only possible if no binaries that depend on it are built)])) + # Arguments for binaries build exclusion AC_ARG_ENABLE([bin-lttng], AS_HELP_STRING([--disable-bin-lttng],[Disable the build of lttng binaries])) AC_ARG_ENABLE([bin-lttng-consumerd], AS_HELP_STRING([--disable-bin-lttng-consumerd], @@ -1023,11 +1052,23 @@ AS_IF([test x$enable_bin_lttng_sessiond != xno], ) # Libraries dependencies enabling +# If we want to build liblttng-ctl +AS_IF([test x$enable_lib_lttng_ctl != xno], + [ + build_lib_lttng_ctl=yes + ] +) +# If we need to build liblttng-ctl because a binary depends on it AS_IF([test x$build_lib_lttng_ctl = xyes], [ build_lib_sessiond_comm=yes ] ) +# Fail if we didn't want to build liblttng-ctl but need to build it anyway +AS_IF([test "x$build_lib_lttng_ctl" = "xyes" -a "x$enable_lib_lttng_ctl" = "xno"],[ + AC_MSG_FAILURE( + [liblttng-ctl must be built, because at least one binary that depends on it is enabled]) +]) AS_IF([test x$build_lib_consumer = xyes], [ @@ -1124,6 +1165,13 @@ test "x$enable_bin_lttng_sessiond" != "xno"], ) AM_CONDITIONAL([BUILD_TESTS], [test x$build_tests = xyes]) + +AS_IF([test "x$build_tests" = "xyes"], + [ + PKG_CHECK_MODULES([babeltrace2], [babeltrace2]) + ] +) + AM_CONDITIONAL([BUILD_EXTRAS], [test x$enable_extras != xno]) # Export libraries build conditions. @@ -1181,6 +1229,9 @@ AC_SUBST(lttnglibexecdir) AC_CONFIG_FILES([ Makefile doc/Makefile + doc/api/Makefile + doc/api/liblttng-ctl/Doxyfile + doc/api/liblttng-ctl/Makefile doc/examples/Makefile doc/examples/rotation/Makefile doc/examples/trigger-condition-event-matches/Makefile @@ -1275,9 +1326,13 @@ AC_CONFIG_FILES([ tests/unit/ini_config/Makefile tests/perf/Makefile tests/utils/Makefile + tests/utils/bt2_plugins/Makefile + tests/utils/bt2_plugins/event_name/Makefile + tests/utils/bt2_plugins/field_stats/Makefile tests/utils/lttngtest/Makefile tests/utils/tap/Makefile tests/utils/testapp/Makefile + tests/utils/testapp/gen-data-pending/Makefile tests/utils/testapp/gen-ns-events/Makefile tests/utils/testapp/gen-kernel-test-events/Makefile tests/utils/testapp/gen-py-events/Makefile @@ -1346,6 +1401,13 @@ PPRINT_PROP_BOOL([libkmod support], $value) test "x$with_lttng_ust" = "xyes" && value=1 || value=0 PPRINT_PROP_BOOL([LTTng-UST support], $value) +AS_ECHO +PPRINT_SUBTITLE([Libraries]) + +# liblttng-ctl enabled/disabled +test x$build_lib_lttng_ctl != xno && value=1 || value=0 +PPRINT_PROP_BOOL([liblttng-ctl], $value) + AS_ECHO PPRINT_SUBTITLE([Binaries]) @@ -1432,6 +1494,9 @@ m4_popdef([build_man_pages_msg]) test "x$embedded_help" = xyes && value=1 || value=0 PPRINT_PROP_BOOL([Embed --help messages], $value, $PPRINT_COLOR_SUBTITLE) +test "x$api_doc" = xyes && value=1 || value=0 +PPRINT_PROP_BOOL([liblttng-ctl HTML API documentation], $value, $PPRINT_COLOR_SUBTITLE) + PPRINT_SET_INDENT(1) report_bindir="`eval eval echo $bindir`"