3 # list of directory options to offer in configure
5 'with-cachedir' : [ '${PREFIX}/var/locks', 'where to put temporary cache files' ],
6 'with-codepagedir' : [ '${PREFIX}/lib/samba', 'where to put codepages' ],
7 'with-configdir' : [ '${PREFIX}/etc/samba', 'Where to put configuration files' ],
8 'with-lockdir' : [ '${PREFIX}/var/locks', 'where to put lock files' ],
9 'with-logfilebase' : [ '${PREFIX}/var/log/samba', 'Where to put log files' ],
10 'with-ncalrpcdir' : [ '${PREFIX}/var/ncalrpc', 'where to put ncalrpc sockets' ],
11 'with-nmbdsocketdir' : [ '${PREFIX}/var/locks/.nmbd', 'Where to put the nmbd socket directory' ],
12 'with-ntp-signd-socket-dir' : [ '${PREFIX}/var/run/ntp_signd', 'NTP signed directory'],
13 'with-pammodulesdir' : [ '', 'Which directory to use for PAM modules' ],
14 'with-piddir' : [ '${PREFIX}/var/locks', 'where to put pid files' ],
15 'with-privatedir' : [ '${PREFIX}/private', 'where to put smbpasswd' ],
16 'with-selftest-prefix' : [ '', 'The prefix where make test will be run' ],
17 'with-selftest-shrdir' : [ '', 'The share directory that make test will be run against' ],
18 'with-statedir' : [ '${PREFIX}/var/locks', 'where to put persistent state files' ],
19 'with-swatdir' : [ '${PREFIX}/swat', 'Where to put SWAT files' ],
20 'with-winbindd-privileged-socket-dir' : [ '${PREFIX}/var/lib/winbindd_privileged', 'winbind privileged socket directory'],
21 'with-winbindd-socket-dir' : [ '${PREFIX}/var/lib/winbindd', 'winbind socket directory' ],
24 # list of cflags to use for dynconfig.c
26 'BINDIR' : '${BINDIR}',
27 'CACHEDIR' : '${CACHEDIR}',
28 'CODEPAGEDIR' : '${CODEPAGEDIR}',
29 'CONFIGDIR' : '${SYSCONFDIR}',
30 'CONFIGFILE' : '${SYSCONFDIR}/smb.conf',
31 'DATADIR' : '${DATADIR}',
32 'LIBDIR' : '${LIBDIR}',
33 'LMHOSTSFILE' : '${SYSCONFDIR}/lmhosts',
34 'LOCKDIR' : '${LOCALSTATEDIR}/locks',
35 'LOGFILEBASE' : '${LOCALSTATEDIR}',
36 'MODULESDIR' : '${PREFIX}/modules',
37 'NCALRPCDIR' : '${LOCALSTATEDIR}/ncalrpc',
38 'NMBDSOCKETDIR' : '${LOCKDIR}/.nmbd',
39 'NTP_SIGND_SOCKET_DIR' : '${NTP_SIGND_SOCKET_DIR}',
40 'PIDDIR' : '${LOCALSTATEDIR}/run',
41 'PRIVATE_DIR' : '${PRIVATEDIR}',
42 'SBINDIR' : '${SBINDIR}',
43 'SETUPDIR' : '${DATADIR}/setup',
44 'SMB_PASSWD_FILE' : '${PRIVATEDIR}/smbpasswd',
45 'STATEDIR' : '${LOCALSTATEDIR}',
46 'SWATDIR' : '${PREFIX}/swat',
47 'WINBINDD_PRIVILEGED_SOCKET_DIR' : '${WINBINDD_PRIVILEGED_SOCKET_DIR}',
48 'WINBINDD_SOCKET_DIR' : '${WINBINDD_SOCKET_DIR}',
52 '''work out a variable name from a configure option name'''
53 if v
.startswith('with-'):
56 v
= string
.replace(v
, '-', '_')
60 def dynconfig_cflags(bld
):
61 '''work out the extra CFLAGS for dynconfig.c'''
63 for f
in dyn_cflags
.keys():
64 # substitute twice, as we could have substitutions containing variables
65 v
= Utils
.subst_vars(dyn_cflags
[f
], bld
.env
)
66 v
= Utils
.subst_vars(v
, bld
.env
)
67 bld
.ASSERT(v
!= '', "Empty dynconfig value for %s" % f
)
68 bld
.ASSERT(v
.find('${') == -1, "Unsubstituted variable in %s : %s : %s" % (f
, dyn_cflags
[f
], v
))
69 cflags
.append('-D%s="%s"' % (f
, v
))