X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=7b284593474f4d7109dbb57a2659c9e5a7ca1adf;hp=2bb30edb325316b64307d67a9e968a5aa280e7c4;hb=234009e7170dbdbb857375718fa7249e6083bd25;hpb=7f08cc82e68617aa423952b8f9cc7c74bc247f8d diff --git a/configure.ac b/configure.ac index 2bb30edb3..7b2845934 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,14 @@ AX_APPEND_COMPILE_FLAGS([ dnl [WARN_CFLAGS], [-Werror]) +# When given, add -Werror to WARN_CFLAGS. +AC_ARG_ENABLE([Werror], + [AS_HELP_STRING([--enable-Werror], [Treat compiler warnings as errors.])] +) +AS_IF([test "x$enable_Werror" = "xyes"], + [WARN_CFLAGS="${WARN_CFLAGS} -Werror"] +) + # Checks for programs. AC_PROG_GREP AC_PROG_MAKE_SET @@ -1051,6 +1059,10 @@ AM_CONDITIONAL([BUILD_LIB_UST_CONSUMER], [test x$build_lib_ust_consumer = xyes]) AM_CFLAGS="${WARN_CFLAGS} -fno-strict-aliasing $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) +# This is set even though it is empty, so Makefiles can do "AM_LDFLAGS += ...". +AM_LDFLAGS="" +AC_SUBST(AM_LDFLAGS) + # The order in which the include folders are searched is important. # The top_builddir should always be searched first in the event that a build # time generated file is included. An example of this is the "version.i" file.