X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=configure.ac;h=09ba4ed071c7aad745ef8169515e15f6cf7db65d;hb=879f9b0aa0c9a8ee31ba47bfaaf6539ef2e349b2;hp=008cd515d59be47bf90dd96b033fab4a797acbec;hpb=ed6dd5d6d9f0ddccd1a09afea5398705bb934048;p=lttng-ust.git diff --git a/configure.ac b/configure.ac index 008cd515..09ba4ed0 100644 --- a/configure.ac +++ b/configure.ac @@ -142,7 +142,6 @@ AC_CHECK_TYPES([ptrdiff_t]) # Find an optional C++11 compiler without GNU extensions (-std=c++11) AX_CXX_COMPILE_STDCXX([11], [noext], [optional]) -AM_CONDITIONAL([HAVE_CXX], [test "$HAVE_CXX11" = "1"]) ## ## @@ -187,10 +186,6 @@ AC_CHECK_PROGS([XMLTO], [xmlto]) AM_PATH_PYTHON([2.7], [], [PYTHON=""]) -AX_PROG_JAVAC -AX_PROG_JAVA -AX_PROG_JAR - # Initialize and configure libtool LT_INIT([disable-static]) @@ -362,8 +357,9 @@ argument to disable NUMA support. # The JNI interface and Java Agents require a working Java JDK AS_IF([AE_IS_FEATURE_ENABLED([jni-interface]) || AE_IS_FEATURE_ENABLED([java-agent-jul]) || AE_IS_FEATURE_ENABLED([java-agent-log4j])], [ - # We detected a java compiler earlier, make sure it works - AX_PROG_JAVAC_WORKS + AX_PROG_JAVAC + AX_PROG_JAVA + AX_PROG_JAR # Get the CPPFLAGS required to build jni libaries AX_JNI_INCLUDE_DIR @@ -449,41 +445,11 @@ a non-standard path to sys/sdt.h ]) -AM_CONDITIONAL([HAVE_CMAKE], [test "x$CMAKE" != "x"]) - -# Configuration options, which will be installed in the config.h -AH_TEMPLATE([LTTNG_UST_HAVE_SDT_INTEGRATION], [SystemTap integration via sdt.h]) - - -AM_CONDITIONAL([ENABLE_UST_DL], [test "x${ac_cv_have_decl_RTLD_DI_LINKMAP}" = "xyes"]) - - -AM_CONDITIONAL([ENABLE_NUMA], [test "x$have_libnuma" = "xyes"]) - -AM_CONDITIONAL([HAVE_PERF_EVENT], [test "x$ac_cv_header_linux_perf_event_h" = "xyes"]) - -AM_CONDITIONAL([ENABLE_JNI_INTERFACE], [test "x$jni_interface" = "xyes"]) -AM_CONDITIONAL([ENABLE_JAVA_AGENT], [test "x$java_agent_jul" = "xyes" || test "x$java_agent_log4j" = "xyes"]) -AM_CONDITIONAL([ENABLE_JAVA_AGENT_WITH_JUL], [test "x$java_agent_jul" = "xyes"]) -AM_CONDITIONAL([ENABLE_JAVA_AGENT_WITH_LOG4J], [test "x$java_agent_log4j" = "xyes"]) - -AM_CONDITIONAL([HAVE_JAVAH], [test "x$JAVAH" != "x"]) - -AM_CONDITIONAL([ENABLE_PYTHON_AGENT], [test "x$python_agent" = "xyes"]) - -AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"], - [LTTng system runtime directory]) - -AM_CONDITIONAL([ENABLE_GEN_TP_EXAMPLES], [test "x$PYTHON" != "x"]) - - -AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" != "xno"]) - -# Export man page build condition: build the man pages if the user -# asked for it, and if the tools are available. -AM_CONDITIONAL([ENABLE_MAN_PAGES], [test "x$man_pages_opt" != "xno"]) -AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"]) +## ## +## Set defines for optional features conditionnals in the source code ## +## ## +AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"], [LTTng system runtime directory]) # Defined in include/lttng/ust-version.h AC_DEFINE([LTTNG_UST_MAJOR_VERSION], ust_version_major, [LTTng UST major version]) @@ -494,6 +460,35 @@ AC_DEFINE([LTTNG_UST_LIB_SONAME_MAJOR], [ust_lib_version_current], [Major SONAME AC_DEFINE([LTTNG_UST_CTL_LIB_SONAME_MAJOR], [ust_ctl_lib_version_current], [Major SONAME number of liblttng-ust-ctl]) +## ## +## Set automake variables for optional feature conditionnals in Makefile.am ## +## ## + +AM_CONDITIONAL([ENABLE_EXAMPLES], AE_IS_FEATURE_ENABLED([examples])) +AM_CONDITIONAL([ENABLE_GEN_TP_EXAMPLES], [test "x$PYTHON" != "x"]) +AM_CONDITIONAL([ENABLE_JAVA_AGENT], AE_IS_FEATURE_ENABLED([java-agent-jul]) || AE_IS_FEATURE_ENABLED([java-agent-log4j])) +AM_CONDITIONAL([ENABLE_JAVA_AGENT_WITH_JUL], AE_IS_FEATURE_ENABLED([java-agent-jul])) +AM_CONDITIONAL([ENABLE_JAVA_AGENT_WITH_LOG4J], AE_IS_FEATURE_ENABLED([java-agent-log4j])) +AM_CONDITIONAL([ENABLE_JNI_INTERFACE], AE_IS_FEATURE_ENABLED([jni-interface])) +AM_CONDITIONAL([ENABLE_MAN_PAGES], AE_IS_FEATURE_ENABLED([man-pages])) +AM_CONDITIONAL([ENABLE_NUMA], AE_IS_FEATURE_ENABLED([numa])) +AM_CONDITIONAL([ENABLE_PYTHON_AGENT], AE_IS_FEATURE_ENABLED([python-agent])) +AM_CONDITIONAL([ENABLE_UST_DL], [test "x$ac_cv_have_decl_RTLD_DI_LINKMAP" = "xyes"]) +AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"]) +AM_CONDITIONAL([HAVE_CMAKE], [test "x$CMAKE" != "x"]) +AM_CONDITIONAL([HAVE_CXX], [test "$HAVE_CXX11" = "1"]) +AM_CONDITIONAL([HAVE_JAVAH], [test "x$JAVAH" != "x"]) +AM_CONDITIONAL([HAVE_PERF_EVENT], [test "x$ac_cv_header_linux_perf_event_h" = "xyes"]) + + +## ## +## Substitute variables for use in Makefile.am ## +## ## + +# Library versions for libtool +AC_SUBST([LTTNG_UST_LIBRARY_VERSION], ust_lib_version) +AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], ust_ctl_lib_version) + AM_CFLAGS="-Wall $URCU_CFLAGS $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) @@ -515,58 +510,58 @@ AC_SUBST(JNI_CPPFLAGS) # List of files to be generated from '.in' templates by AC_OUTPUT AC_CONFIG_FILES([ - Makefile - doc/Makefile - doc/examples/Makefile - doc/man/Makefile - include/Makefile - snprintf/Makefile - libcounter/Makefile - libmsgpack/Makefile - libringbuffer/Makefile - liblttng-ust-comm/Makefile - liblttng-ust/Makefile - liblttng-ust-ctl/Makefile - liblttng-ust-fork/Makefile - liblttng-ust-dl/Makefile - liblttng-ust-fd/Makefile - liblttng-ust-java/Makefile - liblttng-ust-java-agent/Makefile - liblttng-ust-java-agent/java/Makefile - liblttng-ust-java-agent/java/lttng-ust-agent-all/Makefile - liblttng-ust-java-agent/java/lttng-ust-agent-common/Makefile - liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile - liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile - liblttng-ust-java-agent/jni/Makefile - liblttng-ust-java-agent/jni/common/Makefile - liblttng-ust-java-agent/jni/jul/Makefile - liblttng-ust-java-agent/jni/log4j/Makefile - liblttng-ust-libc-wrapper/Makefile - liblttng-ust-cyg-profile/Makefile - liblttng-ust-python-agent/Makefile - python-lttngust/Makefile - python-lttngust/setup.py - python-lttngust/lttngust/__init__.py - tools/Makefile - tests/Makefile - tests/compile/Makefile - tests/compile/ctf-types/Makefile - tests/compile/hello.cxx/Makefile - tests/compile/hello/Makefile - tests/compile/hello-many/Makefile - tests/compile/same_line_tracepoint/Makefile - tests/compile/test-app-ctx/Makefile - tests/benchmark/Makefile - tests/unit/gcc-weak-hidden/Makefile - tests/unit/libmsgpack/Makefile - tests/unit/Makefile - tests/unit/libringbuffer/Makefile - tests/unit/pthread_name/Makefile - tests/unit/snprintf/Makefile - tests/unit/ust-elf/Makefile - tests/utils/Makefile - lttng-ust.pc - lttng-ust-ctl.pc + Makefile + doc/Makefile + doc/examples/Makefile + doc/man/Makefile + include/Makefile + snprintf/Makefile + libcounter/Makefile + libmsgpack/Makefile + libringbuffer/Makefile + liblttng-ust-comm/Makefile + liblttng-ust/Makefile + liblttng-ust-ctl/Makefile + liblttng-ust-fork/Makefile + liblttng-ust-dl/Makefile + liblttng-ust-fd/Makefile + liblttng-ust-java/Makefile + liblttng-ust-java-agent/Makefile + liblttng-ust-java-agent/java/Makefile + liblttng-ust-java-agent/java/lttng-ust-agent-all/Makefile + liblttng-ust-java-agent/java/lttng-ust-agent-common/Makefile + liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile + liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile + liblttng-ust-java-agent/jni/Makefile + liblttng-ust-java-agent/jni/common/Makefile + liblttng-ust-java-agent/jni/jul/Makefile + liblttng-ust-java-agent/jni/log4j/Makefile + liblttng-ust-libc-wrapper/Makefile + liblttng-ust-cyg-profile/Makefile + liblttng-ust-python-agent/Makefile + python-lttngust/Makefile + python-lttngust/setup.py + python-lttngust/lttngust/__init__.py + tools/Makefile + tests/Makefile + tests/compile/Makefile + tests/compile/ctf-types/Makefile + tests/compile/hello.cxx/Makefile + tests/compile/hello/Makefile + tests/compile/hello-many/Makefile + tests/compile/same_line_tracepoint/Makefile + tests/compile/test-app-ctx/Makefile + tests/benchmark/Makefile + tests/unit/gcc-weak-hidden/Makefile + tests/unit/libmsgpack/Makefile + tests/unit/Makefile + tests/unit/libringbuffer/Makefile + tests/unit/pthread_name/Makefile + tests/unit/snprintf/Makefile + tests/unit/ust-elf/Makefile + tests/utils/Makefile + lttng-ust.pc + lttng-ust-ctl.pc ]) AC_OUTPUT @@ -688,3 +683,5 @@ their sources. Use --disable-man-pages to completely disable building and installing the man pages.]) ]) + +# vim: shiftwidth=2 softtabstop=2 expandtab