mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r10374: Add HAVE_* defines (on command-line or in config.h file) for scons +
some other minor updates
(This used to be commit f142c15de1
)
This commit is contained in:
parent
b5521a818f
commit
9d44a9a351
@ -7,10 +7,13 @@
|
||||
# Copyright (C) 2005 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU GPL
|
||||
|
||||
# We don't care about NFS builds...
|
||||
|
||||
opts = Options(None, ARGUMENTS)
|
||||
opts.AddOptions(
|
||||
BoolOption('developer','enable developer flags', 0),
|
||||
PathOption('prefix','installation prefix','/usr/local/samba')
|
||||
PathOption('prefix','installation prefix','/usr/local/samba'),
|
||||
BoolOption('configh','use config.h file', 0)
|
||||
)
|
||||
|
||||
hostenv = Environment(
|
||||
@ -21,6 +24,8 @@ hostenv = Environment(
|
||||
CPPDEFINES={'_SAMBA_BUILD_': None},
|
||||
)
|
||||
|
||||
hostenv.SetOption('max_drift', 1)
|
||||
|
||||
if hostenv['developer']:
|
||||
hostenv.Append(CCFLAGS='-Wall')
|
||||
hostenv.Append(CCFLAGS='-Wshadow')
|
||||
@ -35,7 +40,8 @@ if hostenv['developer']:
|
||||
hostenv.Append(CCFLAGS='-Wno-format-y2k')
|
||||
hostenv.Append(CCFLAGS='-Wno-declaration-after-statement')
|
||||
|
||||
|
||||
defines = {}
|
||||
Export('defines')
|
||||
|
||||
hostenv.Append(CPPPATH = ['#heimdal_build', '#heimdal/lib/krb5',
|
||||
'#heimdal/lib/hdb', '#heimdal/lib/gssapi',
|
||||
@ -88,7 +94,8 @@ for h in ['sys/select.h','fcntl.h','sys/fcntl.h','sys/time.h'] + \
|
||||
['shadow.h','nss.h','nss_common.h','ns_api.h','sys/security.h'] + \
|
||||
['security/pam_appl.h','sys/capability.h','syscall.h','sys/syscall.h'] + \
|
||||
['sys/acl.h']:
|
||||
conf.CheckCHeader(h)
|
||||
if conf.CheckCHeader(h):
|
||||
defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1
|
||||
|
||||
for f in ['dlopen','dlsym','dlerror','waitpid','getcwd','strdup'] + \
|
||||
['strndup','strnlen','strerror','chroot','bzero','memset','strlcpy'] + \
|
||||
@ -99,7 +106,8 @@ for f in ['dlopen','dlsym','dlerror','waitpid','getcwd','strdup'] + \
|
||||
['ftruncate','chsize','getpwanam','setlinebuf','srandom','random'] + \
|
||||
['srand','rand','setenv','usleep','syslog','vsyslog','timegm'] + \
|
||||
['backtrace','setbuffer','pread','pwrite']:
|
||||
conf.CheckFunc(f)
|
||||
if conf.CheckFunc(f):
|
||||
defines['HAVE_' + f.upper()] = 1
|
||||
|
||||
conf.Finish()
|
||||
|
||||
@ -112,9 +120,17 @@ proto_files = []
|
||||
Export('proto_files')
|
||||
|
||||
SConscript(
|
||||
dirs=['param','lib','torture','rpc_server','cldap_server','libcli',
|
||||
dirs=['lib','torture','rpc_server','cldap_server','libcli',
|
||||
'nbt_server','client','ldap_server','libnet','nsswitch','web_server',
|
||||
'smbd','dsdb','heimdal_build','ntptr','kdc','smb_server','ntvfs',
|
||||
'winbind','scripting','auth'])
|
||||
|
||||
hostenv.CProtoHeader(target='include/proto.h',source=proto_files)
|
||||
|
||||
if hostenv['configh']:
|
||||
def create_config_h(env,target,source):
|
||||
pass #FIXME
|
||||
hostenv.Command('include/config.h',[],create_config_h)
|
||||
hostenv.Append(CPPDEFINES = {HAVE_CONFIG_H: 1})
|
||||
else:
|
||||
[hostenv.Append(CPPDEFINES = {p: defines[p]}) for p in defines]
|
||||
|
@ -1,2 +1,2 @@
|
||||
Import('hostenv')
|
||||
hostenv.Program('smbclient', ['client.c'])
|
||||
Import('hostenv popt_common basic talloc param')
|
||||
hostenv.Program('smbclient', ['client.c',popt_common,talloc,basic,param])
|
||||
|
@ -3,7 +3,7 @@ gtksmb = hostenv.StaticLibrary('gtksmb',
|
||||
['common/gtk-smb.c','common/select.c',
|
||||
'common/gtk_events.c','common/credentials.c'])
|
||||
|
||||
hostenv.Program('gregedit', [gtksmb,'tools/gregedit.c'])
|
||||
hostenv.Program('gepdump', [gtksmb,'tools/gepdump.c'])
|
||||
hostenv.Program('gwcrontab', [gtksmb,'tools/gwcrontab.c'])
|
||||
hostenv.Program('gwsam', [gtksmb,'tools/gwsam.c','tools/gwsam_user.c'])
|
||||
hostenv.Program('gregedit', [gtksmb,'tools/gregedit.c',gtksmb])
|
||||
hostenv.Program('gepdump', [gtksmb,'tools/gepdump.c',gtksmb])
|
||||
hostenv.Program('gwcrontab', [gtksmb,'tools/gwcrontab.c',gtksmb])
|
||||
hostenv.Program('gwsam', [gtksmb,'tools/gwsam.c','tools/gwsam_user.c',gtksmb])
|
||||
|
@ -1,13 +1,16 @@
|
||||
Import('hostenv')
|
||||
# tastes like -*- python -*-
|
||||
|
||||
SConscript(dirs=['talloc','charset'])
|
||||
Import('talloc dynconfig charset')
|
||||
|
||||
basic_files = ['version.c', 'xfile.c', 'debug.c', 'fault.c',
|
||||
'signal.c', 'system.c', 'time.c', 'genrand.c', 'dprintf.c',
|
||||
'util_str.c', 'util_strlist.c', 'util_unistr.c', 'util_file.c',
|
||||
'data_blob.c', 'util.c', 'util_sock.c', 'substitute.c',
|
||||
'fsusage.c', 'ms_fnmatch.c', 'select.c', 'mutex.c', 'idtree.c',
|
||||
'db_wrap.c', 'gendb.c', 'credentials.c']
|
||||
basic = hostenv.StaticLibrary('basic', basic_files)
|
||||
'db_wrap.c']
|
||||
basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files])
|
||||
Export('basic')
|
||||
|
||||
hostenv.StaticLibrary('netif', ['netif/interface.c', 'netif/netif.c'])
|
||||
@ -20,5 +23,14 @@ hostenv.StaticLibrary('gencache',['gencache.c'])
|
||||
hostenv.StaticLibrary('pidfile',['pidfile.c'])
|
||||
hostenv.StaticLibrary('unix_privs',['unix_privs.c'])
|
||||
|
||||
SConscript(dirs=['replace','tdb','popt','cmdline','talloc','registry','charset', 'ldb','tls','samba3','socket','socket_wrapper','messaging','com','events',
|
||||
'appweb'])
|
||||
SConscript(dirs=['ldb'])
|
||||
|
||||
Import('ldb')
|
||||
gendb = hostenv.StaticLibrary('gendb', ['gendb.c',ldb])
|
||||
Export('gendb')
|
||||
|
||||
credentials = hostenv.StaticLibrary('credentials',['credentials.c',basic,gendb])
|
||||
Export('credentials')
|
||||
|
||||
SConscript(dirs=['../param/','replace','tdb','popt','cmdline','registry', 'tls','samba3','socket','socket_wrapper','messaging','com','events', 'appweb'])
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Import('hostenv')
|
||||
# tastes like -*- python -*-
|
||||
|
||||
Import('basic param')
|
||||
popt_common = hostenv.StaticLibrary('popt_common',['popt_common.c',basic,param])
|
||||
Import('basic param credentials')
|
||||
popt_common = hostenv.StaticLibrary('popt_common',['popt_common.c',basic,param,credentials])
|
||||
Export('popt_common')
|
||||
|
@ -1,7 +1,14 @@
|
||||
Import('hostenv')
|
||||
hostenv.StaticLibrary('socket_wrapper',['socket_wrapper.c'])
|
||||
|
||||
opts = Options(None, ARGUMENTS)
|
||||
opts.AddOptions(
|
||||
BoolOption('socket-wrapper','enable socket wrapper',0)
|
||||
BoolOption('socket_wrapper','enable socket wrapper',0)
|
||||
)
|
||||
|
||||
opts.Update(hostenv)
|
||||
|
||||
if hostenv['socket_wrapper']:
|
||||
hostenv.Append(CPPDEFINES = {'HAVE_SOCKET_WRAPPER': 1})
|
||||
socket_wrapper = hostenv.StaticLibrary('socket_wrapper',['socket_wrapper.c'])
|
||||
else:
|
||||
socket_wrapper = []
|
||||
|
@ -1,8 +1,8 @@
|
||||
Import('hostenv')
|
||||
# tastes like -*- python -*-
|
||||
|
||||
Import('dynconfig')
|
||||
param = StaticLibrary('loadparm',['loadparm.c','params.c',dynconfig])
|
||||
Import('dynconfig basic')
|
||||
param = hostenv.StaticLibrary('loadparm',['loadparm.c','params.c',dynconfig,basic])
|
||||
Export('param')
|
||||
generic = StaticLibrary('generic',['generic.c'])
|
||||
generic = hostenv.StaticLibrary('generic',['generic.c'])
|
||||
Export('generic')
|
||||
|
Loading…
Reference in New Issue
Block a user