2 AC_DEFUN([OPENAFS_OPTIONS],[
5 AC_ARG_WITH([afs-sysname],
6 [AS_HELP_STRING([--with-afs-sysname=sys], [use sys for the afs sysname])
9 dnl General feature options.
10 AC_ARG_ENABLE([namei-fileserver],
11 [AS_HELP_STRING([--enable-namei-fileserver],
12 [force compilation of namei fileserver in preference to inode
15 [enable_namei_fileserver="default"])
16 AC_ARG_ENABLE([supergroups],
17 [AS_HELP_STRING([--enable-supergroups],
18 [enable support for nested pts groups])],
20 [enable_supergroups="no"])
21 AC_ARG_ENABLE([bitmap-later],
22 [AS_HELP_STRING([--enable-bitmap-later],
23 [enable fast startup of file server by not reading bitmap till
25 [AS_IF([test x"$withval" = xyes],
26 [AC_MSG_WARN([bitmap-later is only used by non-demand-attach
27 fileservers. Please migrate to demand-attach instead.])])],
28 [enable_bitmap_later="no"])
29 AC_ARG_ENABLE([unix-sockets],
30 [AS_HELP_STRING([--disable-unix-sockets],
31 [disable use of unix domain sockets for fssync (defaults to enabled)])],
33 [enable_unix_sockets="yes"])
34 AC_ARG_ENABLE([tivoli-tsm],
35 [AS_HELP_STRING([--enable-tivoli-tsm],
36 [enable use of the Tivoli TSM API libraries for butc support])],
38 [enable_tivoli_tsm="no"])
39 AC_ARG_ENABLE([pthreaded-ubik],
40 [AS_HELP_STRING([--disable-pthreaded-ubik],
41 [disable installation of pthreaded ubik applications (defaults to
44 [enable_pthreaded_ubik="yes"])
45 AC_ARG_ENABLE([ubik-read-while-write],
46 [AS_HELP_STRING([--enable-ubik-read-while-write],
47 [enable vlserver read from db cache during write locks (EXPERIMENTAL)])],
49 [enable_ubik_read_while_write="no"])
51 dnl Kernel module build options.
52 AC_ARG_WITH([linux-kernel-headers],
53 [AS_HELP_STRING([--with-linux-kernel-headers=path],
54 [use the kernel headers found at path (optional, defaults to
55 /lib/modules/`uname -r`/build, then /lib/modules/`uname -r`/source,
56 and lastly /usr/src/linux)])
58 AC_ARG_WITH([linux-kernel-build],
59 [AS_HELP_STRING([--with-linux-kernel-build=path],
60 [use the kernel build found at path(optional, defaults to
63 AC_ARG_WITH([bsd-kernel-headers],
64 [AS_HELP_STRING([--with-bsd-kernel-headers=path],
65 [use the kernel headers found at path (optional, defaults to
68 AC_ARG_WITH([bsd-kernel-build],
69 [AS_HELP_STRING([--with-bsd-kernel-build=path],
70 [use the kernel build found at path (optional, defaults to
71 KSRC/i386/compile/GENERIC)])
73 AC_ARG_WITH([linux-kernel-packaging],
74 [AS_HELP_STRING([--with-linux-kernel-packaging],
75 [use standard naming conventions to aid Linux kernel build packaging
76 (disables MPS, sets the kernel module name to openafs.ko, and
77 installs kernel modules into the standard Linux location)])],
78 [AC_SUBST([LINUX_KERNEL_PACKAGING], [yes])
79 AC_SUBST([LINUX_LIBAFS_NAME], [openafs])],
80 [AC_SUBST([LINUX_LIBAFS_NAME], [libafs])
82 AC_ARG_ENABLE([kernel-module],
83 [AS_HELP_STRING([--disable-kernel-module],
84 [disable compilation of the kernel module (defaults to enabled)])],
86 [enable_kernel_module="yes"])
87 AC_ARG_ENABLE([redhat-buildsys],
88 [AS_HELP_STRING([--enable-redhat-buildsys],
89 [enable compilation of the redhat build system kernel (defaults to
92 [enable_redhat_buildsys="no"])
94 dnl Installation locations.
95 AC_ARG_ENABLE([transarc-paths],
96 [AS_HELP_STRING([--enable-transarc-paths],
97 [use Transarc style paths like /usr/afs and /usr/vice])],
99 [enable_transarc_paths="no"])
101 dnl Deprecated crypto
102 AC_ARG_ENABLE([kauth],
103 [AS_HELP_STRING([--enable-kauth],
104 [install the deprecated kauth server, pam modules, and utilities
105 (defaults to disabled)])],
110 dnl Optimization and debugging flags.
111 AC_ARG_ENABLE([strip-binaries],
112 [AS_HELP_STRING([--disable-strip-binaries],
113 [disable stripping of symbol information from binaries (defaults to
116 [enable_strip_binaries="maybe"])
117 AC_ARG_ENABLE([debug],
118 [AS_HELP_STRING([--enable-debug],
119 [enable compilation of the user space code with debugging information
120 (defaults to disabled)])],
123 AC_ARG_ENABLE([optimize],
124 [AS_HELP_STRING([--disable-optimize],
125 [disable optimization for compilation of the user space code (defaults
128 [enable_optimize="yes"])
129 AC_ARG_ENABLE([warnings],
130 [AS_HELP_STRING([--enable-warnings],
131 [enable compilation warnings when building with gcc (defaults to
134 [enable_warnings="no"])
135 AC_ARG_ENABLE([checking],
136 [AS_HELP_STRING([--enable-checking],
137 [turn compilation warnings into errors when building with gcc (defaults
139 [enable_checking="$enableval"],
140 [enable_checking="no"])
141 AC_ARG_ENABLE([debug-locks],
142 [AS_HELP_STRING([--enable-debug-locks],
143 [turn on lock debugging assertions (defaults to disabled)])],
144 [enable_debug_locks="$enableval"],
145 [enable_debug_locks="no"])
146 AC_ARG_ENABLE([debug-kernel],
147 [AS_HELP_STRING([--enable-debug-kernel],
148 [enable compilation of the kernel module with debugging information
149 (defaults to disabled)])],
151 [enable_debug_kernel="no"])
152 AC_ARG_ENABLE([optimize-kernel],
153 [AS_HELP_STRING([--disable-optimize-kernel],
154 [disable compilation of the kernel module with optimization (defaults
155 based on platform)])],
157 [enable_optimize_kernel=""])
158 AC_ARG_ENABLE([debug-lwp],
159 [AS_HELP_STRING([--enable-debug-lwp],
160 [enable compilation of the LWP code with debugging information
161 (defaults to disabled)])],
163 [enable_debug_lwp="no"])
164 AC_ARG_ENABLE([optimize-lwp],
165 [AS_HELP_STRING([--disable-optimize-lwp],
166 [disable optimization for compilation of the LWP code (defaults to
169 [enable_optimize_lwp="yes"])
170 AC_ARG_ENABLE([debug-pam],
171 [AS_HELP_STRING([--enable-debug-pam],
172 [enable compilation of the PAM code with debugging information
173 (defaults to disabled)])],
175 [enable_debug_pam="no"])
176 AC_ARG_ENABLE([optimize-pam],
177 [AS_HELP_STRING([--disable-optimize-pam],
178 [disable optimization for compilation of the PAM code (defaults to
181 [enable_optimize_pam="yes"])
182 AC_ARG_ENABLE([linux-syscall-probing],
183 [AS_HELP_STRING([--enable-linux-syscall-probing],
184 [enable Linux syscall probing (defaults to autodetect)])],
186 [enable_linux_syscall_probing="maybe"])
187 AC_ARG_ENABLE([linux-d_splice_alias-extra-iput],
188 [AS_HELP_STRING([--enable-linux-d_splice_alias-extra-iput],
189 [Linux kernels in the 3.17 series prior to 3.17.3 had a bug
190 wherein error returns from the d_splice_alias() function were
191 leaking a reference on the inode. The bug was fixed for the
192 3.17.3 kernel, and the possibility of an error return was only
193 introduced in kernel 3.17, so only the narrow range of kernels
194 is affected. Enable this option for builds on systems with
195 kernels affected by this bug, to manually release the reference
196 on error returns and correct the reference counting.
197 Linux commit 51486b900ee92856b977eacfc5bfbe6565028070 (or
198 equivalent) is the fix for the upstream bug, so if such a commit
199 is present, leave this option disabled. We apologize
200 that you are required to know this about your running kernel,
201 but luckily only a narrow range of versions is affected.])],
203 [enable_linux_d_splice_alias_extra_iput="no"])
204 AC_ARG_WITH([crosstools-dir],
205 [AS_HELP_STRING([--with-crosstools-dir=path],
206 [use path for native versions of rxgen, compile_et and config])
209 AC_ARG_WITH([xslt-processor],
210 AS_HELP_STRING([--with-xslt-processor=ARG],
211 [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]),
212 [XSLTPROC="$withval"],
213 [AC_CHECK_PROGS([XSLTPROC], [libxslt saxon xalan-j xsltproc], [echo])])
215 AC_ARG_WITH([html-xsl],
216 AS_HELP_STRING([--with-html-xsl],
217 [build HTML documentation using this stylesheet (default is html/chunk.dsl; specify either html/chunk.xsl or html/docbook.xsl)]),
218 [HTML_XSL="$withval"],
219 [HTML_XSL="html/chunk.xsl"])
221 AC_ARG_WITH([docbook2pdf],
222 AS_HELP_STRING([--with-docbook2pdf=ARG],
223 [which Docbook to PDF utility to use (possible choices are: fop, dblatex, docbook2pdf)]),
224 [DOCBOOK2PDF="$withval"],
225 [AC_CHECK_PROGS([DOCBOOK2PDF], [fop dblatex docbook2pdf], [echo])])
227 AC_ARG_WITH([docbook-stylesheets],
228 AS_HELP_STRING([--with-docbook-stylesheets=ARG],
229 [location of DocBook stylesheets (default is to search a set of likely paths)]),
230 [DOCBOOK_STYLESHEETS="$withval"],
231 [OPENAFS_SEARCH_DIRLIST([DOCBOOK_STYLESHEETS],
232 [/usr/share/xml/docbook/stylesheet/nwalsh/current \
233 /usr/share/xml/docbook/stylesheet/nwalsh \
234 /usr/share/xml/docbook/xsl-stylesheets \
235 /usr/share/sgml/docbook/docbook-xsl-stylesheets \
236 /usr/share/sgml/docbook/xsl-stylesheets \
237 /usr/share/docbook-xsl \
238 /usr/share/sgml/docbkxsl \
239 /usr/local/share/xsl/docbook \
240 /sw/share/xml/xsl/docbook-xsl \
241 /opt/local/share/xsl/docbook-xsl],
243 AS_IF([test "x$DOCBOOK_STYLESHEETS" = "x"],
244 [AC_WARN([Docbook stylesheets not found; some documentation can't be built])
249 AS_HELP_STRING([--with-dot@<:@=PATH@:>@],
250 [use graphviz dot to generate dependency graphs with doxygen (defaults to autodetect)]),
251 [], [with_dot="maybe"])
257 AC_DEFUN([OPENAFS_OPTION_TESTS],[
259 if test "$enable_supergroups" = "yes"; then
260 AC_DEFINE(SUPERGROUPS, 1, [define if you want to have support for nested pts groups])
263 if test "$enable_bitmap_later" = "yes"; then
264 AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later])
267 if test "$enable_unix_sockets" = "yes"; then
268 AC_DEFINE(USE_UNIX_SOCKETS, 1, [define if you want to use UNIX sockets for fssync.])
269 USE_UNIX_SOCKETS="yes"
271 USE_UNIX_SOCKETS="no"
273 AC_SUBST(USE_UNIX_SOCKETS)
275 if test "$enable_ubik_read_while_write" = "yes"; then
276 AC_DEFINE(UBIK_READ_WHILE_WRITE, 1, [define if you want to enable ubik read while write])
279 if test "$enable_namei_fileserver" = "yes"; then
280 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
283 if test "$enable_namei_fileserver" = "default"; then
286 AC_MSG_WARN(Some Solaris 10 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
287 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
291 AC_MSG_WARN(Solaris 11 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
292 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
305 AC_DEFUN([OPENAFS_MORE_OPTION_TESTS],[
306 if test "$enable_debug_locks" = yes; then
307 AC_DEFINE(OPR_DEBUG_LOCKS, 1, [turn on lock debugging in opr])
310 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
317 if test "$enable_login" = yes; then
322 AC_SUBST(BUILD_LOGIN)
324 if test "$enable_kauth" = yes; then
329 AC_SUBST(INSTALL_KAUTH)
332 AC_DEFUN([OPENAFS_YET_MORE_OPTION_TESTS],[
333 if test "x$enable_kernel_module" = "xyes"; then
334 ENABLE_KERNEL_MODULE=libafs
337 if test "x$enable_pthreaded_ubik" = "xyes"; then
338 ENABLE_PTHREADED_UBIK=yes