blob: 988931c490927578649171c6b93fcaad53dcb576 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From b4e04e5dd13c9de8b336f7d0c254973a225e3b5f 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>
Andrew Geissler69721092021-07-23 12:57:00 -040020
21Rebase to 2.3.0
22Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023---
Andrew Geissler69721092021-07-23 12:57:00 -040024 lib/replace/wscript | 90 +++++++++++++++++++++++++++++++++++----------
25 wscript | 8 ++++
26 2 files changed, 78 insertions(+), 20 deletions(-)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027
28diff --git a/lib/replace/wscript b/lib/replace/wscript
Andrew Geissler517393d2023-01-13 08:55:19 -060029index 4c774d9..63c9967 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030--- a/lib/replace/wscript
31+++ b/lib/replace/wscript
Andrew Geissler69721092021-07-23 12:57:00 -040032@@ -25,6 +25,41 @@ def options(opt):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033 opt.PRIVATE_EXTENSION_DEFAULT('')
34 opt.RECURSE('buildtools/wafsamba')
Andrew Geissler69721092021-07-23 12:57:00 -040035
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036+ opt.add_option('--with-acl',
37+ help=("Enable use of acl"),
38+ action="store_true", dest='enable_acl')
39+ opt.add_option('--without-acl',
40+ help=("Disable use of acl"),
41+ action="store_false", dest='enable_acl', default=False)
42+
43+ opt.add_option('--with-attr',
44+ help=("Enable use of attr"),
45+ action="store_true", dest='enable_attr')
46+ opt.add_option('--without-attr',
47+ help=("Disable use of attr"),
48+ action="store_false", dest='enable_attr', default=False)
49+
50+ opt.add_option('--with-libaio',
51+ help=("Enable use of libaio"),
52+ action="store_true", dest='enable_libaio')
53+ opt.add_option('--without-libaio',
54+ help=("Disable use of libaio"),
55+ action="store_false", dest='enable_libaio', default=False)
56+
57+ opt.add_option('--with-libbsd',
58+ help=("Enable use of libbsd"),
59+ action="store_true", dest='enable_libbsd')
60+ opt.add_option('--without-libbsd',
61+ help=("Disable use of libbsd"),
62+ action="store_false", dest='enable_libbsd', default=False)
63+
64+ opt.add_option('--with-libcap',
65+ help=("Enable use of libcap"),
66+ action="store_true", dest='enable_libcap')
67+ opt.add_option('--without-libcap',
68+ help=("Disable use of libcap"),
69+ action="store_false", dest='enable_libcap', default=False)
Andrew Geissler69721092021-07-23 12:57:00 -040070+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080071 @Utils.run_once
72 def configure(conf):
Andrew Geissler69721092021-07-23 12:57:00 -040073 conf.RECURSE('buildtools/wafsamba')
74@@ -35,12 +70,25 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075 conf.DEFINE('HAVE_LIBREPLACE', 1)
76 conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
77
78- conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
79- conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
80+ conf.CHECK_HEADERS('linux/types.h crypt.h locale.h compat.h')
81+ conf.CHECK_HEADERS('compat.h ctype.h dustat.h')
82 conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
Andrew Geissler69721092021-07-23 12:57:00 -040083 conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080084- conf.CHECK_HEADERS('shadow.h sys/acl.h')
85- conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h sys/dir.h sys/epoll.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080086+ conf.CHECK_HEADERS('shadow.h')
87+ conf.CHECK_HEADERS('sys/attributes.h sys/dir.h sys/epoll.h')
88+
89+ if Options.options.enable_acl:
90+ conf.CHECK_HEADERS('acl/libacl.h sys/acl.h')
91+
92+ if Options.options.enable_attr:
93+ conf.CHECK_HEADERS('attr/attributes.h attr/xattr.h')
94+
95+ if Options.options.enable_libaio:
96+ conf.CHECK_HEADERS('libaio.h')
97+
98+ if Options.options.enable_libcap:
99+ conf.CHECK_HEADERS('sys/capability.h')
100+
101 conf.CHECK_HEADERS('port.h')
Andrew Geissler69721092021-07-23 12:57:00 -0400102 conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800103 conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
Andrew Geissler517393d2023-01-13 08:55:19 -0600104@@ -110,8 +158,9 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800105 conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
106 conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
107
Brad Bishop26bdd442019-08-16 17:08:17 -0400108- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
109- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800110+ if Options.options.enable_valgrind:
Brad Bishop26bdd442019-08-16 17:08:17 -0400111+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
112+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800113 conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
114 conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
115 conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
Andrew Geissler517393d2023-01-13 08:55:19 -0600116@@ -434,20 +483,21 @@ def configure(conf):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800117
Brad Bishop26bdd442019-08-16 17:08:17 -0400118 strlcpy_in_bsd = False
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800119
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800120- # libbsd on some platforms provides strlcpy and strlcat
121- if not conf.CHECK_FUNCS('strlcpy strlcat'):
122- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
123- checklibc=True):
124- strlcpy_in_bsd = True
125- if not conf.CHECK_FUNCS('getpeereid'):
126- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
127- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
128- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
129- if not conf.CHECK_FUNCS('setproctitle_init'):
130- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
131-
132- if not conf.CHECK_FUNCS('closefrom'):
133- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
Brad Bishop26bdd442019-08-16 17:08:17 -0400134+ if Options.options.enable_libbsd:
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800135+ # libbsd on some platforms provides strlcpy and strlcat
136+ if not conf.CHECK_FUNCS('strlcpy strlcat'):
Brad Bishop26bdd442019-08-16 17:08:17 -0400137+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
138+ checklibc=True):
139+ strlcpy_in_bsd = True
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800140+ if not conf.CHECK_FUNCS('getpeereid'):
141+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
142+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
143+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
144+ if not conf.CHECK_FUNCS('setproctitle_init'):
145+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
146+
147+ if not conf.CHECK_FUNCS('closefrom'):
148+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
149
150 conf.CHECK_CODE('''
151 struct ucred cred;
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800152diff --git a/wscript b/wscript
Andrew Geissler517393d2023-01-13 08:55:19 -0600153index 60bb7cf..7f14847 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800154--- a/wscript
155+++ b/wscript
Andrew Geissler517393d2023-01-13 08:55:19 -0600156@@ -40,6 +40,14 @@ def options(opt):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800157 help='disable new LMDB backend for LDB',
158 action='store_true', dest='without_ldb_lmdb', default=False)
159
160+ opt.add_option('--with-valgrind',
161+ help=("enable use of valgrind"),
162+ action="store_true", dest='enable_valgrind')
163+ opt.add_option('--without-valgrind',
164+ help=("disable use of valgrind"),
165+ action="store_false", dest='enable_valgrind', default=False)
Brad Bishop26bdd442019-08-16 17:08:17 -0400166+
167+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800168
169 def configure(conf):
170 conf.RECURSE('lib/tdb')
171--
Andrew Geissler517393d2023-01-13 08:55:19 -06001722.25.1
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800173