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/winbindd"
23 winbindd_privileged_socket_dir="${localstatedir}/lib/winbindd_privileged"
24 ntp_signd_socket_dir="${localstatedir}/run/ntp_signd"
27 [AS_HELP_STRING([--with-fhs],[Use FHS-compliant paths (default=no)])],
28 lockdir="${localstatedir}/lib/samba"
29 piddir="${localstatedir}/run/samba"
30 logfilebase="${localstatedir}/log/samba"
31 privatedir="${localstatedir}/lib/samba/private"
32 sysconfdir="${sysconfdir}/samba"
33 modulesdir="${libdir}/samba"
34 datadir="${datadir}/samba"
35 includedir="${includedir}/samba-4.0"
36 ntp_signd_socket_dir="${localstatedir}/run/samba/ntp_signd"
37 winbindd_socket_dir="${localstatedir}/run/samba/winbindd"
38 winbindd_privileged_socket_dir="${localstatedir}/lib/samba/winbindd_privileged"
41 #################################################
42 # set private directory location
43 AC_ARG_WITH(privatedir,
44 [AS_HELP_STRING([--with-privatedir=DIR],[Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)])],
48 # Just in case anybody calls it without argument
50 AC_MSG_WARN([--with-privatedir called without argument - will use default])
57 #################################################
58 # set where the winbindd socket should be put
59 AC_ARG_WITH(winbindd-socket-dir,
60 [AS_HELP_STRING([--with-winbindd-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_socket_dir)])],
64 # Just in case anybody calls it without argument
66 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
69 winbindd_socket_dir="$withval"
73 #################################################
74 # set where the winbindd privilaged socket should be put
75 AC_ARG_WITH(winbindd-privileged-socket-dir,
76 [AS_HELP_STRING([--with-winbindd-privileged-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_privileged_socket_dir)])],
80 # Just in case anybody calls it without argument
82 AC_MSG_WARN([--with-winbind-privileged-socketdir called without argument - will use default])
85 winbindd_privileged_socket_dir="$withval"
89 #################################################
90 # set where the NTP signing deamon socket should be put
91 AC_ARG_WITH(ntp-signd-socket-dir,
92 [AS_HELP_STRING([--with-ntp-signd-socket-dir=DIR],[Where to put the NTP signing deamon socket ($ac_default_prefix/run/ntp_signd)])],
96 # Just in case anybody calls it without argument
98 AC_MSG_WARN([--with-ntp-signd-socketdir called without argument - will use default])
101 ntp_signd_socket_dir="$withval"
105 #################################################
106 # set lock directory location
108 [AS_HELP_STRING([--with-lockdir=DIR],[Where to put lock files ($ac_default_prefix/var/locks)])],
112 # Just in case anybody calls it without argument
114 AC_MSG_WARN([--with-lockdir called without argument - will use default])
121 #################################################
122 # set pid directory location
124 [AS_HELP_STRING([--with-piddir=DIR],[Where to put pid files ($ac_default_prefix/var/locks)])],
128 # Just in case anybody calls it without argument
130 AC_MSG_WARN([--with-piddir called without argument - will use default])
137 #################################################
138 # set log directory location
139 AC_ARG_WITH(logfilebase,
140 [AS_HELP_STRING([--with-logfilebase=DIR],[Where to put log files (\$(VARDIR))])],
144 # Just in case anybody does it
146 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
149 logfilebase="$withval"
156 AC_SUBST(logfilebase)
160 AC_SUBST(winbindd_socket_dir)
161 AC_SUBST(winbindd_privileged_socket_dir)
162 AC_SUBST(ntp_signd_socket_dir)
165 #################################################
166 # set prefix for 'make test'
167 # this is needed to workarround the 108 char
168 # unix socket path limitation!
170 selftest_prefix="./st"
171 AC_SUBST(selftest_prefix)
172 AC_ARG_WITH(selftest-prefix,
173 [AS_HELP_STRING([--with-selftest-prefix=DIR],[The prefix where make test will be run ($selftest_prefix)])],
176 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
179 selftest_prefix="$withval"
185 [AS_HELP_STRING([--enable-debug],[Turn on compiler debugging information (default=no)])],
186 [if test x$enable_debug = xyes; then
192 AC_ARG_ENABLE(developer,
193 [AS_HELP_STRING([--enable-developer],[Turn on developer warnings and debugging (default=no)])],
194 [if test x$enable_developer = xyes; then
199 dnl disable these external libs
200 AC_ARG_WITH(disable-ext-lib,
201 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
202 [ if test $withval; then
203 for i in `echo $withval | sed -e's/,/ /g'`