1 dnl SMB Build Environment Path Checks
2 dnl -------------------------------------------------------
3 dnl Copyright (C) Stefan (metze) Metzmacher 2004
4 dnl Released under the GNU GPL
5 dnl -------------------------------------------------------
8 AC_LIBREPLACE_LOCATION_CHECKS
10 #################################################
11 # Directory handling stuff to support both the
12 # legacy SAMBA directories and FHS compliant
14 AC_PREFIX_DEFAULT(/usr/local/samba)
16 # Defaults and --without-fhs
17 logfilebase="${localstatedir}"
18 lockdir="${localstatedir}/locks"
19 piddir="${localstatedir}/run"
20 privatedir="\${prefix}/private"
21 modulesdir="\${prefix}/modules"
22 winbindd_socket_dir="${localstatedir}/run/winbind_pipe"
23 ntp_signd_socket_dir="${localstatedir}/run/ntp_signd"
26 [ --with-fhs Use FHS-compliant paths (default=no)],
27 lockdir="${localstatedir}/lib/samba"
28 piddir="${localstatedir}/run/samba"
29 logfilebase="${localstatedir}/log/samba"
30 privatedir="${localstatedir}/lib/samba/private"
31 sysconfdir="${sysconfdir}/samba"
32 modulesdir="${libdir}/samba"
33 datadir="${datadir}/samba"
34 includedir="${includedir}/samba-4.0"
35 ntp_signd_socket_dir="${localstatedir}/run/samba/ntp_signd"
36 winbindd_socket_dir="${localstatedir}/run/samba/winbind_pipe"
39 #################################################
40 # set private directory location
41 AC_ARG_WITH(privatedir,
42 [ --with-privatedir=DIR Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)],
46 # Just in case anybody calls it without argument
48 AC_MSG_WARN([--with-privatedir called without argument - will use default])
55 #################################################
56 # set where the winbindd socket should be put
57 AC_ARG_WITH(winbindd-socket-dir,
58 [ --with-winbindd-socket-dir=DIR Where to put the winbindd socket ($ac_default_prefix/run/winbind_pipe)],
62 # Just in case anybody calls it without argument
64 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
67 winbindd_socket_dir="$withval"
71 #################################################
72 # set where the NTP signing deamon socket should be put
73 AC_ARG_WITH(ntp-signd-socket-dir,
74 [ --with-ntp-signd-socket-dir=DIR Where to put the NTP signing deamon socket ($ac_default_prefix/run/ntp_signd)],
78 # Just in case anybody calls it without argument
80 AC_MSG_WARN([--with-ntp-signd-socketdir called without argument - will use default])
83 ntp_signd_socket_dir="$withval"
87 #################################################
88 # set lock directory location
90 [ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
94 # Just in case anybody calls it without argument
96 AC_MSG_WARN([--with-lockdir called without argument - will use default])
103 #################################################
104 # set pid directory location
106 [ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
110 # Just in case anybody calls it without argument
112 AC_MSG_WARN([--with-piddir called without argument - will use default])
119 #################################################
120 # set log directory location
121 AC_ARG_WITH(logfilebase,
122 [ --with-logfilebase=DIR Where to put log files (\$(VARDIR))],
126 # Just in case anybody does it
128 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
131 logfilebase="$withval"
138 AC_SUBST(logfilebase)
142 AC_SUBST(winbindd_socket_dir)
143 AC_SUBST(ntp_signd_socket_dir)
146 #################################################
147 # set prefix for 'make test'
148 # this is needed to workarround the 108 char
149 # unix socket path limitation!
151 selftest_prefix="./st"
152 AC_SUBST(selftest_prefix)
153 AC_ARG_WITH(selftest-prefix,
154 [ --with-selftest-prefix=DIR The prefix where make test will be run ($selftest_prefix)],
157 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
160 selftest_prefix="$withval"
166 [ --enable-debug Turn on compiler debugging information (default=no)],
167 [if test x$enable_debug = xyes; then
173 AC_ARG_ENABLE(developer,
174 [ --enable-developer Turn on developer warnings and debugging (default=no)],
175 [if test x$enable_developer = xyes; then
180 dnl disable these external libs
181 AC_ARG_WITH(disable-ext-lib,
182 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
183 [ if test $withval; then
184 for i in `echo $withval | sed -e's/,/ /g'`