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> |
| 9 | --- |
| 10 | lib/replace/wscript | 4 +++- |
| 11 | source3/wscript | 5 ++++- |
| 12 | wscript | 4 ++++ |
| 13 | 3 files changed, 11 insertions(+), 2 deletions(-) |
| 14 | |
| 15 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
| 16 | index f0040b1..aca73af 100644 |
| 17 | --- a/lib/replace/wscript |
| 18 | +++ b/lib/replace/wscript |
| 19 | @@ -101,7 +101,9 @@ struct foo bar = { .y = 'X', .x = 1 }; |
| 20 | |
| 21 | conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H') |
| 22 | |
| 23 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 24 | + if not Options.options.disable_valgrind: |
| 25 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 26 | + |
| 27 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
| 28 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
| 29 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h') |
| 30 | diff --git a/source3/wscript b/source3/wscript |
| 31 | index bac3dd5..a5c51ea 100644 |
| 32 | --- a/source3/wscript |
| 33 | +++ b/source3/wscript |
| 34 | @@ -1016,7 +1016,10 @@ syscall(SYS_setgroups32, 0, NULL); |
| 35 | Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient") |
| 36 | else: |
| 37 | conf.DEFINE('WITH_DNS_UPDATES', 1) |
| 38 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 39 | + |
| 40 | + if not Options.options.disable_valgrind: |
| 41 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') |
| 42 | + |
| 43 | if Options.options.developer: |
| 44 | if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'): |
| 45 | conf.DEFINE('VALGRIND', '1') |
| 46 | diff --git a/wscript b/wscript |
| 47 | index 7679c0f..681ac17 100644 |
| 48 | --- a/wscript |
| 49 | +++ b/wscript |
| 50 | @@ -72,6 +72,10 @@ def set_options(opt): |
| 51 | help=("Disable systemd integration"), |
| 52 | action='store_false', dest='enable_systemd') |
| 53 | |
| 54 | + opt.add_option('--without-valgrind', |
| 55 | + help=("Disable use of the valgrind headers"), |
| 56 | + action="store_true", dest='disable_valgrind', default=False) |
| 57 | + |
| 58 | gr = opt.option_group('developer options') |
| 59 | |
| 60 | opt.tool_options('python') # options for disabling pyc or pyo compilation |
| 61 | -- |
| 62 | 1.9.1 |
| 63 | |