ports/devel/talloc242/files/patch-buildtools_wafsamba_samba__autoconf.py
Xavier Beaudouin 9b1dcbb8c6 devel/talloc242: Hierarchical pool based memory allocator
A hierarchical pool based memory allocator with destructors. It uses
reference counting to determine when memory should be freed.

This port is needed for Samba 4.20

This commit is just a repocopy. I will update the port to the correct
version and connect it to the build in the next commit.

PR:		280533
Sponsored by:	Klara, Inc.
Approved by:	0mp (mentor)
Approved by:	samba (0mp, kiwi)
Differential Revision:	https://reviews.freebsd.org/D48657
2025-01-30 15:41:58 +01:00

35 lines
1.8 KiB
Python

--- buildtools/wafsamba/samba_autoconf.py.orig 2019-09-03 13:59:55 UTC
+++ buildtools/wafsamba/samba_autoconf.py
@@ -573,7 +573,7 @@ def library_flags(self, libs):
@conf
-def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False):
+def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False, msg=None):
'''check if a set of libraries exist as system libraries
returns the sublist of libs that do exist as a syslib or []
@@ -593,11 +593,14 @@ int foo()
ret.append(lib)
continue
+ if msg is None:
+ msg = 'Checking for library %s' % lib
+
(ccflags, ldflags, cpppath) = library_flags(conf, lib)
if shlib:
- res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
+ res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
else:
- res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
+ res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
if not res:
if mandatory:
@@ -944,5 +947,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
if (conf.env.undefined_ignore_ldflags == [] and
- conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])):
+ conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)):
conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']