1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r10393: More type checking in scons

Remove unused file
(This used to be commit a9e71ab5d1ed8b34f158ff0e89dd67ec785b9829)
This commit is contained in:
Jelmer Vernooij 2005-09-21 15:18:11 +00:00 committed by Gerald (Jerry) Carter
parent b1ad4a27cb
commit 90678b76d6
3 changed files with 54 additions and 11 deletions

View File

@ -13,7 +13,7 @@ import cPickle
opts = Options(None, ARGUMENTS)
opts.AddOptions(
BoolOption('developer','enable developer flags', 0),
BoolOption('developer','enable developer flags', False),
PathOption('prefix','installation prefix','/usr/local/samba'),
BoolOption('configure','run configure checks', False),
)
@ -42,6 +42,9 @@ if hostenv['developer']:
hostenv.Append(CCFLAGS='-Wno-format-y2k')
hostenv.Append(CCFLAGS='-Wno-declaration-after-statement')
# Pull in GNU extensions
hostenv.Append(CPPDEFINES = {'_GNU_SOURCE': 1})
# Store configuration data in a dictionary.
def saveconfig(data):
@ -116,7 +119,7 @@ if hostenv['configure']:
['sys/syslog.h','syslog.h','stdint.h','inttypes.h','locale.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']:
['sys/acl.h','stdbool.h']:
if conf.CheckCHeader(h):
defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1
@ -132,6 +135,54 @@ if hostenv['configure']:
if conf.CheckFunc(f):
defines['HAVE_' + f.upper()] = 1
needed_types = {
'uint_t': 'unsigned int',
'int8_t': 'signed char',
'uint8_t': 'unsigned char',
'int16_t': 'short',
'uint16_t': 'unsigned short',
'int32_t': 'long',
'uint32_t': 'unsigned long',
'int64_t': 'long long',
'uint64_t': 'unsigned long long'
}
type_headers = """
#include <stdint.h>
"""
for t in needed_types:
if not conf.CheckType(t,type_headers):
defines[t] = needed_types[t]
if conf.TryCompile("""
#include <sys/types.h>
int main()
{
volatile int i = 0;
return 0;
}""", '.c'):
defines['HAVE_VOLATILE'] = 1
if conf.TryCompile("""
#include <stdio.h>
int main()
{
typedef struct {unsigned x;} FOOBAR;
#define X_FOOBAR(x) ((FOOBAR) { x })
#define FOO_ONE X_FOOBAR(1)
FOOBAR f = FOO_ONE;
static struct {
FOOBAR y;
} f2[] = {
{FOO_ONE}
};
return 0;
}""", '.c'):
defines['HAVE_IMMEDIATE_STRUCTURES'] = 1
hostenv.AlwaysBuild('include/config.h')
conf.Finish()
[dynenv.Append(CPPDEFINES = {p: '\\"%s\\"' % paths[p]}) for p in paths]
@ -156,10 +207,9 @@ if hostenv['configure']:
saveconfig(defines)
# How to create config.h file
def create_config_h(env, target, source):
fd = open(str(target[0]), 'w')
[fd.write('#define %s\n' % x) for x in defines]
[fd.write('#define %s %s\n' % (x, defines[x])) for x in defines]
fd.close()
def create_config_h_print(*args, **kwargs):

View File

@ -1,6 +0,0 @@
dnl SMB Build Environment Shared Ld Checks
dnl -------------------------------------------------------
dnl Copyright (C) Stefan (metze) Metzmacher 2004
dnl Released under the GNU GPL
dnl -------------------------------------------------------
dnl

View File

@ -19,6 +19,5 @@ sinclude(build/m4/check_path.m4)
sinclude(build/m4/check_perl.m4)
sinclude(build/m4/check_cc.m4)
sinclude(build/m4/check_ld.m4)
sinclude(build/m4/check_shld.m4)
sinclude(build/m4/check_types.m4)
sinclude(build/m4/check_doc.m4)