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 -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
133 AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
134 [if eval "test x$enable_krb5developer = xyes"; then
136 CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
139 AC_ARG_ENABLE(gtkdeveloper, [ --enable-gtkdeveloper Turn on developer warnings and debugging, except -Wstrict-prototypes and -Wshadow (default=no)],
140 [if eval "test x$enable_gtkdeveloper = xyes"; then
142 CFLAGS="${CFLAGS} -g -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
146 AC_ARG_ENABLE(experimental, [ --enable-experimental Turn on experimental features (default=no)],
147 [if eval "test x$enable_experimental = xyes"; then
153 dnl exclude these modules
154 AC_ARG_WITH(exclude-modules,
155 [ --with-exclude-modules=MODULES Comma-seperated list of names of modules to exclude from build],
156 [ if test $withval; then
157 for i in `echo $withval | sed -e's/,/ /g'`
159 eval SMB_MODULE_$i=NOT
163 dnl Always built these modules shared
164 AC_ARG_WITH(shared-modules,
165 [ --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared],
166 [ if test $withval; then
167 for i in `echo $withval | sed -e's/,/ /g'`
169 eval SMB_MODULE_$i=SHARED
173 dnl Always built these modules static
174 AC_ARG_WITH(static-modules,
175 [ --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in],
176 [ if test $withval; then
177 for i in `echo $withval | sed -e's/,/ /g'`
179 eval SMB_MODULE_$i=STATIC