Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | From 9a2d6315ff206b2a47100dfd85afe3af56576995 Mon Sep 17 00:00:00 2001 |
| 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
| 3 | Date: Thu, 10 Dec 2015 04:20:51 -0500 |
| 4 | Subject: [PATCH] Add config option without-valgrind |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 9 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 10 | --- |
| 11 | lib/replace/wscript | 4 +++- |
| 12 | source3/wscript | 5 ++++- |
| 13 | wscript | 4 ++++ |
| 14 | 3 files changed, 11 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
| 17 | index f0040b1..aca73af 100644 |
| 18 | --- a/lib/replace/wscript |
| 19 | +++ b/lib/replace/wscript |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 20 | @@ -101,7 +101,9 @@ def configure(conf): |
| 21 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
| 22 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | |
| 24 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 25 | + if not Options.options.disable_valgrind: |
| 26 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 27 | + |
| 28 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
| 29 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 31 | diff --git a/source3/wscript b/source3/wscript |
| 32 | index bac3dd5..a5c51ea 100644 |
| 33 | --- a/source3/wscript |
| 34 | +++ b/source3/wscript |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | @@ -1070,7 +1070,10 @@ syscall(SYS_setgroups32, 0, NULL); |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 36 | Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient") |
| 37 | else: |
| 38 | conf.DEFINE('WITH_DNS_UPDATES', 1) |
| 39 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 40 | + |
| 41 | + if not Options.options.disable_valgrind: |
| 42 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 43 | + |
| 44 | if Options.options.developer: |
| 45 | if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'): |
| 46 | conf.DEFINE('VALGRIND', '1') |
| 47 | diff --git a/wscript b/wscript |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | index 542a60c..22e6116 100644 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 49 | --- a/wscript |
| 50 | +++ b/wscript |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 51 | @@ -86,6 +86,10 @@ def set_options(opt): |
| 52 | help=("Disable RELRO builds"), |
| 53 | action="store_false", dest='enable_relro') |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | |
| 55 | + opt.add_option('--without-valgrind', |
| 56 | + help=("Disable use of the valgrind headers"), |
| 57 | + action="store_true", dest='disable_valgrind', default=False) |
| 58 | + |
| 59 | gr = opt.option_group('developer options') |
| 60 | |
| 61 | opt.tool_options('python') # options for disabling pyc or pyo compilation |
| 62 | -- |
| 63 | 1.9.1 |
| 64 | |