Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | From b4e04e5dd13c9de8b336f7d0c254973a225e3b5f Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Changqing Li <changqing.li@windriver.com> |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 3 | Date: Mon, 1 Jul 2019 16:14:16 +0800 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] ldb: Add configure options for packages |
| 5 | |
| 6 | Add configure options for the following packages: |
| 7 | - acl |
| 8 | - attr |
| 9 | - libaio |
| 10 | - libbsd |
| 11 | - libcap |
| 12 | - valgrind |
| 13 | |
| 14 | Upstream-Status: Inappropriate [oe deterministic build specific] |
| 15 | |
| 16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
| 17 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 18 | upgrade to version 1.5.4 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 20 | |
| 21 | Rebase to 2.3.0 |
| 22 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | --- |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 24 | lib/replace/wscript | 90 +++++++++++++++++++++++++++++++++++---------- |
| 25 | wscript | 8 ++++ |
| 26 | 2 files changed, 78 insertions(+), 20 deletions(-) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | |
| 28 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 29 | index 4c774d9..63c9967 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | --- a/lib/replace/wscript |
| 31 | +++ b/lib/replace/wscript |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 32 | @@ -25,6 +25,41 @@ def options(opt): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | opt.PRIVATE_EXTENSION_DEFAULT('') |
| 34 | opt.RECURSE('buildtools/wafsamba') |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 35 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | + 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 Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 70 | + |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 71 | @Utils.run_once |
| 72 | def configure(conf): |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 73 | conf.RECURSE('buildtools/wafsamba') |
| 74 | @@ -35,12 +70,25 @@ def configure(conf): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 75 | 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 Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 83 | conf.CHECK_HEADERS('locale.h ndir.h pwd.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | - 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 86 | + 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 Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 102 | conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 103 | 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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 104 | @@ -110,8 +158,9 @@ def configure(conf): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 105 | 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 Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 108 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 109 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 110 | + if Options.options.enable_valgrind: |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 111 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
| 112 | + conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 113 | 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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 116 | @@ -434,20 +483,21 @@ def configure(conf): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 117 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 118 | strlcpy_in_bsd = False |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 119 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 120 | - # 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 Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 134 | + if Options.options.enable_libbsd: |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 135 | + # libbsd on some platforms provides strlcpy and strlcat |
| 136 | + if not conf.CHECK_FUNCS('strlcpy strlcat'): |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 137 | + if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', |
| 138 | + checklibc=True): |
| 139 | + strlcpy_in_bsd = True |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 140 | + 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 152 | diff --git a/wscript b/wscript |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 153 | index 60bb7cf..7f14847 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 154 | --- a/wscript |
| 155 | +++ b/wscript |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 156 | @@ -40,6 +40,14 @@ def options(opt): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 157 | 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 Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 166 | + |
| 167 | + |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 168 | |
| 169 | def configure(conf): |
| 170 | conf.RECURSE('lib/tdb') |
| 171 | -- |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 172 | 2.25.1 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 173 | |