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 modules directory location
53 AC_ARG_WITH(modulesdir,
54 [AS_HELP_STRING([--with-modulesdir=DIR],[Where to put dynamically loadable modules ($modulesdir)])],
58 # Just in case anybody calls it without argument
60 AC_MSG_WARN([--with-modulesdir called without argument - will use default])
67 #################################################
68 # set private directory location
69 AC_ARG_WITH(privatedir,
70 [AS_HELP_STRING([--with-privatedir=DIR],[Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)])],
74 # Just in case anybody calls it without argument
76 AC_MSG_WARN([--with-privatedir called without argument - will use default])
83 #################################################
84 # set where the winbindd socket should be put
85 AC_ARG_WITH(winbindd-socket-dir,
86 [AS_HELP_STRING([--with-winbindd-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_socket_dir)])],
90 # Just in case anybody calls it without argument
92 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
95 winbindd_socket_dir="$withval"
99 #################################################
100 # set where the winbindd privileged socket should be put
101 AC_ARG_WITH(winbindd-privileged-socket-dir,
102 [AS_HELP_STRING([--with-winbindd-privileged-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_privileged_socket_dir)])],
106 # Just in case anybody calls it without argument
108 AC_MSG_WARN([--with-winbind-privileged-socketdir called without argument - will use default])
111 winbindd_privileged_socket_dir="$withval"
115 #################################################
116 # set where the NTP signing deamon socket should be put
117 AC_ARG_WITH(ntp-signd-socket-dir,
118 [AS_HELP_STRING([--with-ntp-signd-socket-dir=DIR],[Where to put the NTP signing deamon socket ($ac_default_prefix/run/ntp_signd)])],
122 # Just in case anybody calls it without argument
124 AC_MSG_WARN([--with-ntp-signd-socketdir called without argument - will use default])
127 ntp_signd_socket_dir="$withval"
131 #################################################
132 # set lock directory location
134 [AS_HELP_STRING([--with-lockdir=DIR],[Where to put lock files ($ac_default_prefix/var/locks)])],
138 # Just in case anybody calls it without argument
140 AC_MSG_WARN([--with-lockdir called without argument - will use default])
147 #################################################
148 # set pid directory location
150 [AS_HELP_STRING([--with-piddir=DIR],[Where to put pid files ($ac_default_prefix/var/locks)])],
154 # Just in case anybody calls it without argument
156 AC_MSG_WARN([--with-piddir called without argument - will use default])
163 #################################################
164 # set log directory location
165 AC_ARG_WITH(logfilebase,
166 [AS_HELP_STRING([--with-logfilebase=DIR],[Where to put log files (\$(VARDIR))])],
170 # Just in case anybody does it
172 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
175 logfilebase="$withval"
182 AC_SUBST(logfilebase)
186 AC_SUBST(winbindd_socket_dir)
187 AC_SUBST(winbindd_privileged_socket_dir)
188 AC_SUBST(ntp_signd_socket_dir)
191 #################################################
192 # set prefix for 'make test'
193 # this is needed to workarround the 108 char
194 # unix socket path limitation!
196 selftest_prefix="./st"
197 AC_SUBST(selftest_prefix)
198 AC_ARG_WITH(selftest-prefix,
199 [AS_HELP_STRING([--with-selftest-prefix=DIR],[The prefix where make test will be run ($selftest_prefix)])],
202 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
205 selftest_prefix="$withval"
211 [AS_HELP_STRING([--enable-debug],[Turn on compiler debugging information (default=no)])],
212 [if test x$enable_debug = xyes; then
218 AC_ARG_ENABLE(developer,
219 [AS_HELP_STRING([--enable-developer],[Turn on developer warnings and debugging (default=no)])],
220 [if test x$enable_developer = xyes; then
225 dnl disable these external libs
226 AC_ARG_WITH(disable-ext-lib,
227 [AS_HELP_STRING([--with-disable-ext-lib=LIB],[Comma-seperated list of external libraries])],
228 [ if test $withval; then
229 for i in `echo $withval | sed -e's/,/ /g'`