From: Michael Jeanson Date: Wed, 22 Jul 2020 18:48:00 +0000 (-0400) Subject: Enable autotools warnings as errors X-Git-Tag: v2.13.0-rc1~469 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0f6f0e89dace3a34dae3e06e5af0515a49149acd;p=lttng-ust.git Enable autotools warnings as errors Enable all autotools warnings and error out to help catch all the wonderful, shall we say, pecularities of M4sh. And fix some associated errors in configure.ac. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: Icc693a1913a003f2c5b299e82084252c5735603f --- diff --git a/bootstrap b/bootstrap index 0ade5adc..4b7e4110 100755 --- a/bootstrap +++ b/bootstrap @@ -5,4 +5,4 @@ if [ ! -e config ]; then mkdir config fi -autoreconf -vi +autoreconf -vif -W all,error diff --git a/configure.ac b/configure.ac index d409072a..eaff5ef0 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ AC_CONFIG_SRCDIR([include/lttng/tracepoint.h]) AC_CANONICAL_TARGET AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc]) +AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc -Wall -Wno-portability -Werror]) AM_MAINTAINER_MODE([enable]) # Enable silent rules if available (Introduced in AM 1.11) @@ -160,6 +160,7 @@ AC_CHECK_FUNCS([ \ strdup \ strerror \ strtol \ + strtoul \ sysconf \ ]) diff --git a/liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am b/liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am index 99fa78cf..e5fb8a69 100644 --- a/liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile.am @@ -1,5 +1,5 @@ JAVAROOT = . -CLASSPATH_ENV = CLASSPATH=$(CLASSPATH):$(builddir)/../lttng-ust-agent-common/lttng-ust-agent-common.jar +AM_JAVACFLAGS = -classpath $(CLASSPATH):$(builddir)/../lttng-ust-agent-common/lttng-ust-agent-common.jar pkgpath = org/lttng/ust/agent/jul @@ -29,7 +29,7 @@ $(jarfile): classnoinst.stamp if !HAVE_JAVAH # If we don't have javah, assume we are running openjdk >= 10 and use javac # to generate the jni header file. -AM_JAVACFLAGS = -h $(juljniout) +AM_JAVACFLAGS += -h $(juljniout) else jul-jni-header.stamp: $(dist_noinst_JAVA) $(JAVAH) -classpath $(CLASSPATH):$(srcdir) -d $(juljniout) $(JAVAHFLAGS) org.lttng.ust.agent.jul.LttngJulApi && \ diff --git a/liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am b/liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am index 0c9475a3..fc4a9160 100644 --- a/liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am +++ b/liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile.am @@ -1,5 +1,5 @@ JAVAROOT = . -CLASSPATH_ENV = CLASSPATH=$(CLASSPATH):$(builddir)/../lttng-ust-agent-common/lttng-ust-agent-common.jar +AM_JAVACFLAGS = -classpath $(CLASSPATH):$(builddir)/../lttng-ust-agent-common/lttng-ust-agent-common.jar pkgpath = org/lttng/ust/agent/log4j @@ -29,7 +29,7 @@ $(jarfile): classnoinst.stamp if !HAVE_JAVAH # If we don't have javah, assume we are running openjdk >= 10 and use javac # to generate the jni header file. -AM_JAVACFLAGS = -h $(log4jjniout) +AM_JAVACFLAGS += -h $(log4jjniout) else log4j-jni-header.stamp: $(dist_noinst_JAVA) $(JAVAH) -classpath $(CLASSPATH):$(srcdir) -d $(log4jjniout) $(JAVAHFLAGS) org.lttng.ust.agent.log4j.LttngLog4jApi && \