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 if test x"$prefix" = x"/usr" -o x"$prefix" = x"/usr/local"; then
23 AC_MSG_WARN([Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)])
24 AC_MSG_ERROR([invalid --prefix=$prefix])
26 MODULESDIR="${libdir}"
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="${libdir}/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(modulesdir,
64 [AS_HELP_STRING([--with-modulesdir=DIR],
65 [Which directory to use for modules ($exec_prefix/modules)])],
69 # Just in case anybody calls it without argument
71 AC_MSG_WARN([--with-modulesdir called without argument - will use default])
78 AC_ARG_WITH(pammodulesdir,
79 [AS_HELP_STRING([--with-pammodulesdir=DIR],
80 [Which directory to use for PAM modules ($libdir/security)])],
84 # Just in case anybody calls it without argument
86 AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
89 PAMMODULESDIR="$withval"
93 AC_ARG_WITH(configdir,
94 [AS_HELP_STRING([--with-configdir=DIR],
95 [Where to put configuration files ($sysconfdir)])],
99 # Just in case anybody calls it without argument
101 AC_MSG_WARN([--with-configdir called without argument - will use default])
108 AC_ARG_WITH(privatedir,
109 [AS_HELP_STRING([--with-privatedir=DIR],
110 [Where to put passdb.tdb and other private files ($prefix/private)])],
114 # Just in case anybody calls it without argument
116 AC_MSG_WARN([--with-privatedir called without argument - will use default])
119 PRIVATE_DIR="$withval"
124 [AS_HELP_STRING([--with-lockdir=DIR],
125 [Where to put short term disposable state files ($localstatedir/lock)])],
129 # Just in case anybody calls it without argument
131 AC_MSG_WARN([--with-lockdir called without argument - will use default])
139 [AS_HELP_STRING([--with-piddir=DIR],
140 [Where to put pid files ($localstatedir/run)])],
144 # Just in case anybody calls it without argument
146 AC_MSG_WARN([--with-piddir called without argument - will use default])
153 AC_ARG_WITH(statedir,
154 [AS_HELP_STRING([--with-statedir=DIR],
155 [Where to put persistent state files ($localstatedir/locks)])],
159 # Just in case anybody calls it without argument
161 AC_MSG_WARN([--with-statedir called without argument - will use default])
168 AC_ARG_WITH(cachedir,
169 [AS_HELP_STRING([--with-cachedir=DIR],
170 [Where to put temporary cache files ($localstatedir/cache)])],
174 # Just in case anybody calls it without argument
176 AC_MSG_WARN([--with-cachedir called without argument - will use default])
183 AC_ARG_WITH(logfilebase,
184 [AS_HELP_STRING([--with-logfilebase=DIR],
185 [Where to put log files ($localstatedir)])],
189 # Just in case anybody calls it without argument
191 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
194 LOGFILEBASE="$withval"
198 AC_ARG_WITH(sockets-dir,
199 [AS_HELP_STRING([--with-sockets-dir=DIR],
200 [socket directory ($localstatedir/run)])],
204 # Just in case anybody calls it without argument
206 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
209 SOCKET_DIR="$withval"
213 AC_ARG_WITH(privileged-socket-dir,
214 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
215 [privileged socket directory ($localstatedir/lib)])],
219 # Just in case anybody calls it without argument
221 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
224 PRIVILEGED_SOCKET_DIR="$withval"
228 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
229 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
231 AC_ARG_WITH(winbind-socket-dir,
232 [AS_HELP_STRING([--with-winbind-socket-dir=DIR],
233 [winbnd socket directory ($localstatedir/run/winbindd)])],
237 # Just in case anybody calls it without argument
239 AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
242 WINBINDD_SOCKET_DIR="$withval"
246 AC_ARG_WITH(winbind-privileged-socket-dir,
247 [AS_HELP_STRING([--with-winbind-privileged-socket-dir=DIR],
248 [winbind privileged socket directory ($localstatedir/lib/winbindd)])],
252 # Just in case anybody calls it without argument
254 AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
257 WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
261 NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
262 NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
263 NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
264 CONFIGFILE="${CONFIGDIR}/smb.conf"
265 LMHOSTSFILE="${CONFIGDIR}/lmhosts"
266 SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"
275 AC_SUBST(SCRIPTSBINDIR)
276 dnl AC_SUBST(PYTHONDIR)
277 dnl AC_SUBST(PYTHONARCHDIR)
281 AC_SUBST(PKGCONFIGDIR)
283 AC_SUBST(CODEPAGEDIR)
284 AC_SUBST(PAMMODULESDIR)
286 AC_SUBST(PRIVATE_DIR)
291 AC_SUBST(LOGFILEBASE)
293 AC_SUBST(PRIVILEGED_SOCKET_DIR)
294 AC_SUBST(WINBINDD_SOCKET_DIR)
295 AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
296 AC_SUBST(NMBDSOCKETDIR)
297 AC_SUBST(NTP_SIGND_SOCKET_DIR)
300 AC_SUBST(LMHOSTSFILE)
301 AC_SUBST(SMB_PASSWD_FILE)