From a1f17360f663e0eb737fecabe8e5cbb8f1027264 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 22 Apr 2020 14:37:55 -0400 Subject: [PATCH] fix: Add CLASSPATH to autoconf precious variables This will record the value of CLASSPATH in the autoconf cache and ensure it's used when calling make even if it's not exported to the environment. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: Ia06070dd352f9d3b6956a1ec0f4eb1d024f73179 --- configure.ac | 1 + doc/examples/Makefile.am | 2 ++ doc/examples/java-log4j/Makefile | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8b7d3284..7f31f36c 100644 --- a/configure.ac +++ b/configure.ac @@ -359,6 +359,7 @@ AS_IF([test "x$jni_interface" = "xyes" || test "x$java_agent_jul" = "xyes" || te AX_PROG_JAVAC AX_PROG_JAVA AX_PROG_JAR + AC_ARG_VAR([CLASSPATH], [Java class path]) AX_JNI_INCLUDE_DIR for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 2ba8cd89..c6367976 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -147,6 +147,7 @@ all-local: ( \ cd $$subdir && \ $(MAKE) all \ + CLASSPATH="$(CLASSPATH)" \ JAVA_CLASSPATH_OVERRIDE_JUL="../../../liblttng-ust-java-agent/java/lttng-ust-agent-jul" \ JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" \ $(AM_MAKEFLAGS) \ @@ -158,6 +159,7 @@ all-local: ( \ cd $$subdir && \ $(MAKE) all \ + CLASSPATH="$(CLASSPATH)" \ JAVA_CLASSPATH_OVERRIDE_LOG4J="../../../liblttng-ust-java-agent/java/lttng-ust-agent-log4j" \ JAVA_CLASSPATH_OVERRIDE_COMMON="../../../liblttng-ust-java-agent/java/lttng-ust-agent-common" \ $(AM_MAKEFLAGS) \ diff --git a/doc/examples/java-log4j/Makefile b/doc/examples/java-log4j/Makefile index bf10fc52..59ffdf79 100644 --- a/doc/examples/java-log4j/Makefile +++ b/doc/examples/java-log4j/Makefile @@ -22,7 +22,7 @@ JARFILE_COMMON=lttng-ust-agent-common.jar # If system classpath is empty, try to guess log4j location ifeq "$(CLASSPATH)" "" - CLASSPATH="/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar" + CLASSPATH=/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar endif # Check if the top level makefile overrides the Log4j Jar file's path. -- 2.34.1