1 #################################################
2 # Directory handling stuff to support both the
3 # legacy SAMBA directories and FHS compliant
5 AC_PREFIX_DEFAULT(/usr/local/samba)
7 test x"${modulesdir}" = x"" && {
8 modulesdir="\${exec_prefix}/modules"
14 LIBEXECDIR="${libexecdir}"
17 LOCALEDIR="${localedir}"
18 SCRIPTSBINDIR="${sbindir}"
23 [AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])])
25 if test x$enable_fhs != xyes; then
26 MODULESDIR="${modulesdir}"
27 INCLUDEDIR="${includedir}"
28 SETUPDIR="${datadir}/setup"
29 PKGCONFIGDIR="${libdir}/pkgconfig"
30 SWATDIR="${datadir}/swat"
31 CODEPAGEDIR="${datadir}/codepages"
32 PAMMODULESDIR="${libdir}/security"
33 CONFIGDIR="${sysconfdir}"
34 PRIVATE_DIR="${prefix}/private"
35 LOCKDIR="${localstatedir}/lock"
36 PIDDIR="${localstatedir}/run"
37 STATEDIR="${localstatedir}/locks"
38 CACHEDIR="${localstatedir}/cache"
39 LOGFILEBASE="${localstatedir}"
40 SOCKET_DIR="${localstatedir}/run"
41 PRIVILEGED_SOCKET_DIR="${localstatedir}/lib"
43 AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
45 MODULESDIR="${modulesdir}/samba"
46 INCLUDEDIR="${includedir}/samba-4.0"
47 SETUPDIR="${datadir}/samba/setup"
48 PKGCONFIGDIR="${libdir}/pkgconfig"
49 SWATDIR="${datadir}/samba/swat"
50 CODEPAGEDIR="${datadir}/samba/codepages"
51 PAMMODULESDIR="${libdir}/security"
52 CONFIGDIR="${sysconfdir}/samba"
53 PRIVATE_DIR="${localstatedir}/lib/samba/private"
54 LOCKDIR="${localstatedir}/lock/samba"
55 PIDDIR="${localstatedir}/run/samba"
56 STATEDIR="${localstatedir}/lib/samba"
57 CACHEDIR="${localstatedir}/cache/samba"
58 LOGFILEBASE="${localstatedir}/log/samba"
59 SOCKET_DIR="${localstatedir}/run/samba"
60 PRIVILEGED_SOCKET_DIR="${localstatedir}/lib/samba"
63 AC_ARG_WITH(pammodulesdir,
64 [AS_HELP_STRING([--with-pammodulesdir=DIR],
65 [Which directory to use for PAM modules ($libdir/security)])],
69 # Just in case anybody calls it without argument
71 AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
74 PAMMODULESDIR="$withval"
78 AC_ARG_WITH(configdir,
79 [AS_HELP_STRING([--with-configdir=DIR],
80 [Where to put configuration files ($sysconfdir)])],
84 # Just in case anybody calls it without argument
86 AC_MSG_WARN([--with-configdir called without argument - will use default])
93 AC_ARG_WITH(privatedir,
94 [AS_HELP_STRING([--with-privatedir=DIR],
95 [Where to put passdb.tdb and other private files ($prefix/private)])],
99 # Just in case anybody calls it without argument
101 AC_MSG_WARN([--with-privatedir called without argument - will use default])
104 PRIVATE_DIR="$withval"
109 [AS_HELP_STRING([--with-lockdir=DIR],
110 [Where to put short term disposable state files ($localstatedir/lock)])],
114 # Just in case anybody calls it without argument
116 AC_MSG_WARN([--with-lockdir called without argument - will use default])
124 [AS_HELP_STRING([--with-piddir=DIR],
125 [Where to put pid files ($localstatedir/run)])],
129 # Just in case anybody calls it without argument
131 AC_MSG_WARN([--with-piddir called without argument - will use default])
138 AC_ARG_WITH(statedir,
139 [AS_HELP_STRING([--with-statedir=DIR],
140 [Where to put persistent state files ($localstatedir/locks)])],
144 # Just in case anybody calls it without argument
146 AC_MSG_WARN([--with-statedir called without argument - will use default])
153 AC_ARG_WITH(cachedir,
154 [AS_HELP_STRING([--with-cachedir=DIR],
155 [Where to put temporary cache files ($localstatedir/cache)])],
159 # Just in case anybody calls it without argument
161 AC_MSG_WARN([--with-cachedir called without argument - will use default])
168 AC_ARG_WITH(logfilebase,
169 [AS_HELP_STRING([--with-logfilebase=DIR],
170 [Where to put log files ($localstatedir)])],
174 # Just in case anybody calls it without argument
176 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
179 LOGFILEBASE="$withval"
183 AC_ARG_WITH(sockets-dir,
184 [AS_HELP_STRING([--with-sockets-dir=DIR],
185 [socket directory ($localstatedir/run)])],
189 # Just in case anybody calls it without argument
191 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
194 SOCKET_DIR="$withval"
198 AC_ARG_WITH(privileged-socket-dir,
199 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
200 [privileged socket directory ($localstatedir/lib)])],
204 # Just in case anybody calls it without argument
206 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
209 PRIVILEGED_SOCKET_DIR="$withval"
213 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
214 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
215 NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
216 NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
217 NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
218 CONFIGFILE="${CONFIGDIR}/smb.conf"
219 LMHOSTSFILE="${CONFIGDIR}/lmhosts"
220 SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"
229 AC_SUBST(SCRIPTSBINDIR)
230 dnl AC_SUBST(PYTHONDIR)
231 dnl AC_SUBST(PYTHONARCHDIR)
235 AC_SUBST(PKGCONFIGDIR)
237 AC_SUBST(CODEPAGEDIR)
238 AC_SUBST(PAMMODULESDIR)
240 AC_SUBST(PRIVATE_DIR)
245 AC_SUBST(LOGFILEBASE)
247 AC_SUBST(PRIVILEGED_SOCKET_DIR)
248 AC_SUBST(WINBINDD_SOCKET_DIR)
249 AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
250 AC_SUBST(NMBDSOCKETDIR)
251 AC_SUBST(NTP_SIGND_SOCKET_DIR)
254 AC_SUBST(LMHOSTSFILE)
255 AC_SUBST(SMB_PASSWD_FILE)