Debian Codegraph @

build/moz.configure/nss.configure

raw
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 system_lib_option(
8 "--with-system-nss",
9 help="Use system NSS",
10 when=use_pkg_config,
11 )
12
13 imply_option("--with-system-nspr", True, when="--with-system-nss")
14
15 nss_pkg = pkg_check_modules(
16 "NSS", "nss >= 3.112", when="--with-system-nss", config=False
17 )
18
19 set_config("MOZ_SYSTEM_NSS", True, when="--with-system-nss")
20
21
22 @depends(nss_pkg, build_environment)
23 def nss_config(nss_pkg, build_env):
24 cflags = ["-I%s" % os.path.join(build_env.dist, "include", "nss")]
25 libs = None
26 if nss_pkg:
27 cflags = list(nss_pkg.cflags) + cflags
28 libs = nss_pkg.libs
29 return namespace(cflags=cflags, libs=libs)
30
31
32 set_config("NSS_CFLAGS", nss_config.cflags)
33 set_config("NSS_LIBS", nss_config.libs)
34
35 # Used specifically by Thunderbird
36 project_flag(
37 env="NSS_EXTRA_SYMBOLS_FILE",
38 nargs=1,
39 help="Path to a file containing extra symbols to export from NSS",
40 )