lsa: lsa_CreateTrustedDomainEx takes lsa_TrustDomainInfoAuthInfo, not
[samba.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 test x"${modulesdir}" = x"" && {
8     modulesdir="\${exec_prefix}/modules"
9 }
10
11 BINDIR="${bindir}"
12 SBINDIR="${sbindir}"
13 LIBDIR="${libdir}"
14 LIBEXECDIR="${libexecdir}"
15 MANDIR="${mandir}"
16 DATADIR="${datadir}"
17 LOCALEDIR="${localedir}"
18 SCRIPTSBINDIR="${sbindir}"
19 #PYTHONDIR
20 #PYTHONARCHDIR
21
22 AC_ARG_ENABLE(fhs,
23 [AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])])
24
25 if test x$enable_fhs != xyes; then
26         MODULESDIR="${modulesdir}"
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])
44
45         MODULESDIR="${modulesdir}/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"
61 fi
62
63 AC_ARG_WITH(pammodulesdir,
64 [AS_HELP_STRING([--with-pammodulesdir=DIR],
65  [Which directory to use for PAM modules ($libdir/security)])],
66 [ case "$withval" in
67   yes|no)
68   #
69   # Just in case anybody calls it without argument
70   #
71     AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
72   ;;
73   * )
74     PAMMODULESDIR="$withval"
75   ;;
76   esac])
77
78 AC_ARG_WITH(configdir,
79 [AS_HELP_STRING([--with-configdir=DIR],
80  [Where to put configuration files ($sysconfdir)])],
81 [ case "$withval" in
82   yes|no)
83   #
84   # Just in case anybody calls it without argument
85   #
86     AC_MSG_WARN([--with-configdir called without argument - will use default])
87   ;;
88   * )
89     CONFIGDIR="$withval"
90   ;;
91   esac])
92
93 AC_ARG_WITH(privatedir,
94 [AS_HELP_STRING([--with-privatedir=DIR],
95  [Where to put passdb.tdb and other private files ($prefix/private)])],
96 [ case "$withval" in
97   yes|no)
98   #
99   # Just in case anybody calls it without argument
100   #
101     AC_MSG_WARN([--with-privatedir called without argument - will use default])
102   ;;
103   * )
104     PRIVATE_DIR="$withval"
105   ;;
106   esac])
107
108 AC_ARG_WITH(lockdir,
109 [AS_HELP_STRING([--with-lockdir=DIR],
110  [Where to put short term disposable state files ($localstatedir/lock)])],
111 [ case "$withval" in
112   yes|no)
113   #
114   # Just in case anybody calls it without argument
115   #
116     AC_MSG_WARN([--with-lockdir called without argument - will use default])
117   ;;
118   * )
119     LOCKDIR="$withval"
120   ;;
121   esac])
122
123 AC_ARG_WITH(piddir,
124 [AS_HELP_STRING([--with-piddir=DIR],
125  [Where to put pid files ($localstatedir/run)])],
126 [ case "$withval" in
127   yes|no)
128   #
129   # Just in case anybody calls it without argument
130   #
131     AC_MSG_WARN([--with-piddir called without argument - will use default])
132   ;;
133   * )
134     PIDDIR="$withval"
135   ;;
136   esac])
137
138 AC_ARG_WITH(statedir,
139 [AS_HELP_STRING([--with-statedir=DIR],
140  [Where to put persistent state files ($localstatedir/locks)])],
141 [ case "$withval" in
142   yes|no)
143   #
144   # Just in case anybody calls it without argument
145   #
146     AC_MSG_WARN([--with-statedir called without argument - will use default])
147   ;;
148   * )
149     STATEDIR="$withval"
150   ;;
151   esac])
152
153 AC_ARG_WITH(cachedir,
154 [AS_HELP_STRING([--with-cachedir=DIR],
155  [Where to put temporary cache files ($localstatedir/cache)])],
156 [ case "$withval" in
157   yes|no)
158   #
159   # Just in case anybody calls it without argument
160   #
161     AC_MSG_WARN([--with-cachedir called without argument - will use default])
162   ;;
163   * )
164     CACHEDIR="$withval"
165   ;;
166   esac])
167
168 AC_ARG_WITH(logfilebase,
169 [AS_HELP_STRING([--with-logfilebase=DIR],
170  [Where to put log files ($localstatedir)])],
171 [ case "$withval" in
172   yes|no)
173   #
174   # Just in case anybody calls it without argument
175   #
176     AC_MSG_WARN([--with-logfilebase called without argument - will use default])
177   ;;
178   * )
179     LOGFILEBASE="$withval"
180   ;;
181   esac])
182
183 AC_ARG_WITH(sockets-dir,
184 [AS_HELP_STRING([--with-sockets-dir=DIR],
185  [socket directory ($localstatedir/run)])],
186 [ case "$withval" in
187   yes|no)
188   #
189   # Just in case anybody calls it without argument
190   #
191     AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
192   ;;
193   * )
194     SOCKET_DIR="$withval"
195   ;;
196   esac])
197
198 AC_ARG_WITH(privileged-socket-dir,
199 [AS_HELP_STRING([--with-privileged-socket-dir=DIR],
200  [privileged socket directory ($localstatedir/lib)])],
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     PRIVILEGED_SOCKET_DIR="$withval"
210   ;;
211   esac])
212
213 WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
214 WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"
215 NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
216 NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
217 NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
218 CONFIGFILE="${CONFIGDIR}/smb.conf"
219 LMHOSTSFILE="${CONFIGDIR}/lmhosts"
220 SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"
221
222 AC_SUBST(BINDIR)
223 AC_SUBST(SBINDIR)
224 AC_SUBST(LIBDIR)
225 AC_SUBST(LIBEXECDIR)
226 AC_SUBST(MANDIR)
227 AC_SUBST(DATADIR)
228 AC_SUBST(LOCALEDIR)
229 AC_SUBST(SCRIPTSBINDIR)
230 dnl AC_SUBST(PYTHONDIR)
231 dnl AC_SUBST(PYTHONARCHDIR)
232 AC_SUBST(MODULESDIR)
233 AC_SUBST(INCLUDEDIR)
234 AC_SUBST(SETUPDIR)
235 AC_SUBST(PKGCONFIGDIR)
236 AC_SUBST(SWATDIR)
237 AC_SUBST(CODEPAGEDIR)
238 AC_SUBST(PAMMODULESDIR)
239 AC_SUBST(CONFIGDIR)
240 AC_SUBST(PRIVATE_DIR)
241 AC_SUBST(LOCKDIR)
242 AC_SUBST(PIDDIR)
243 AC_SUBST(STATEDIR)
244 AC_SUBST(CACHEDIR)
245 AC_SUBST(LOGFILEBASE)
246 AC_SUBST(SOCKET_DIR)
247 AC_SUBST(PRIVILEGED_SOCKET_DIR)
248 AC_SUBST(WINBINDD_SOCKET_DIR)
249 AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
250 AC_SUBST(NMBDSOCKETDIR)
251 AC_SUBST(NTP_SIGND_SOCKET_DIR)
252 AC_SUBST(NCALRPCDIR)
253 AC_SUBST(CONFIGFILE)
254 AC_SUBST(LMHOSTSFILE)
255 AC_SUBST(SMB_PASSWD_FILE)
256