1 dnl This file contains the common configuration code which would
2 dnl otherwise be duplicated between configure and configure-libafs.
4 dnl NB: Because this code is a macro, references to positional shell
5 dnl parameters must be done like $[]1 instead of $1
7 AC_DEFUN([OPENAFS_CONFIGURE_COMMON],[
10 #undef STRUCT_SOCKADDR_HAS_SA_LEN
11 #if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
12 # if ENDIANESS_IN_SYS_PARAM_H
14 # include <sys/types.h>
15 # include <sys/param.h>
16 # if BYTE_ORDER == BIG_ENDIAN
17 # define WORDS_BIGENDIAN 1
20 # if defined(AUTOCONF_FOUND_BIGENDIAN)
21 # define WORDS_BIGENDIAN 1
23 # undef WORDS_BIGENDIAN
27 # if defined(AUTOCONF_FOUND_BIGENDIAN)
28 # define WORDS_BIGENDIAN 1
30 # undef WORDS_BIGENDIAN
34 # if defined(__BIG_ENDIAN__)
35 # define WORDS_BIGENDIAN 1
37 # undef WORDS_BIGENDIAN
42 * Always use 64-bit file offsets for UKERNEL code. Needed for UKERNEL stuff to
43 * play nice with some other interfaces like FUSE. We technically only would
44 * need to define this when building for such interfaces, but set it always to
45 * try and reduce potential confusion.
47 #define _FILE_OFFSET_BITS 64
48 #define AFS_CACHE_VNODE_PATH
54 #undef DEFINED_FOR_EACH_PROCESS
55 #undef DEFINED_PREV_TASK
56 #undef EXPORTED_SYS_CALL_TABLE
57 #undef EXPORTED_IA32_SYS_CALL_TABLE
58 #undef IRIX_HAS_MEM_FUNCS
59 #undef RECALC_SIGPENDING_TAKES_VOID
60 #undef STRUCT_FS_HAS_FS_ROLLED
62 #undef HAVE_ARPA_NAMESER_COMPAT_H
63 /* glue for RedHat kernel bug */
64 #undef ENABLE_REDHAT_BUILDSYS
65 #if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
66 #include "redhat-fix.h"
75 AC_ARG_WITH([afs-sysname],
76 [AS_HELP_STRING([--with-afs-sysname=sys], [use sys for the afs sysname])])
78 dnl General feature options.
80 [AS_HELP_STRING([--disable-pam], [disable PAM support])],
83 AC_ARG_ENABLE([namei-fileserver],
84 [AS_HELP_STRING([--enable-namei-fileserver],
85 [force compilation of namei fileserver in preference to inode
88 [enable_namei_fileserver="default"])
89 AC_ARG_ENABLE([supergroups],
90 [AS_HELP_STRING([--enable-supergroups],
91 [enable support for nested pts groups])],
93 [enable_supergroups="no"])
94 AC_ARG_ENABLE([bitmap-later],
95 [AS_HELP_STRING([--enable-bitmap-later],
96 [enable fast startup of file server by not reading bitmap till
99 [enable_bitmap_later="no"])
100 AC_ARG_ENABLE([demand-attach-fs],
101 [AS_HELP_STRING([--enable-demand-attach-fs],
102 [enable Demand Attach Fileserver (please see documentation)])],
104 [enable_demand_attach_fs="no"])
105 AC_ARG_ENABLE([unix-sockets],
106 [AS_HELP_STRING([--disable-unix-sockets],
107 [disable use of unix domain sockets for fssync (defaults to enabled)])],
109 [enable_unix_sockets="yes"])
110 AC_ARG_ENABLE([icmp-pmtu-discovery],
111 [AS_HELP_STRING([--enable-icmp-pmtu-discovery],
112 [enable path MTU discovery by decoding ICMP unreachable replies])],
114 [enable_icmp_pmtu_discovery="no"])
115 AC_ARG_ENABLE([tivoli-tsm],
116 [AS_HELP_STRING([--enable-tivoli-tsm],
117 [enable use of the Tivoli TSM API libraries for butc support])],
119 [enable_tivoli_tsm="no"])
120 AC_ARG_ENABLE([pthreaded-ubik],
121 [AS_HELP_STRING([--enable-pthreaded-ubik],
122 [enable installation of pthreaded ubik applications (defaults to
125 [enable_pthreaded_ubik="no"])
127 dnl Kernel module build options.
128 AC_ARG_WITH([linux-kernel-headers],
129 [AS_HELP_STRING([--with-linux-kernel-headers=path],
130 [use the kernel headers found at path (optional, defaults to
131 /usr/src/linux-2.4, then /usr/src/linux)])])
132 AC_ARG_WITH([linux-kernel-build],
133 [AS_HELP_STRING([--with-linux-kernel-build=path],
134 [use the kernel build found at path(optional, defaults to
135 /usr/src/linux-2.4, then /usr/src/linux)])])
136 AC_ARG_WITH([bsd-kernel-headers],
137 [AS_HELP_STRING([--with-bsd-kernel-headers=path],
138 [use the kernel headers found at path (optional, defaults to
140 AC_ARG_WITH([bsd-kernel-build],
141 [AS_HELP_STRING([--with-bsd-kernel-build=path],
142 [use the kernel build found at path (optional, defaults to
143 KSRC/i386/compile/GENERIC)])])
144 AC_ARG_WITH([linux-kernel-packaging],
145 [AS_HELP_STRING([--with-linux-kernel-packaging],
146 [use standard naming conventions to aid Linux kernel build packaging
147 (disables MPS, sets the kernel module name to openafs.ko, and
148 installs kernel modules into the standard Linux location)])],
149 [AC_SUBST(LINUX_KERNEL_PACKAGING, "yes")
150 AC_SUBST(LINUX_LIBAFS_NAME, "openafs")],
151 [AC_SUBST(LINUX_LIBAFS_NAME, "libafs")])
152 AC_ARG_ENABLE([kernel-module],
153 [AS_HELP_STRING([--disable-kernel-module],
154 [disable compilation of the kernel module (defaults to enabled)])],
156 [enable_kernel_module="yes"])
157 AC_ARG_ENABLE([redhat-buildsys],
158 [AS_HELP_STRING([--enable-redhat-buildsys],
159 [enable compilation of the redhat build system kernel (defaults to
162 [enable_redhat_buildsys="no"])
164 dnl Installation locations.
165 AC_ARG_ENABLE([transarc-paths],
166 [AS_HELP_STRING([--enable-transarc-paths],
167 [use Transarc style paths like /usr/afs and /usr/vice])],
169 [enable_transarc_paths="no"])
171 dnl Optimization and debugging flags.
172 AC_ARG_ENABLE([strip-binaries],
173 [AS_HELP_STRING([--disable-strip-binaries],
174 [disable stripping of symbol information from binaries (defaults to
177 [enable_strip_binaries="maybe"])
178 AC_ARG_ENABLE([debug],
179 [AS_HELP_STRING([--enable-debug],
180 [enable compilation of the user space code with debugging information
181 (defaults to disabled)])],
184 AC_ARG_ENABLE([optimize],
185 [AS_HELP_STRING([--disable-optimize],
186 [disable optimization for compilation of the user space code (defaults
189 [enable_optimize="yes"])
190 AC_ARG_ENABLE([warnings],
191 [AS_HELP_STRING([--enable-warnings],
192 [enable compilation warnings when building with gcc (defaults to
195 [enable_warnings="no"])
196 AC_ARG_ENABLE([checking],
197 [AS_HELP_STRING([--enable-checking],
198 [turn compilation warnings into errors when building with gcc (defaults
200 [enable_checking="$enableval"],
201 [enable_checking="no"])
202 AC_ARG_ENABLE([debug-kernel],
203 [AS_HELP_STRING([--enable-debug-kernel],
204 [enable compilation of the kernel module with debugging information
205 (defaults to disabled)])],
207 [enable_debug_kernel="no"])
208 AC_ARG_ENABLE([optimize-kernel],
209 [AS_HELP_STRING([--disable-optimize-kernel],
210 [disable compilation of the kernel module with optimization (defaults
211 based on platform)])],
213 [enable_optimize_kernel="yes"])
214 AC_ARG_ENABLE([debug-lwp],
215 [AS_HELP_STRING([--enable-debug-lwp],
216 [enable compilation of the LWP code with debugging information
217 (defaults to disabled)])],
219 [enable_debug_lwp="no"])
220 AC_ARG_ENABLE([optimize-lwp],
221 [AS_HELP_STRING([--disable-optimize-lwp],
222 [disable optimization for compilation of the LWP code (defaults to
225 [enable_optimize_lwp="yes"])
226 AC_ARG_ENABLE([debug-pam],
227 [AS_HELP_STRING([--enable-debug-pam],
228 [enable compilation of the PAM code with debugging information
229 (defaults to disabled)])],
231 [enable_debug_pam="no"])
232 AC_ARG_ENABLE([optimize-pam],
233 [AS_HELP_STRING([--disable-optimize-pam],
234 [disable optimization for compilation of the PAM code (defaults to
237 [enable_optimize_pam="yes"])
238 AC_ARG_ENABLE([linux-syscall-probing],
239 [AS_HELP_STRING([--enable-linux-syscall-probing],
240 [enable Linux syscall probing (defaults to autodetect)])],
242 [enable_linux_syscall_probing="maybe"])
245 AC_ARG_WITH([xslt-processor],
246 AS_HELP_STRING([--with-xslt-processor=ARG],
247 [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]),
251 AC_ARG_WITH([html-xsl],
252 AS_HELP_STRING([--with-html-xsl],
253 [build HTML documentation using Norman Walsh's DocBook XSL stylesheets (default is no; specify a path to chunk.xsl or docbook.xsl)]),
259 dnl weird ass systems
264 dnl Various compiler setup.
268 dnl Checks for programs.
275 OPENAFS_CHECK_BIGENDIAN
276 OPENAFS_PRINTF_TAKES_Z_LEN
278 AC_MSG_CHECKING(your OS)
284 if test "x$enable_redhat_buildsys" = "xyes"; then
285 AC_DEFINE(ENABLE_REDHAT_BUILDSYS, 1, [define if you have redhat buildsystem])
287 if test "x$enable_kernel_module" = "xyes"; then
288 if test "x$with_linux_kernel_headers" != "x"; then
289 LINUX_KERNEL_PATH="$with_linux_kernel_headers"
291 LINUX_KERNEL_PATH="/lib/modules/`uname -r`/source"
292 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
293 LINUX_KERNEL_PATH="/lib/modules/`uname -r`/build"
295 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
296 LINUX_KERNEL_PATH="/usr/src/linux-2.4"
298 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
299 LINUX_KERNEL_PATH="/usr/src/linux"
302 if test "x$with_linux_kernel_build" != "x"; then
303 LINUX_KERNEL_BUILD="$with_linux_kernel_build"
305 LINUX_KERNEL_BUILD=$LINUX_KERNEL_PATH
307 if test -f "$LINUX_KERNEL_BUILD/include/generated/utsrelease.h"; then
308 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/generated/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
309 LINUX_VERSION="$linux_kvers"
311 if test -f "$LINUX_KERNEL_BUILD/include/linux/utsrelease.h"; then
312 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
313 LINUX_VERSION="$linux_kvers"
315 if test -f "$LINUX_KERNEL_BUILD/include/linux/version.h"; then
316 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
317 if test "x$linux_kvers" = "x"; then
318 if test -f "$LINUX_KERNEL_BUILD/include/linux/version-up.h"; then
319 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
320 if test "x$linux_kvers" = "x"; then
321 AC_MSG_ERROR(Linux headers lack version definition [2])
324 LINUX_VERSION="$linux_kvers"
327 AC_MSG_ERROR(Linux headers lack version definition)
331 LINUX_VERSION="$linux_kvers"
334 enable_kernel_module="no"
338 if test ! -f "$LINUX_KERNEL_BUILD/include/generated/autoconf.h" &&
339 test ! -f "$LINUX_KERNEL_BUILD/include/linux/autoconf.h"; then
340 enable_kernel_module="no"
342 if test "x$enable_kernel_module" = "xno"; then
343 if test "x$with_linux_kernel_headers" != "x"; then
344 AC_MSG_ERROR(No usable linux headers found at $LINUX_KERNEL_PATH)
347 AC_MSG_WARN(No usable linux headers found at $LINUX_KERNEL_PATH so disabling kernel module)
350 dnl do we need to determine SUBARCH from autoconf.h
354 if test "x$enable_kernel_module" = "xyes"; then
355 AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
356 if test "x${AFS_SYSKVERS}" = "x"; then
357 AC_MSG_ERROR(Couldn't guess your Linux version [2])
364 AC_PATH_PROG(SOLARISCC, [cc], ,
365 [/opt/SUNWspro/bin:/opt/SunStudioExpress/bin])
366 SOLARIS_UFSVFS_HAS_DQRWLOCK
367 SOLARIS_FS_HAS_FS_ROLLED
368 SOLARIS_SOLOOKUP_TAKES_SOCKPARAMS
372 enable_kernel_module=no
378 if test -f "/usr/old/usr/include/ndir.h"; then
379 AC_DEFINE(HAVE_USR_OLD_USR_INCLUDE_NDIR_H, 1, [define if you have old ndir.h])
383 if test -d /usr/include/sys/SN/SN1; then
384 IRIX_BUILD_IP35="IP35"
391 AC_MSG_RESULT(rs_aix)
395 AC_MSG_RESULT(arm_darwin)
399 AC_MSG_RESULT(ppc_darwin)
403 AC_MSG_RESULT(x86_darwin)
407 AC_MSG_RESULT(i386_fbsd)
411 AC_MSG_RESULT(amd64_fbsd)
419 AC_MSG_RESULT(amd64_obsd)
423 AC_MSG_RESULT(i386_obsd)
427 AC_MSG_RESULT(i386_dfbsd)
430 AC_MSG_RESULT($system)
434 if test "x$with_afs_sysname" != "x"; then
435 AFS_SYSNAME="$with_afs_sysname"
437 AC_MSG_CHECKING(your AFS sysname)
443 AFS_SYSNAME="i386_obsd${vM}${vm}"
445 sparc64-*-openbsd?.?)
449 AFS_SYSNAME="sparc64_obsd${vM}${vm}"
455 AFS_SYSNAME="amd64_obsd${vM}${vm}"
461 AFS_SYSNAME="i386_fbsd_${vM}${vm}"
467 AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
469 i386-*-dragonfly2.2*)
470 AFS_SYSNAME="i386_dfbsd_23"
472 i386-*-dragonfly2.3*)
473 AFS_SYSNAME="i386_dfbsd_23"
475 i?86-*-netbsd*1.6[[M-Z]]*)
476 AFS_SYSNAME="i386_nbsd20"
478 powerpc-*-netbsd*1.6[[M-Z]]*)
479 AFS_SYSNAME="ppc_nbsd20"
482 arch=${host%%-unknown*}
483 arch=$(echo $arch |sed -e 's/x86_64/amd64/g' \
484 -e 's/powerpc/ppc/g')
495 if test $vm -eq 99 ; then
498 if test $vM -gt 1 ; then
501 AFS_SYSNAME="${arch}_nbsd${vM}${vm}"
504 AFS_SYSNAME="hp_ux110"
507 AFS_SYSNAME="hp_ux11i"
510 AFS_SYSNAME="hp_ux1123"
513 AFS_SYSNAME="ia64_hpux1122"
516 AFS_SYSNAME="ia64_hpux1123"
519 AFS_SYSNAME="hp_ux102"
521 powerpc-apple-darwin7*)
522 AFS_SYSNAME="ppc_darwin_70"
524 powerpc-apple-darwin8.*)
525 AFS_SYSNAME="ppc_darwin_80"
527 i386-apple-darwin8.*)
528 AFS_SYSNAME="x86_darwin_80"
530 powerpc-apple-darwin9.*)
531 AFS_SYSNAME="ppc_darwin_90"
533 i386-apple-darwin9.*)
534 AFS_SYSNAME="x86_darwin_90"
536 i?86-apple-darwin10.*)
537 AFS_SYSNAME="x86_darwin_100"
539 sparc-sun-solaris2.5*)
540 AFS_SYSNAME="sun4x_55"
543 sparc-sun-solaris2.6)
544 AFS_SYSNAME="sun4x_56"
546 sparc-sun-solaris2.7)
547 AFS_SYSNAME="sun4x_57"
549 sparc-sun-solaris2.8)
550 AFS_SYSNAME="sun4x_58"
552 sparc-sun-solaris2.9)
553 AFS_SYSNAME="sun4x_59"
555 sparc-sun-solaris2.10)
556 AFS_SYSNAME="sun4x_510"
558 sparc-sun-solaris2.11)
559 AFS_SYSNAME="sun4x_511"
562 AFS_SYSNAME="sun4_413"
566 AFS_SYSNAME="sunx86_57"
569 AFS_SYSNAME="sunx86_58"
572 AFS_SYSNAME="sunx86_59"
575 AFS_SYSNAME="sunx86_510"
578 AFS_SYSNAME="sunx86_511"
581 AFS_SYSNAME="alpha_dux40"
584 AFS_SYSNAME="alpha_dux50"
587 AFS_SYSNAME="alpha_dux51"
593 AFS_SYSNAME="ia64_linuxXX"
596 AFS_SYSNAME="`/bin/arch`_linuxXX"
599 AFS_SYSNAME="ppc64_linuxXX"
602 AFS_SYSNAME="alpha_linux_XX"
605 AFS_SYSNAME="s390_linuxXX"
608 AFS_SYSNAME="s390x_linuxXX"
611 AFS_SYSNAME="`/bin/arch`_linuxXX"
614 AFS_SYSNAME="sparc64_linuxXX"
617 AFS_SYSNAME="i386_linuxXX"
620 AFS_SYSNAME="arm_linuxXX"
622 parisc-*-linux-gnu|hppa-*-linux-gnu)
623 AFS_SYSNAME="parisc_linuxXX"
627 AFS_SYSNAME="rs_aix42"
631 AFS_SYSNAME="rs_aix42"
635 AFS_SYSNAME="rs_aix51"
639 AFS_SYSNAME="rs_aix52"
643 AFS_SYSNAME="rs_aix53"
647 AFS_SYSNAME="rs_aix61"
651 AFS_SYSNAME="amd64_linuxXX"
655 AC_MSG_ERROR(An AFS sysname is required)
660 *_linux* | *_umlinux*)
661 if test "x${AFS_SYSKVERS}" = "x"; then
662 AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
664 _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
665 AFS_SYSNAME="$_AFS_SYSNAME"
668 [#ifndef CONFIG_USERMODE
671 ac_cv_linux_is_uml=yes,)
672 if test "${ac_cv_linux_is_uml}" = yes; then
673 _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
675 AFS_SYSNAME="$_AFS_SYSNAME"
678 AC_MSG_RESULT($AFS_SYSNAME)
683 AC_CHECK_HEADERS(crt_externs.h)
684 DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
685 DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
689 dnl Some hosts have a separate common param file they should include. Figure
690 dnl out if we're on one of them now that we know the sysname.
692 *_nbsd15) AFS_PARAM_COMMON=param.nbsd15.h ;;
693 *_nbsd16) AFS_PARAM_COMMON=param.nbsd16.h ;;
694 *_nbsd20) AFS_PARAM_COMMON=param.nbsd20.h ;;
695 *_nbsd21) AFS_PARAM_COMMON=param.nbsd21.h ;;
696 *_nbsd30) AFS_PARAM_COMMON=param.nbsd30.h ;;
697 *_nbsd40) AFS_PARAM_COMMON=param.nbsd40.h ;;
698 *_nbsd50) AFS_PARAM_COMMON=param.nbsd50.h ;;
699 *_obsd31) AFS_PARAM_COMMON=param.obsd31.h ;;
700 *_obsd32) AFS_PARAM_COMMON=param.obsd32.h ;;
701 *_obsd33) AFS_PARAM_COMMON=param.obsd33.h ;;
702 *_obsd34) AFS_PARAM_COMMON=param.obsd34.h ;;
703 *_obsd35) AFS_PARAM_COMMON=param.obsd35.h ;;
704 *_obsd36) AFS_PARAM_COMMON=param.obsd36.h ;;
705 *_obsd37) AFS_PARAM_COMMON=param.obsd37.h ;;
706 *_obsd38) AFS_PARAM_COMMON=param.obsd38.h ;;
707 *_obsd39) AFS_PARAM_COMMON=param.obsd39.h ;;
708 *_obsd40) AFS_PARAM_COMMON=param.obsd40.h ;;
709 *_obsd41) AFS_PARAM_COMMON=param.obsd41.h ;;
710 *_obsd42) AFS_PARAM_COMMON=param.obsd42.h ;;
711 *_obsd43) AFS_PARAM_COMMON=param.obsd43.h ;;
712 *_obsd44) AFS_PARAM_COMMON=param.obsd44.h ;;
713 *_obsd45) AFS_PARAM_COMMON=param.obsd45.h ;;
714 *_obsd46) AFS_PARAM_COMMON=param.obsd46.h ;;
715 *_linux22) AFS_PARAM_COMMON=param.linux22.h ;;
716 *_linux24) AFS_PARAM_COMMON=param.linux24.h ;;
717 *_linux26) AFS_PARAM_COMMON=param.linux26.h ;;
718 # Linux alpha adds an extra underscore for no good reason.
719 *_linux_22) AFS_PARAM_COMMON=param.linux22.h ;;
720 *_linux_24) AFS_PARAM_COMMON=param.linux24.h ;;
721 *_linux_26) AFS_PARAM_COMMON=param.linux26.h ;;
724 case $AFS_SYSNAME in *_linux* | *_umlinux*)
726 # Add (sub-) architecture-specific paths needed by conftests
729 UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
730 UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
731 UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
732 CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
735 if test "x$enable_kernel_module" = "xyes"; then
736 if test "x$enable_debug_kernel" = "xno"; then
737 LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
739 OPENAFS_GCC_SUPPORTS_MARCH
740 AC_SUBST(P5PLUS_KOPTS)
741 OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
742 OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
743 OPENAFS_GCC_SUPPORTS_NO_COMMON
744 OPENAFS_GCC_SUPPORTS_PIPE
745 AC_SUBST(LINUX_GCC_KOPTS)
747 dnl Setup the kernel build environment
748 LINUX_KBUILD_USES_EXTRA_CFLAGS
749 LINUX_KERNEL_COMPILE_WORKS
751 dnl Check for header files
752 AC_CHECK_LINUX_HEADER([config.h])
753 AC_CHECK_LINUX_HEADER([completion.h])
754 AC_CHECK_LINUX_HEADER([exportfs.h])
755 AC_CHECK_LINUX_HEADER([freezer.h])
756 AC_CHECK_LINUX_HEADER([key-type.h])
757 AC_CHECK_LINUX_HEADER([semaphore.h])
758 AC_CHECK_LINUX_HEADER([seq_file.h])
760 dnl Check for structure elements
761 AC_CHECK_LINUX_STRUCT([address_space_operations],
762 [write_begin], [fs.h])
763 AC_CHECK_LINUX_STRUCT([backing_dev_info], [name],
765 AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
766 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
767 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
768 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
769 AC_CHECK_LINUX_STRUCT([inode], [i_mutex], [fs.h])
770 AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h])
771 AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h])
772 AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h])
773 AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h])
774 AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h])
775 AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])
776 AC_CHECK_LINUX_STRUCT([super_operations], [alloc_inode],
778 AC_CHECK_LINUX_STRUCT([task_struct], [cred], [sched.h])
779 AC_CHECK_LINUX_STRUCT([task_struct], [exit_state], [sched.h])
780 AC_CHECK_LINUX_STRUCT([task_struct], [parent], [sched.h])
781 AC_CHECK_LINUX_STRUCT([task_struct], [real_parent], [sched.h])
782 AC_CHECK_LINUX_STRUCT([task_struct], [rlim], [sched.h])
783 AC_CHECK_LINUX_STRUCT([task_struct], [sig], [sched.h])
784 AC_CHECK_LINUX_STRUCT([task_struct], [sighand], [sched.h])
785 AC_CHECK_LINUX_STRUCT([task_struct], [sigmask_lock], [sched.h])
786 AC_CHECK_LINUX_STRUCT([task_struct], [tgid], [sched.h])
787 AC_CHECK_LINUX_STRUCT([task_struct], [thread_info], [sched.h])
788 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
790 dnl Function existence checks
792 AC_CHECK_LINUX_FUNC([bdi_init],
793 [#include <linux/backing-dev.h>],
795 AC_CHECK_LINUX_FUNC([PageChecked],
796 [#include <linux/mm.h>
797 #include <linux/page-flags.h>],
799 int bchecked = PageChecked(_page);])
800 AC_CHECK_LINUX_FUNC([PageFsMisc],
801 [#include <linux/mm.h>
802 #include <linux/page-flags.h>],
804 int bchecked = PageFsMisc(_page);])
805 AC_CHECK_LINUX_FUNC([current_kernel_time],
806 [#include <linux/time.h>],
808 s = current_kernel_time();])
809 AC_CHECK_LINUX_FUNC([d_alloc_anon],
810 [#include <linux/dcache.h>],
811 [d_alloc_anon(NULL);])
812 AC_CHECK_LINUX_FUNC([do_sync_read],
813 [#include <linux/fs.h>],
814 [do_sync_read(NULL, NULL, 0, NULL);])
815 AC_CHECK_LINUX_FUNC([find_task_by_pid],
816 [#include <linux/sched.h>],
817 [pid_t p; find_task_by_pid(p);])
818 AC_CHECK_LINUX_FUNC([generic_file_aio_read],
819 [#include <linux/fs.h>],
820 [generic_file_aio_read(NULL,NULL,0,0);])
821 AC_CHECK_LINUX_FUNC([grab_cache_page_write_begin],
822 [#include <linux/pagemap.h>],
823 [grab_cache_page_write_begin(NULL, 0, 0);])
824 AC_CHECK_LINUX_FUNC([hlist_unhashed],
825 [#include <linux/list.h>],
826 [hlist_unhashed(0);])
827 AC_CHECK_LINUX_FUNC([i_size_read],
828 [#include <linux/fs.h>],
829 [i_size_read(NULL);])
830 AC_CHECK_LINUX_FUNC([kernel_setsockopt],
831 [#include <linux/net.h>],
832 [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
833 AC_CHECK_LINUX_FUNC([page_follow_link],
834 [#include <linux/fs.h>],
835 [page_follow_link(0,0);])
836 AC_CHECK_LINUX_FUNC([page_offset],
837 [#include <linux/pagemap.h>],
838 [page_offset(NULL);])
839 AC_CHECK_LINUX_FUNC([pagevec_lru_add_file],
840 [#include <linux/pagevec.h>],
841 [__pagevec_lru_add_file(NULL);])
842 AC_CHECK_LINUX_FUNC([rcu_read_lock],
843 [#include <linux/rcupdate.h>],
845 AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
846 [#include <linux/splice.h>],
847 [splice_direct_to_actor(NULL,NULL,NULL);])
848 AC_CHECK_LINUX_FUNC([svc_addr_in],
849 [#include <linux/sunrpc/svc.h>],
850 [svc_addr_in(NULL);])
851 AC_CHECK_LINUX_FUNC([zero_user_segments],
852 [#include <linux/highmem.h>],
853 [zero_user_segments(NULL, 0, 0, 0, 0);])
855 dnl Consequences - things which get set as a result of the
857 AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"],
858 [AC_DEFINE([AFS_NONFSTRANS], 1,
859 [define to disable the nfs translator])])
861 dnl Assorted more complex tests
862 LINUX_EXPORTS_PROC_ROOT_FS
863 LINUX_KMEM_CACHE_INIT
864 LINUX_HAVE_KMEM_CACHE_T
865 LINUX_KMEM_CACHE_CREATE_TAKES_DTOR
866 LINUX_KMEM_CACHE_CREATE_CTOR_TAKES_VOID
867 LINUX_D_PATH_TAKES_STRUCT_PATH
869 LINUX_INODE_SETATTR_RETURN_TYPE
870 LINUX_IOP_I_CREATE_TAKES_NAMEIDATA
871 LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA
872 LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA
873 LINUX_IOP_I_PUT_LINK_TAKES_COOKIE
874 LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA
875 LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T
876 LINUX_FOP_F_FSYNC_TAKES_DENTRY
877 LINUX_AOP_WRITEBACK_CONTROL
878 LINUX_FS_STRUCT_FOP_HAS_SPLICE
879 LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
880 LINUX_POSIX_TEST_LOCK_RETURNS_CONFLICT
881 LINUX_POSIX_TEST_LOCK_CONFLICT_ARG
882 LINUX_KERNEL_SOCK_CREATE
883 LINUX_EXPORTS_KEY_TYPE_KEYRING
884 LINUX_KEYS_HAVE_SESSION_TO_PARENT
886 LINUX_RECALC_SIGPENDING_ARG_TYPE
887 LINUX_EXPORTS_TASKLIST_LOCK
888 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
889 LINUX_STATFS_TAKES_DENTRY
891 LINUX_HAVE_TRY_TO_FREEZE
892 LINUX_LINUX_KEYRING_SUPPORT
893 LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
894 LINUX_KEY_ALLOC_NEEDS_CRED
895 LINUX_INIT_WORK_HAS_DATA
896 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
898 dnl If we are guaranteed that keyrings will work - that is
899 dnl a) The kernel has keyrings enabled
900 dnl b) The code is new enough to give us a key_type_keyring
901 dnl then we just disable syscall probing unless we've been
904 AS_IF([test "$enable_linux_syscall_probing" = "maybe"],
905 [AS_IF([test "$ac_cv_linux_keyring_support" = "yes" -a "$ac_cv_linux_exports_key_type_keyring" = "yes"],
906 [enable_linux_syscall_probing="no"],
907 [enable_linux_syscall_probing="yes"])
910 dnl Syscall probing needs a few tests of its own, and just
911 dnl won't work if the kernel doesn't export init_mm
912 AS_IF([test "$enable_linux_syscall_probing" = "yes"], [
913 LINUX_EXPORTS_INIT_MM
914 AS_IF([test "$ac_cv_linux_exports_init_mm" = "no"], [
916 [Can't do syscall probing without exported init_mm])
918 LINUX_EXPORTS_SYS_CHDIR
919 LINUX_EXPORTS_SYS_OPEN
920 AC_DEFINE(ENABLE_LINUX_SYSCALL_PROBING, 1,
921 [define to enable syscall table probes])
924 dnl Packaging and SMP build
925 if test "x$with_linux_kernel_packaging" = "xno" ; then
932 if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
933 AS_IF([test "$enable_linux_syscall_probing" = "yes"], [
934 AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
936 ac_cv_linux_exports_sys_call_table=no
937 if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
938 ac_cv_linux_exports_ia32_sys_call_table=yes
941 LINUX_EXPORTS_KALLSYMS_ADDRESS
942 LINUX_EXPORTS_KALLSYMS_SYMBOL
943 LINUX_EXPORTS_SYS_CALL_TABLE
944 LINUX_EXPORTS_IA32_SYS_CALL_TABLE
945 if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
946 linux_syscall_method=none
947 if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
948 linux_syscall_method=scan
949 if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
950 linux_syscall_method=scan_with_kallsyms_address
953 if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
954 linux_syscall_method=kallsyms_symbol
956 if test "x$linux_syscall_method" = "xnone"; then
957 AC_MSG_WARN([no available sys_call_table access method -- guessing scan])
958 linux_syscall_method=scan
962 if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
963 AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
965 if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
966 AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
968 if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" -o "x$ac_cv_linux_func_i_put_link_takes_cookie" = "xyes"; then
969 AC_DEFINE(USABLE_KERNEL_PAGE_SYMLINK_CACHE, 1, [define if your kernel has a usable symlink cache API])
971 AC_MSG_WARN([your kernel does not have a usable symlink cache API])
975 dnl Linux-only, but just enable always.
976 AC_DEFINE(AFS_CACHE_BYPASS, 1, [define to activate cache bypassing Unix client])
979 AC_CACHE_CHECK([if struct sockaddr has sa_len field],
980 [ac_cv_sockaddr_len],
981 [AC_TRY_COMPILE( [#include <sys/types.h>
982 #include <sys/socket.h>],
983 [struct sockaddr *a; a->sa_len=0;],
984 [ac_cv_sockaddr_len=yes],
985 [ac_cv_sockaddr_len=no])
987 AS_IF([test "$ac_cv_sockaddr_len" = "yes"],
988 [AC_DEFINE(STRUCT_SOCKADDR_HAS_SA_LEN, 1,
989 [define if you struct sockaddr sa_len])])
991 if test "x${MKAFS_OSTYPE}" = "xIRIX"; then
992 echo Skipping library tests because they confuse Irix.
994 AC_SEARCH_LIBS([socket], [socket inet])
995 AC_SEARCH_LIBS([connect], [nsl])
996 AC_SEARCH_LIBS([gethostbyname], [dns nsl resolv])
998 dnl darwin wants it, aix hates it
999 AC_MSG_CHECKING(for the useability of arpa/nameser_compat.h)
1003 #include <sys/types.h>
1004 #include <sys/socket.h>
1005 #include <netinet/in.h>
1006 #include <arpa/inet.h>
1007 #include <arpa/nameser.h>
1008 #include <arpa/nameser_compat.h>
1010 ], [static int i; i = 0;],
1012 AC_DEFINE(HAVE_ARPA_NAMESER_COMPAT_H, 1, [define if arpa/nameser_compat.h exists])],
1016 openafs_save_libs="$LIBS"
1017 AC_MSG_CHECKING([for res_search])
1020 if test "$ac_cv_func_res_search" = no; then
1021 for lib in dns nsl resolv; do
1022 if test "$ac_cv_func_res_search" != yes; then
1025 LIBS="$openafs_save_libs"
1028 if test "$ac_cv_func_res_search" = yes; then
1030 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
1031 AC_MSG_RESULT([yes, in lib$lib])
1036 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
1042 AC_CHECK_RESOLV_RETRANS
1044 AC_CACHE_CHECK([for setsockopt(, SOL_IP, IP_RECVERR)],
1045 [ac_cv_setsockopt_iprecverr],
1047 #include <sys/types.h>
1048 #include <sys/socket.h>
1049 #include <netinet/in.h>],
1051 setsockopt(0, SOL_IP, IP_RECVERR, &on, sizeof(on));],
1052 [ac_cv_setsockopt_iprecverr=yes],
1053 [ac_cv_setsockopt_iprecverr=no])])
1055 AS_IF([test "$ac_cv_setsockopt_iprecverr" = "yes"],
1056 [AC_DEFINE(ADAPT_PMTU_RECVERR, 1,
1057 [define if asynchronous socket errors can be received])])
1060 if test "x$MKAFS_OSTYPE" = OBSD; then
1061 PTHREAD_LIBS="-pthread"
1063 if test "x$MKAFS_OSTYPE" = xDFBSD; then
1064 PTHREAD_LIBS="-pthread"
1066 if test "x$PTHREAD_LIBS" = xerror; then
1067 AC_CHECK_LIB(pthread, pthread_attr_init,
1068 PTHREAD_LIBS="-lpthread")
1070 if test "x$PTHREAD_LIBS" = xerror; then
1071 AC_CHECK_LIB(pthreads, pthread_attr_init,
1072 PTHREAD_LIBS="-lpthreads")
1074 if test "x$PTHREAD_LIBS" = xerror; then
1075 AC_CHECK_LIB(c_r, pthread_attr_init,
1076 PTHREAD_LIBS="-lc_r")
1078 if test "x$PTHREAD_LIBS" = xerror; then
1079 AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
1081 if test "x$PTHREAD_LIBS" = xerror; then
1082 # pthread_attr_init is a macro under HPUX 11.0 and 11.11
1083 AC_CHECK_LIB(pthread, pthread_attr_destroy,
1084 PTHREAD_LIBS="-lpthread")
1086 if test "x$PTHREAD_LIBS" = xerror; then
1087 AC_MSG_WARN(*** Unable to locate working posix thread library ***)
1089 AC_SUBST(PTHREAD_LIBS)
1091 HOST_CPU="$host_cpu"
1093 if test "x$with_bsd_kernel_headers" != "x"; then
1094 BSD_KERNEL_PATH="$with_bsd_kernel_headers"
1096 BSD_KERNEL_PATH="/usr/src/sys"
1099 if test "x$with_bsd_kernel_build" != "x"; then
1100 BSD_KERNEL_BUILD="$with_bsd_kernel_build"
1102 case $AFS_SYSNAME in
1104 BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/${HOST_CPU}/compile/GENERIC"
1107 BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/arch/${HOST_CPU}/compile/GENERIC"
1112 if test "$enable_supergroups" = "yes"; then
1113 AC_DEFINE(SUPERGROUPS, 1, [define if you want to have support for nested pts groups])
1116 if test "$enable_bitmap_later" = "yes"; then
1117 AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later])
1120 if test "$enable_demand_attach_fs" = "yes"; then
1121 AC_DEFINE(DEMAND_ATTACH_ENABLE, 1, [define if you want the demand attach fileserver])
1126 AC_SUBST(DEMAND_ATTACH)
1128 if test "$enable_unix_sockets" = "yes"; then
1129 AC_DEFINE(USE_UNIX_SOCKETS, 1, [define if you want to use UNIX sockets for fssync.])
1130 USE_UNIX_SOCKETS="yes"
1132 USE_UNIX_SOCKETS="no"
1134 AC_SUBST(USE_UNIX_SOCKETS)
1136 if test "$enable_icmp_pmtu_discovery" = "yes"; then
1137 if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
1138 AC_DEFINE(ADAPT_PMTU, 1, [define if you want to decode icmp unreachable packets to discover path mtu])
1142 if test "$enable_namei_fileserver" = "yes"; then
1143 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1146 if test "$enable_namei_fileserver" = "default"; then
1149 AC_MSG_WARN(Some Solaris 10 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
1150 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1154 AC_MSG_WARN(Solaris 11 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
1155 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1167 dnl check for tivoli
1168 AC_MSG_CHECKING(for tivoli tsm butc support)
1170 if test "$enable_tivoli_tsm" = "yes"; then
1171 XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
1172 XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
1173 XBSADIR3=/usr/tivoli/tsm/client/api/bin/sample
1174 XBSADIR4=/opt/tivoli/tsm/client/api/bin/sample
1176 if test -r "$XBSADIR3/dsmapifp.h"; then
1177 XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR3"
1179 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1180 elif test -r "$XBSADIR4/dsmapifp.h"; then
1181 XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR4"
1183 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1184 elif test -r "$XBSADIR1/xbsa.h"; then
1185 XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
1187 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1188 elif test -r "$XBSADIR2/xbsa.h"; then
1189 XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
1191 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1193 AC_MSG_RESULT([no, missing xbsa.h and dsmapifp.h header files])
1198 AC_SUBST(XBSA_CFLAGS)
1199 AC_SUBST(XBSA_XLIBS)
1201 dnl checks for header files.
1205 AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h grp.h)
1206 AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
1207 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
1208 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h sys/pag.h)
1209 AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.h)
1210 AC_CHECK_HEADERS(security/pam_modules.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
1211 AC_CHECK_HEADERS(linux/errqueue.h,,,[#include <linux/types.h>])
1212 AC_CHECK_HEADERS(et/com_err.h)
1214 AC_CHECK_TYPES([fsblkcnt_t],,,[
1215 #include <sys/types.h>
1216 #ifdef HAVE_SYS_BITYPES_H
1217 #include <sys/bitypes.h>
1219 #ifdef HAVE_SYS_STATFS_H
1220 #include <sys/statfs.h>
1222 #ifdef HAVE_SYS_STATVFS_H
1223 #include <sys/statvfs.h>
1227 OPENAFS_TEST_PACKAGE(libintl,[#include <libintl.h>],[-lintl],,,INTL)
1229 dnl Don't build PAM on IRIX; the interface doesn't work for us.
1230 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
1231 case $AFS_SYSNAME in
1244 if test "$enable_login" = yes; then
1249 AC_SUBST(BUILD_LOGIN)
1251 AC_CHECK_FUNCS(snprintf strlcat strlcpy flock getrlimit)
1252 AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr)
1253 AC_CHECK_FUNCS(setvbuf vsyslog getcwd)
1254 AC_CHECK_FUNCS(regcomp regexec regerror)
1255 AC_CHECK_FUNCS(fseeko64 ftello64)
1256 AC_MSG_CHECKING([for POSIX regex library])
1257 if test "$ac_cv_header_regex_h" = "yes" && \
1258 test "$ac_cv_func_regcomp" = "yes" && \
1259 test "$ac_cv_func_regexec" = "yes" && \
1260 test "$ac_cv_func_regerror" = "yes"; then
1261 AC_DEFINE(HAVE_POSIX_REGEX, 1, [define if you have POSIX regex library])
1268 AC_CHECK_SIZEOF(void *)
1269 AC_CHECK_SIZEOF(unsigned long long)
1270 AC_CHECK_SIZEOF(unsigned long)
1271 AC_CHECK_SIZEOF(unsigned int)
1275 AC_CHECK_TYPE([sig_atomic_t],[],
1276 [AC_DEFINE([sig_atomic_t], [int],
1277 [Define to int if <signal.h> does not define.])],
1278 [#include <sys/types.h>
1279 #include <signal.h>])
1280 AC_CHECK_TYPE([socklen_t],[],
1281 [AC_DEFINE([socklen_t], [int],
1282 [Define to int if <sys/socket.h> does not define.])],
1283 [#include <sys/types.h>
1284 #include <sys/socket.h>])
1285 AC_CHECK_TYPES(off64_t)
1286 AC_SIZEOF_TYPE(long)
1290 AC_CHECK_FUNCS(timegm)
1291 AC_CHECK_FUNCS(daemon)
1293 dnl Directory PATH handling
1294 if test "x$enable_transarc_paths" = "xyes" ; then
1295 afsconfdir=${afsconfdir=/usr/afs/etc}
1296 viceetcdir=${viceetcdir=/usr/vice/etc}
1297 afskerneldir=${afskerneldir=${viceetcdir}}
1298 afssrvbindir=${afssrvbindir=/usr/afs/bin}
1299 afssrvsbindir=${afssrvsbindir=/usr/afs/bin}
1300 afssrvlibexecdir=${afssrvlibexecdir=/usr/afs/bin}
1301 afsdbdir=${afsdbdir=/usr/afs/db}
1302 afslogsdir=${afslogsdir=/usr/afs/logs}
1303 afslocaldir=${afslocaldir=/usr/afs/local}
1304 afsbackupdir=${afsbackupdir=/usr/afs/backup}
1305 afsbosconfigdir=${afsbosconfigdir=/usr/afs/local}
1306 afsdatadir=${afsdatadir=/usr/vice/etc}
1308 afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'}
1309 viceetcdir=${viceetcdir='${sysconfdir}/openafs'}
1310 afskerneldir=${afskerneldir='${libdir}/openafs'}
1311 afssrvbindir=${afssrvbindir='${bindir}'}
1312 afssrvsbindir=${afssrvsbindir='${sbindir}'}
1313 afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'}
1314 afsdbdir=${afsdbdir='${localstatedir}/openafs/db'}
1315 afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'}
1316 afslocaldir=${afslocaldir='${localstatedir}/openafs'}
1317 afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'}
1318 afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'}
1319 afsdatadir=${afsdatadir='${datadir}/openafs'}
1321 AC_SUBST(afsconfdir)
1322 AC_SUBST(viceetcdir)
1323 AC_SUBST(afskerneldir)
1324 AC_SUBST(afssrvbindir)
1325 AC_SUBST(afssrvsbindir)
1326 AC_SUBST(afssrvlibexecdir)
1328 AC_SUBST(afslogsdir)
1329 AC_SUBST(afslocaldir)
1330 AC_SUBST(afsbackupdir)
1331 AC_SUBST(afsbosconfigdir)
1332 AC_SUBST(afsdatadir)
1334 if test "x$enable_kernel_module" = "xyes"; then
1335 ENABLE_KERNEL_MODULE=libafs
1338 if test "x$enable_pthreaded_ubik" = "xyes"; then
1339 ENABLE_PTHREADED_UBIK=yes
1343 AC_SUBST(AFS_SYSNAME)
1344 AC_SUBST(AFS_PARAM_COMMON)
1345 AC_SUBST(ENABLE_KERNEL_MODULE)
1346 AC_SUBST(ENABLE_PTHREADED_UBIK)
1348 AC_SUBST(LINUX_KERNEL_PATH)
1349 AC_SUBST(LINUX_KERNEL_BUILD)
1351 AC_SUBST(BSD_KERNEL_PATH)
1352 AC_SUBST(BSD_KERNEL_BUILD)
1353 AC_SUBST(LINUX_VERSION)
1354 AC_SUBST(MKAFS_OSTYPE)
1355 AC_SUBST(TOP_OBJDIR)
1356 AC_SUBST(TOP_SRCDIR)
1357 AC_SUBST(TOP_INCDIR)
1358 AC_SUBST(TOP_LIBDIR)
1360 AC_SUBST(DARWIN_INFOFILE)
1361 AC_SUBST(IRIX_BUILD_IP35)
1368 TOP_SRCDIR="${srcdir}/src"
1370 dnl If we're using ./configure, need a more reasonable TOP_SRCDIR, since relative links don't work everywhere
1376 TOP_SRCDIR=`cd $TOP_SRCDIR; pwd`
1380 TOP_OBJDIR="${SRCDIR_PARENT}"
1381 TOP_INCDIR="${SRCDIR_PARENT}/include"
1382 TOP_LIBDIR="${SRCDIR_PARENT}/lib"
1383 if test "${DEST}x" = "x"; then
1384 DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest"
1387 HELPER_SPLINT="${TOP_SRCDIR}/helper-splint.sh"
1388 HELPER_SPLINTCFG="${TOP_SRCDIR}/splint.cfg"
1389 AC_SUBST(HELPER_SPLINT)
1390 AC_SUBST(HELPER_SPLINTCFG)
1392 mkdir -p ${TOP_OBJDIR}/src/JAVA/libjafs