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 CODEPAGEDIR="${datadir}/codepages"
31 PAMMODULESDIR="${libdir}/security"
32 CONFIGDIR="\${sysconfdir}"
33 PRIVATE_DIR="\${prefix}/private"
34 LOCKDIR="\${localstatedir}/lock"
35 PIDDIR="\${localstatedir}/run"
36 STATEDIR="\${localstatedir}/locks"
37 CACHEDIR="\${localstatedir}/cache"
38 LOGFILEBASE="\${localstatedir}"
39 SOCKET_DIR="\${localstatedir}/run"
40 PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib"
42 AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
44 MODULESDIR="${libdir}/samba"
45 INCLUDEDIR="${includedir}/samba-4.0"
46 SETUPDIR="${datadir}/samba/setup"
47 PKGCONFIGDIR="${libdir}/pkgconfig"
48 CODEPAGEDIR="${datadir}/samba/codepages"
49 PAMMODULESDIR="${libdir}/security"
50 CONFIGDIR="\${sysconfdir}/samba"
51 PRIVATE_DIR="\${localstatedir}/lib/samba/private"
52 LOCKDIR="\${localstatedir}/lock/samba"
53 PIDDIR="\${localstatedir}/run/samba"
54 STATEDIR="\${localstatedir}/lib/samba"
55 CACHEDIR="\${localstatedir}/cache/samba"
56 LOGFILEBASE="\${localstatedir}/log/samba"
57 SOCKET_DIR="\${localstatedir}/run/samba"
58 PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib/samba"
61 AC_ARG_WITH(modulesdir,
62 [AS_HELP_STRING([--with-modulesdir=DIR],
63 [Which directory to use for modules ($exec_prefix/modules)])],
67 # Just in case anybody calls it without argument
69 AC_MSG_WARN([--with-modulesdir called without argument - will use default])
76 AC_ARG_WITH(pammodulesdir,
77 [AS_HELP_STRING([--with-pammodulesdir=DIR],
78 [Which directory to use for PAM modules ($libdir/security)])],
82 # Just in case anybody calls it without argument
84 AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
87 PAMMODULESDIR="$withval"
91 AC_ARG_WITH(configdir,
92 [AS_HELP_STRING([--with-configdir=DIR],
93 [Where to put configuration files ($sysconfdir)])],
97 # Just in case anybody calls it without argument
99 AC_MSG_WARN([--with-configdir called without argument - will use default])
106 AC_ARG_WITH(privatedir,
107 [AS_HELP_STRING([--with-privatedir=DIR],
108 [Where to put passdb.tdb and other private files ($prefix/private)])],
112 # Just in case anybody calls it without argument
114 AC_MSG_WARN([--with-privatedir called without argument - will use default])
117 PRIVATE_DIR="$withval"
122 [AS_HELP_STRING([--with-lockdir=DIR],
123 [Where to put short term disposable state files ($localstatedir/lock)])],
127 # Just in case anybody calls it without argument
129 AC_MSG_WARN([--with-lockdir called without argument - will use default])
137 [AS_HELP_STRING([--with-piddir=DIR],
138 [Where to put pid files ($localstatedir/run)])],
142 # Just in case anybody calls it without argument
144 AC_MSG_WARN([--with-piddir called without argument - will use default])
151 AC_ARG_WITH(statedir,
152 [AS_HELP_STRING([--with-statedir=DIR],
153 [Where to put persistent state files ($localstatedir/locks)])],
157 # Just in case anybody calls it without argument
159 AC_MSG_WARN([--with-statedir called without argument - will use default])
166 AC_ARG_WITH(cachedir,
167 [AS_HELP_STRING([--with-cachedir=DIR],
168 [Where to put temporary cache files ($localstatedir/cache)])],
172 # Just in case anybody calls it without argument
174 AC_MSG_WARN([--with-cachedir called without argument - will use default])
181 AC_ARG_WITH(logfilebase,
182 [AS_HELP_STRING([--with-logfilebase=DIR],
183 [Where to put log files ($localstatedir)])],
187 # Just in case anybody calls it without argument
189 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
192 LOGFILEBASE="$withval"
196 AC_ARG_WITH(sockets-dir,
197 [AS_HELP_STRING([--with-sockets-dir=DIR],
198 [socket directory ($localstatedir/run)])],
202 # Just in case anybody calls it without argument
204 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
207 SOCKET_DIR="$withval"
211 AC_ARG_WITH(privileged-socket-dir,
212 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
213 [privileged socket directory ($localstatedir/lib)])],
217 # Just in case anybody calls it without argument
219 AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
222 PRIVILEGED_SOCKET_DIR="$withval"
226 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
227 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
229 AC_ARG_WITH(winbind-socket-dir,
230 [AS_HELP_STRING([--with-winbind-socket-dir=DIR],
231 [winbnd socket directory ($localstatedir/run/winbindd)])],
235 # Just in case anybody calls it without argument
237 AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
240 WINBINDD_SOCKET_DIR="$withval"
244 AC_ARG_WITH(winbind-privileged-socket-dir,
245 [AS_HELP_STRING([--with-winbind-privileged-socket-dir=DIR],
246 [winbind privileged socket directory ($localstatedir/lib/winbindd)])],
250 # Just in case anybody calls it without argument
252 AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
255 WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
259 NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
260 NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
261 NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
262 CONFIGFILE="${CONFIGDIR}/smb.conf"
263 LMHOSTSFILE="${CONFIGDIR}/lmhosts"
264 SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"
273 AC_SUBST(SCRIPTSBINDIR)
274 dnl AC_SUBST(PYTHONDIR)
275 dnl AC_SUBST(PYTHONARCHDIR)
279 AC_SUBST(PKGCONFIGDIR)
280 AC_SUBST(CODEPAGEDIR)
281 AC_SUBST(PAMMODULESDIR)
283 AC_SUBST(PRIVATE_DIR)
288 AC_SUBST(LOGFILEBASE)
290 AC_SUBST(PRIVILEGED_SOCKET_DIR)
291 AC_SUBST(WINBINDD_SOCKET_DIR)
292 AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
293 AC_SUBST(NMBDSOCKETDIR)
294 AC_SUBST(NTP_SIGND_SOCKET_DIR)
297 AC_SUBST(LMHOSTSFILE)
298 AC_SUBST(SMB_PASSWD_FILE)