source: branches/samba-3.5.x/source4/build/m4/check_path.m4

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 6.7 KB
Line 
1dnl SMB Build Environment Path Checks
2dnl -------------------------------------------------------
3dnl Copyright (C) Stefan (metze) Metzmacher 2004
4dnl Released under the GNU GPL
5dnl -------------------------------------------------------
6dnl
7
8AC_LIBREPLACE_LOCATION_CHECKS
9
10#################################################
11# Directory handling stuff to support both the
12# legacy SAMBA directories and FHS compliant
13# ones...
14AC_PREFIX_DEFAULT(/usr/local/samba)
15
16# Defaults and --without-fhs
17logfilebase="${localstatedir}"
18lockdir="${localstatedir}/locks"
19piddir="${localstatedir}/run"
20privatedir="\${prefix}/private"
21modulesdir="\${prefix}/modules"
22winbindd_socket_dir="${localstatedir}/run/winbindd"
23winbindd_privileged_socket_dir="${localstatedir}/lib/winbindd_privileged"
24ntp_signd_socket_dir="${localstatedir}/run/ntp_signd"
25
26AC_ARG_ENABLE(fhs,
27[AS_HELP_STRING([--enable-fhs],[Use FHS-compliant paths (default=no)])],
28[fhs=$enableval],
29[fhs=no]
30)
31
32if test x$fhs = xyes; then
33 lockdir="${localstatedir}/lib/samba"
34 piddir="${localstatedir}/run/samba"
35 logfilebase="${localstatedir}/log/samba"
36 privatedir="${localstatedir}/lib/samba/private"
37 sysconfdir="${sysconfdir}/samba"
38 modulesdir="${libdir}/samba"
39 datadir="${datadir}/samba"
40 includedir="${includedir}/samba-4.0"
41 ntp_signd_socket_dir="${localstatedir}/run/samba/ntp_signd"
42 winbindd_socket_dir="${localstatedir}/run/samba/winbindd"
43 winbindd_privileged_socket_dir="${localstatedir}/lib/samba/winbindd_privileged"
44else
45 # Check to prevent installing directly under /usr without the FHS
46 AS_IF([test $prefix = /usr || test $prefix = /usr/local],[
47 AC_MSG_ERROR([Don't install directly under "/usr" or "/usr/local" without using the FHS option (--enable-fhs). This could lead to file loss!])
48 ])
49fi
50
51#################################################
52# set modules directory location
53AC_ARG_WITH(modulesdir,
54[AS_HELP_STRING([--with-modulesdir=DIR],[Where to put dynamically loadable modules ($modulesdir)])],
55[ case "$withval" in
56 yes|no)
57 #
58 # Just in case anybody calls it without argument
59 #
60 AC_MSG_WARN([--with-modulesdir called without argument - will use default])
61 ;;
62 * )
63 modulesdir="$withval"
64 ;;
65 esac])
66
67#################################################
68# set private directory location
69AC_ARG_WITH(privatedir,
70[AS_HELP_STRING([--with-privatedir=DIR],[Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)])],
71[ case "$withval" in
72 yes|no)
73 #
74 # Just in case anybody calls it without argument
75 #
76 AC_MSG_WARN([--with-privatedir called without argument - will use default])
77 ;;
78 * )
79 privatedir="$withval"
80 ;;
81 esac])
82
83#################################################
84# set where the winbindd socket should be put
85AC_ARG_WITH(winbindd-socket-dir,
86[AS_HELP_STRING([--with-winbindd-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_socket_dir)])],
87[ case "$withval" in
88 yes|no)
89 #
90 # Just in case anybody calls it without argument
91 #
92 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default])
93 ;;
94 * )
95 winbindd_socket_dir="$withval"
96 ;;
97 esac])
98
99#################################################
100# set where the winbindd privileged socket should be put
101AC_ARG_WITH(winbindd-privileged-socket-dir,
102[AS_HELP_STRING([--with-winbindd-privileged-socket-dir=DIR],[Where to put the winbindd socket ($winbindd_privileged_socket_dir)])],
103[ case "$withval" in
104 yes|no)
105 #
106 # Just in case anybody calls it without argument
107 #
108 AC_MSG_WARN([--with-winbind-privileged-socketdir called without argument - will use default])
109 ;;
110 * )
111 winbindd_privileged_socket_dir="$withval"
112 ;;
113 esac])
114
115#################################################
116# set where the NTP signing deamon socket should be put
117AC_ARG_WITH(ntp-signd-socket-dir,
118[AS_HELP_STRING([--with-ntp-signd-socket-dir=DIR],[Where to put the NTP signing deamon socket ($ac_default_prefix/run/ntp_signd)])],
119[ case "$withval" in
120 yes|no)
121 #
122 # Just in case anybody calls it without argument
123 #
124 AC_MSG_WARN([--with-ntp-signd-socketdir called without argument - will use default])
125 ;;
126 * )
127 ntp_signd_socket_dir="$withval"
128 ;;
129 esac])
130
131#################################################
132# set lock directory location
133AC_ARG_WITH(lockdir,
134[AS_HELP_STRING([--with-lockdir=DIR],[Where to put lock files ($ac_default_prefix/var/locks)])],
135[ case "$withval" in
136 yes|no)
137 #
138 # Just in case anybody calls it without argument
139 #
140 AC_MSG_WARN([--with-lockdir called without argument - will use default])
141 ;;
142 * )
143 lockdir="$withval"
144 ;;
145 esac])
146
147#################################################
148# set pid directory location
149AC_ARG_WITH(piddir,
150[AS_HELP_STRING([--with-piddir=DIR],[Where to put pid files ($ac_default_prefix/var/locks)])],
151[ case "$withval" in
152 yes|no)
153 #
154 # Just in case anybody calls it without argument
155 #
156 AC_MSG_WARN([--with-piddir called without argument - will use default])
157 ;;
158 * )
159 piddir="$withval"
160 ;;
161 esac])
162
163#################################################
164# set log directory location
165AC_ARG_WITH(logfilebase,
166[AS_HELP_STRING([--with-logfilebase=DIR],[Where to put log files (\$(VARDIR))])],
167[ case "$withval" in
168 yes|no)
169 #
170 # Just in case anybody does it
171 #
172 AC_MSG_WARN([--with-logfilebase called without argument - will use default])
173 ;;
174 * )
175 logfilebase="$withval"
176 ;;
177 esac])
178
179
180AC_SUBST(lockdir)
181AC_SUBST(piddir)
182AC_SUBST(logfilebase)
183AC_SUBST(privatedir)
184AC_SUBST(bindir)
185AC_SUBST(sbindir)
186AC_SUBST(winbindd_socket_dir)
187AC_SUBST(winbindd_privileged_socket_dir)
188AC_SUBST(ntp_signd_socket_dir)
189AC_SUBST(modulesdir)
190
191#################################################
192# set prefix for 'make test'
193# this is needed to workarround the 108 char
194# unix socket path limitation!
195#
196selftest_prefix="./st"
197AC_SUBST(selftest_prefix)
198AC_ARG_WITH(selftest-prefix,
199[AS_HELP_STRING([--with-selftest-prefix=DIR],[The prefix where make test will be run ($selftest_prefix)])],
200[ case "$withval" in
201 yes|no)
202 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
203 ;;
204 * )
205 selftest_prefix="$withval"
206 ;;
207 esac])
208
209debug=no
210AC_ARG_ENABLE(debug,
211[AS_HELP_STRING([--enable-debug],[Turn on compiler debugging information (default=no)])],
212 [if test x$enable_debug = xyes; then
213 debug=yes
214 fi])
215
216developer=no
217AC_SUBST(developer)
218AC_ARG_ENABLE(developer,
219[AS_HELP_STRING([--enable-developer],[Turn on developer warnings and debugging (default=no)])],
220 [if test x$enable_developer = xyes; then
221 debug=yes
222 developer=yes
223 fi])
224
225dnl disable these external libs
226AC_ARG_WITH(disable-ext-lib,
227[AS_HELP_STRING([--with-disable-ext-lib=LIB],[Comma-seperated list of external libraries])],
228[ if test $withval; then
229 for i in `echo $withval | sed -e's/,/ /g'`
230 do
231 eval SMB_$i=NO
232 done
233fi ])
Note: See TracBrowser for help on using the repository browser.