From 3d4ea18d4dd9031adc16348c16595d6c216b2d84 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 24 Sep 2005 16:23:41 +0000 Subject: r10478: More work on proto headers; we now generate a couple of smaller ones that are then included by include/proto.h (This used to be commit 703ffbaaaca11f3d8781cfe9e7542fcaa626d991) --- source4/lib/SConscript | 14 ++++++++++---- source4/lib/replace/SConscript | 10 ++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/SConscript b/source4/lib/SConscript index 328d6233e4..caeeea5712 100644 --- a/source4/lib/SConscript +++ b/source4/lib/SConscript @@ -2,7 +2,7 @@ Import('hostenv') # tastes like -*- python -*- SConscript(dirs=['talloc','charset']) -Import('talloc', 'dynconfig', 'charset', 'proto_files') +Import('talloc', 'dynconfig', 'charset') basic_files = ['version.c', 'xfile.c', 'debug.c', 'fault.c', 'signal.c', 'system.c', 'time.c', 'genrand.c', 'dprintf.c', @@ -11,7 +11,7 @@ basic_files = ['version.c', 'xfile.c', 'debug.c', 'fault.c', 'fsusage.c', 'ms_fnmatch.c', 'select.c', 'mutex.c', 'idtree.c', 'db_wrap.c'] -proto_files += [File(x) for x in basic_files] +proto_files = basic_files basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files]) Export('basic') @@ -29,11 +29,17 @@ hostenv.StaticLibrary('unix_privs',['unix_privs.c']) SConscript(dirs=['ldb']) Import('ldb') -gendb = hostenv.StaticLibrary('gendb', ['gendb.c',ldb]) +gendb_files = ['gendb.c'] +proto_files += gendb_files +gendb = hostenv.StaticLibrary('gendb', [gendb_files,ldb]) Export('gendb') -credentials = hostenv.StaticLibrary('credentials',['credentials.c',basic,gendb]) +credentials_files = ['credentials.c'] +proto_files += credentials_files +credentials = hostenv.StaticLibrary('credentials',[credentials_files,basic,gendb]) Export('credentials') +hostenv.proto_headers += hostenv.CProtoHeader('proto.h', proto_files) + SConscript(dirs=['../param/','replace','tdb','popt','cmdline','registry', 'tls','samba3','socket','socket_wrapper','messaging','com','events', 'appweb']) diff --git a/source4/lib/replace/SConscript b/source4/lib/replace/SConscript index 60652b0b15..48abf2c081 100644 --- a/source4/lib/replace/SConscript +++ b/source4/lib/replace/SConscript @@ -19,6 +19,16 @@ if hostenv['configure']: if conf.CheckFunc(f,'c'): defines['HAVE_' + f.upper()] = 1 + # Check for errno declaration + if conf.TryCompile(""" +#include + +int main() { + int i = (int)errno; + return 0; +}""", '.c'): + defines['HAVE_ERRNO_DECL'] = 1 + for h in ['dlfcn.h']: if conf.CheckCHeader('dlfcn.h'): defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1 -- cgit