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