From: Andrew Bartlett Date: Fri, 9 Feb 2024 09:15:30 +0000 (+1300) Subject: ldb: Honour --private-library=!ldb as meaning build as a public library X-Git-Tag: tdb-1.4.11~1611 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b5d226a5ae79ca9455c5377299334550b0ec968;p=thirdparty%2Fsamba.git ldb: Honour --private-library=!ldb as meaning build as a public library Likewise, let the SAMBA_LIBRARY code handle being a private library rather than in the library declaration. Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 171022383eb..fad5fd24e38 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -33,6 +33,7 @@ import symbols import pkgconfig import configure_file import samba_waf18 +import samba_bundled LIB_PATH="shared" diff --git a/lib/ldb/wscript b/lib/ldb/wscript index 25591a2617d..cfdcb2eb6f6 100644 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -14,7 +14,7 @@ sys.path.insert(0, top + '/buildtools/wafsamba') out = 'bin' -from wafsamba import samba_dist, samba_utils +from wafsamba import samba_dist, samba_utils, samba_bundled from waflib import Errors, Options, Logs, Context import shutil @@ -194,6 +194,9 @@ def configure(conf): conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + conf.env.ldb_is_public_library \ + = not samba_bundled.LIB_MUST_BE_PRIVATE(conf, 'ldb') + def build(bld): bld.RECURSE('lib/tevent') @@ -208,9 +211,9 @@ def build(bld): if not 'PACKAGE_VERSION' in bld.env: bld.env.PACKAGE_VERSION = VERSION bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' - private_library = False - else: - private_library = True + + private_library = not bld.env.ldb_is_public_library + # we're not currently linking against the ldap libs, but ldb.pc.in # has @LDAP_LIBS@ bld.env.LDAP_LIBS = '' @@ -273,11 +276,11 @@ def build(bld): COMMON_SRC + ' ' + LDB_MAP_SRC, deps='tevent LIBLDB_MAIN replace', includes='include', - public_headers=('' if private_library else ldb_headers), - public_headers_install=not private_library, + public_headers=ldb_headers, + public_headers_install=True, pc_files='ldb.pc', vnum=VERSION, - private_library=private_library, + private_library=False, manpages='man/ldb.3', abi_directory='ABI', abi_match = abi_match) diff --git a/wscript b/wscript index 770b9bcf9af..6b5d29bcfe5 100644 --- a/wscript +++ b/wscript @@ -16,6 +16,8 @@ from waflib.Tools import bison samba_dist.DIST_DIRS('.') samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions') +DEFAULT_PRIVATE_LIBS = ["ldb"] + # install in /usr/local/samba by default default_prefix = Options.default_prefix = '/usr/local/samba'