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"
149 AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
150 [if test x$enable_developer = xyes; then
152 CFLAGS="${CFLAGS} -g -Wall"
154 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"
159 [ --enable-debug Turn on compiler debugging information (default=no)],
160 [if test x$enable_debug = xyes -a x$enable_developer != xyes; then
162 CFLAGS="${CFLAGS} -g"
167 AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)],
168 [if eval "test x$enable_experimental = xyes"; then
173 dnl disable these external libs
174 AC_ARG_WITH(disable-ext-lib,
175 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
176 [ if test $withval; then
177 for i in `echo $withval | sed -e's/,/ /g'`
179 eval SMB_EXT_LIB_$i=NO
183 dnl exclude these modules
184 AC_ARG_WITH(exclude-modules,
185 [ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build],
186 [ if test $withval; then
187 for i in `echo $withval | sed -e's/,/ /g'`
189 eval SMB_MODULE_$i=NOT
193 dnl Always built these modules shared
194 AC_ARG_WITH(shared-modules,
195 [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared],
196 [ if test $withval; then
197 for i in `echo $withval | sed -e's/,/ /g'`
199 eval SMB_MODULE_$i=SHARED
203 dnl Always built these modules static
204 AC_ARG_WITH(static-modules,
205 [ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
206 [ if test $withval; then
207 for i in `echo $withval | sed -e's/,/ /g'`
209 eval SMB_MODULE_$i=STATIC