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="\${VARDIR}/cache/samba"
18 piddir="\${VARDIR}/run/samba"
19 logfilebase="\${VARDIR}/log/samba"
20 privatedir="\${CONFIGDIR}/private"
21 libdir="\${prefix}/lib/samba"
22 swatdir="\${DATADIR}/samba/swat",
23 configdir="\${LIBDIR}"
24 logfilebase="\${VARDIR}"
25 lockdir="\${VARDIR}/locks"
26 piddir="\${VARDIR}/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"
113 AC_SUBST(logfilebase)
120 [ --enable-debug Turn on compiler debugging information (default=no)],
121 [if eval "test x$enable_debug = xyes"; then
123 CFLAGS="${CFLAGS} -g"
127 AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
128 [if eval "test x$enable_developer = xyes"; then
130 CFLAGS="${CFLAGS} -g -Wall"
132 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 -DDEBUG_PASSWORD -DDEVELOPER"
135 AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
136 [if eval "test x$enable_krb5developer = xyes"; then
138 CFLAGS="${CFLAGS} -g -Wall"
140 DEVELOPER_CFLAGS="-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -DDEBUG_PASSWORD -DDEVELOPER"
143 AC_ARG_ENABLE(gtkdeveloper, [ --enable-gtkdeveloper Turn on developer warnings and debugging, except -Wstrict-prototypes and -Wshadow (default=no)],
144 [if eval "test x$enable_gtkdeveloper = xyes"; then
146 CFLAGS="${CFLAGS} -g -Wall"
148 DEVELOPER_CFLAGS="-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -DDEBUG_PASSWORD -DDEVELOPER"
152 AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)],
153 [if eval "test x$enable_experimental = xyes"; then
159 dnl exclude these modules
160 AC_ARG_WITH(exclude-modules,
161 [ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build],
162 [ if test $withval; then
163 for i in `echo $withval | sed -e's/,/ /g'`
165 eval SMB_MODULE_$i=NOT
169 dnl Always built these modules shared
170 AC_ARG_WITH(shared-modules,
171 [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared],
172 [ if test $withval; then
173 for i in `echo $withval | sed -e's/,/ /g'`
175 eval SMB_MODULE_$i=SHARED
179 dnl Always built these modules static
180 AC_ARG_WITH(static-modules,
181 [ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
182 [ if test $withval; then
183 for i in `echo $withval | sed -e's/,/ /g'`
185 eval SMB_MODULE_$i=STATIC