1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
--- ./source3/wscript.orig 2013-09-06 09:39:57.000000000 +0000
+++ ./source3/wscript 2013-11-20 00:30:53.150817814 +0000
@@ -34,6 +34,7 @@
opt.SAMBA3_ADD_OPTION('utmp')
opt.SAMBA3_ADD_OPTION('pthreadpool', with_name="enable", without_name="disable", default=True)
opt.SAMBA3_ADD_OPTION('avahi', with_name="enable", without_name="disable")
+ opt.SAMBA3_ADD_OPTION('dnssd', with_name="enable", without_name="disable")
opt.SAMBA3_ADD_OPTION('iconv')
opt.SAMBA3_ADD_OPTION('acl-support')
opt.SAMBA3_ADD_OPTION('dnsupdate')
@@ -315,7 +316,9 @@
# Check if the compiler will optimize out functions
conf.CHECK_CODE('''
-if (0) {
+char s = "string";
+int len = 6;
+if (sizeof(s) != len && sizeof(s) != sizeof(char *)) {
this_function_does_not_exist();
} else {
return 1;
@@ -493,7 +496,7 @@
conf.CHECK_CODE('struct aiocb a; return aio_return(&a);', 'HAVE_AIO_RETURN', msg='Checking for aio_return', headers='aio.h', lib='aio rt')
conf.CHECK_CODE('struct aiocb a; return aio_error(&a);', 'HAVE_AIO_ERROR', msg='Checking for aio_error', headers='aio.h', lib='aio rt')
conf.CHECK_CODE('struct aiocb a; return aio_cancel(1, &a);', 'HAVE_AIO_CANCEL', msg='Checking for aio_cancel', headers='aio.h', lib='aio rt')
- conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return aio_suspend(&a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt')
+ conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec t; return aio_suspend(a, 1, &t);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt')
if not conf.CONFIG_SET('HAVE_AIO'):
conf.DEFINE('HAVE_NO_AIO', '1')
else:
@@ -803,6 +806,17 @@
conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
+ if Options.options.with_dnssd:
+ conf.env.with_dnssd = True
+ if not conf.CHECK_HEADERS('dns_sd.h'):
+ conf.env.with_dnssd = False
+ if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'):
+ conf.env.with_dnssd = False
+ if conf.env.with_dnssd:
+ conf.DEFINE('WITH_DNSSD_SUPPORT', 1)
+ else:
+ conf.SET_TARGET_TYPE('dns_sd', 'EMPTY')
+
if Options.options.with_iconv:
conf.env.with_iconv = True
if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
@@ -1690,26 +1704,8 @@
if PTHREAD_LDFLAGS == 'error':
if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthread'):
- PTHREAD_CFLAGS='-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS'
- PTHREAD_LDFLAGS='-lpthread'
- if PTHREAD_LDFLAGS == 'error':
- if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthreads'):
- PTHREAD_CFLAGS='-D_THREAD_SAFE'
- PTHREAD_LDFLAGS='-lpthreads'
- if PTHREAD_LDFLAGS == 'error':
- if conf.CHECK_FUNCS_IN('pthread_attr_init', 'c_r'):
- PTHREAD_CFLAGS='-D_THREAD_SAFE -pthread'
+ PTHREAD_CFLAGS='-pthread'
PTHREAD_LDFLAGS='-pthread'
- if PTHREAD_LDFLAGS == 'error':
- if conf.CHECK_FUNCS('pthread_attr_init'):
- PTHREAD_CFLAGS='-D_REENTRANT'
- PTHREAD_LDFLAGS='-lpthread'
- # especially for HP-UX, where the CHECK_FUNC macro fails to test for
- # pthread_attr_init. On pthread_mutex_lock it works there...
- if PTHREAD_LDFLAGS == 'error':
- if conf.CHECK_FUNCS_IN('pthread_mutex_lock', 'pthread'):
- PTHREAD_CFLAGS='-D_REENTRANT'
- PTHREAD_LDFLAGS='-lpthread'
if PTHREAD_CFLAGS != 'error' and PTHREAD_LDFLAGS != 'error':
conf.ADD_CFLAGS(PTHREAD_CFLAGS)
@@ -1783,8 +1779,8 @@
auth_script vfs_readahead vfs_xattr_tdb vfs_posix_eadb
vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb
vfs_smb_traffic_analyzer vfs_preopen vfs_catia vfs_scannedonly
- vfs_media_harmony
- vfs_commit
+ vfs_media_harmony
+ vfs_commit
vfs_crossrename vfs_linux_xfs_sgid
vfs_time_audit idmap_autorid idmap_tdb2
idmap_rid idmap_hash idmap_rfc2307'''))
@@ -1830,7 +1826,7 @@
default_static_modules.extend(TO_LIST('charset_macosxfs'))
if conf.CONFIG_SET('HAVE_GPFS'):
- default_shared_modules.extend(TO_LIST('vfs_gpfs'))
+ default_shared_modules.extend(TO_LIST('vfs_gpfs'))
if conf.CONFIG_SET('HAVE_LINUX_IOCTL'):
default_shared_modules.extend(TO_LIST('vfs_btrfs'))
|