dbwrap-ctdb: Avoid a talloc_stackframe()
[Samba/bjacke.git] / dynconfig / config.m4
blob6b5dfdbaddef4a05fde3901e04b4b93e2be91637
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)
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
18 AC_ARG_ENABLE(fhs,
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])
25         fi
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"
42 else
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)])],
66 [ case "$withval" in
67   yes|no)
68   #
69   # Just in case anybody calls it without argument
70   #
71     AC_MSG_WARN([--with-modulesdir called without argument - will use default])
72   ;;
73   * )
74     MODULESDIR="$withval"
75   ;;
76   esac])
78 AC_ARG_WITH(pammodulesdir,
79 [AS_HELP_STRING([--with-pammodulesdir=DIR],
80  [Which directory to use for PAM modules ($libdir/security)])],
81 [ case "$withval" in
82   yes|no)
83   #
84   # Just in case anybody calls it without argument
85   #
86     AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
87   ;;
88   * )
89     PAMMODULESDIR="$withval"
90   ;;
91   esac])
93 AC_ARG_WITH(configdir,
94 [AS_HELP_STRING([--with-configdir=DIR],
95  [Where to put configuration files ($sysconfdir)])],
96 [ case "$withval" in
97   yes|no)
98   #
99   # Just in case anybody calls it without argument
100   #
101     AC_MSG_WARN([--with-configdir called without argument - will use default])
102   ;;
103   * )
104     CONFIGDIR="$withval"
105   ;;
106   esac])
108 AC_ARG_WITH(privatedir,
109 [AS_HELP_STRING([--with-privatedir=DIR],
110  [Where to put passdb.tdb and other private files ($prefix/private)])],
111 [ case "$withval" in
112   yes|no)
113   #
114   # Just in case anybody calls it without argument
115   #
116     AC_MSG_WARN([--with-privatedir called without argument - will use default])
117   ;;
118   * )
119     PRIVATE_DIR="$withval"
120   ;;
121   esac])
123 AC_ARG_WITH(lockdir,
124 [AS_HELP_STRING([--with-lockdir=DIR],
125  [Where to put short term disposable state files ($localstatedir/lock)])],
126 [ case "$withval" in
127   yes|no)
128   #
129   # Just in case anybody calls it without argument
130   #
131     AC_MSG_WARN([--with-lockdir called without argument - will use default])
132   ;;
133   * )
134     LOCKDIR="$withval"
135   ;;
136   esac])
138 AC_ARG_WITH(piddir,
139 [AS_HELP_STRING([--with-piddir=DIR],
140  [Where to put pid files ($localstatedir/run)])],
141 [ case "$withval" in
142   yes|no)
143   #
144   # Just in case anybody calls it without argument
145   #
146     AC_MSG_WARN([--with-piddir called without argument - will use default])
147   ;;
148   * )
149     PIDDIR="$withval"
150   ;;
151   esac])
153 AC_ARG_WITH(statedir,
154 [AS_HELP_STRING([--with-statedir=DIR],
155  [Where to put persistent state files ($localstatedir/locks)])],
156 [ case "$withval" in
157   yes|no)
158   #
159   # Just in case anybody calls it without argument
160   #
161     AC_MSG_WARN([--with-statedir called without argument - will use default])
162   ;;
163   * )
164     STATEDIR="$withval"
165   ;;
166   esac])
168 AC_ARG_WITH(cachedir,
169 [AS_HELP_STRING([--with-cachedir=DIR],
170  [Where to put temporary cache files ($localstatedir/cache)])],
171 [ case "$withval" in
172   yes|no)
173   #
174   # Just in case anybody calls it without argument
175   #
176     AC_MSG_WARN([--with-cachedir called without argument - will use default])
177   ;;
178   * )
179     CACHEDIR="$withval"
180   ;;
181   esac])
183 AC_ARG_WITH(logfilebase,
184 [AS_HELP_STRING([--with-logfilebase=DIR],
185  [Where to put log files ($localstatedir)])],
186 [ case "$withval" in
187   yes|no)
188   #
189   # Just in case anybody calls it without argument
190   #
191     AC_MSG_WARN([--with-logfilebase called without argument - will use default])
192   ;;
193   * )
194     LOGFILEBASE="$withval"
195   ;;
196   esac])
198 AC_ARG_WITH(sockets-dir,
199 [AS_HELP_STRING([--with-sockets-dir=DIR],
200  [socket directory ($localstatedir/run)])],
201 [ case "$withval" in
202   yes|no)
203   #
204   # Just in case anybody calls it without argument
205   #
206     AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
207   ;;
208   * )
209     SOCKET_DIR="$withval"
210   ;;
211   esac])
213 AC_ARG_WITH(privileged-socket-dir,
214 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
215  [privileged socket directory ($localstatedir/lib)])],
216 [ case "$withval" in
217   yes|no)
218   #
219   # Just in case anybody calls it without argument
220   #
221     AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
222   ;;
223   * )
224     PRIVILEGED_SOCKET_DIR="$withval"
225   ;;
226   esac])
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)])],
234 [ case "$withval" in
235   yes|no)
236   #
237   # Just in case anybody calls it without argument
238   #
239     AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
240   ;;
241   * )
242     WINBINDD_SOCKET_DIR="$withval"
243   ;;
244   esac])
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)])],
249 [ case "$withval" in
250   yes|no)
251   #
252   # Just in case anybody calls it without argument
253   #
254     AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
255   ;;
256   * )
257     WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
258   ;;
259   esac])
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"
268 AC_SUBST(BINDIR)
269 AC_SUBST(SBINDIR)
270 AC_SUBST(LIBDIR)
271 AC_SUBST(LIBEXECDIR)
272 AC_SUBST(MANDIR)
273 AC_SUBST(DATADIR)
274 AC_SUBST(LOCALEDIR)
275 AC_SUBST(SCRIPTSBINDIR)
276 dnl AC_SUBST(PYTHONDIR)
277 dnl AC_SUBST(PYTHONARCHDIR)
278 AC_SUBST(MODULESDIR)
279 AC_SUBST(INCLUDEDIR)
280 AC_SUBST(SETUPDIR)
281 AC_SUBST(PKGCONFIGDIR)
282 AC_SUBST(SWATDIR)
283 AC_SUBST(CODEPAGEDIR)
284 AC_SUBST(PAMMODULESDIR)
285 AC_SUBST(CONFIGDIR)
286 AC_SUBST(PRIVATE_DIR)
287 AC_SUBST(LOCKDIR)
288 AC_SUBST(PIDDIR)
289 AC_SUBST(STATEDIR)
290 AC_SUBST(CACHEDIR)
291 AC_SUBST(LOGFILEBASE)
292 AC_SUBST(SOCKET_DIR)
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)
298 AC_SUBST(NCALRPCDIR)
299 AC_SUBST(CONFIGFILE)
300 AC_SUBST(LMHOSTSFILE)
301 AC_SUBST(SMB_PASSWD_FILE)