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 #################################################
9 # Directory handling stuff to support both the
10 # legacy SAMBA directories and FHS compliant
12 AC_PREFIX_DEFAULT(/usr/local/samba)
15 [ --with-fhs Use FHS-compliant paths (default=no)],
16 configdir="${sysconfdir}/samba"
17 lockdir="\${localstatedir}/cache/samba"
18 piddir="\${localstatedir}/run/samba"
19 logfilebase="\${localstatedir}/log/samba"
20 privatedir="\${CONFIGDIR}/private"
21 libdir="\${prefix}/lib/samba"
22 swatdir="\${DATADIR}/samba/swat",
23 configdir="\${libdir}"
24 logfilebase="\${localstatedir}"
25 lockdir="\${localstatedir}/locks"
26 piddir="\${localstatedir}/locks"
27 privatedir="\${prefix}/private"
28 swatdir="\${prefix}/swat")
30 #################################################
31 # set private directory location
32 AC_ARG_WITH(privatedir,
33 [ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)],
37 # Just in case anybody calls it without argument
39 AC_MSG_WARN([--with-privatedir called without argument - will use default])
46 #################################################
47 # set lock directory location
49 [ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
53 # Just in case anybody calls it without argument
55 AC_MSG_WARN([--with-lockdir called without argument - will use default])
62 #################################################
63 # set pid directory location
65 [ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
69 # Just in case anybody calls it without argument
71 AC_MSG_WARN([--with-piddir called without argument - will use default])
78 #################################################
79 # set configuration directory location
80 AC_ARG_WITH(configdir,
81 [ --with-configdir=DIR Where to put configuration files (\$libdir)],
85 # Just in case anybody does it
87 AC_MSG_WARN([--with-configdir called without argument - will use default])
94 #################################################
95 # set log directory location
96 AC_ARG_WITH(logfilebase,
97 [ --with-logfilebase=DIR Where to put log files (\$(VARDIR))],
101 # Just in case anybody does it
103 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
106 logfilebase="$withval"
111 #################################################
112 # set swat directory location
114 [ --with-swatdir=DIR Where to put configuration files (\$swatdir)],
117 AC_MSG_WARN([--with-swatdir called without argument - will use default])
127 AC_SUBST(logfilebase)
133 #################################################
134 # set prefix for 'make test'
136 AC_SUBST(selftest_prefix)
137 AC_ARG_WITH(selftest-prefix,
138 [ --with-selftest-prefix=DIR The prefix where make test will be runned (\$selftest_prefix)],
141 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
144 selftest_prefix="$withval"
150 AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
151 [if test x$enable_developer = xyes; then
153 CFLAGS="${CFLAGS} -g -Wall"
155 DEVELOPER_CFLAGS="-Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -Wformat=2 -Wno-format-y2k -DDEBUG_PASSWORD -DDEVELOPER"
160 [ --enable-debug Turn on compiler debugging information (default=no)],
161 [if test x$enable_debug = xyes -a x$enable_developer != xyes; then
163 CFLAGS="${CFLAGS} -g"
168 AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)],
169 [if eval "test x$enable_experimental = xyes"; then
174 dnl disable these external libs
175 AC_ARG_WITH(disable-ext-lib,
176 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
177 [ if test $withval; then
178 for i in `echo $withval | sed -e's/,/ /g'`
180 eval SMB_EXT_LIB_$i=NO
184 dnl exclude these modules
185 AC_ARG_WITH(exclude-modules,
186 [ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build],
187 [ if test $withval; then
188 for i in `echo $withval | sed -e's/,/ /g'`
190 eval SMB_MODULE_$i=NOT
194 dnl Always built these modules shared
195 AC_ARG_WITH(shared-modules,
196 [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared],
197 [ if test $withval; then
198 for i in `echo $withval | sed -e's/,/ /g'`
200 eval SMB_MODULE_$i=SHARED
204 dnl Always built these modules static
205 AC_ARG_WITH(static-modules,
206 [ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
207 [ if test $withval; then
208 for i in `echo $withval | sed -e's/,/ /g'`
210 eval SMB_MODULE_$i=STATIC