1 #################################################
2 # Directory handling stuff to support both the
3 # legacy SAMBA directories and FHS compliant
5 AC_PREFIX_DEFAULT(/usr/local/samba)
10 LIBEXECDIR="${libexecdir}"
13 LOCALEDIR="${localedir}"
14 SCRIPTSBINDIR="${sbindir}"
19 [AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])])
21 if test x$enable_fhs != xyes; then
22 MODULESDIR="${libdir}"
23 INCLUDEDIR="${includedir}"
24 SETUPDIR="${datadir}/setup"
25 PKGCONFIGDIR="${libdir}/pkgconfig"
26 SWATDIR="${datadir}/swat"
27 CODEPAGEDIR="${datadir}/codepages"
28 PAMMODULESDIR="${libdir}/security"
29 CONFIGDIR="\${sysconfdir}"
30 PRIVATE_DIR="\${prefix}/private"
31 LOCKDIR="\${localstatedir}/lock"
32 PIDDIR="\${localstatedir}/run"
33 STATEDIR="\${localstatedir}/locks"
34 CACHEDIR="\${localstatedir}/cache"
35 LOGFILEBASE="\${localstatedir}"
36 SOCKET_DIR="\${localstatedir}/run"
37 PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib"
39 AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
41 MODULESDIR="${libdir}/samba"
42 INCLUDEDIR="${includedir}/samba-4.0"
43 SETUPDIR="${datadir}/samba/setup"
44 PKGCONFIGDIR="${libdir}/pkgconfig"
45 SWATDIR="${datadir}/samba/swat"
46 CODEPAGEDIR="${datadir}/samba/codepages"
47 PAMMODULESDIR="${libdir}/security"
48 CONFIGDIR="\${sysconfdir}/samba"
49 PRIVATE_DIR="\${localstatedir}/lib/samba/private"
50 LOCKDIR="\${localstatedir}/lock/samba"
51 PIDDIR="\${localstatedir}/run/samba"
52 STATEDIR="\${localstatedir}/lib/samba"
53 CACHEDIR="\${localstatedir}/cache/samba"
54 LOGFILEBASE="\${localstatedir}/log/samba"
55 SOCKET_DIR="\${localstatedir}/run/samba"
56 PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib/samba"
59 AC_ARG_WITH(modulesdir,
60 [AS_HELP_STRING([--with-modulesdir=DIR],
61 [Which directory to use for modules ($exec_prefix/modules)])],
65 # Just in case anybody calls it without argument
67 AC_MSG_WARN([--with-modulesdir called without argument - will use default])
74 AC_ARG_WITH(pammodulesdir,
75 [AS_HELP_STRING([--with-pammodulesdir=DIR],
76 [Which directory to use for PAM modules ($libdir/security)])],
80 # Just in case anybody calls it without argument
82 AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
85 PAMMODULESDIR="$withval"
89 AC_ARG_WITH(configdir,
90 [AS_HELP_STRING([--with-configdir=DIR],
91 [Where to put configuration files ($sysconfdir)])],
95 # Just in case anybody calls it without argument
97 AC_MSG_WARN([--with-configdir called without argument - will use default])
104 AC_ARG_WITH(privatedir,
105 [AS_HELP_STRING([--with-privatedir=DIR],
106 [Where to put passdb.tdb and other private files ($prefix/private)])],
110 # Just in case anybody calls it without argument
112 AC_MSG_WARN([--with-privatedir called without argument - will use default])
115 PRIVATE_DIR="$withval"
120 [AS_HELP_STRING([--with-lockdir=DIR],
121 [Where to put short term disposable state files ($localstatedir/lock)])],
125 # Just in case anybody calls it without argument
127 AC_MSG_WARN([--with-lockdir called without argument - will use default])
135 [AS_HELP_STRING([--with-piddir=DIR],
136 [Where to put pid files ($localstatedir/run)])],
140 # Just in case anybody calls it without argument
142 AC_MSG_WARN([--with-piddir called without argument - will use default])
149 AC_ARG_WITH(statedir,
150 [AS_HELP_STRING([--with-statedir=DIR],
151 [Where to put persistent state files ($localstatedir/locks)])],
155 # Just in case anybody calls it without argument
157 AC_MSG_WARN([--with-statedir called without argument - will use default])
164 AC_ARG_WITH(cachedir,
165 [AS_HELP_STRING([--with-cachedir=DIR],
166 [Where to put temporary cache files ($localstatedir/cache)])],
170 # Just in case anybody calls it without argument
172 AC_MSG_WARN([--with-cachedir called without argument - will use default])
179 AC_ARG_WITH(logfilebase,
180 [AS_HELP_STRING([--with-logfilebase=DIR],
181 [Where to put log files ($localstatedir)])],
185 # Just in case anybody calls it without argument
187 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
190 LOGFILEBASE="$withval"
194 AC_ARG_WITH(sockets-dir,
195 [AS_HELP_STRING([--with-sockets-dir=DIR],
196 [socket directory ($localstatedir/run)])],
200 # Just in case anybody calls it without argument
202 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
205 SOCKET_DIR="$withval"
209 AC_ARG_WITH(privileged-socket-dir,
210 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
211 [privileged socket directory ($localstatedir/lib)])],
215 # Just in case anybody calls it without argument
217 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
220 PRIVILEGED_SOCKET_DIR="$withval"
224 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
225 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
227 AC_ARG_WITH(winbind-socket-dir,
228 [AS_HELP_STRING([--with-winbind-socket-dir=DIR],
229 [winbnd socket directory ($localstatedir/run/winbindd)])],
233 # Just in case anybody calls it without argument
235 AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
238 WINBINDD_SOCKET_DIR="$withval"
242 AC_ARG_WITH(winbind-privileged-socket-dir,
243 [AS_HELP_STRING([--with-winbind-privileged-socket-dir=DIR],
244 [winbind privileged socket directory ($localstatedir/lib/winbindd)])],
248 # Just in case anybody calls it without argument
250 AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
253 WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
257 NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
258 NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
259 NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
260 CONFIGFILE="${CONFIGDIR}/smb.conf"
261 LMHOSTSFILE="${CONFIGDIR}/lmhosts"
262 SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"
271 AC_SUBST(SCRIPTSBINDIR)
272 dnl AC_SUBST(PYTHONDIR)
273 dnl AC_SUBST(PYTHONARCHDIR)
277 AC_SUBST(PKGCONFIGDIR)
279 AC_SUBST(CODEPAGEDIR)
280 AC_SUBST(PAMMODULESDIR)
282 AC_SUBST(PRIVATE_DIR)
287 AC_SUBST(LOGFILEBASE)
289 AC_SUBST(PRIVILEGED_SOCKET_DIR)
290 AC_SUBST(WINBINDD_SOCKET_DIR)
291 AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
292 AC_SUBST(NMBDSOCKETDIR)
293 AC_SUBST(NTP_SIGND_SOCKET_DIR)
296 AC_SUBST(LMHOSTSFILE)
297 AC_SUBST(SMB_PASSWD_FILE)