From 3eedbee7a4df0962a9c0d7ef3a94dfb6d3627b94 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 27 Aug 2010 22:45:02 +0000 Subject: [PATCH] Fixes trac:2541. Ensure that we keep CPPFLAGS if a non-standard valgrind location was specified. CMR:v1.4.3 CMR:v1.5 This commit was SVN r23680. The following Trac tickets were found above: Ticket 2541 --> https://svn.open-mpi.org/trac/ompi/ticket/2541 --- opal/mca/memchecker/valgrind/Makefile.am | 4 ++-- opal/mca/memchecker/valgrind/configure.m4 | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/opal/mca/memchecker/valgrind/Makefile.am b/opal/mca/memchecker/valgrind/Makefile.am index 6b56b5e362..aa01ba122d 100644 --- a/opal/mca/memchecker/valgrind/Makefile.am +++ b/opal/mca/memchecker/valgrind/Makefile.am @@ -1,7 +1,7 @@ # # Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. -# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -9,7 +9,7 @@ # $HEADER$ # -AM_CPPFLAGS = $(memchecker_valgrind_CPPFLAGS) +AM_CPPFLAGS = $(opal_memchecker_valgrind_CPPFLAGS) sources = \ memchecker_valgrind.h \ memchecker_valgrind_component.c \ diff --git a/opal/mca/memchecker/valgrind/configure.m4 b/opal/mca/memchecker/valgrind/configure.m4 index 02049843dd..040fac5c7d 100644 --- a/opal/mca/memchecker/valgrind/configure.m4 +++ b/opal/mca/memchecker/valgrind/configure.m4 @@ -2,7 +2,7 @@ # # Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. -# Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,14 +27,15 @@ AC_DEFUN([MCA_memchecker_valgrind_CONFIG],[ [Directory where the valgrind software is installed])]) OMPI_CHECK_WITHDIR([valgrind], [$with_valgrind], [include/valgrind/valgrind.h]) - memchecker_valgrind_CPPFLAGS= opal_memchecker_valgrind_CPPFLAGS= opal_memchecker_valgrind_save_CPPFLAGS="$CPPFLAGS" opal_memchecker_valgrind_happy=no AS_IF([test "$with_valgrind" != "no"], [AS_IF([test ! -z "$with_valgrind" -a "$with_valgrind" != "yes"], - [CPPFLAGS="$CPPFLAGS -I$with_valgrind/include" - opal_memchecker_valgrind_CPPFLAGS="-I$with_valgrind/include"]) + [opal_memchecker_valgrind_CPPFLAGS="-I$with_valgrind/include" + # We need this -I to stay in CPPFLAGS when we're done + CPPFLAGS="$CPPFLAGS -I$with_valgrind/include" + opal_memchecker_valgrind_save_CPPFLAGS=$CPPFLAGS]) AC_CHECK_HEADERS([valgrind/valgrind.h], [AC_MSG_CHECKING([for VALGRIND_CHECK_MEM_IS_ADDRESSABLE]) AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ @@ -55,10 +56,9 @@ AC_DEFUN([MCA_memchecker_valgrind_CONFIG],[ CPPFLAGS="$opal_memchecker_valgrind_save_CPPFLAGS" AS_IF([test "$opal_memchecker_valgrind_happy" = "yes"], - [memchecker_valgrind_CPPFLAGS=$opal_memchecker_valgrind_CPPFLAGS - $1],[$2]) + [$1],[$2]) - AC_SUBST([memchecker_valgrind_CPPFLAGS]) + AC_SUBST([opal_memchecker_valgrind_CPPFLAGS]) OMPI_VAR_SCOPE_POP ])dnl