mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
Add configure checks for glibc and openssl versions
Add configure checks to determine if rust or specifically himmelblau sources can be compiled. Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
221447d5ba
commit
549f67a9e6
@ -8,6 +8,13 @@ import wafsamba
|
|||||||
from samba_utils import symlink
|
from samba_utils import symlink
|
||||||
from optparse import SUPPRESS_HELP
|
from optparse import SUPPRESS_HELP
|
||||||
|
|
||||||
|
def get_libc_version():
|
||||||
|
import ctypes
|
||||||
|
libc = ctypes.CDLL("libc.so.6")
|
||||||
|
gnu_get_libc_version = libc.gnu_get_libc_version
|
||||||
|
gnu_get_libc_version.restype = ctypes.c_char_p
|
||||||
|
return gnu_get_libc_version().decode()
|
||||||
|
|
||||||
phs = os.environ.get("PYTHONHASHSEED", None)
|
phs = os.environ.get("PYTHONHASHSEED", None)
|
||||||
if phs != "1":
|
if phs != "1":
|
||||||
raise Errors.WafError('''PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!''')
|
raise Errors.WafError('''PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!''')
|
||||||
@ -356,6 +363,10 @@ def configure(conf):
|
|||||||
conf.env.disable_python = Options.options.disable_python
|
conf.env.disable_python = Options.options.disable_python
|
||||||
conf.env.enable_rust = Options.options.enable_rust
|
conf.env.enable_rust = Options.options.enable_rust
|
||||||
if Options.options.enable_rust:
|
if Options.options.enable_rust:
|
||||||
|
glibc_vers = float('.'.join(get_libc_version().split('.')[:2]))
|
||||||
|
if glibc_vers < 2.32:
|
||||||
|
conf.fatal('--enable-rust cannot be specified with '
|
||||||
|
'glibc version %s' % glibc_vers)
|
||||||
conf.DEFINE('HAVE_RUST', '1')
|
conf.DEFINE('HAVE_RUST', '1')
|
||||||
|
|
||||||
if (conf.env.AUTOCONF_HOST and
|
if (conf.env.AUTOCONF_HOST and
|
||||||
|
8
wscript
8
wscript
@ -12,6 +12,7 @@ import shutil
|
|||||||
import wafsamba, samba_dist, samba_git, samba_version, samba_utils
|
import wafsamba, samba_dist, samba_git, samba_version, samba_utils
|
||||||
from waflib import Options, Scripting, Logs, Context, Errors
|
from waflib import Options, Scripting, Logs, Context, Errors
|
||||||
from waflib.Tools import bison
|
from waflib.Tools import bison
|
||||||
|
import ssl
|
||||||
|
|
||||||
samba_dist.DIST_DIRS('.')
|
samba_dist.DIST_DIRS('.')
|
||||||
samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions')
|
samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions')
|
||||||
@ -511,6 +512,13 @@ def configure(conf):
|
|||||||
conf.env.debug = Options.options.debug
|
conf.env.debug = Options.options.debug
|
||||||
conf.env.developer = Options.options.developer
|
conf.env.developer = Options.options.developer
|
||||||
conf.env.enable_himmelblau = Options.options.enable_himmelblau
|
conf.env.enable_himmelblau = Options.options.enable_himmelblau
|
||||||
|
if Options.options.enable_himmelblau:
|
||||||
|
if not conf.env.enable_rust:
|
||||||
|
conf.fatal('--with-himmelblau cannot be specified without '
|
||||||
|
'--enable-rust')
|
||||||
|
if ssl.OPENSSL_VERSION_INFO[0] < 3:
|
||||||
|
conf.fatal('--with-himmelblau cannot be specified with '
|
||||||
|
'%s' % ssl.OPENSSL_VERSION)
|
||||||
|
|
||||||
#
|
#
|
||||||
# FreeBSD is broken. It doesn't include 'extern char **environ'
|
# FreeBSD is broken. It doesn't include 'extern char **environ'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user