From 9c0d9ec19df0c98a2bf443777796076375e63618 Mon Sep 17 00:00:00 2001 From: Phil Carns Date: Tue, 6 Aug 2013 15:04:52 -0400 Subject: [PATCH] add --enable-valgrind-clean - helpful for address-sanitizer use too --- configure.ac | 13 +++++++++++++ src/util/lookup3.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0662ecd..b56eac8 100755 --- a/configure.ac +++ b/configure.ac @@ -89,6 +89,19 @@ else AC_MSG_ERROR([Could not find usable ROSS installation, try --with-ross=DIR]) fi +dnl ====================================================================== +dnl Try harder to be valgrind safe +dnl ====================================================================== +AC_ARG_ENABLE(valgrind-clean, + [AS_HELP_STRING( + [--enable-valgrind-clean], + [Try harder to avoid valgrind warnings]) + ]) + +AS_IF([test "x$enable_valgrind_clean" = "xyes"], [ + AC_DEFINE([VALGRIND], [1], [If enabling valgrind-clean build]) +]) + # # To reactivate rewriting of the codesparser.y file, # uncomment next line. diff --git a/src/util/lookup3.c b/src/util/lookup3.c index 8b8a841..04cdeee 100644 --- a/src/util/lookup3.c +++ b/src/util/lookup3.c @@ -1,4 +1,4 @@ - +#include "codes_base_config.h" #include "codes/jenkins-hash.h" /* -- 2.26.2