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"
25 [ --with-fhs Use FHS-compliant paths (default=no)],
26 lockdir="${localstatedir}/lib/samba"
27 piddir="${localstatedir}/run/samba"
28 logfilebase="${localstatedir}/log/samba"
29 privatedir="${localstatedir}/lib/samba/private"
30 sysconfdir="${sysconfdir}/samba"
31 modulesdir="${libdir}/samba"
32 datadir="${datadir}/samba"
33 includedir="${includedir}/samba-4.0"
34 winbindd_socket_dir="${localstatedir}/run/samba/winbind_pipe"
37 #################################################
38 # set private directory location
39 AC_ARG_WITH(privatedir,
40 [ --with-privatedir=DIR Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)],
44 # Just in case anybody calls it without argument
46 AC_MSG_WARN([--with-privatedir called without argument - will use default])
53 #################################################
54 # set where the winbindd socket should be put
55 AC_ARG_WITH(winbindd-socket-dir,
56 [ --with-winbindd-socket-dir=DIR Where to put the winbindd socket ($ac_default_prefix/run/winbind_pipe)],
60 # Just in case anybody calls it without argument
62 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
65 winbindd_socket_dir="$withval"
69 #################################################
70 # set lock directory location
72 [ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
76 # Just in case anybody calls it without argument
78 AC_MSG_WARN([--with-lockdir called without argument - will use default])
85 #################################################
86 # set pid directory location
88 [ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
92 # Just in case anybody calls it without argument
94 AC_MSG_WARN([--with-piddir called without argument - will use default])
101 #################################################
102 # set log directory location
103 AC_ARG_WITH(logfilebase,
104 [ --with-logfilebase=DIR Where to put log files (\$(VARDIR))],
108 # Just in case anybody does it
110 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
113 logfilebase="$withval"
120 AC_SUBST(logfilebase)
124 AC_SUBST(winbindd_socket_dir)
127 #################################################
128 # set prefix for 'make test'
129 # this is needed to workarround the 108 char
130 # unix socket path limitation!
132 selftest_prefix="./st"
133 AC_SUBST(selftest_prefix)
134 AC_ARG_WITH(selftest-prefix,
135 [ --with-selftest-prefix=DIR The prefix where make test will be run ($selftest_prefix)],
138 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
141 selftest_prefix="$withval"
147 [ --enable-debug Turn on compiler debugging information (default=no)],
148 [if test x$enable_debug = xyes; then
154 AC_ARG_ENABLE(developer,
155 [ --enable-developer Turn on developer warnings and debugging (default=no)],
156 [if test x$enable_developer = xyes; then
161 dnl disable these external libs
162 AC_ARG_WITH(disable-ext-lib,
163 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
164 [ if test $withval; then
165 for i in `echo $withval | sed -e's/,/ /g'`