summaryrefslogtreecommitdiff
path: root/source4/lib/replace/SConscript
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-23 16:32:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:48 -0500
commit4be0ae794e4af2354d678fddd7bf1e822ffa9148 (patch)
tree128989d970334e4a896329992e827c4f09b8c035 /source4/lib/replace/SConscript
parentda46c9252ee887602b3e629065ca87b9ed11466f (diff)
downloadsamba-4be0ae794e4af2354d678fddd7bf1e822ffa9148.tar.gz
samba-4be0ae794e4af2354d678fddd7bf1e822ffa9148.tar.bz2
samba-4be0ae794e4af2354d678fddd7bf1e822ffa9148.zip
r10456: More SCons fixes:
- Add framework for fallback generating code - Move pread / pwrite replacement functions to libreplace - Support pidl builds correctly - Support asn1 builds correctly - Move OS-specific checks to lib/replace/SConscript (This used to be commit fbbfad0a1f7dedbf48e835a864f8285f283d72f3)
Diffstat (limited to 'source4/lib/replace/SConscript')
-rw-r--r--source4/lib/replace/SConscript28
1 files changed, 24 insertions, 4 deletions
diff --git a/source4/lib/replace/SConscript b/source4/lib/replace/SConscript
index 982120e1bf..a2b3a30e10 100644
--- a/source4/lib/replace/SConscript
+++ b/source4/lib/replace/SConscript
@@ -1,11 +1,31 @@
-Import('hostenv')
+#!/usr/bin/env python
+Import('hostenv defines')
if hostenv['configure']:
conf = Configure(hostenv)
- #FIXME: conf.CheckBrokenInetNtoa()
+ for f in ['memset','syslog','setnetgrent','getnetgrent','endnetgrent', \
+ 'mktemp']:
+ if not conf.CheckFunc(f,'c'):
+ print "Required function `%s' not found" % f
+ exit(1)
+
for f in ['strtoull','__strtoull','strtouq','strtoll','__strtoll','strtoq',
- 'seteuid','setresuid','setegid','setresgid']:
- conf.CheckFunc(f,'c')
+ 'seteuid','setresuid','setegid','setresgid','dlsym','dlopen',
+ 'dlerror','dlclose','waitpid','getcwd','strdup','strndup',
+ 'strnlen','strerror','bzero','chroot','strlcpy','strlcat',
+ 'memmove','vsnprintf','asprintf','snprintf','vasprintf',
+ 'innetgr','mktime','rename','ftruncate','chsize','setlinebuf',
+ 'setenv','vsyslog','pread','pwrite']:
+ if conf.CheckFunc(f,'c'):
+ defines['HAVE_' + f.upper()] = 1
+
+ for h in ['dlfcn.h']:
+ if conf.CheckCHeader('dlfcn.h'):
+ defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1
+
+ if not conf.CheckType('socklen_t'):
+ defines['socklen_t'] = 'int'
+
conf.Finish()
hostenv.StaticLibrary('repdir', ['repdir/repdir.c'])