From: Oliver Kurth Date: Tue, 17 Mar 2020 21:36:54 +0000 (-0700) Subject: open-vm-tools: add --enable-valgrind configure option X-Git-Tag: stable-11.1.0~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e4de82af2a71d14197abf31990a16a31fb8a8a8;p=thirdparty%2Fopen-vm-tools.git open-vm-tools: add --enable-valgrind configure option Add the option "--enable-valgrind" to the ./configure command, and test if the necessary headers are installed. --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 94babc7a2..58f46a1e1 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2019 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2020 VMware, Inc. All rights reserved. ### ### Configure script for building the VMware OSS Tools. ### @@ -200,6 +200,26 @@ fi # and sets no_x. AC_PATH_XTRA +AC_CHECK_HEADER([valgrind/valgrind.h], + [], + [have_valgrind=no], + []) + +AC_ARG_ENABLE( + valgrind, + AS_HELP_STRING( + [--enable-valgrind], + [enables building with valgrind]), + [enable_valgrind="$enableval"], + [enable_valgrind="no"]) + +if test "$enable_valgrind" = "yes" ; then + if test "$have_valgrind" = "no" ; then + AC_MSG_ERROR([valgrind/valgrind.h not found. Make sure you have the valgrind headers installed.]), + fi + CPPFLAGS="$CPPFLAGS -DUSE_VALGRIND=1" +fi + # Arguments for disabling individual open-vm-tools features or libraries. AC_ARG_ENABLE( multimon,