<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 November 2014 10:45, Chen Qi <span dir="ltr"><<a href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+-AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])<br>
++AC_ARG_ENABLE(valgrindheader, AS_HELP_STRING([--disable-valgrindheader], [disable valgrind header checking]))<br>
++if test "x$enable_valgrindheader" != "xno"; then<br>
++ AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])<br>
++fi<br>
</blockquote><div><br></div><div>If the user passes --enable-valgrindheader and valgrind isn't present, it doesn't fail. Combined with the lack of a valgrind build dependency in the PACKAGECONFIG statement this isn't a very useful PACKAGECONFIG option as it only works when not specified, and if it's specified is non-deterministic.</div><div><br></div><div>It appears that this valgrind support is for running the test suite under valgrind for leak detection, which is something we're unlikely to do. A quick fix would be to comment out the check.</div><div><br></div><div>A proper fix would be to use AC_ARG_WITH(valgrind), default to "auto", use the pkg-config macros and respect yes/no/auto as appropriate. The mantra here being to spend ten minutes fixing it properly upstream instead of having to rewrite the patch often as upstream changes their configure script.</div><div><br></div><div>Ross</div></div></div></div>