source: branches/samba-3.3.x/source/m4/check_path.m4

Last change on this file was 221, checked in by Herwig Bauernfeind, 16 years ago

Update Samba 3.3 to 3.3.1

File size: 9.2 KB
Line 
1dnl
2dnl Samba3 build environment path checks
3dnl
4dnl Copyright (C) Michael Adam 2008
5dnl
6dnl Released under the GNU General Public License
7dnl http://www.gnu.org/licenses/
8dnl
9
10AC_LIBREPLACE_LOCATION_CHECKS
11
12#################################################
13# Directory handling stuff to support both the
14# legacy SAMBA directories and FHS compliant
15# ones...
16AC_PREFIX_DEFAULT(/usr/local/samba)
17
18rootsbindir="\${SBINDIR}"
19lockdir="\${VARDIR}/locks"
20piddir="\${VARDIR}/locks"
21test "${mandir}" || mandir="\${prefix}/man"
22logfilebase="\${VARDIR}"
23privatedir="\${prefix}/private"
24test "${libdir}" || libdir="\${prefix}/lib"
25modulesdir="${libdir}"
26pammodulesdir="${libdir}/security"
27configdir="${libdir}"
28swatdir="\${prefix}/swat"
29codepagedir="\${MODULESDIR}"
30statedir="\${LOCKDIR}"
31cachedir="\${LOCKDIR}"
32localedir="\${prefix}/share/locale"
33
34AC_ARG_WITH(fhs,
35[AS_HELP_STRING([--with-fhs],[Use FHS-compliant paths (default=no)])],
36[ case "$withval" in
37 yes)
38 lockdir="\${VARDIR}/lib/samba"
39 piddir="\${VARDIR}/run"
40 mandir="\${prefix}/share/man"
41 logfilebase="\${VARDIR}/log/samba"
42 privatedir="\${CONFIGDIR}/private"
43 test "${libdir}" || libdir="\${prefix}/lib"
44 modulesdir="${libdir}/samba"
45 configdir="\${sysconfdir}/samba"
46 swatdir="\${DATADIR}/samba/swat"
47 codepagedir="\${MODULESDIR}"
48 statedir="\${VARDIR}/lib/samba"
49 cachedir="\${VARDIR}/lib/samba"
50 AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
51 ;;
52 esac])
53
54#################################################
55# set private directory location
56AC_ARG_WITH(privatedir,
57[AS_HELP_STRING([--with-privatedir=DIR], [Where to put smbpasswd ($ac_default_prefix/private)])],
58[ case "$withval" in
59 yes|no)
60 #
61 # Just in case anybody calls it without argument
62 #
63 AC_MSG_WARN([--with-privatedir called without argument - will use default])
64 ;;
65 * )
66 privatedir="$withval"
67 ;;
68 esac])
69
70#################################################
71# set root sbin directory location
72AC_ARG_WITH(rootsbindir,
73[AS_HELP_STRING([--with-rootsbindir=DIR], [Which directory to use for root sbin ($ac_default_prefix/sbin)])],
74[ case "$withval" in
75 yes|no)
76 #
77 # Just in case anybody calls it without argument
78 #
79 AC_MSG_WARN([--with-rootsbindir called without argument - will use default])
80 ;;
81 * )
82 rootsbindir="$withval"
83 ;;
84 esac])
85
86#################################################
87# set lock directory location
88AC_ARG_WITH(lockdir,
89[AS_HELP_STRING([--with-lockdir=DIR], [Where to put lock files ($ac_default_prefix/var/locks)])],
90[ case "$withval" in
91 yes|no)
92 #
93 # Just in case anybody calls it without argument
94 #
95 AC_MSG_WARN([--with-lockdir called without argument - will use default])
96 ;;
97 * )
98 lockdir="$withval"
99 ;;
100 esac])
101
102#################################################
103# set pid directory location
104AC_ARG_WITH(piddir,
105[AS_HELP_STRING([--with-piddir=DIR], [Where to put pid files ($ac_default_prefix/var/locks)])],
106[ case "$withval" in
107 yes|no)
108 #
109 # Just in case anybody calls it without argument
110 #
111 AC_MSG_WARN([--with-piddir called without argument - will use default])
112 ;;
113 * )
114 piddir="$withval"
115 ;;
116 esac])
117
118#################################################
119# set SWAT directory location
120AC_ARG_WITH(swatdir,
121[AS_HELP_STRING([--with-swatdir=DIR], [Where to put SWAT files ($ac_default_prefix/swat)])],
122[ case "$withval" in
123 yes|no)
124 #
125 # Just in case anybody does it
126 #
127 AC_MSG_WARN([--with-swatdir called without argument - will use default])
128 ;;
129 * )
130 swatdir="$withval"
131 ;;
132 esac])
133
134#################################################
135# set configuration directory location
136AC_ARG_WITH(configdir,
137[AS_HELP_STRING([--with-configdir=DIR], [Where to put configuration files ($libdir)])],
138[ case "$withval" in
139 yes|no)
140 #
141 # Just in case anybody does it
142 #
143 AC_MSG_WARN([--with-configdir called without argument - will use default])
144 ;;
145 * )
146 configdir="$withval"
147 ;;
148 esac])
149
150#################################################
151# set log directory location
152AC_ARG_WITH(logfilebase,
153[AS_HELP_STRING([--with-logfilebase=DIR], [Where to put log files ($VARDIR)])],
154[ case "$withval" in
155 yes|no)
156 #
157 # Just in case anybody does it
158 #
159 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
160 ;;
161 * )
162 logfilebase="$withval"
163 ;;
164 esac])
165
166
167#################################################
168
169#################################################
170# set shared modules (internal lib) directory location
171AC_ARG_WITH(modulesdir,
172[AS_HELP_STRING([--with-modulesdir=DIR], [Where to put shared modules ($libdir)])],
173[ case "$withval" in
174 yes|no)
175 #
176 # Just in case anybody does it
177 #
178 AC_MSG_WARN([--with-modulesdir without argument - will use default])
179 ;;
180 * )
181 modulesdir="$withval"
182 ;;
183 esac])
184
185#################################################
186# set PAM modules directory location
187AC_ARG_WITH(pammodulesdir,
188[AS_HELP_STRING([--with-pammodulesdir=DIR], [Which directory to use for PAM modules ($ac_default_prefix/$libdir/security)])],
189[ case "$withval" in
190 yes|no)
191 #
192 # Just in case anybody calls it without argument
193 #
194 AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
195 ;;
196 * )
197 pammodulesdir="$withval"
198 ;;
199 esac])
200
201#################################################
202# set man directory location
203AC_ARG_WITH(mandir,
204[AS_HELP_STRING([--with-mandir=DIR], [Where to put man pages ($mandir)])],
205[ case "$withval" in
206 yes|no)
207 #
208 # Just in case anybody does it
209 #
210 AC_MSG_WARN([--with-mandir without argument - will use default])
211 ;;
212 * )
213 mandir="$withval"
214 ;;
215 esac])
216
217################################################
218# set locale directory location
219AC_ARG_WITH(localedir,
220[ --with-localedir=DIR Where to put po files ($ac_default_prefix/share/locale)],
221[ case "$withval" in
222 yes|no)
223 #
224 # Just in case anybody does it
225 #
226 AC_MSG_WARN([--with-localedir called without argument - will use default])
227 ;;
228 *)
229 localedir="$withval"
230 ;;
231 esac])
232
233
234AC_SUBST(configdir)
235AC_SUBST(lockdir)
236AC_SUBST(piddir)
237AC_SUBST(logfilebase)
238AC_SUBST(privatedir)
239AC_SUBST(swatdir)
240AC_SUBST(bindir)
241AC_SUBST(sbindir)
242AC_SUBST(codepagedir)
243AC_SUBST(statedir)
244AC_SUBST(cachedir)
245AC_SUBST(rootsbindir)
246AC_SUBST(pammodulesdir)
247AC_SUBST(modulesdir)
248AC_SUBST(localedir)
249
250#################################################
251# set prefix for 'make test'
252selftest_prefix="./st"
253AC_SUBST(selftest_prefix)
254AC_ARG_WITH(selftest-prefix,
255[AS_HELP_STRING([--with-selftest-prefix=DIR], [The prefix where make test will be run ($selftest_prefix)])],
256[ case "$withval" in
257 yes|no)
258 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
259 ;;
260 * )
261 selftest_prefix="$withval"
262 ;;
263 esac
264])
265
266#################################################
267# set path of samba4's smbtorture
268smbtorture4_path=""
269AC_SUBST(smbtorture4_path)
270AC_ARG_WITH(smbtorture4_path,
271[AS_HELP_STRING([--with-smbtorture4-path=PATH], [The path to a samba4 smbtorture for make test (none)])],
272[ case "$withval" in
273 yes|no)
274 AC_MSG_ERROR([--with-smbtorture4-path should take a path])
275 ;;
276 * )
277 smbtorture4_path="$withval"
278 if test -z "$smbtorture4_path" -a ! -f $smbtorture4_path; then
279 AC_MSG_ERROR(['$smbtorture_path' does not exist!])
280 fi
281 ;;
282 esac
283])
284
285## check for --enable-debug first before checking CFLAGS before
286## so that we don't mix -O and -g
287debug=no
288AC_ARG_ENABLE(debug,
289[AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])],
290 [if eval "test x$enable_debug = xyes"; then
291 debug=yes
292 fi])
293
294developer=no
295AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on developer warnings and debugging (default=no)])],
296 [if eval "test x$enable_developer = xyes"; then
297 debug=yes
298 developer=yes
299 fi])
300
301krb5developer=no
302AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)])],
303 [if eval "test x$enable_krb5developer = xyes"; then
304 debug=yes
305 developer=yes
306 krb5_developer=yes
307 fi])
308
309picky_developer=no
310AC_ARG_ENABLE(picky-developer, [AS_HELP_STRING([--enable-picky-developer], [Halt compilation on warnings])],
311 [if eval "test x$enable_picky_developer = xyes"; then
312 debug=yes
313 developer=yes
314 picky_developer=yes
315 fi])
316
317AC_ARG_WITH(cfenc,
318[AS_HELP_STRING([--with-cfenc=HEADERDIR], [Use internal CoreFoundation encoding API for optimization (Mac OS X/Darwin only)])],
319[
320# May be in source $withval/CoreFoundation/StringEncodings.subproj.
321# Should have been in framework $withval/CoreFoundation.framework/Headers.
322for d in \
323 $withval/CoreFoundation/StringEncodings.subproj \
324 $withval/StringEncodings.subproj \
325 $withval/CoreFoundation.framework/Headers \
326 $withval/Headers \
327 $withval
328do
329 if test -r $d/CFStringEncodingConverter.h; then
330 ln -sfh $d include/CoreFoundation
331 fi
332done
333])
334
Note: See TracBrowser for help on using the repository browser.