1
1

A typo prevented the valgrind memchecker component finding the

Valgrind header files if they weren't already in the compiler's
default header file search path.  This commit fixes that typo and adds
a little more infrastructure (via an AC_SUBST) to pass in the relevant
CPPFLAGS to the build system for the valgrind memchecker component.

This commit was SVN r19764.
Этот коммит содержится в:
Jeff Squyres 2008-10-17 23:04:39 +00:00
родитель 307d52aedc
Коммит e42139710b
2 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -1,6 +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$
#
# Additional copyrights may follow
@ -8,6 +9,7 @@
# $HEADER$
#
AM_CPPFLAGS = $(memchecker_valgrind_CPPFLAGS)
sources = \
memchecker_valgrind.h \
memchecker_valgrind_component.c \

Просмотреть файл

@ -20,11 +20,13 @@ AC_DEFUN([MCA_memchecker_valgrind_COMPILE_MODE], [
# MCA_memchecker_valgrind_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
AC_DEFUN([MCA_memchecker_valgrind_CONFIG],[
OMPI_VAR_SCOPE_PUSH([ompi_check_memchecker_valgrind_save_CPPFLAGS ompi_check_memchecker_valgrind_happy])
AC_ARG_WITH([valgrind],
[AC_HELP_STRING([--with-valgrind(=DIR)],
[Directory where the valgrind software is installed])])
memchecker_valgrind_CPPFLAGS=
ompi_check_memchecker_valgrind_save_CPPFLAGS="$CPPFLAGS"
ompi_check_memchecker_valgrind_happy=no
AS_IF([test "$with_valgrind" != "no"],
@ -43,12 +45,18 @@ AC_DEFUN([MCA_memchecker_valgrind_CONFIG],[
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Need Valgrind version 3.2.0 or later. Can not build component.])]
[AC_MSG_RESULT([cross-compiling; assume yes...?])
AC_MSG_WARN([OMPI will fail to compile if you do not have Valgrind version 3.2.0 or later])])
AC_MSG_WARN([OMPI will fail to compile if you do not have Valgrind version 3.2.0 or later])
ompi_check_memchecker_valgrind_happy=yes]),
],
[AC_MSG_WARN([valgrind.h not found])
AC_MSG_WARN([Cannot compile this component])])])
$CPPFLAGS="$ompi_check_memchecker_valgrind_save_CPPFLAGS"
CPPFLAGS="$ompi_check_memchecker_valgrind_save_CPPFLAGS"
AS_IF([test "$ompi_check_memchecker_valgrind_happy" = "yes"],
[$1],[$2])
[memchecker_valgrind_CPPFLAGS="-I$with_valgrind/include"
$1],[$2])
AC_SUBST([memchecker_valgrind_CPPFLAGS])
OMPI_VAR_SCOPE_POP
])dnl