blob: bffd0653b75f8440b3126b28fee4aea85ca7e29e [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From 0841c3ed69c388251c1aeae63f2c3813555a54f6 Mon Sep 17 00:00:00 2001
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08002From: Changqing Li <changqing.li@windriver.com>
Brad Bishop26bdd442019-08-16 17:08:17 -04003Date: Mon, 1 Jul 2019 16:14:16 +0800
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004Subject: [PATCH] ldb: Add configure options for packages
5
6Add configure options for the following packages:
7 - acl
8 - attr
9 - libaio
10 - libbsd
11 - libcap
12 - valgrind
13
14Upstream-Status: Inappropriate [oe deterministic build specific]
15
16Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17
Brad Bishop26bdd442019-08-16 17:08:17 -040018upgrade to version 1.5.4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019Signed-off-by: Changqing Li <changqing.li@windriver.com>
20---
Brad Bishop26bdd442019-08-16 17:08:17 -040021 lib/replace/wscript | 92 +++++++++++++++++++++++++++++++++++++++++------------
22 wscript | 8 +++++
23 2 files changed, 79 insertions(+), 21 deletions(-)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024
25diff --git a/lib/replace/wscript b/lib/replace/wscript
Brad Bishop26bdd442019-08-16 17:08:17 -040026index a7fd25d..ad26041 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027--- a/lib/replace/wscript
28+++ b/lib/replace/wscript
Brad Bishop26bdd442019-08-16 17:08:17 -040029@@ -24,6 +24,41 @@ def options(opt):
30 opt.BUILTIN_DEFAULT('NONE')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 opt.PRIVATE_EXTENSION_DEFAULT('')
32 opt.RECURSE('buildtools/wafsamba')
Brad Bishop26bdd442019-08-16 17:08:17 -040033+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034+ opt.add_option('--with-acl',
35+ help=("Enable use of acl"),
36+ action="store_true", dest='enable_acl')
37+ opt.add_option('--without-acl',
38+ help=("Disable use of acl"),
39+ action="store_false", dest='enable_acl', default=False)
40+
41+ opt.add_option('--with-attr',
42+ help=("Enable use of attr"),
43+ action="store_true", dest='enable_attr')
44+ opt.add_option('--without-attr',
45+ help=("Disable use of attr"),
46+ action="store_false", dest='enable_attr', default=False)
47+
48+ opt.add_option('--with-libaio',
49+ help=("Enable use of libaio"),
50+ action="store_true", dest='enable_libaio')
51+ opt.add_option('--without-libaio',
52+ help=("Disable use of libaio"),
53+ action="store_false", dest='enable_libaio', default=False)
54+
55+ opt.add_option('--with-libbsd',
56+ help=("Enable use of libbsd"),
57+ action="store_true", dest='enable_libbsd')
58+ opt.add_option('--without-libbsd',
59+ help=("Disable use of libbsd"),
60+ action="store_false", dest='enable_libbsd', default=False)
61+
62+ opt.add_option('--with-libcap',
63+ help=("Enable use of libcap"),
64+ action="store_true", dest='enable_libcap')
65+ opt.add_option('--without-libcap',
66+ help=("Disable use of libcap"),
67+ action="store_false", dest='enable_libcap', default=False)
Brad Bishop26bdd442019-08-16 17:08:17 -040068
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080069 @Utils.run_once
70 def configure(conf):
Brad Bishop26bdd442019-08-16 17:08:17 -040071@@ -34,12 +69,25 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072 conf.DEFINE('HAVE_LIBREPLACE', 1)
73 conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
74
75- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
76- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
77+ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
78+ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
79 conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
80- conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
81- conf.CHECK_HEADERS('shadow.h sys/acl.h')
82- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
83+ conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
84+ conf.CHECK_HEADERS('shadow.h')
85+ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
86+
87+ if Options.options.enable_acl:
88+ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
89+
90+ if Options.options.enable_attr:
91+ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
92+
93+ if Options.options.enable_libaio:
94+ conf.CHECK_HEADERS('libaio.h')
95+
96+ if Options.options.enable_libcap:
97+ conf.CHECK_HEADERS('sys/capability.h')
98+
99 conf.CHECK_HEADERS('port.h')
100 conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h sys/fs/vx/quota.h')
101 conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
Brad Bishop26bdd442019-08-16 17:08:17 -0400102@@ -110,8 +158,9 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800103 conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
104 conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
105
Brad Bishop26bdd442019-08-16 17:08:17 -0400106- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
107- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800108+ if Options.options.enable_valgrind:
Brad Bishop26bdd442019-08-16 17:08:17 -0400109+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
110+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800111 conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
112 conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
113 conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
Brad Bishop26bdd442019-08-16 17:08:17 -0400114@@ -380,20 +429,21 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800115
Brad Bishop26bdd442019-08-16 17:08:17 -0400116 strlcpy_in_bsd = False
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800117
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800118- # libbsd on some platforms provides strlcpy and strlcat
119- if not conf.CHECK_FUNCS('strlcpy strlcat'):
120- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
121- checklibc=True):
122- strlcpy_in_bsd = True
123- if not conf.CHECK_FUNCS('getpeereid'):
124- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
125- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
126- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
127- if not conf.CHECK_FUNCS('setproctitle_init'):
128- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
129-
130- if not conf.CHECK_FUNCS('closefrom'):
131- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
Brad Bishop26bdd442019-08-16 17:08:17 -0400132+ if Options.options.enable_libbsd:
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800133+ # libbsd on some platforms provides strlcpy and strlcat
134+ if not conf.CHECK_FUNCS('strlcpy strlcat'):
Brad Bishop26bdd442019-08-16 17:08:17 -0400135+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
136+ checklibc=True):
137+ strlcpy_in_bsd = True
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800138+ if not conf.CHECK_FUNCS('getpeereid'):
139+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
140+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
141+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
142+ if not conf.CHECK_FUNCS('setproctitle_init'):
143+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
144+
145+ if not conf.CHECK_FUNCS('closefrom'):
146+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
147
148 conf.CHECK_CODE('''
149 struct ucred cred;
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800150diff --git a/wscript b/wscript
Brad Bishop26bdd442019-08-16 17:08:17 -0400151index d3402a7..d4e0ce1 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800152--- a/wscript
153+++ b/wscript
Brad Bishop26bdd442019-08-16 17:08:17 -0400154@@ -38,6 +38,14 @@ def options(opt):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800155 help='disable new LMDB backend for LDB',
156 action='store_true', dest='without_ldb_lmdb', default=False)
157
158+ opt.add_option('--with-valgrind',
159+ help=("enable use of valgrind"),
160+ action="store_true", dest='enable_valgrind')
161+ opt.add_option('--without-valgrind',
162+ help=("disable use of valgrind"),
163+ action="store_false", dest='enable_valgrind', default=False)
Brad Bishop26bdd442019-08-16 17:08:17 -0400164+
165+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800166
167 def configure(conf):
168 conf.RECURSE('lib/tdb')
169--
1702.7.4
171