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/.
7 system_lib_option("--with-system-nss", help="Use system NSS")
9 imply_option("--with-system-nspr", True, when="--with-system-nss")
11 nss_pkg = pkg_check_modules(
12 "NSS", "nss >= 3.95", when="--with-system-nss", config=False
15 set_config("MOZ_SYSTEM_NSS", True, when="--with-system-nss")
18 @depends(nss_pkg, build_environment)
19 def nss_config(nss_pkg, build_env):
20 cflags = ["-I%s" % os.path.join(build_env.dist, "include", "nss")]
23 cflags = list(nss_pkg.cflags) + cflags
25 return namespace(cflags=cflags, libs=libs)
28 set_config("NSS_CFLAGS", nss_config.cflags)
29 set_config("NSS_LIBS", nss_config.libs)