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([cache-bypass],
90 [AS_HELP_STRING([--enable-cache-bypass],
91 [enable client support for cache bypass])],
93 [enable_cache_bypass="no"])
94 AC_ARG_ENABLE([supergroups],
95 [AS_HELP_STRING([--enable-supergroups],
96 [enable support for nested pts groups])],
98 [enable_supergroups="no"])
99 AC_ARG_ENABLE([fast-restart],
100 [AS_HELP_STRING([--enable-fast-restart],
101 [enable fast startup of file server without salvaging])],
103 [enable_fast_restart="no"])
104 AC_ARG_ENABLE([bitmap-later],
105 [AS_HELP_STRING([--enable-bitmap-later],
106 [enable fast startup of file server by not reading bitmap till
109 [enable_bitmap_later="no"])
110 AC_ARG_ENABLE([demand-attach-fs],
111 [AS_HELP_STRING([--enable-demand-attach-fs],
112 [enable Demand Attach Fileserver (please see documentation)])],
114 [enable_demand_attach_fs="no"])
115 AC_ARG_ENABLE([disconnected],
116 [AS_HELP_STRING([--enable-disconnected],
117 [enable disconnected support in cache manager (experimental)])],
119 [enable_disconnected="no"])
120 AC_ARG_ENABLE([unix-sockets],
121 [AS_HELP_STRING([--enable-unix-sockets],
122 [enable use of unix domain sockets for fssync])],
124 [enable_unix_sockets="yes"])
125 AC_ARG_ENABLE([icmp-pmtu-discovery],
126 [AS_HELP_STRING([--enable-icmp-pmtu-discovery],
127 [enable path MTU discovery by decoding ICMP unreachable replies])],
129 [enable_icmp_pmtu_discovery="no"])
130 AC_ARG_ENABLE([tivoli-tsm],
131 [AS_HELP_STRING([--enable-tivoli-tsm],
132 [enable use of the Tivoli TSM API libraries for butc support])],
134 [enable_tivoli_tsm="no"])
135 AC_ARG_ENABLE([pthreaded-ubik],
136 [AS_HELP_STRING([--enable-pthreaded-ubik],
137 [enable installation of pthreaded ubik applications (defaults to
140 [enable_pthreaded_ubik="no"])
142 dnl Kernel module build options.
143 AC_ARG_WITH([dux-kernel-headers],
144 [AS_HELP_STRING([--with-dux-kernel-headers=path],
145 [use the kernel headers found at path (optional, defaults to first
146 match in /usr/sys)])])
147 AC_ARG_WITH([linux-kernel-headers],
148 [AS_HELP_STRING([--with-linux-kernel-headers=path],
149 [use the kernel headers found at path (optional, defaults to
150 /usr/src/linux-2.4, then /usr/src/linux)])])
151 AC_ARG_WITH([linux-kernel-build],
152 [AS_HELP_STRING([--with-linux-kernel-build=path],
153 [use the kernel build found at path(optional, defaults to
154 /usr/src/linux-2.4, then /usr/src/linux)])])
155 AC_ARG_WITH([bsd-kernel-headers],
156 [AS_HELP_STRING([--with-bsd-kernel-headers=path],
157 [use the kernel headers found at path (optional, defaults to
159 AC_ARG_WITH([bsd-kernel-build],
160 [AS_HELP_STRING([--with-bsd-kernel-build=path],
161 [use the kernel build found at path (optional, defaults to
162 KSRC/i386/compile/GENERIC)])])
163 AC_ARG_WITH([linux-kernel-packaging],
164 [AS_HELP_STRING([--with-linux-kernel-packaging],
165 [use standard naming conventions to aid Linux kernel build packaging
166 (disables MPS, sets the kernel module name to openafs.ko, and
167 installs kernel modules into the standard Linux location)])],
168 [AC_SUBST(LINUX_KERNEL_PACKAGING, "yes")
169 AC_SUBST(LINUX_LIBAFS_NAME, "openafs")],
170 [AC_SUBST(LINUX_LIBAFS_NAME, "libafs")])
171 AC_ARG_ENABLE([kernel-module],
172 [AS_HELP_STRING([--disable-kernel-module],
173 [disable compilation of the kernel module (defaults to enabled)])],
175 [enable_kernel_module="yes"])
176 AC_ARG_ENABLE([redhat-buildsys],
177 [AS_HELP_STRING([--enable-redhat-buildsys],
178 [enable compilation of the redhat build system kernel (defaults to
181 [enable_redhat_buildsys="no"])
183 dnl Installation locations.
184 AC_ARG_ENABLE([transarc-paths],
185 [AS_HELP_STRING([--enable-transarc-paths],
186 [use Transarc style paths like /usr/afs and /usr/vice])],
188 [enable_transarc_paths="no"])
190 dnl Optimization and debugging flags.
191 AC_ARG_ENABLE([strip-binaries],
192 [AS_HELP_STRING([--disable-strip-binaries],
193 [disable stripping of symbol information from binaries (defaults to
196 [enable_strip_binaries="maybe"])
197 AC_ARG_ENABLE([debug],
198 [AS_HELP_STRING([--enable-debug],
199 [enable compilation of the user space code with debugging information
200 (defaults to disabled)])],
203 AC_ARG_ENABLE([optimize],
204 [AS_HELP_STRING([--disable-optimize],
205 [disable optimization for compilation of the user space code (defaults
208 [enable_optimize="yes"])
209 AC_ARG_ENABLE([warnings],
210 [AS_HELP_STRING([--enable-warnings],
211 [enable compilation warnings when building with gcc (defaults to
214 [enable_warnings="no"])
215 AC_ARG_ENABLE([checking],
216 [AS_HELP_STRING([--enable-checking],
217 [turn compilation warnings into errors when building with gcc (defaults
219 [enable_checking="$enableval"],
220 [enable_checking="no"])
221 AC_ARG_ENABLE([debug-kernel],
222 [AS_HELP_STRING([--enable-debug-kernel],
223 [enable compilation of the kernel module with debugging information
224 (defaults to disabled)])],
226 [enable_debug_kernel="no"])
227 AC_ARG_ENABLE([optimize-kernel],
228 [AS_HELP_STRING([--disable-optimize-kernel],
229 [disable compilation of the kernel module with optimization (defaults
230 based on platform)])],
232 [enable_optimize_kernel="yes"])
233 AC_ARG_ENABLE([debug-lwp],
234 [AS_HELP_STRING([--enable-debug-lwp],
235 [enable compilation of the LWP code with debugging information
236 (defaults to disabled)])],
238 [enable_debug_lwp="no"])
239 AC_ARG_ENABLE([optimize-lwp],
240 [AS_HELP_STRING([--disable-optimize-lwp],
241 [disable optimization for compilation of the LWP code (defaults to
244 [enable_optimize_lwp="yes"])
245 AC_ARG_ENABLE([debug-pam],
246 [AS_HELP_STRING([--enable-debug-pam],
247 [enable compilation of the PAM code with debugging information
248 (defaults to disabled)])],
250 [enable_debug_pam="no"])
251 AC_ARG_ENABLE([optimize-pam],
252 [AS_HELP_STRING([--disable-optimize-pam],
253 [disable optimization for compilation of the PAM code (defaults to
256 [enable_optimize_pam="yes"])
257 AC_ARG_ENABLE([linux-syscall-probing],
258 [AS_HELP_STRING([--disable-linux-syscall-probing],
259 [disabling Linux syscall probing (defaults to enabled)])],
261 [AC_DEFINE(ENABLE_LINUX_SYSCALL_PROBING, 1,
262 [define to enable syscall table probes])])
265 AC_ARG_WITH([xslt-processor],
266 AS_HELP_STRING([--with-xslt-processor=ARG],
267 [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]),
271 AC_ARG_WITH([html-xsl],
272 AS_HELP_STRING([--with-html-xsl],
273 [build HTML documentation using Norman Walsh's DocBook XSL stylesheets (default is no; specify a path to chunk.xsl or docbook.xsl)]),
279 dnl weird ass systems
284 dnl Various compiler setup.
288 dnl Checks for programs.
295 OPENAFS_CHECK_BIGENDIAN
296 OPENAFS_PRINTF_TAKES_Z_LEN
298 AC_MSG_CHECKING(your OS)
304 if test "x$enable_redhat_buildsys" = "xyes"; then
305 AC_DEFINE(ENABLE_REDHAT_BUILDSYS, 1, [define if you have redhat buildsystem])
307 if test "x$enable_kernel_module" = "xyes"; then
308 if test "x$with_linux_kernel_headers" != "x"; then
309 LINUX_KERNEL_PATH="$with_linux_kernel_headers"
311 LINUX_KERNEL_PATH="/lib/modules/`uname -r`/source"
312 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
313 LINUX_KERNEL_PATH="/lib/modules/`uname -r`/build"
315 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
316 LINUX_KERNEL_PATH="/usr/src/linux-2.4"
318 if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
319 LINUX_KERNEL_PATH="/usr/src/linux"
322 if test "x$with_linux_kernel_build" != "x"; then
323 LINUX_KERNEL_BUILD="$with_linux_kernel_build"
325 LINUX_KERNEL_BUILD=$LINUX_KERNEL_PATH
327 if test -f "$LINUX_KERNEL_BUILD/include/generated/utsrelease.h"; then
328 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/generated/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
329 LINUX_VERSION="$linux_kvers"
331 if test -f "$LINUX_KERNEL_BUILD/include/linux/utsrelease.h"; then
332 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
333 LINUX_VERSION="$linux_kvers"
335 if test -f "$LINUX_KERNEL_BUILD/include/linux/version.h"; then
336 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
337 if test "x$linux_kvers" = "x"; then
338 if test -f "$LINUX_KERNEL_BUILD/include/linux/version-up.h"; then
339 linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
340 if test "x$linux_kvers" = "x"; then
341 AC_MSG_ERROR(Linux headers lack version definition [2])
344 LINUX_VERSION="$linux_kvers"
347 AC_MSG_ERROR(Linux headers lack version definition)
351 LINUX_VERSION="$linux_kvers"
354 enable_kernel_module="no"
358 if test ! -f "$LINUX_KERNEL_BUILD/include/generated/autoconf.h" &&
359 test ! -f "$LINUX_KERNEL_BUILD/include/linux/autoconf.h"; then
360 enable_kernel_module="no"
362 if test "x$enable_kernel_module" = "xno"; then
363 if test "x$with_linux_kernel_headers" != "x"; then
364 AC_MSG_ERROR(No usable linux headers found at $LINUX_KERNEL_PATH)
367 AC_MSG_WARN(No usable linux headers found at $LINUX_KERNEL_PATH so disabling kernel module)
370 dnl do we need to determine SUBARCH from autoconf.h
374 if test "x$enable_kernel_module" = "xyes"; then
375 AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
376 if test "x${AFS_SYSKVERS}" = "x"; then
377 AC_MSG_ERROR(Couldn't guess your Linux version [2])
384 AC_PATH_PROG(SOLARISCC, [cc], ,
385 [/opt/SUNWspro/bin:/opt/SunStudioExpress/bin])
386 SOLARIS_UFSVFS_HAS_DQRWLOCK
387 SOLARIS_FS_HAS_FS_ROLLED
388 SOLARIS_SOLOOKUP_TAKES_SOCKPARAMS
392 enable_kernel_module=no
398 if test -f "/usr/old/usr/include/ndir.h"; then
399 AC_DEFINE(HAVE_USR_OLD_USR_INCLUDE_NDIR_H, 1, [define if you have old ndir.h])
403 if test -d /usr/include/sys/SN/SN1; then
404 IRIX_BUILD_IP35="IP35"
411 AC_MSG_RESULT(rs_aix)
415 AC_MSG_RESULT(alpha_dux)
419 AC_MSG_RESULT(ppc_darwin)
423 AC_MSG_RESULT(x86_darwin)
427 AC_MSG_RESULT(i386_fbsd)
431 AC_MSG_RESULT(amd64_fbsd)
439 AC_MSG_RESULT(amd64_obsd)
443 AC_MSG_RESULT(i386_obsd)
447 AC_MSG_RESULT(i386_dfbsd)
450 AC_MSG_RESULT($system)
454 if test "x$with_afs_sysname" != "x"; then
455 AFS_SYSNAME="$with_afs_sysname"
457 AC_MSG_CHECKING(your AFS sysname)
463 AFS_SYSNAME="i386_obsd${vM}${vm}"
465 sparc64-*-openbsd?.?)
469 AFS_SYSNAME="sparc64_obsd${vM}${vm}"
475 AFS_SYSNAME="amd64_obsd${vM}${vm}"
481 AFS_SYSNAME="i386_fbsd_${vM}${vm}"
487 AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
489 i386-*-dragonfly2.2*)
490 AFS_SYSNAME="i386_dfbsd_23"
492 i386-*-dragonfly2.3*)
493 AFS_SYSNAME="i386_dfbsd_23"
496 AFS_SYSNAME="i386_nbsd15"
499 AFS_SYSNAME="alpha_nbsd15"
501 i?86-*-netbsd*1.6[[M-Z]]*)
502 AFS_SYSNAME="i386_nbsd20"
504 powerpc-*-netbsd*1.6[[M-Z]]*)
505 AFS_SYSNAME="ppc_nbsd20"
508 AFS_SYSNAME="i386_nbsd20"
511 AFS_SYSNAME="amd64_nbsd20"
513 x86_64-*-netbsd*3.[[0-8]]*)
514 # XXX AFS_PARAM_COMMON handled separately, redundant?
515 AFS_PARAM_COMMON=param.nbsd30.h
516 AFS_SYSNAME="amd64_nbsd30"
518 x86_64-*-netbsd*4.[[0-8]]*)
519 # XXX AFS_PARAM_COMMON handled separately, redundant?
520 AFS_PARAM_COMMON=param.nbsd40.h
521 AFS_SYSNAME="amd64_nbsd40"
523 powerpc-*-netbsd*2.0*)
524 AFS_SYSNAME="ppc_nbsd20"
527 AFS_SYSNAME="i386_nbsd16"
530 AFS_SYSNAME="alpha_nbsd16"
532 powerpc-*-netbsd*1.6*)
533 AFS_SYSNAME="ppc_nbsd16"
536 AFS_SYSNAME="i386_nbsd21"
539 AFS_SYSNAME="i386_nbsd30"
541 i?86-*-netbsd*3.[[0-8]]*)
542 AFS_SYSNAME="i386_nbsd30"
545 AFS_SYSNAME="i386_nbsd30"
547 i?86-*-netbsd*4.[[0-8]]*)
548 AFS_SYSNAME="i386_nbsd40"
551 AFS_SYSNAME="i386_nbsd40"
554 AFS_SYSNAME="hp_ux110"
557 AFS_SYSNAME="hp_ux11i"
560 AFS_SYSNAME="hp_ux1123"
563 AFS_SYSNAME="ia64_hpux1122"
566 AFS_SYSNAME="ia64_hpux1123"
569 AFS_SYSNAME="hp_ux102"
571 powerpc-apple-darwin7*)
572 AFS_SYSNAME="ppc_darwin_70"
574 powerpc-apple-darwin8.*)
575 AFS_SYSNAME="ppc_darwin_80"
577 i386-apple-darwin8.*)
578 AFS_SYSNAME="x86_darwin_80"
580 powerpc-apple-darwin9.*)
581 AFS_SYSNAME="ppc_darwin_90"
583 i386-apple-darwin9.*)
584 AFS_SYSNAME="x86_darwin_90"
586 i?86-apple-darwin10.*)
587 AFS_SYSNAME="x86_darwin_100"
589 sparc-sun-solaris2.5*)
590 AFS_SYSNAME="sun4x_55"
593 sparc-sun-solaris2.6)
594 AFS_SYSNAME="sun4x_56"
596 sparc-sun-solaris2.7)
597 AFS_SYSNAME="sun4x_57"
599 sparc-sun-solaris2.8)
600 AFS_SYSNAME="sun4x_58"
602 sparc-sun-solaris2.9)
603 AFS_SYSNAME="sun4x_59"
605 sparc-sun-solaris2.10)
606 AFS_SYSNAME="sun4x_510"
608 sparc-sun-solaris2.11)
609 AFS_SYSNAME="sun4x_511"
612 AFS_SYSNAME="sun4_413"
616 AFS_SYSNAME="sunx86_57"
619 AFS_SYSNAME="sunx86_58"
622 AFS_SYSNAME="sunx86_59"
625 AFS_SYSNAME="sunx86_510"
628 AFS_SYSNAME="sunx86_511"
631 AFS_SYSNAME="alpha_dux40"
634 AFS_SYSNAME="alpha_dux50"
637 AFS_SYSNAME="alpha_dux51"
643 AFS_SYSNAME="ia64_linuxXX"
646 AFS_SYSNAME="`/bin/arch`_linuxXX"
649 AFS_SYSNAME="ppc64_linuxXX"
652 AFS_SYSNAME="alpha_linux_XX"
655 AFS_SYSNAME="s390_linuxXX"
658 AFS_SYSNAME="s390x_linuxXX"
661 AFS_SYSNAME="`/bin/arch`_linuxXX"
664 AFS_SYSNAME="sparc64_linuxXX"
667 AFS_SYSNAME="i386_linuxXX"
670 AFS_SYSNAME="arm_linuxXX"
672 parisc-*-linux-gnu|hppa-*-linux-gnu)
673 AFS_SYSNAME="parisc_linuxXX"
677 AFS_SYSNAME="rs_aix42"
681 AFS_SYSNAME="rs_aix42"
685 AFS_SYSNAME="rs_aix51"
689 AFS_SYSNAME="rs_aix52"
693 AFS_SYSNAME="rs_aix53"
697 AFS_SYSNAME="rs_aix61"
701 AFS_SYSNAME="amd64_linuxXX"
705 AC_MSG_ERROR(An AFS sysname is required)
710 *_linux* | *_umlinux*)
711 if test "x${AFS_SYSKVERS}" = "x"; then
712 AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
714 _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
715 AFS_SYSNAME="$_AFS_SYSNAME"
718 [#ifndef CONFIG_USERMODE
721 ac_cv_linux_is_uml=yes,)
722 if test "${ac_cv_linux_is_uml}" = yes; then
723 _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
725 AFS_SYSNAME="$_AFS_SYSNAME"
728 AC_MSG_RESULT($AFS_SYSNAME)
733 DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
734 DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
738 dnl Some hosts have a separate common param file they should include. Figure
739 dnl out if we're on one of them now that we know the sysname.
741 *_nbsd15) AFS_PARAM_COMMON=param.nbsd15.h ;;
742 *_nbsd16) AFS_PARAM_COMMON=param.nbsd16.h ;;
743 *_nbsd20) AFS_PARAM_COMMON=param.nbsd20.h ;;
744 *_nbsd21) AFS_PARAM_COMMON=param.nbsd21.h ;;
745 *_nbsd30) AFS_PARAM_COMMON=param.nbsd30.h ;;
746 *_nbsd40) AFS_PARAM_COMMON=param.nbsd40.h ;;
747 *_obsd31) AFS_PARAM_COMMON=param.obsd31.h ;;
748 *_obsd32) AFS_PARAM_COMMON=param.obsd32.h ;;
749 *_obsd33) AFS_PARAM_COMMON=param.obsd33.h ;;
750 *_obsd34) AFS_PARAM_COMMON=param.obsd34.h ;;
751 *_obsd35) AFS_PARAM_COMMON=param.obsd35.h ;;
752 *_obsd36) AFS_PARAM_COMMON=param.obsd36.h ;;
753 *_obsd37) AFS_PARAM_COMMON=param.obsd37.h ;;
754 *_obsd38) AFS_PARAM_COMMON=param.obsd38.h ;;
755 *_obsd39) AFS_PARAM_COMMON=param.obsd39.h ;;
756 *_obsd40) AFS_PARAM_COMMON=param.obsd40.h ;;
757 *_obsd41) AFS_PARAM_COMMON=param.obsd41.h ;;
758 *_obsd42) AFS_PARAM_COMMON=param.obsd42.h ;;
759 *_obsd43) AFS_PARAM_COMMON=param.obsd43.h ;;
760 *_obsd44) AFS_PARAM_COMMON=param.obsd44.h ;;
761 *_obsd45) AFS_PARAM_COMMON=param.obsd45.h ;;
762 *_obsd46) AFS_PARAM_COMMON=param.obsd46.h ;;
763 *_linux22) AFS_PARAM_COMMON=param.linux22.h ;;
764 *_linux24) AFS_PARAM_COMMON=param.linux24.h ;;
765 *_linux26) AFS_PARAM_COMMON=param.linux26.h ;;
768 case $AFS_SYSNAME in *_linux* | *_umlinux*)
770 # Add (sub-) architecture-specific paths needed by conftests
773 UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
774 UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
775 UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
776 CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
779 if test "x$enable_kernel_module" = "xyes"; then
780 if test "x$enable_debug_kernel" = "xno"; then
781 LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
783 OPENAFS_GCC_SUPPORTS_MARCH
784 AC_SUBST(P5PLUS_KOPTS)
785 OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
786 OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
787 OPENAFS_GCC_SUPPORTS_NO_COMMON
788 OPENAFS_GCC_SUPPORTS_PIPE
789 AC_SUBST(LINUX_GCC_KOPTS)
791 dnl Setup the kernel build environment
792 LINUX_KBUILD_USES_EXTRA_CFLAGS
793 LINUX_KERNEL_COMPILE_WORKS
795 dnl Check for header files
796 AC_CHECK_LINUX_HEADER([config.h])
797 AC_CHECK_LINUX_HEADER([completion.h])
798 AC_CHECK_LINUX_HEADER([exportfs.h])
799 AC_CHECK_LINUX_HEADER([freezer.h])
800 AC_CHECK_LINUX_HEADER([key-type.h])
801 AC_CHECK_LINUX_HEADER([semaphore.h])
802 AC_CHECK_LINUX_HEADER([seq_file.h])
804 dnl Check for structure elements
805 AC_CHECK_LINUX_STRUCT([address_space_operations],
806 [write_begin], [fs.h])
807 AC_CHECK_LINUX_STRUCT([backing_dev_info], [name],
809 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
810 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
811 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
812 AC_CHECK_LINUX_STRUCT([inode], [i_mutex], [fs.h])
813 AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h])
814 AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h])
815 AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h])
816 AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h])
817 AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h])
818 AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])
819 AC_CHECK_LINUX_STRUCT([super_operations], [alloc_inode],
821 AC_CHECK_LINUX_STRUCT([task_struct], [cred], [sched.h])
822 AC_CHECK_LINUX_STRUCT([task_struct], [exit_state], [sched.h])
823 AC_CHECK_LINUX_STRUCT([task_struct], [parent], [sched.h])
824 AC_CHECK_LINUX_STRUCT([task_struct], [real_parent], [sched.h])
825 AC_CHECK_LINUX_STRUCT([task_struct], [rlim], [sched.h])
826 AC_CHECK_LINUX_STRUCT([task_struct], [sig], [sched.h])
827 AC_CHECK_LINUX_STRUCT([task_struct], [sighand], [sched.h])
828 AC_CHECK_LINUX_STRUCT([task_struct], [sigmask_lock], [sched.h])
829 AC_CHECK_LINUX_STRUCT([task_struct], [tgid], [sched.h])
830 AC_CHECK_LINUX_STRUCT([task_struct], [thread_info], [sched.h])
831 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
833 dnl Function existence checks
835 AC_CHECK_LINUX_FUNC([bdi_init],
836 [#include <linux/backing-dev.h>],
838 AC_CHECK_LINUX_FUNC([ctl_table], [ctl_name], [sysctl.h])
839 AC_CHECK_LINUX_FUNC([current_kernel_time],
840 [#include <linux/time.h>],
842 s = current_kernel_time();])
843 AC_CHECK_LINUX_FUNC([d_alloc_anon],
844 [#include <linux/dcache.h>],
845 [d_alloc_anon(NULL);])
846 AC_CHECK_LINUX_FUNC([do_sync_read],
847 [#include <linux/fs.h>],
848 [do_sync_read(NULL, NULL, 0, NULL);])
849 AC_CHECK_LINUX_FUNC([find_task_by_pid],
850 [#include <linux/sched.h>],
851 [pid_t p; find_task_by_pid(p);])
852 AC_CHECK_LINUX_FUNC([generic_file_aio_read],
853 [#include <linux/fs.h>],
854 [generic_file_aio_read(NULL,NULL,0,0);])
855 AC_CHECK_LINUX_FUNC([grab_cache_page_write_begin],
856 [#include <linux/pagemap.h>],
857 [grab_cache_page_write_begin(NULL, 0, 0);])
858 AC_CHECK_LINUX_FUNC([hlist_unhashed],
859 [#include <linux/list.h>],
860 [hlist_unhashed(0);])
861 AC_CHECK_LINUX_FUNC([i_size_read],
862 [#include <linux/fs.h>],
863 [i_size_read(NULL);])
864 AC_CHECK_LINUX_FUNC([iget],
865 [#include <linux/fs.h>],
867 AC_CHECK_LINUX_FUNC([kernel_setsockopt],
868 [#include <linux/net.h>],
869 [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
870 AC_CHECK_LINUX_FUNC([page_follow_link],
871 [#include <linux/fs.h>],
872 [page_follow_link(0,0);])
873 AC_CHECK_LINUX_FUNC([page_offset],
874 [#include <linux/pagemap.h>],
875 [page_offset(NULL);])
876 AC_CHECK_LINUX_FUNC([pagevec_lru_add_file],
877 [#include <linux/pagevec.h>],
878 [__pagevec_lru_add_file(NULL);])
879 AC_CHECK_LINUX_FUNC([rcu_read_lock],
880 [#include <linux/rcupdate.h>],
882 AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
883 [#include <linux/splice.h>],
884 [splice_direct_to_actor(NULL,NULL,NULL);])
885 AC_CHECK_LINUX_FUNC([svc_addr_in],
886 [#include <linux/sunrpc/svc.h>],
887 [svc_addr_in(NULL);])
888 AC_CHECK_LINUX_FUNC([vfs_llseek],
889 [#include <linux/fs.h>],
890 [vfs_llseek(NULL, 0, 0);])
891 AC_CHECK_LINUX_FUNC([zero_user_segments],
892 [#include <linux/highmem.h>],
893 [zero_user_segments(NULL, 0, 0, 0, 0);])
895 dnl Consequences - things which get set as a result of the
897 AS_IF([test "x$ac_cv_linux_func_iget" = "xno"],
898 [AC_DEFINE([LINUX_USE_FH], 1,
899 [define to use linux file handles for cache files])])
900 AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"],
901 [AC_DEFINE([AFS_NONFSTRANS], 1,
902 [define to disable the nfs translator])])
904 dnl Assorted more complex tests
905 LINUX_EXPORTS_PROC_ROOT_FS
906 LINUX_KMEM_CACHE_INIT
907 LINUX_HAVE_KMEM_CACHE_T
908 LINUX_KMEM_CACHE_CREATE_CTOR_TAKES_VOID
909 LINUX_D_PATH_TAKES_STRUCT_PATH
911 LINUX_INODE_SETATTR_RETURN_TYPE
912 LINUX_IOP_I_CREATE_TAKES_NAMEIDATA
913 LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA
914 LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA
915 LINUX_IOP_I_PUT_LINK_TAKES_COOKIE
916 LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA
917 LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T
918 LINUX_AOP_WRITEBACK_CONTROL
919 LINUX_FS_STRUCT_FOP_HAS_SPLICE
920 LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
921 LINUX_POSIX_TEST_LOCK_RETURNS_CONFLICT
922 LINUX_POSIX_TEST_LOCK_CONFLICT_ARG
923 LINUX_KERNEL_SOCK_CREATE
924 LINUX_EXPORTS_KEY_TYPE_KEYRING
925 LINUX_KEYS_HAVE_SESSION_TO_PARENT
927 LINUX_RECALC_SIGPENDING_ARG_TYPE
928 LINUX_EXPORTS_TASKLIST_LOCK
929 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
930 LINUX_STATFS_TAKES_DENTRY
932 LINUX_HAVE_TRY_TO_FREEZE
933 LINUX_LINUX_KEYRING_SUPPORT
934 LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
935 LINUX_KEY_ALLOC_NEEDS_CRED
936 LINUX_INIT_WORK_HAS_DATA
937 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
938 LINUX_EXPORTS_INIT_MM
939 LINUX_EXPORTS_SYS_CHDIR
940 LINUX_EXPORTS_SYS_OPEN
942 dnl Packaging and SMP build
943 if test "x$with_linux_kernel_packaging" = "xno" ; then
950 if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
951 AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
952 ac_cv_linux_exports_sys_call_table=no
953 if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
954 ac_cv_linux_exports_ia32_sys_call_table=yes
957 LINUX_EXPORTS_KALLSYMS_ADDRESS
958 LINUX_EXPORTS_KALLSYMS_SYMBOL
959 LINUX_EXPORTS_SYS_CALL_TABLE
960 LINUX_EXPORTS_IA32_SYS_CALL_TABLE
961 if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
962 linux_syscall_method=none
963 if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
964 linux_syscall_method=scan
965 if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
966 linux_syscall_method=scan_with_kallsyms_address
969 if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
970 linux_syscall_method=kallsyms_symbol
972 if test "x$linux_syscall_method" = "xnone"; then
973 AC_MSG_WARN([no available sys_call_table access method -- guessing scan])
974 linux_syscall_method=scan
978 if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
979 AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
981 if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
982 AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
984 if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" -o "x$ac_cv_linux_func_i_put_link_takes_cookie" = "xyes"; then
985 AC_DEFINE(USABLE_KERNEL_PAGE_SYMLINK_CACHE, 1, [define if your kernel has a usable symlink cache API])
987 AC_MSG_WARN([your kernel does not have a usable symlink cache API])
993 AC_CACHE_VAL(ac_cv_sockaddr_len,
995 AC_MSG_CHECKING([if struct sockaddr has sa_len field])
996 AC_TRY_COMPILE( [#include <sys/types.h>
997 #include <sys/socket.h>],
999 a->sa_len=0;], ac_cv_sockaddr_len=yes, ac_cv_sockaddr_len=no)
1000 AC_MSG_RESULT($ac_cv_sockaddr_len)])
1001 if test "$ac_cv_sockaddr_len" = "yes"; then
1002 AC_DEFINE(STRUCT_SOCKADDR_HAS_SA_LEN, 1, [define if you struct sockaddr sa_len])
1004 if test "x${MKAFS_OSTYPE}" = "xIRIX"; then
1005 echo Skipping library tests because they confuse Irix.
1007 AC_SEARCH_LIBS([socket], [socket inet])
1008 AC_SEARCH_LIBS([connect], [nsl])
1009 AC_SEARCH_LIBS([gethostbyname], [dns nsl resolv])
1011 dnl darwin wants it, aix hates it
1012 AC_MSG_CHECKING(for the useability of arpa/nameser_compat.h)
1016 #include <sys/types.h>
1017 #include <sys/socket.h>
1018 #include <netinet/in.h>
1019 #include <arpa/inet.h>
1020 #include <arpa/nameser.h>
1021 #include <arpa/nameser_compat.h>
1023 ], [static int i; i = 0;],
1025 AC_DEFINE(HAVE_ARPA_NAMESER_COMPAT_H, 1, [define if arpa/nameser_compat.h exists])],
1029 openafs_save_libs="$LIBS"
1030 AC_MSG_CHECKING([for res_search])
1033 if test "$ac_cv_func_res_search" = no; then
1034 for lib in dns nsl resolv; do
1035 if test "$ac_cv_func_res_search" != yes; then
1038 LIBS="$openafs_save_libs"
1041 if test "$ac_cv_func_res_search" = yes; then
1043 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
1044 AC_MSG_RESULT([yes, in lib$lib])
1049 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
1055 AC_CHECK_RESOLV_RETRANS
1057 AC_CACHE_VAL(ac_cv_setsockopt_iprecverr,
1059 AC_MSG_CHECKING([for setsockopt(, SOL_IP, IP_RECVERR)])
1060 AC_TRY_COMPILE( [#include <sys/types.h>
1061 #include <sys/socket.h>
1062 #include <netinet/in.h>],
1064 setsockopt(0, SOL_IP, IP_RECVERR, &on, sizeof(on));], ac_cv_setsockopt_iprecverr=yes, ac_cv_setsockopt_iprecverr=no)
1065 AC_MSG_RESULT($ac_cv_setsockopt_iprecverr)])
1066 if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
1067 AC_DEFINE(ADAPT_PMTU_RECVERR, 1, [define if asynchronous socket errors can be received])
1071 if test "x$MKAFS_OSTYPE" = OBSD; then
1072 PTHREAD_LIBS="-pthread"
1074 if test "x$MKAFS_OSTYPE" = xDFBSD; then
1075 PTHREAD_LIBS="-pthread"
1077 if test "x$PTHREAD_LIBS" = xerror; then
1078 AC_CHECK_LIB(pthread, pthread_attr_init,
1079 PTHREAD_LIBS="-lpthread")
1081 if test "x$PTHREAD_LIBS" = xerror; then
1082 AC_CHECK_LIB(pthreads, pthread_attr_init,
1083 PTHREAD_LIBS="-lpthreads")
1085 if test "x$PTHREAD_LIBS" = xerror; then
1086 AC_CHECK_LIB(c_r, pthread_attr_init,
1087 PTHREAD_LIBS="-lc_r")
1089 if test "x$PTHREAD_LIBS" = xerror; then
1090 AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
1092 if test "x$PTHREAD_LIBS" = xerror; then
1093 # pthread_attr_init is a macro under HPUX 11.0 and 11.11
1094 AC_CHECK_LIB(pthread, pthread_attr_destroy,
1095 PTHREAD_LIBS="-lpthread")
1097 if test "x$PTHREAD_LIBS" = xerror; then
1098 AC_MSG_WARN(*** Unable to locate working posix thread library ***)
1100 AC_SUBST(PTHREAD_LIBS)
1102 HOST_CPU="$host_cpu"
1104 if test "x$with_bsd_kernel_headers" != "x"; then
1105 BSD_KERNEL_PATH="$with_bsd_kernel_headers"
1107 BSD_KERNEL_PATH="/usr/src/sys"
1110 if test "x$with_bsd_kernel_build" != "x"; then
1111 BSD_KERNEL_BUILD="$with_bsd_kernel_build"
1113 case $AFS_SYSNAME in
1115 BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/compile/GENERIC"
1118 BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/${HOST_CPU}/compile/GENERIC"
1124 if test "$enable_supergroups" = "yes"; then
1125 AC_DEFINE(SUPERGROUPS, 1, [define if you want to have support for nested pts groups])
1128 if test "$enable_fast_restart" = "yes"; then
1129 AC_DEFINE(FAST_RESTART, 1, [define if you want to have fast restart])
1132 if test "$enable_bitmap_later" = "yes"; then
1133 AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later])
1136 if test "$enable_demand_attach_fs" = "yes"; then
1137 AC_DEFINE(DEMAND_ATTACH_ENABLE, 1, [define if you want the demand attach fileserver])
1142 AC_SUBST(DEMAND_ATTACH)
1144 if test "$enable_disconnected" = "yes"; then
1145 AC_DEFINE(AFS_DISCON_ENV, 1, [define if you want support for disconnected operation])
1148 if test "$enable_unix_sockets" = "yes"; then
1149 AC_DEFINE(USE_UNIX_SOCKETS, 1, [define if you want to use UNIX sockets for fssync.])
1150 USE_UNIX_SOCKETS="yes"
1152 USE_UNIX_SOCKETS="no"
1154 AC_SUBST(USE_UNIX_SOCKETS)
1156 if test "$enable_fast_restart" = "yes" &&
1157 test "$enable_demand_attach_fs" = "yes" ; then
1158 AC_MSG_ERROR([The Demand Attach and Fast Restart extensions are mutually exclusive. Demand Attach fileservers automatically salvage volumes in the background, thereby making Fast Restart pointless.])
1162 if test "$enable_icmp_pmtu_discovery" = "yes"; then
1163 if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
1164 AC_DEFINE(ADAPT_PMTU, 1, [define if you want to decode icmp unreachable packets to discover path mtu])
1168 if test "$enable_cache_bypass" = "yes"; then
1169 AC_DEFINE(AFS_CACHE_BYPASS, 1, [define to activate cache bypassing Unix client])
1172 if test "$enable_namei_fileserver" = "yes"; then
1173 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1176 if test "$enable_namei_fileserver" = "default"; then
1179 AC_MSG_WARN(Some Solaris 10 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
1180 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1184 AC_MSG_WARN(Solaris 11 versions are not safe with the inode fileserver. Forcing namei. Override with --disable-namei-fileserver)
1185 AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
1197 dnl check for tivoli
1198 AC_MSG_CHECKING(for tivoli tsm butc support)
1200 if test "$enable_tivoli_tsm" = "yes"; then
1201 XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
1202 XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
1203 XBSADIR3=/usr/tivoli/tsm/client/api/bin/sample
1204 XBSADIR4=/opt/tivoli/tsm/client/api/bin/sample
1206 if test -r "$XBSADIR3/dsmapifp.h"; then
1207 XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR3"
1209 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1210 elif test -r "$XBSADIR4/dsmapifp.h"; then
1211 XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR4"
1213 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1214 elif test -r "$XBSADIR1/xbsa.h"; then
1215 XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
1217 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1218 elif test -r "$XBSADIR2/xbsa.h"; then
1219 XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
1221 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
1223 AC_MSG_RESULT([no, missing xbsa.h and dsmapifp.h header files])
1228 AC_SUBST(XBSA_CFLAGS)
1229 AC_SUBST(XBSA_XLIBS)
1231 dnl checks for header files.
1235 AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h grp.h)
1236 AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
1237 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
1238 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h sys/pag.h)
1239 AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h)
1240 AC_CHECK_HEADERS(security/pam_modules.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
1241 AC_CHECK_HEADERS(linux/errqueue.h,,,[#include <linux/types.h>])
1242 AC_CHECK_HEADERS(et/com_err.h)
1244 AC_CHECK_TYPES([fsblkcnt_t],,,[
1245 #include <sys/types.h>
1246 #ifdef HAVE_SYS_BITYPES_H
1247 #include <sys/bitypes.h>
1249 #ifdef HAVE_SYS_STATFS_H
1250 #include <sys/statfs.h>
1252 #ifdef HAVE_SYS_STATVFS_H
1253 #include <sys/statvfs.h>
1257 OPENAFS_TEST_PACKAGE(libintl,[#include <libintl.h>],[-lintl],,,INTL)
1259 dnl Don't build PAM on IRIX; the interface doesn't work for us.
1260 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
1261 case $AFS_SYSNAME in
1274 if test "$enable_login" = yes; then
1279 AC_SUBST(BUILD_LOGIN)
1281 AC_CHECK_FUNCS(snprintf strlcat strlcpy flock)
1282 AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr)
1283 AC_CHECK_FUNCS(setvbuf vsyslog getcwd)
1284 AC_CHECK_FUNCS(regcomp regexec regerror)
1285 AC_MSG_CHECKING([for POSIX regex library])
1286 if test "$ac_cv_header_regex_h" = "yes" && \
1287 test "$ac_cv_func_regcomp" = "yes" && \
1288 test "$ac_cv_func_regexec" = "yes" && \
1289 test "$ac_cv_func_regerror" = "yes"; then
1290 AC_DEFINE(HAVE_POSIX_REGEX, 1, [define if you have POSIX regex library])
1298 AC_CHECK_SIZEOF(void *)
1299 AC_CHECK_SIZEOF(unsigned long long)
1300 AC_CHECK_SIZEOF(unsigned long)
1301 AC_CHECK_SIZEOF(unsigned int)
1304 AC_CHECK_TYPE(ssize_t, int)
1305 AC_CHECK_TYPE([sig_atomic_t], ,
1306 [AC_DEFINE([sig_atomic_t], [int],
1307 [Define to int if <signal.h> does not define.])],
1308 [#include <sys/types.h>
1309 #include <signal.h>])
1310 AC_SIZEOF_TYPE(long)
1314 AC_CHECK_FUNCS(timegm)
1315 AC_CHECK_FUNCS(daemon)
1317 dnl Directory PATH handling
1318 if test "x$enable_transarc_paths" = "xyes" ; then
1319 afsconfdir=${afsconfdir=/usr/afs/etc}
1320 viceetcdir=${viceetcdir=/usr/vice/etc}
1321 afskerneldir=${afskerneldir=${viceetcdir}}
1322 afssrvbindir=${afssrvbindir=/usr/afs/bin}
1323 afssrvsbindir=${afssrvsbindir=/usr/afs/bin}
1324 afssrvlibexecdir=${afssrvlibexecdir=/usr/afs/bin}
1325 afsdbdir=${afsdbdir=/usr/afs/db}
1326 afslogsdir=${afslogsdir=/usr/afs/logs}
1327 afslocaldir=${afslocaldir=/usr/afs/local}
1328 afsbackupdir=${afsbackupdir=/usr/afs/backup}
1329 afsbosconfigdir=${afsbosconfigdir=/usr/afs/local}
1330 afsdatadir=${afsdatadir=/usr/vice/etc}
1332 afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'}
1333 viceetcdir=${viceetcdir='${sysconfdir}/openafs'}
1334 afskerneldir=${afskerneldir='${libdir}/openafs'}
1335 afssrvbindir=${afssrvbindir='${bindir}'}
1336 afssrvsbindir=${afssrvsbindir='${sbindir}'}
1337 afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'}
1338 afsdbdir=${afsdbdir='${localstatedir}/openafs/db'}
1339 afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'}
1340 afslocaldir=${afslocaldir='${localstatedir}/openafs'}
1341 afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'}
1342 afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'}
1343 afsdatadir=${afsdatadir='${datadir}/openafs'}
1345 AC_SUBST(afsconfdir)
1346 AC_SUBST(viceetcdir)
1347 AC_SUBST(afskerneldir)
1348 AC_SUBST(afssrvbindir)
1349 AC_SUBST(afssrvsbindir)
1350 AC_SUBST(afssrvlibexecdir)
1352 AC_SUBST(afslogsdir)
1353 AC_SUBST(afslocaldir)
1354 AC_SUBST(afsbackupdir)
1355 AC_SUBST(afsbosconfigdir)
1356 AC_SUBST(afsdatadir)
1358 if test "x$enable_kernel_module" = "xyes"; then
1359 ENABLE_KERNEL_MODULE=libafs
1362 if test "x$enable_pthreaded_ubik" = "xyes"; then
1363 ENABLE_PTHREADED_UBIK=yes
1367 AC_SUBST(AFS_SYSNAME)
1368 AC_SUBST(AFS_PARAM_COMMON)
1369 AC_SUBST(ENABLE_KERNEL_MODULE)
1370 AC_SUBST(ENABLE_PTHREADED_UBIK)
1372 AC_SUBST(LINUX_KERNEL_PATH)
1373 AC_SUBST(LINUX_KERNEL_BUILD)
1375 AC_SUBST(BSD_KERNEL_PATH)
1376 AC_SUBST(BSD_KERNEL_BUILD)
1377 AC_SUBST(LINUX_VERSION)
1378 AC_SUBST(MKAFS_OSTYPE)
1379 AC_SUBST(TOP_OBJDIR)
1380 AC_SUBST(TOP_SRCDIR)
1381 AC_SUBST(TOP_INCDIR)
1382 AC_SUBST(TOP_LIBDIR)
1384 AC_SUBST(DARWIN_INFOFILE)
1385 AC_SUBST(IRIX_BUILD_IP35)
1393 TOP_SRCDIR="${srcdir}/src"
1395 dnl If we're using ./configure, need a more reasonable TOP_SRCDIR, since relative links don't work everywhere
1401 TOP_SRCDIR=`cd $TOP_SRCDIR; pwd`
1405 TOP_OBJDIR="${SRCDIR_PARENT}"
1406 TOP_INCDIR="${SRCDIR_PARENT}/include"
1407 TOP_LIBDIR="${SRCDIR_PARENT}/lib"
1408 if test "${DEST}x" = "x"; then
1409 DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest"
1412 HELPER_SPLINT="${TOP_SRCDIR}/helper-splint.sh"
1413 HELPER_SPLINTCFG="${TOP_SRCDIR}/splint.cfg"
1414 AC_SUBST(HELPER_SPLINT)
1415 AC_SUBST(HELPER_SPLINTCFG)
1417 mkdir -p ${TOP_OBJDIR}/src/JAVA/libjafs