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
154 DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER"
155 if test x"$GCC" = x"yes" ; then
156 AX_CFLAGS_GCC_OPTION(-Wall, DEVELOPER_CFLAGS)
157 AX_CFLAGS_GCC_OPTION(-Wshadow, DEVELOPER_CFLAGS)
158 AX_CFLAGS_GCC_OPTION(-Werror-implicit-function-declaration, DEVELOPER_CFLAGS)
159 AX_CFLAGS_GCC_OPTION(-Wstrict-prototypes, DEVELOPER_CFLAGS)
160 AX_CFLAGS_GCC_OPTION(-Wpointer-arith, DEVELOPER_CFLAGS)
161 AX_CFLAGS_GCC_OPTION(-Wcast-qual, DEVELOPER_CFLAGS)
162 AX_CFLAGS_GCC_OPTION(-Wcast-align, DEVELOPER_CFLAGS)
163 AX_CFLAGS_GCC_OPTION(-Wwrite-strings, DEVELOPER_CFLAGS)
164 AX_CFLAGS_GCC_OPTION(-Wmissing-format-attribute, DEVELOPER_CFLAGS)
165 AX_CFLAGS_GCC_OPTION(-Wformat=2, DEVELOPER_CFLAGS)
166 AX_CFLAGS_GCC_OPTION(-Wno-format-y2k, DEVELOPER_CFLAGS)
167 AX_CFLAGS_GCC_OPTION(-Wno-declaration-after-statement, DEVELOPER_CFLAGS)
173 [ --enable-debug Turn on compiler debugging information (default=no)],
174 [if test x$enable_debug = xyes -a x$enable_developer != xyes; then
176 CFLAGS="${CFLAGS} -g"
181 AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)],
182 [if eval "test x$enable_experimental = xyes"; then
187 dnl disable these external libs
188 AC_ARG_WITH(disable-ext-lib,
189 [ --with-disable-ext-lib=LIB Comma-seperated list of external libraries],
190 [ if test $withval; then
191 for i in `echo $withval | sed -e's/,/ /g'`
193 eval SMB_EXT_LIB_$i=NO
197 dnl exclude these modules
198 AC_ARG_WITH(exclude-modules,
199 [ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build],
200 [ if test $withval; then
201 for i in `echo $withval | sed -e's/,/ /g'`
203 eval SMB_MODULE_$i=NOT
207 dnl Always built these modules shared
208 AC_ARG_WITH(shared-modules,
209 [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared],
210 [ if test $withval; then
211 for i in `echo $withval | sed -e's/,/ /g'`
213 eval SMB_MODULE_$i=SHARED
217 dnl Always built these modules static
218 AC_ARG_WITH(static-modules,
219 [ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
220 [ if test $withval; then
221 for i in `echo $withval | sed -e's/,/ /g'`
223 eval SMB_MODULE_$i=STATIC