Skip to content

Commit ba60a6d

Browse files
author
ripley
committed
make --with-system-valgrind-headers the default
git-svn-id: https://svn.r-project.org/R/trunk@83743 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 81e3f12 commit ba60a6d

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

configure

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ Optional Packages:
19081908
Level of additional instrumentation for Valgrind
19091909
(0/1/2) [0]
19101910
--with-system-valgrind-headers
1911-
use system valgrind headers (if available) [no]
1911+
use system valgrind headers (if available) [yes]
19121912
--with-internal-tzcode use internal time-zone code [no, yes on macOS]
19131913
--with-internal-towlower
19141914
use internal code for towlower/upper [no, yes on
@@ -4920,7 +4920,7 @@ else
49204920
fi
49214921

49224922
else $as_nop
4923-
use_system_valgrind=no
4923+
use_system_valgrind=yes
49244924
fi
49254925

49264926

@@ -53210,6 +53210,11 @@ then :
5321053210

5321153211
fi
5321253212

53213+
if test "${ac_cv_header_valgrind_memcheck_h}" != yes; then
53214+
set use_system_valgrind = no
53215+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: system valgrind headers not found -- using internal copies" >&5
53216+
printf "%s\n" "$as_me: WARNING: system valgrind headers not found -- using internal copies" >&2;}
53217+
fi
5321353218
fi
5321453219

5321553220

configure.ac

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ AC_ARG_WITH([valgrind-instrumentation],
503503
[valgrind_level=0])
504504

505505
AC_ARG_WITH([system-valgrind-headers],
506-
[AS_HELP_STRING([--with-system-valgrind-headers],[use system valgrind headers (if available) @<:@no@:>@])],
506+
[AS_HELP_STRING([--with-system-valgrind-headers],[use system valgrind headers (if available) @<:@yes@:>@])],
507507
[R_ARG_USE_SYSTEM(valgrind)],
508-
[use_system_valgrind=no])
508+
[use_system_valgrind=yes])
509509

510510
AC_ARG_WITH([internal-tzcode],
511511
[AS_HELP_STRING([--with-internal-tzcode],[use internal time-zone code @<:@no, yes on macOS@:>@])],
@@ -2605,6 +2605,10 @@ if test ${valgrind_level} -eq 0; then
26052605
AC_DEFINE(NVALGRIND, 1, [Define to disable Valgrind instrumentation])
26062606
elif test "${use_system_valgrind}" = yes; then
26072607
AC_CHECK_HEADERS([valgrind/memcheck.h])
2608+
if test "${ac_cv_header_valgrind_memcheck_h}" != yes; then
2609+
set use_system_valgrind = no
2610+
AC_MSG_WARN([system valgrind headers not found -- using internal copies])
2611+
fi
26082612
fi
26092613

26102614
AC_DEFINE_UNQUOTED(VALGRIND_LEVEL, ${valgrind_level}, [Define as 1 or 2 to specify levels of Valgrind instrumentation])

doc/NEWS.Rd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,19 @@
265265
266266
\item The minimum required version of \code{libcurl} has been
267267
increased from 7.28.0 to 7.32.0 (released in Aug 2013).
268+
269+
\item If \command{configure} option
270+
\option{--with-valgrind-instrumentation} is given value \code{1}
271+
or \code{2}, option \option{--with-system-valgrind-headers} is now
272+
the default and ignored. It is highly recommended that the system
273+
headers are installed alongside \command{valgrind}: they are part
274+
of its packaging on some Linux distributions and packaged
275+
separetely (e.g.\sspace{}in a \file{valgrind-devel} RPM) on
276+
others. \command{configure} gives a warning if they are not
277+
found.
278+
279+
THe system headers will be reauired in a future release of \R
280+
to build with \command{valgrind} instruementation.
268281
}
269282
}
270283

doc/manual/R-exts.texi

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9432,11 +9432,9 @@ they are freed.} but make @R{} much slower when running under
94329432
@code{valgrind}. Using this in conjunction with @code{gctorture} can be
94339433
even more effective (and even slower).
94349434

9435-
If you have the development files (sometimes packaged separately, for
9436-
example as @file{valgrind-devel}) installed and want to build an
9437-
instrumented @R{} you are recoomended to also use the
9438-
@command{configure} option @option{--with-system-valgrind-headers} (and
9439-
having them installed is highly recommended).
9435+
It is highly recommended that the @command{valgrind} headers (sometimes
9436+
packaged separately, for example as @file{valgrind-devel}) are installed
9437+
and want to build an instrumented @R{}: this will be required in future.
94409438

94419439
An example of @code{valgrind} output is
94429440
@smallexample

0 commit comments

Comments
 (0)