s3fs: added file_server directory
[nivanova/samba-autobuild/.git] / dynconfig / config.m4
1 #################################################
2 # Directory handling stuff to support both the
3 # legacy SAMBA directories and FHS compliant
4 # ones...
5 AC_PREFIX_DEFAULT(/usr/local/samba)
6
7 BINDIR="${bindir}"
8 SBINDIR="${sbindir}"
9 LIBDIR="${libdir}"
10 LIBEXECDIR="${libexecdir}"
11 MANDIR="${mandir}"
12 DATADIR="${datadir}"
13 LOCALEDIR="${localedir}"
14 SCRIPTSBINDIR="${sbindir}"
15 #PYTHONDIR
16 #PYTHONARCHDIR
17
18 AC_ARG_ENABLE(fhs,
19 [AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])])
20
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"
38 else
39         AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
40
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"
57 fi
58
59 AC_ARG_WITH(modulesdir,
60 [AS_HELP_STRING([--with-modulesdir=DIR],
61  [Which directory to use for modules ($exec_prefix/modules)])],
62 [ case "$withval" in
63   yes|no)
64   #
65   # Just in case anybody calls it without argument
66   #
67     AC_MSG_WARN([--with-modulesdir called without argument - will use default])
68   ;;
69   * )
70     MODULESDIR="$withval"
71   ;;
72   esac])
73
74 AC_ARG_WITH(pammodulesdir,
75 [AS_HELP_STRING([--with-pammodulesdir=DIR],
76  [Which directory to use for PAM modules ($libdir/security)])],
77 [ case "$withval" in
78   yes|no)
79   #
80   # Just in case anybody calls it without argument
81   #
82     AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
83   ;;
84   * )
85     PAMMODULESDIR="$withval"
86   ;;
87   esac])
88
89 AC_ARG_WITH(configdir,
90 [AS_HELP_STRING([--with-configdir=DIR],
91  [Where to put configuration files ($sysconfdir)])],
92 [ case "$withval" in
93   yes|no)
94   #
95   # Just in case anybody calls it without argument
96   #
97     AC_MSG_WARN([--with-configdir called without argument - will use default])
98   ;;
99   * )
100     CONFIGDIR="$withval"
101   ;;
102   esac])
103
104 AC_ARG_WITH(privatedir,
105 [AS_HELP_STRING([--with-privatedir=DIR],
106  [Where to put passdb.tdb and other private files ($prefix/private)])],
107 [ case "$withval" in
108   yes|no)
109   #
110   # Just in case anybody calls it without argument
111   #
112     AC_MSG_WARN([--with-privatedir called without argument - will use default])
113   ;;
114   * )
115     PRIVATE_DIR="$withval"
116   ;;
117   esac])
118
119 AC_ARG_WITH(lockdir,
120 [AS_HELP_STRING([--with-lockdir=DIR],
121  [Where to put short term disposable state files ($localstatedir/lock)])],
122 [ case "$withval" in
123   yes|no)
124   #
125   # Just in case anybody calls it without argument
126   #
127     AC_MSG_WARN([--with-lockdir called without argument - will use default])
128   ;;
129   * )
130     LOCKDIR="$withval"
131   ;;
132   esac])
133
134 AC_ARG_WITH(piddir,
135 [AS_HELP_STRING([--with-piddir=DIR],
136  [Where to put pid files ($localstatedir/run)])],
137 [ case "$withval" in
138   yes|no)
139   #
140   # Just in case anybody calls it without argument
141   #
142     AC_MSG_WARN([--with-piddir called without argument - will use default])
143   ;;
144   * )
145     PIDDIR="$withval"
146   ;;
147   esac])
148
149 AC_ARG_WITH(statedir,
150 [AS_HELP_STRING([--with-statedir=DIR],
151  [Where to put persistent state files ($localstatedir/locks)])],
152 [ case "$withval" in
153   yes|no)
154   #
155   # Just in case anybody calls it without argument
156   #
157     AC_MSG_WARN([--with-statedir called without argument - will use default])
158   ;;
159   * )
160     STATEDIR="$withval"
161   ;;
162   esac])
163
164 AC_ARG_WITH(cachedir,
165 [AS_HELP_STRING([--with-cachedir=DIR],
166  [Where to put temporary cache files ($localstatedir/cache)])],
167 [ case "$withval" in
168   yes|no)
169   #
170   # Just in case anybody calls it without argument
171   #
172     AC_MSG_WARN([--with-cachedir called without argument - will use default])
173   ;;
174   * )
175     CACHEDIR="$withval"
176   ;;
177   esac])
178
179 AC_ARG_WITH(logfilebase,
180 [AS_HELP_STRING([--with-logfilebase=DIR],
181  [Where to put log files ($localstatedir)])],
182 [ case "$withval" in
183   yes|no)
184   #
185   # Just in case anybody calls it without argument
186   #
187     AC_MSG_WARN([--with-logfilebase called without argument - will use default])
188   ;;
189   * )
190     LOGFILEBASE="$withval"
191   ;;
192   esac])
193
194 AC_ARG_WITH(sockets-dir,
195 [AS_HELP_STRING([--with-sockets-dir=DIR],
196  [socket directory ($localstatedir/run)])],
197 [ case "$withval" in
198   yes|no)
199   #
200   # Just in case anybody calls it without argument
201   #
202     AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
203   ;;
204   * )
205     SOCKET_DIR="$withval"
206   ;;
207   esac])
208
209 AC_ARG_WITH(privileged-socket-dir,
210 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
211  [privileged socket directory ($localstatedir/lib)])],
212 [ case "$withval" in
213   yes|no)
214   #
215   # Just in case anybody calls it without argument
216   #
217     AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
218   ;;
219   * )
220     PRIVILEGED_SOCKET_DIR="$withval"
221   ;;
222   esac])
223
224 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
225 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
226
227 AC_ARG_WITH(winbind-socket-dir,
228 [AS_HELP_STRING([--with-winbind-socket-dir=DIR],
229  [winbnd socket directory ($localstatedir/run/winbindd)])],
230 [ case "$withval" in
231   yes|no)
232   #
233   # Just in case anybody calls it without argument
234   #
235     AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
236   ;;
237   * )
238     WINBINDD_SOCKET_DIR="$withval"
239   ;;
240   esac])
241
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)])],
245 [ case "$withval" in
246   yes|no)
247   #
248   # Just in case anybody calls it without argument
249   #
250     AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
251   ;;
252   * )
253     WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
254   ;;
255   esac])
256
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"
263
264 AC_SUBST(BINDIR)
265 AC_SUBST(SBINDIR)
266 AC_SUBST(LIBDIR)
267 AC_SUBST(LIBEXECDIR)
268 AC_SUBST(MANDIR)
269 AC_SUBST(DATADIR)
270 AC_SUBST(LOCALEDIR)
271 AC_SUBST(SCRIPTSBINDIR)
272 dnl AC_SUBST(PYTHONDIR)
273 dnl AC_SUBST(PYTHONARCHDIR)
274 AC_SUBST(MODULESDIR)
275 AC_SUBST(INCLUDEDIR)
276 AC_SUBST(SETUPDIR)
277 AC_SUBST(PKGCONFIGDIR)
278 AC_SUBST(SWATDIR)
279 AC_SUBST(CODEPAGEDIR)
280 AC_SUBST(PAMMODULESDIR)
281 AC_SUBST(CONFIGDIR)
282 AC_SUBST(PRIVATE_DIR)
283 AC_SUBST(LOCKDIR)
284 AC_SUBST(PIDDIR)
285 AC_SUBST(STATEDIR)
286 AC_SUBST(CACHEDIR)
287 AC_SUBST(LOGFILEBASE)
288 AC_SUBST(SOCKET_DIR)
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)
294 AC_SUBST(NCALRPCDIR)
295 AC_SUBST(CONFIGFILE)
296 AC_SUBST(LMHOSTSFILE)
297 AC_SUBST(SMB_PASSWD_FILE)
298