Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/buildtools/wafsamba/samba3.py

    r740 r988  
    55from optparse import SUPPRESS_HELP
    66from samba_utils import os_path_relpath, TO_LIST
     7from samba_autoconf import library_flags
     8
    79
    810def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
    911                      with_name="with", without_name="without"):
     12    if default is None:
     13        default_str = "auto"
     14    elif default is True:
     15        default_str = "yes"
     16    elif default is False:
     17        default_str = "no"
     18    else:
     19        default_str = str(default)
     20
    1021    if help == ():
    11         help = ("Build with %s support" % option)
     22        help = ("Build with %s support (default=%s)" % (option, default_str))
    1223    if dest is None:
    1324        dest = "with_%s" % option.replace('-', '_')
     
    4758def s3_fix_kwargs(bld, kwargs):
    4859    '''fix the build arguments for s3 build rules to include the
    49         necessary includes, subdir and cflags options '''
     60    necessary includes, subdir and cflags options '''
    5061    s3dir = os.path.join(bld.env.srcdir, 'source3')
    5162    s3reldir = os_path_relpath(s3dir, bld.curdir)
     
    5364    # the extra_includes list is relative to the source3 directory
    5465    extra_includes = [ '.', 'include', 'lib' ]
    55     if bld.env.use_intree_heimdal:
     66    # local heimdal paths only included when USING_SYSTEM_KRB5 is not set
     67    if not bld.CONFIG_SET("USING_SYSTEM_KRB5"):
    5668        extra_includes += [ '../source4/heimdal/lib/com_err',
     69                            '../source4/heimdal/lib/krb5',
    5770                            '../source4/heimdal/lib/gssapi',
    58                             '../source4/heimdal_build' ]
     71                            '../source4/heimdal_build',
     72                            '../bin/default/source4/heimdal/lib/asn1' ]
    5973
    60     if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
     74    if bld.CONFIG_SET('USING_SYSTEM_TDB'):
     75        (tdb_includes, tdb_ldflags, tdb_cpppath) = library_flags(bld, 'tdb')
     76        extra_includes += tdb_cpppath
     77    else:
    6178        extra_includes += [ '../lib/tdb/include' ]
    6279
    63     if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
     80    if bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
     81        (tevent_includes, tevent_ldflags, tevent_cpppath) = library_flags(bld, 'tevent')
     82        extra_includes += tevent_cpppath
     83    else:
    6484        extra_includes += [ '../lib/tevent' ]
    6585
    66     if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
     86    if bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
     87        (talloc_includes, talloc_ldflags, talloc_cpppath) = library_flags(bld, 'talloc')
     88        extra_includes += talloc_cpppath
     89    else:
    6790        extra_includes += [ '../lib/talloc' ]
    6891
    69     if not bld.CONFIG_SET('USING_SYSTEM_POPT'):
     92    if bld.CONFIG_SET('USING_SYSTEM_POPT'):
     93        (popt_includes, popt_ldflags, popt_cpppath) = library_flags(bld, 'popt')
     94        extra_includes += popt_cpppath
     95    else:
    7096        extra_includes += [ '../lib/popt' ]
    7197
     
    80106    kwargs['includes'] = includes
    81107
    82     # some S3 code assumes that CONFIGFILE is set
    83     cflags = ['-DCONFIGFILE="%s"' % bld.env['CONFIGFILE']]
    84     if 'cflags' in kwargs:
    85         cflags += TO_LIST(kwargs['cflags'])
    86     kwargs['cflags'] = cflags
    87 
    88108# these wrappers allow for mixing of S3 and S4 build rules in the one build
    89109
    90110def SAMBA3_LIBRARY(bld, name, *args, **kwargs):
    91         s3_fix_kwargs(bld, kwargs)
    92         kwargs['allow_undefined_symbols'] = True
    93         return bld.SAMBA_LIBRARY(name, *args, **kwargs)
     111    s3_fix_kwargs(bld, kwargs)
     112    return bld.SAMBA_LIBRARY(name, *args, **kwargs)
    94113Build.BuildContext.SAMBA3_LIBRARY = SAMBA3_LIBRARY
    95114
    96115def SAMBA3_MODULE(bld, name, *args, **kwargs):
    97         s3_fix_kwargs(bld, kwargs)
    98         kwargs['allow_undefined_symbols'] = True
    99         return bld.SAMBA_MODULE(name, *args, **kwargs)
     116    s3_fix_kwargs(bld, kwargs)
     117    return bld.SAMBA_MODULE(name, *args, **kwargs)
    100118Build.BuildContext.SAMBA3_MODULE = SAMBA3_MODULE
    101119
    102120def SAMBA3_SUBSYSTEM(bld, name, *args, **kwargs):
    103         s3_fix_kwargs(bld, kwargs)
    104         return bld.SAMBA_SUBSYSTEM(name, *args, **kwargs)
     121    s3_fix_kwargs(bld, kwargs)
     122    return bld.SAMBA_SUBSYSTEM(name, *args, **kwargs)
    105123Build.BuildContext.SAMBA3_SUBSYSTEM = SAMBA3_SUBSYSTEM
    106124
    107125def SAMBA3_BINARY(bld, name, *args, **kwargs):
    108         s3_fix_kwargs(bld, kwargs)
    109         return bld.SAMBA_BINARY(name, *args, **kwargs)
     126    s3_fix_kwargs(bld, kwargs)
     127    return bld.SAMBA_BINARY(name, *args, **kwargs)
    110128Build.BuildContext.SAMBA3_BINARY = SAMBA3_BINARY
     129
     130def SAMBA3_PYTHON(bld, name, *args, **kwargs):
     131    s3_fix_kwargs(bld, kwargs)
     132    return bld.SAMBA_PYTHON(name, *args, **kwargs)
     133Build.BuildContext.SAMBA3_PYTHON = SAMBA3_PYTHON
Note: See TracChangeset for help on using the changeset viewer.