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([--enable-fhs],[Use FHS-compliant paths (default=no)])],
32 if test x$fhs = xyes; then
33 lockdir="${localstatedir}/lib/samba"
34 piddir="${localstatedir}/run/samba"
35 logfilebase="${localstatedir}/log/samba"
36 privatedir="${localstatedir}/lib/samba/private"
37 sysconfdir="${sysconfdir}/samba"
38 modulesdir="${libdir}/samba"
39 datadir="${datadir}/samba"
40 includedir="${includedir}/samba-4.0"
41 ntp_signd_socket_dir="${localstatedir}/run/samba/ntp_signd"
42 winbindd_socket_dir="${localstatedir}/run/samba/winbindd"
43 winbindd_privileged_socket_dir="${localstatedir}/lib/samba/winbindd_privileged"
45 # Check to prevent installing directly under /usr without the FHS
46 AS_IF([test $prefix == /usr || test $prefix == /usr/local],[
47 AC_MSG_ERROR([Don't install directly under "/usr" or "/usr/local" without using the FHS option (--enable-fhs). This could lead to file loss!])
51 #################################################
52 # set private directory location
53 AC_ARG_WITH(privatedir,
54 [AS_HELP_STRING([--with-privatedir=DIR],[Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)])],
58 # Just in case anybody calls it without argument
60 AC_MSG_WARN([--with-privatedir called without argument - will use default])
67 #################################################
68 # set where the winbindd socket should be put
69 AC_ARG_WITH(winbindd-socket-dir,
70 [AS_HELP_STRING([--with-winbindd-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_socket_dir)])],
74 # Just in case anybody calls it without argument
76 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
79 winbindd_socket_dir="$withval"
83 #################################################
84 # set where the winbindd privilaged socket should be put
85 AC_ARG_WITH(winbindd-privileged-socket-dir,
86 [AS_HELP_STRING([--with-winbindd-privileged-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_privileged_socket_dir)])],
90 # Just in case anybody calls it without argument
92 AC_MSG_WARN([--with-winbind-privileged-socketdir called without argument - will use default])
95 winbindd_privileged_socket_dir="$withval"
99 #################################################
100 # set where the NTP signing deamon socket should be put
101 AC_ARG_WITH(ntp-signd-socket-dir,
102 [AS_HELP_STRING([--with-ntp-signd-socket-dir=DIR],[Where to put the NTP signing deamon socket ($ac_default_prefix/run/ntp_signd)])],
106 # Just in case anybody calls it without argument
108 AC_MSG_WARN([--with-ntp-signd-socketdir called without argument - will use default])
111 ntp_signd_socket_dir="$withval"
115 #################################################
116 # set lock directory location
118 [AS_HELP_STRING([--with-lockdir=DIR],[Where to put lock files ($ac_default_prefix/var/locks)])],
122 # Just in case anybody calls it without argument
124 AC_MSG_WARN([--with-lockdir called without argument - will use default])
131 #################################################
132 # set pid directory location
134 [AS_HELP_STRING([--with-piddir=DIR],[Where to put pid files ($ac_default_prefix/var/locks)])],
138 # Just in case anybody calls it without argument
140 AC_MSG_WARN([--with-piddir called without argument - will use default])
147 #################################################
148 # set log directory location
149 AC_ARG_WITH(logfilebase,
150 [AS_HELP_STRING([--with-logfilebase=DIR],[Where to put log files (\$(VARDIR))])],
154 # Just in case anybody does it
156 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
159 logfilebase="$withval"
166 AC_SUBST(logfilebase)
170 AC_SUBST(winbindd_socket_dir)
171 AC_SUBST(winbindd_privileged_socket_dir)
172 AC_SUBST(ntp_signd_socket_dir)
175 #################################################
176 # set prefix for 'make test'
177 # this is needed to workarround the 108 char
178 # unix socket path limitation!
180 selftest_prefix="./st"
181 AC_SUBST(selftest_prefix)
182 AC_ARG_WITH(selftest-prefix,
183 [AS_HELP_STRING([--with-selftest-prefix=DIR],[The prefix where make test will be run ($selftest_prefix)])],
186 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
189 selftest_prefix="$withval"
195 [AS_HELP_STRING([--enable-debug],[Turn on compiler debugging information (default=no)])],
196 [if test x$enable_debug = xyes; then
202 AC_ARG_ENABLE(developer,
203 [AS_HELP_STRING([--enable-developer],[Turn on developer warnings and debugging (default=no)])],
204 [if test x$enable_developer = xyes; then
209 dnl disable these external libs
210 AC_ARG_WITH(disable-ext-lib,
211 [AS_HELP_STRING([--with-disable-ext-lib=LIB],[Comma-seperated list of external libraries])],
212 [ if test $withval; then
213 for i in `echo $withval | sed -e's/,/ /g'`