1 AC_REVISION($Revision$)dnl
3 AC_INIT(arla, 0.42-RC2, [arla-drinkers@stacken.kth.se])
6 AM_INIT_AUTOMAKE([foreign no-dependencies 1.9])
8 AM_CONFIG_HEADER(include/config.h)
9 AC_CONFIG_SRCDIR([arlad/arla.c])
17 if test "$AS" = ""; then
26 # This may be overridden using --prefix=/usr to configure
27 AC_PREFIX_DEFAULT(/usr/arla)
30 AC_SUBST(CANONICAL_HOST)
33 dnl this is needed to run the configure tests against glibc
35 AC_DEFINE([_GNU_SOURCE], 1,
36 [Define to enable extensions on glibc-based systems such as Linux.])
46 dnl remove ifdef when we use 2.54
47 m4_ifdef([AC_PROG_EGREP], [AC_PROG_EGREP],)
49 AC_CHECK_PROGS(SYMORDER, symorder, :)
50 AC_CHECK_PROGS(MAKEINFO, makeinfo, :)
51 AC_CHECK_PROGS(DVI2PS, dvi2ps, :)
52 AC_CHECK_PROGS(TEXI2DVI, texi2dvi, :)
53 AC_CHECK_PROGS(TEXI2PDF, texi2pdf, :)
54 AC_CHECK_PROGS(TEXI2HTML, texi2html, :)
55 AC_CHECK_PROGS(DVIPS, dvips, :)
56 AC_CHECK_PROGS(chmod, chmod, :)
57 AC_PATH_PROGS(GUILE_GTK, guile-gtk, /bin/false)
61 force_large_file=yes ;;
63 force_large_file=no ;;
66 if test "${force_large_file}" = "yes" ; then
67 AC_DEFINE(_LARGEFILE_SOURCE, 1,
68 [Define if you have largefile support])
69 AC_DEFINE(_LARGEFILE64_SOURCE, 1,
70 [Define if you have largefile support])
71 AC_DEFINE(_FILE_OFFSET_BITS, 64,
72 [Define how big file offset is in your OS. 32/64 are valid values.])
77 dnl See if there is any X11 present
80 AM_CONDITIONAL(X11, test X"$no_x" != X"yes")
85 [ --enable-smp compile for SMP (for Linux, FreeBSD, and NetBSD)],
86 [if test "$enableval" = "yes"; then
87 smp="-DSMP -DCONFIG_SMP"
94 [ --enable-kld build kld modules (only FreeBSD 3.0)],
95 [if test "$enableval" = "yes"; then
104 LWP_PROCESS="process.o"
111 AC_ARG_WITH(pthreads,
112 [ --with-pthreads=dir compile liblwp as pthreads wrapper using pthreads in dir],
113 [if test "$with_pthreads" = "windows"; then
115 elif test "$with_pthreads" != "no"; then
120 PLWP_INC_FLAGS="-DPTHREADS_LWP"
121 if test "$with_pthreads" != "yes"; then
122 AC_FIND_FUNC_NO_LIBS(pthread_create, pthread,,,[-L${with_pthreads}/lib])
123 PLWP_LIB_FLAGS="-L${with_pthreads}/lib $LIB_pthread_create"
124 PLWP_INC_FLAGS="-I${with_pthreads}/include -DPTHREADS_LWP"
126 AC_FIND_FUNC_NO_LIBS(pthread_create, pthread)
127 PLWP_LIB_FLAGS="$LIB_pthread_create"
128 PLWP_INC_FLAGS="-DPTHREADS_LWP"
130 AC_FIND_FUNC_NO_LIBS(sched_yield, pthread,,,[${PLWP_LIB_FLAGS}])
131 fi],[with_pthreads=no])
133 # where the source tree is located
137 if test -d /lib/modules/`uname -r`/build; then
138 default_sys=/lib/modules/`uname -r`/build
140 default_sys=/usr/src/linux
144 default_sys=${SYSDIR:-/usr/src/sys}
147 default_sys=${SYSDIR:-/sys}
152 [ --with-sys=dir use dir as your kernel source code directory
153 default $default_sys],
155 [SYS="$default_sys"])
158 AC_ARG_WITH(kernel-obj,
159 [ --with-kernel-obj=dir use dir as your kernel build directory (used on
160 FreeBSD to find your actual kernel parameters)],
161 [FBSDKERNBUILDDIR=KERNBUILDDIR\=$withval],
163 AC_SUBST(FBSDKERNBUILDDIR)
165 AC_ARG_WITH(bsd-make,
166 [ --with-bsd-make=prog when using a bsd and cross compiling we need
167 to know your make, default /usr/bin/make],
169 [BSDMAKE="/usr/bin/make"])
173 nnpfs_target="$target_os"
175 [ --disable-nnpfs build arla w/o nnpfs],
176 [if test "$enableval" = "no" ; then
177 nnpfs_target="without_nnpfs";
180 AC_MSG_CHECKING(for kernel stuff)
181 case "$nnpfs_target" in
183 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/sunos
184 KERNEL_SRCS='sunos-subr.c'
188 AC_MSG_RESULT(SunOS 4.1.x)
191 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/solaris
192 KERNEL_SRCS='solaris-subr.c'
196 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_KERNEL"
197 AC_MSG_RESULT(Solaris)
198 case "$target_cpu" in
199 sparc64) AC_DEFINE(NEED_VICEIOCTL32, 1,
200 [define if you need 32 bit compat pioctl])
201 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_SYSCALL32 -D_SYSCALL32_IMPL"
206 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/irix
207 KERNEL_SRCS='irix-subr.c'
209 ip=`hinv -c processor | awk '$4 ~ /IP/ { print $4}'`
210 cpu=`hinv -t cpu | awk '{print $3}'`
211 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D$ip -D$cpu -DR4000"
216 AC_DEFINE(IRIX_64, 1, [define this if on Irix6.4 or higher]) ;;
221 KERNEL_SRCS='hpux-subr.c'
224 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
225 AC_MSG_WARN(No kernel support for $target_os, compiling only user-level stuff)
228 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/aix
229 KERNEL_SRCS='aix-subr.c'
235 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
236 KERNEL_SRCS='bsd-subr.c'
238 AC_WERROR(BSD_WERROR)
240 cat > conftest.mk << END
241 .include <bsd.lkm.mk>
242 .if defined(UVM) && (\${UVM} != "no")
249 @echo \$(CFLAGS) \$(CPPFLAGS)
251 ac_out=`$BSDMAKE S=$SYS -f conftest.mk echo 2> /dev/null`
256 -I*) if test "$i" != -I. -a "$i" != "-I`pwd`"; then
257 incl="$incl${incl:+ }$i"
260 -D*) defs="$defs${defs:+ }$i" ;;
261 -m*) flags="$flags${flags:+ }$i" ;;
262 -f*) flags="$flags${flags:+ }$i" ;;
266 ## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
267 # make sure we compile with -mno-fp-regs on alpha
268 if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
270 flags="$flags${flags:+ }-mno-fp-regs"
272 if test `uname -m` = pmax
274 KERNEL_CFLAGS="${KERNEL_CFLAGS} -G 0 -mno-abicalls -mno-half-pic"
275 KERNEL_LDFLAGS="${KERNEL_LDFLAGS} -G 0 -Ttext 0x80030000 -T ${SYS}/arch/mips/conf/kern.ldscript"
277 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_LKM"
278 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
279 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
281 if test `uname -m` = pmax
283 ac_kernel_ld='${KERNEL_LD} ${KERNEL_LDFLAGS} -o conftest $LDFLAGS -R $KERNEL conftest.o -e _foo 1>&5'
286 NNPFS_SRCS='nnpfs_wrap-bsd.c nnpfs_common-bsd.c nnpfs_dev-common.c nnpfs_dev-bsd.c nnpfs_dev-openbsd.c nnpfs_syscalls-common.c nnpfs_syscalls-wrap-bsd.c nnpfs_node-bsd.c nnpfs_vfsops-common.c nnpfs_vfsops-bsd.c nnpfs_vfsops-openbsd.c nnpfs_vnodeops-common.c nnpfs_vnodeops-bsd.c'
291 AC_MSG_RESULT(OpenBSD)
293 netbsd* | netbsdelf*)
294 AC_WERROR(BSD_WERROR)
295 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
296 KERNEL_SRCS='bsd-subr.c'
299 cat > conftest.mk << END
300 .include <bsd.kmod.mk>
308 @echo \$(CFLAGS) \$(CPPFLAGS)
310 ac_out=`$BSDMAKE S=$SYS -f conftest.mk echo 2> /dev/null`
313 set X $ac_out ; shift
314 while test $# != 0; do
317 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
318 incl="$incl${incl:+ }$1"
323 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
324 incl="$incl${incl:+ }-isystem $1"
328 -D*) defs="$defs${defs:+ }$1" ;;
329 -m*) flags="$flags${flags:+ }$1" ;;
330 -f*) flags="$flags${flags:+ }$1" ;;
335 ## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
336 # make sure we compile with -mno-fp-regs on alpha
337 if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
339 flags="$flags${flags:+ }-mno-fp-regs"
341 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
342 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
344 NNPFS_SRCS='nnpfs_wrap-bsd.c nnpfs_common-bsd.c nnpfs_dev-common.c nnpfs_dev-bsd.c nnpfs_dev-netbsd.c nnpfs_syscalls-common.c nnpfs_syscalls-wrap-bsd.c nnpfs_node-bsd.c nnpfs_vfsops-common.c nnpfs_vfsops-bsd.c nnpfs_vfsops-netbsd.c nnpfs_vnodeops-common.c nnpfs_vnodeops-bsd.c nnpfs_vnodeops-netbsd.c'
351 dnl Ok, lets build the symlinks the lkm needs
352 dnl First make sure the directory and file exists
353 dnl Then run make depend to create the symlinks
354 dnl And a last thing in this ugly hack, add a -I to that directory
356 test -d include/netbsd-lkm || \
357 "$srcdir"/mkinstalldirs include/netbsd-lkm > /dev/null 2>/dev/null
359 kakasrcdir=`cd $srcdir && pwd`
361 (cd include/netbsd-lkm && \
362 $BSDMAKE S="$SYS" foosrc=$kakasrcdir/include/netbsd-lkm \
363 -f "$kakasrcdir"/include/netbsd-lkm/Makefile depend>/dev/null)
365 KERNEL_CPPFLAGS="$KERNEL_CPPFLAGS -I`pwd`/include/netbsd-lkm"
367 if test "X$smp" != "Xno" -a "X$smp" != "X"; then
368 KERNEL_CPPFLAGS="$KERNEL_CPPFLAGS -DMULTIPROCESSOR"
371 AC_MSG_RESULT(NetBSD)
374 AC_WERROR(BSD_WERROR)
375 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
376 KERNEL_SRCS='bsd-subr.c'
381 if test "X$smp" != "Xno" -a "X$xmp" != "X"; then
387 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-O"
388 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DVFS_KLD -DKLD_MODULE -I$SYS/arch -I$SYS -I."
392 NNPFS_SRCS='nnpfs_wrap-bsd.c nnpfs_common-bsd.c nnpfs_dev-common.c nnpfs_dev-bsd.c nnpfs_syscalls-common.c nnpfs_syscalls-wrap-dragonfly.c nnpfs_node-bsd.c nnpfs_vfsops-common.c nnpfs_vfsops-bsd.c nnpfs_vfsops-freebsd.c nnpfs_vnodeops-common.c nnpfs_vnodeops-bsd.c'
395 AC_MSG_RESULT(DragonFly)
397 freebsd[[56789]]* | freebsdelf[[56789]]*)
398 AC_MSG_RESULT([FreeBSD [[56789]].x])
399 KERNEL=`sysctl -n kern.bootfile`
400 AC_WERROR(BSD_WERROR)
402 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
403 KERNEL_SRCS='bsd-subr.c'
405 KERNEL=`sysctl -n kern.bootfile`
407 cat > conftest.mk << END
410 .include <bsd.kmod.mk>
412 @echo \$(CFLAGS) \$(CPPFLAGS)
414 ac_out=`$BSDMAKE S=$SYS -f conftest.mk echo 2> /dev/null`
417 set X $ac_out ; shift
418 while test $# != 0; do
421 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
422 incl="$incl${incl:+ }$1"
427 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
428 incl="$incl${incl:+ }-isystem $1"
432 -D*) defs="$defs${defs:+ }$1" ;;
433 -m*) flags="$flags${flags:+ }$1" ;;
434 -f*) flags="$flags${flags:+ }$1" ;;
439 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -I. $defs${defs:+ }$flags${flags:+ }$incl"
440 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
445 freebsd[[34]]* | freebsdelf[[34]]*)
446 AC_MSG_RESULT([FreeBSD [[34]].x])
447 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
448 KERNEL_SRCS='bsd-subr.c'
450 KERNEL=`sysctl -n kern.bootfile`
451 AC_WERROR(BSD_WERROR)
452 AC_MSG_CHECKING(for kernel object format)
454 case `file $KERNEL 2>/dev/null` in
455 *ELF*) kernobjformat=elf ;;
457 AC_MSG_RESULT($kernobjformat)
459 AC_MSG_CHECKING(for kld)
460 dnl Default to kld if freebsd4.0
463 if test "X$kld" = "X"; then
466 if test "X$smp" != "Xno" -a "X$xmp" != "X"; then
473 AC_SUBST(FREEBSD_GENSETDEFS)
475 dnl Or if the kernel is ELF
476 case "$kernobjformat" in
478 if test "X$kld" = "X"; then
483 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-O"
484 if test `uname -m` = alpha -a `expr X"$KERNEL_CFLAGS" : ".*-mno-fp-regs"` -eq 0
486 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-mno-fp-regs"
488 if test "$kld" = "yes"; then
489 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DVFS_KLD -DKLD_MODULE -I$SYS/arch -I$SYS -I."
490 test_KERNEL_CFLAGS="-$kernobjformat ${KERNEL_CFLAGS}"
492 case "$kernobjformat" in
493 aout) extra_LDFLAGS="-A" ;;
494 elf) extra_LDFLAGS="-R" ;;
495 *) AC_MSG_ERROR([Unknown object format $kernobjformat])
497 ac_kernel_ld='${LD-ld} -$kernobjformat -o conftest $LDFLAGS $extra_LDFLAGS $KERNEL conftest.o -e _foo 1>&AC_FD_CC'
501 if test "$kernobjformat" != "aout"; then
502 AC_MSG_WARN([You cannot build LKMs against $kernobjformat kernels])
504 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DLKM -D_LKM -DVFS_LKM -DACTUALLY_LKM_NOT_KERNEL -I$SYS/arch -I$SYS -I."
505 test_KERNEL_CFLAGS="-aout ${KERNEL_CFLAGS}"
507 ac_kernel_ld='${LD-ld} -aout -o conftest $LDFLAGS -A $KERNEL conftest.o -e _foo 1>&AC_FD_CC'
513 NNPFS_SRCS='nnpfs_wrap-bsd.c nnpfs_common-bsd.c nnpfs_dev-common.c nnpfs_dev-bsd.c nnpfs_dev-freebsd.c nnpfs_syscalls-common.c nnpfs_syscalls-wrap-freebsd.c nnpfs_node-bsd.c nnpfs_vfsops-common.c nnpfs_vfsops-bsd.c nnpfs_vfsops-freebsd.c nnpfs_vnodeops-common.c nnpfs_vnodeops-bsd.c'
520 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
521 KERNEL_SRCS='bsd-subr.c'
524 case "$nnpfs_target" in
525 darwin6.*) COM_APPLE_KERNEL_BSD="6.0" ;;
526 darwin7.*) COM_APPLE_KERNEL_BSD="6.0" ;;
527 darwin8.*) COM_APPLE_KERNEL_BSD="6.0" ;;
528 darwin*) COM_APPLE_KERNEL_BSD="1.1" ;;
529 *) AC_MSG_ERROR([Unknown kernel version])
531 AC_CONFIG_FILES([nnpfs/bsd/Info.plist])
533 AC_SUBST(COM_APPLE_KERNEL_BSD)
535 ac_cv_func_mmap_fixed_mapped=no dnl disable mmap for darwin
537 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -DKERNEL -D_KERNEL -I/System/Library/Frameworks/Kernel.framework/Headers -static -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API"
538 case "$nnpfs_target" in
542 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
543 CPPFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
544 CFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
548 YDR_CPPFLAGS="-traditional-cpp"
550 LDFLAGS="${LDFLAGS} -flat_namespace"
551 KERNEL_CFLAGS="${KERNEL_CFLAGS} -fno-common -Wno-format -pipe -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch -fno-builtin"
552 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
560 NNPFS_SRCS='nnpfs_wrap-bsd.c nnpfs_common-bsd.c nnpfs_dev-common.c nnpfs_dev-bsd.c nnpfs_dev-macos.c nnpfs_syscalls-common.c nnpfs_syscalls-wrap-macos.c nnpfs_node-bsd.c nnpfs_vfsops-common.c nnpfs_vfsops-bsd.c nnpfs_vfsops-macos.c nnpfs_vnodeops-common.c nnpfs_vnodeops-macos.c nnpfs_info.c'
562 AC_DEFINE([BIND_8_COMPAT], 1,
563 [Define to pull in bind8 glue for darwin.])
568 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/linux
569 KERNEL_SRCS='bsd-subr.c'
572 if test "X$smp" = "Xno"; then
576 KERNEL_CPPFLAGS="-I$SYS/include -DMODULE -D__KERNEL__ $smp ${KERNEL_CPPFLAGS} "
577 case "$target_cpu" in
579 KERNEL_CC=${KERNEL_CC:-$CC}
580 KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fp-regs -ffixed-8" ;;
582 KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fpu -ffixed-g4 -fcall-used-g5 -fcall-used-g7"
583 KERNEL_LD_FLAGS="-m elf64_sparc"
584 KERNEL_CC=${KERNEL_CC:-sparc64-linux-gcc}
585 AC_DEFINE(NEED_VICEIOCTL32, 1,
586 [define if you need 32 bit compat pioctl]) ;;
589 KERNEL_CC=${KERNEL_CC:-$CC} ;;
591 KERNEL_CC=${KERNEL_CC:-$CC} ;;
593 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
598 AC_MSG_RESULT(mingw32)
599 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
600 KERNEL_SRCS=unknown-subr.c
606 AC_MSG_RESULT(cygwin/VC)
607 AC_MSG_WARN([No kernel support for NT])
608 if test "$with_pthreads" = "windows"; then
609 AC_MSG_WARN([Using LWP on windows native threads])
614 PLWP_INC_FLAGS="-DWINDOWS_THREADS_LWP"
616 AC_MSG_WARN([Using LWP on asm threads or pthreads])
618 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
619 KERNEL_SRCS=unknown-subr.c
626 if test "$nnpfs_target" != "without_nnpfs"; then
627 AC_MSG_WARN([No kernel support for $target_os, compiling only user-level stuff])
629 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
630 KERNEL_SRCS=unknown-subr.c
637 dnl ydr need special flags
638 AC_SUBST(YDR_CPPFLAGS)
641 AM_CONDITIONAL(DFLY, expr "$target_os" : "dragonfly.*" >/dev/null 2>&1)
644 AM_CONDITIONAL(FBSD5, test X"$FREEBSD5" = Xyes)
646 dnl are we linux-ia64
647 AM_CONDITIONAL(LINUX_IA64, test X"$LINUX_IA64" = Xyes)
649 dnl support for native readdir
650 AM_CONDITIONAL(NNPFS_AFS_READDIR, false)
654 AM_CONDITIONAL(DCE, false)
655 AM_CONDITIONAL(MACOSX, test `expr "$nnpfs_target" : darwin` != 0)
657 AC_ARG_WITH(lwp-redzone,
658 [ --without-lwp-redzone don't use redzone for (asm)lwp],
659 [lwpredzone=$withval],
662 AM_CONDITIONAL(LWP_REDZONE, test X$lwpredzone != Xno)
664 # Check where to put the cache
666 AC_ARG_WITH(arlacachedir,
667 [ --with-arlacachedir=dir use dir as cachedir instead of \$prefix/cache],
668 [ARLACACHEDIR=$withval],
669 [ARLACACHEDIR='${prefix}/cache'])
671 # Check where to find the configuration
673 AC_ARG_WITH(arlaconffile,
674 [ --with-arlaconffile=file use file for configuration instead of \$prefix/etc/arla.conf],
675 [ARLACONFFILE=$withval],
676 [ARLACONFFILE='${sysconfdir}/arla.conf'])
678 # Check where to store partitions
680 AC_ARG_WITH(milkopart,
681 [ --with-milkopart=dir location of milko partitions (default /)],
682 [MILKO_ROOT='-DMILKO_ROOT=\"$withval\"'],
683 [MILKO_ROOT='-DMILKO_ROOT=\"/\"'])
689 [ --enable-knfs make afs nfs-mountable],
690 [ARLA_KNFS="-DARLA_KNFS"])
695 dnl If we want to use pthreads
698 AC_SUBST(LWP_PROCESS)
699 AC_SUBST(PLWP_LIB_FLAGS)
700 AC_SUBST(PLWP_INC_FLAGS)
709 dnl AC_CHECK_TYPE(nlink_t, int)
712 dnl Tests for readline/editline
715 rk_TEST_PACKAGE(readline,
717 #include <readline.h>],-lreadline,,, READLINE)
719 if test "$with_readline" = "no"; then
720 AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses)
721 if test "$ac_cv_funclib_tgetent" = "no"; then
722 AC_MSG_ERROR([Could not find tgetent, needed by edit/editline])
724 AC_FIND_FUNC_NO_LIBS(readline, editline edit readline, [], [], [$LIB_tgetent])
725 if test "$ac_cv_func_readline" = "no"; then
726 AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
727 if test "$ac_cv_func_el_init" = yes; then
728 editline_OBJS=edit_compat.o
729 LIB_readline='-L'`pwd`'/lib/editline -leditline '"$LIB_el_init";
730 INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
732 editline_OBJS="editline.o complete.o sysunix.o"
733 LIB_readline='-L'`pwd`'/lib/editline -leditline'
734 INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
738 AC_DEFINE(HAVE_READLINE, 1, [define if you have a function readline])
740 LIB_readline_ac="$LIB_readline $LIB_tgetent"
741 LIB_readline="$LIB_readline \$(LIB_tgetent)"
748 [ --disable-mmap don't use mmap],
749 [if test "$enableval" = "no"; then
750 ac_cv_func_mmap_fixed_mapped=no
754 AC_ARG_ENABLE(dynamic-afs,
755 [ --disable-dynamic-afs don't use loaded AFS library with AIX],[
756 if test "$enableval" = "no"; then
762 AC_ARG_ENABLE(linux-syscall,
763 AC_HELP_STRING([--disable-linux-syscall],[don't modify the syscall table on linux]),
764 [if test "$enableval" = "no" ; then
767 if test "$syscallhack" = "yes"; then
768 AC_DEFINE(SYSCALLHACK, 1, [define to enable syscall table modification on linux])
772 AC_ARG_ENABLE(linux-group-pags,
773 AC_HELP_STRING([--disable-linux-group-pags],[don't use groups for pags on linux]),
774 [if test "$enableval" = "no" ; then
777 if test "$grouppags" = "yes"; then
778 AC_DEFINE(GROUPPAGS, 1, [define to enable groups-based pags on linux])
784 AC_SUBST(LIB_readline)
785 AC_SUBST(INCLUDE_readline)
786 AC_SUBST(editline_OBJS)dnl
787 if test "$editline_OBJS" != ""; then
788 editline_dir=editline
790 AC_SUBST(editline_dir)
795 AC_SUBST(KERNEL_INCLUDE)
796 AC_SUBST(KERNEL_SRCS)
797 AC_SUBST(KERNEL_HDRS)
798 AC_SUBST(KERNEL_CPPFLAGS)
799 AC_SUBST(KERNEL_CFLAGS)
800 AC_SUBST(KERNEL_LD_FLAGS)
806 AC_SUBST(NNPFS_SUBDIR)
809 AC_SUBST(ARLACACHEDIR)
810 AC_SUBST(ARLACONFFILE)
815 dnl Various checks for headers and their contents
846 netinet/in6_machtypes.h \
901 AC_CHECK_HEADERS([net/if.h], , , [AC_INCLUDES_DEFAULT
902 #if HAVE_SYS_SOCKET_H
903 #include <sys/socket.h>
906 AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT
907 #ifdef HAVE_NETINET6_IN6_H
908 #include <netinet6/in6.h>
917 ], , , [AC_INCLUDES_DEFAULT
918 #ifdef HAVE_SYS_PARAM_H
919 #include <sys/param.h>
925 ], , , [AC_INCLUDES_DEFAULT
926 #ifdef HAVE_SYS_PARAM_H
927 #include <sys/param.h>
929 #ifdef HAVE_SYS_MOUNT_H
930 #include <sys/mount.h>
937 AC_CHECK_HEADERS([resolv.h], , , [AC_INCLUDES_DEFAULT
938 #ifdef HAVE_SYS_TYPES_H
939 #include <sys/types.h>
941 #ifdef HAVE_NETINET_IN_H
942 #include <netinet/in.h>
944 #ifdef HAVE_ARPA_NAMESER_H
945 #include <arpa/nameser.h>
952 dnl These need to before roken checks
955 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
956 AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
957 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
958 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
959 AM_CONDITIONAL(have_glob_h, test "$ac_cv_header_glob_h" = yes)
960 AM_CONDITIONAL(do_roken_rename, true)
963 dnl and this is for kernel header files
966 save_CPPFLAGS="${CPPFLAGS}"
967 CPPFLAGS="${KERNEL_CPPFLAGS}"
970 miscfs/genfs/genfs.h \
971 miscfs/syncfs/syncfs.h \
982 CPPFLAGS="${save_CPPFLAGS}"
986 dnl Check for endian-ness
1003 dnl Check for __FUNCTION__
1009 dnl Check for __attribute__
1018 AC_ENABLE_SHARED(no)
1024 # It is said that the kerberos junk needs to be after ac_check_roken,
1025 # but I didn't notice that, so we include some to have a good place
1026 # to check for existing roken in
1029 AC_CHECK_KERBEROS(54auto)
1031 #end krb, continue roken stuff
1035 # oh, and put sl here, too
1039 if test "X$ac_cv_arla_with_roken" = "Xyes" ; then
1041 #LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
1043 dnl inlined parts of rk_ROKEN, seems to be needed by sl and rx sometimes.
1054 AM_CONDITIONAL(ARLA_LOCAL_ROKEN, test X$ac_cv_arla_with_roken = Xyes)
1058 if test "X$ac_cv_found_krb5" = "Xyes" ; then
1059 RXKAD_LIBS_extra="$RXKAD_LIBS_extra $KRB5_LIB_FLAGS"
1062 if test "X$RXKAD_LIBS_extra" != "X" ; then
1063 RXKAD_LIBS="\$(top_builddir)/rxkad/librxkad.la $RXKAD_LIBS_extra"
1065 AM_CONDITIONAL(RXKAD, test "X$RXKAD_LIBS_extra" != "X")
1067 dnl AC_TYPE_KRB_PRINCIPAL
1068 dnl AC_FUNC_KRB_GET_ERR_TEXT
1069 dnl AC_FUNC_KRB_GET_DEFAULT_TKT_ROOT
1070 dnl AC_FUNC_KRB_GET_DEFAULT_PRINCIPAL
1071 dnl AC_FUNC_KRB_KDCTIMEOFDAY
1072 AC_FUNC_KAFS_SETTOKEN_RXKAD
1078 dnl AC_FIND_FUNC_NO_LIBS2(tf_init, "", , , [$KRB4_LIB_FLAGS])
1080 dnl if test "$ac_cv_func_tf_init" = yes; then
1081 dnl APPL_SUBDIRS="$APPL_SUBDIRS kalog"
1086 dnl Check for strange operating systems that you need to handle differently
1091 if test "$krb_cv_sys_aix" = yes ;then
1092 if test "$aix_dynamic_afs" = yes; then
1093 AFS_EXTRA_OBJS='$(srcdir)/afsl.exp dlfcn.o'
1094 AFS_EXTRA_LIBS=afslib.so
1095 # this works differently in AIX <=3 and 4
1096 if test `uname -v` = 4 ; then
1097 AFS_EXTRA_LD="-bnoentry"
1099 AFS_EXTRA_LD="-e _nostart"
1102 AIX_EXTRA_KAFS="-lld"
1104 AFS_EXTRA_OBJS='$(srcdir)/afsl.exp afslib.o'
1106 AFS_EXTRA_DEFS='-DSTATIC_AFS_SYSCALLS'
1109 AC_SUBST(AFS_EXTRA_OBJS)dnl
1110 AC_SUBST(AFS_EXTRA_LIBS)dnl
1111 AC_SUBST(AFS_EXTRA_LD)dnl
1112 AC_SUBST(AFS_EXTRA_DEFS)dnl
1113 AC_SUBST(AIX_EXTRA_KAFS)dnl
1117 dnl Check for struct winsize
1120 AC_KRB_STRUCT_WINSIZE
1123 dnl Various checks for libraries and their contents
1126 AC_FIND_FUNC(syslog, syslog)
1129 dnl System V is have misplaced the socket routines, should really be in libc
1132 AC_FIND_FUNC(socket, socket)
1133 AC_FIND_FUNC(gethostbyname, nsl)
1134 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
1136 dnl we don't actually use v6 functions in this code, but some generic
1137 dnl functions such as getnameinfo et al can reside in libraries that are
1138 dnl found by this macro
1142 AC_FIND_FUNC(res_search, resolv,
1145 #ifdef HAVE_SYS_TYPES_H
1146 #include <sys/types.h>
1148 #ifdef HAVE_NETINET_IN_H
1149 #include <netinet/in.h>
1151 #ifdef HAVE_ARPA_NAMESER_H
1152 #include <arpa/nameser.h>
1154 #ifdef HAVE_RESOLV_H
1160 AC_FIND_FUNC(res_init, resolv,
1163 #ifdef HAVE_SYS_TYPES_H
1164 #include <sys/types.h>
1166 #ifdef HAVE_NETINET_IN_H
1167 #include <netinet/in.h>
1169 #ifdef HAVE_ARPA_NAMESER_H
1170 #include <arpa/nameser.h>
1172 #ifdef HAVE_RESOLV_H
1178 AC_FIND_FUNC(dn_expand, resolv,
1181 #ifdef HAVE_SYS_TYPES_H
1182 #include <sys/types.h>
1184 #ifdef HAVE_NETINET_IN_H
1185 #include <netinet/in.h>
1187 #ifdef HAVE_ARPA_NAMESER_H
1188 #include <arpa/nameser.h>
1190 #ifdef HAVE_RESOLV_H
1198 AC_CHECK_FUNCS(strtoll strtoq getrusage thr_yield)
1200 AC_EGREP_HEADER(sigaction, signal.h,
1201 AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [define if you have sigaction]))
1203 save_CPPFLAGS="${CPPFLAGS}"
1204 AC_HAVE_TYPES([int8_t int16_t int32_t int64_t])
1205 AC_HAVE_TYPES([int16 int32])
1206 AC_HAVE_TYPES([u_int8_t u_int16_t u_int32_t u_int64_t])
1207 AC_HAVE_TYPES([uint8_t uint16_t uint32_t uint64_t])
1208 AC_HAVE_TYPES([u_int16 u_int32])
1209 AC_HAVE_TYPES([bool ssize_t])
1210 AC_HAVE_TYPES([register_t]) dnl really only needed for bsd nnpfs
1211 AC_HAVE_TYPES([uintptr_t]) dnl really only needed for bsd nnpfs
1212 AC_HAVE_TYPES([intptr_t])
1213 AC_HAVE_TYPES([off64_t])
1214 AC_CHECK_HEADERS([ktypes.h com_err.h et/com_err.h])
1215 COMERR_CPPFLAGS="$CPPFLAGS"
1216 AC_SUBST(COMERR_CPPFLAGS)
1217 CPPFLAGS="${save_CPPFLAGS}"
1222 dnl check for old libkafs
1225 dnl AC_FIND_FUNC_NO_LIBS2(krb_afslog_uid, "", , , [$KAFS_LIBS $KRB4_LIB_FLAGS])
1228 AC_CHECK_FUNC(localtime_r,[
1229 AC_DEFINE([HAVE_LOCALTIME_R], 1, [define if there exists a localtime_r])])
1235 AC_CHECK_FUNCS(getfh fhopen)
1237 AC_CHECK_FUNCS(getattrlist setattrlist)
1239 AC_CHECK_FUNCS(statvfs)
1241 rk_CHECK_VAR(optreset,[#include <stdlib.h>])dnl
1248 #include <sys/types.h>
1249 #include <sys/time.h>
1250 #ifdef HAVE_UNISTD_H
1253 #ifdef HAVE_WINSOCK_H
1254 #include <winsock.h>
1261 AC_HAVE_STRUCT_FIELD(struct dirent, d_type,
1262 [#ifdef HAVE_SYS_TYPES_H
1263 #include <sys/types.h>
1269 dnl Check for sa_len in sys/socket.h
1272 AC_HAVE_STRUCT_FIELD(struct sockaddr,
1274 [#include <sys/types.h>
1275 #include <sys/socket.h>])
1278 dnl Check for sin_len
1281 AC_HAVE_STRUCT_FIELD(struct sockaddr_in,
1283 [#include <sys/types.h>
1284 #include <sys/socket.h>
1285 #ifdef HAVE_NETINET_IN_H
1286 #include <netinet/in.h>
1290 dnl check for strange as stuff on solaris
1293 case "$target_os" in
1295 AC_CACHE_CHECK(if as supports .register, ac_cv_prog_as_register,[
1296 cat > conftest.s <<EOF
1297 .register %g2, #scratch
1298 .register %g3, #scratch
1299 .register %g6, #scratch
1300 .register %g7, #scratch
1302 if $AS conftest.s >/dev/null 2>&1; then
1303 ac_cv_prog_as_register=yes
1305 ac_cv_prog_as_register=no
1307 rm -f conftest.s a.out
1309 if test "$ac_cv_prog_as_register" = "yes"; then
1310 AC_DEFINE([PROG_AS_UNDERSTANDS_REGISTER], 1,
1311 [define this if your as understands .register])
1323 if test "$NNPFS_SUBDIR" = "bsd" -o "$NNPFS_SUBDIR" = "freebsd" ; then
1325 AC_CONFIG_FILES([nnpfs/bsd/Makefile nnpfs/bsd/bin/Makefile nnpfs/freebsd/Makefile])
1327 AC_ELF_OBJECT_FORMAT
1330 AC_CHECK_KERNEL_FUNCS([ \
1341 vfs_opv_init_default \
1342 vfs_opv_init_explicit \
1345 vfs_deallocate_syncvnode \
1353 vnode_pager_generic_putpages \
1354 vnode_pager_generic_getpages \
1355 vnode_pager_setsize \
1366 AC_CHECK_KERNEL_FUNC(memcpy, [0,0,0])
1368 AC_BSD_HEADER_VNODE_IF_H
1370 AC_KERNEL_NEED_PROTO([
1371 #ifdef HAVE_SYS_TYPES_H
1372 #include <sys/types.h>
1374 #ifdef HAVE_SYS_PARAM_H
1375 #include <sys/param.h>
1377 #ifdef HAVE_SYS_TIME_H
1378 #include <sys/time.h>
1380 #ifdef HAVE_SYS_PROC_H
1381 #include <sys/proc.h>
1383 #ifdef HAVE_SYS_VNODE_H
1384 #include <sys/vnode.h>
1389 AC_KERNEL_NEED_PROTO([
1390 #ifdef HAVE_SYS_TYPES_H
1391 #include <sys/types.h>
1393 #ifdef HAVE_SYS_PARAM_H
1394 #include <sys/param.h>
1396 #ifdef HAVE_SYS_TIME_H
1397 #include <sys/time.h>
1399 #ifdef HAVE_SYS_PROC_H
1400 #include <sys/proc.h>
1402 #include <sys/signal.h>
1403 #include <sys/signalvar.h>
1407 AC_KERNEL_NEED_PROTO([
1408 #ifdef HAVE_SYS_TYPES_H
1409 #include <sys/types.h>
1411 #ifdef HAVE_SYS_PARAM_H
1412 #include <sys/param.h>
1414 #ifdef HAVE_SYS_TIME_H
1415 #include <sys/time.h>
1417 #ifdef HAVE_SYS_PROC_H
1418 #include <sys/proc.h>
1420 #ifdef HAVE_SYS_VNODE_H
1421 #include <sys/vnode.h>
1423 #ifdef HAVE_SYS_VFS_PROTO_H
1424 #include <sys/vfs_proto.h>
1429 AC_KERNEL_NEED_PROTO([
1430 #ifdef HAVE_SYS_TYPES_H
1431 #include <sys/types.h>
1433 #ifdef HAVE_SYS_PARAM_H
1434 #include <sys/param.h>
1436 #ifdef HAVE_SYS_LIBKERN_H
1437 #include <sys/libkern.h>
1439 #ifdef HAVE_SYS_SYSTM_H
1440 #include <sys/systm.h>
1445 AC_CHECK_KERNEL_VAR(doforce, int)
1446 AC_CHECK_KERNEL_VAR(aout_sysent, struct sysent*,[#include <sys/systm.h>])
1447 AC_CHECK_KERNEL_VOP_T
1448 AC_BSD_FUNC_VFS_OBJECT_CREATE
1449 AC_BSD_FUNC_VOP_LOCK
1450 AC_BSD_FUNC_VFS_BUSY
1453 AC_BSD_FUNC_VFS_GETNEWFSID
1455 AC_BSD_FUNC_LOCKSTATUS
1456 AC_BSD_FUNC_SELRECORD
1462 dnl Find out if have have proc.p_sigmask
1465 AC_HAVE_STRUCT_FIELD(
1468 [#ifdef HAVE_SYS_TYPES_H
1469 #include <sys/types.h>
1471 #ifdef HAVE_SYS_PARAM_H
1472 #include <sys/param.h>
1474 #ifdef HAVE_SYS_TIME_H
1475 #include <sys/time.h>
1477 #ifdef HAVE_SYS_PROC_H
1478 #include <sys/proc.h>
1481 AC_HAVE_STRUCT_FIELD(
1484 [#ifdef HAVE_SYS_TYPES_H
1485 #include <sys/types.h>
1487 #ifdef HAVE_SYS_PARAM_H
1488 #include <sys/param.h>
1490 #ifdef HAVE_SYS_TIME_H
1491 #include <sys/time.h>
1493 #ifdef HAVE_SYS_PROC_H
1494 #include <sys/proc.h>
1497 AC_HAVE_KERNEL_STRUCT_FIELD([
1498 #ifdef HAVE_SYS_TYPES_H
1499 #include <sys/types.h>
1501 #ifdef HAVE_SYS_PARAM_H
1502 #include <sys/param.h>
1504 #ifdef HAVE_SYS_TIME_H
1505 #include <sys/time.h>
1507 #ifdef HAVE_SYS_PROC_H
1508 #include <sys/proc.h>
1510 #ifdef HAVE_SYS_VNODE_H
1511 #include <sys/vnode.h>
1513 #ifdef HAVE_SYS_MOUNT_H
1514 #include <sys/mount.h>
1521 AC_HAVE_KERNEL_STRUCT_FIELD([
1522 #ifdef HAVE_SYS_TYPES_H
1523 #include <sys/types.h>
1525 #ifdef HAVE_SYS_PARAM_H
1526 #include <sys/param.h>
1528 #ifdef HAVE_SYS_TIME_H
1529 #include <sys/time.h>
1531 #ifdef HAVE_SYS_PROC_H
1532 #include <sys/proc.h>
1534 #ifdef HAVE_SYS_VNODE_H
1535 #include <sys/vnode.h>
1537 #ifdef HAVE_SYS_MOUNT_H
1538 #include <sys/mount.h>
1545 AC_HAVE_KERNEL_STRUCT_FIELD([
1546 #include <sys/types.h>
1547 #include <sys/param.h>
1548 #include <sys/mount.h>
1554 AC_HAVE_KERNEL_STRUCT_FIELD([
1555 #include <sys/types.h>
1556 #include <sys/param.h>
1557 #include <sys/mount.h>
1563 AC_HAVE_KERNEL_STRUCT_FIELD([
1564 #include <sys/types.h>
1565 #ifdef HAVE_SYS_CDEFS_H
1566 #include <sys/cdefs.h>
1568 #include <sys/uio.h>
1574 AC_HAVE_KERNEL_STRUCT_FIELD([
1575 #include <sys/types.h>
1576 #include <sys/param.h>
1577 #include <sys/mount.h>
1580 struct vnodeopv_desc **,
1583 AC_HAVE_KERNEL_STRUCT_FIELD([
1584 #include <sys/types.h>
1585 #include <sys/param.h>
1586 #include <sys/mount.h>
1592 AC_HAVE_KERNEL_STRUCT_FIELD([
1593 #include <sys/types.h>
1594 #include <sys/param.h>
1595 #include <sys/mount.h>
1601 AC_HAVE_KERNEL_STRUCT_FIELD([
1602 #include <sys/types.h>
1603 #include <sys/param.h>
1604 #include <sys/mount.h>
1610 AC_HAVE_KERNEL_STRUCT_FIELD([
1611 #include <sys/types.h>
1612 #include <sys/param.h>
1613 #include <sys/mount.h>
1616 struct sysctl_oid *,
1619 AC_HAVE_KERNEL_STRUCT_FIELD([
1620 #include <sys/types.h>
1621 #include <sys/param.h>
1622 #include <sys/mount.h>
1628 save_test_KERNEL_CFLAGS="$test_KERNEL_CFLAGS"
1629 test_KERNEL_CFLAGS="$test_KERNEL_CFLAGS $BSD_WERROR"
1631 AC_HAVE_KERNEL_STRUCT_FIELD([
1632 #include <sys/types.h>
1633 #include <sys/param.h>
1634 #include <sys/time.h>
1635 #include <sys/proc.h>
1636 #include <sys/mount.h>
1637 typedef int (*mount_type)(struct mount *, const char *, void *, struct nameidata *, struct proc *);
1643 test_KERNEL_CFLAGS="$save_test_KERNEL_CFLAGS"
1645 AC_HAVE_KERNEL_STRUCT_FIELD([
1646 #include <sys/types.h>
1647 #include <sys/param.h>
1648 #include <sys/mount.h>
1654 AC_HAVE_KERNEL_STRUCT_FIELD([
1655 #include <sys/types.h>
1656 #include <sys/param.h>
1657 #include <sys/mount.h>
1663 AC_HAVE_KERNEL_STRUCT_FIELD([
1664 #include <sys/types.h>
1665 #include <sys/param.h>
1666 #include <sys/mount.h>
1672 AC_HAVE_KERNEL_STRUCT_FIELD([
1673 #include <sys/types.h>
1674 #include <sys/param.h>
1675 #include <sys/mount.h>
1681 AC_HAVE_KERNEL_STRUCT_FIELD([
1682 #include <sys/types.h>
1683 #include <sys/param.h>
1684 #include <sys/mount.h>
1690 AC_HAVE_KERNEL_STRUCT_FIELD([
1691 #include <sys/types.h>
1692 #include <sys/param.h>
1693 #include <sys/mount.h>
1699 AC_HAVE_KERNEL_STRUCT_FIELD([
1700 #include <sys/types.h>
1701 #include <sys/param.h>
1702 #include <sys/mount.h>
1708 AC_HAVE_KERNEL_STRUCT_FIELD([
1709 #include <sys/types.h>
1710 #include <sys/systm.h>
1711 #ifdef HAVE_SYS_SYSENT_H
1712 #include <sys/sysent.h>
1719 AC_HAVE_KERNEL_STRUCT_FIELD([
1720 #include <sys/types.h>
1721 #include <sys/systm.h>
1722 #ifdef HAVE_SYS_SYSENT_H
1723 #include <sys/sysent.h>
1730 AC_HAVE_KERNEL_STRUCT_FIELD([
1731 #ifdef HAVE_SYS_TYPES_H
1732 #include <sys/types.h>
1734 #ifdef HAVE_SYS_PARAM_H
1735 #include <sys/param.h>
1737 #ifdef HAVE_SYS_TIME_H
1738 #include <sys/time.h>
1740 #ifdef HAVE_SYS_PROC_H
1741 #include <sys/proc.h>
1743 #ifdef HAVE_SYS_VNODE_H
1744 #include <sys/vnode.h>
1746 #ifdef HAVE_SYS_MOUNT_H
1747 #include <sys/mount.h>
1754 AC_HAVE_KERNEL_STRUCT_FIELD([
1755 #include <sys/types.h>
1756 #include <sys/param.h>
1757 #include <sys/vnode.h>
1763 AC_HAVE_KERNEL_STRUCT_FIELD([
1764 #include <sys/types.h>
1765 #include <sys/param.h>
1766 #include <sys/vnode.h>
1772 AC_HAVE_KERNEL_STRUCT_FIELD([
1773 #include <sys/types.h>
1774 #include <sys/param.h>
1775 #include <sys/vnode.h>
1781 AC_HAVE_KERNEL_DEF([
1782 #ifdef HAVE_SYS_TYPES_H
1783 #include <sys/types.h>
1785 #ifdef HAVE_SYS_PARAM_H
1786 #include <sys/param.h>
1788 #ifdef HAVE_SYS_MOUNT_H
1789 #include <sys/mount.h>
1791 #ifdef HAVE_SYS_TIME_H
1792 #include <sys/time.h>
1794 #ifdef HAVE_SYS_PROC_H
1795 #include <sys/proc.h>
1797 #ifdef HAVE_SYS_SA_H
1800 #ifdef HAVE_SYS_SYSPROTO_H
1801 #include <sys/sysproto.h>
1803 #ifdef HAVE_SYS_SYSCALLARGS_H
1804 #include <sys/syscallargs.h>
1807 struct setgroups_args)
1809 AC_HAVE_KERNEL_DEF([
1810 #ifdef HAVE_SYS_TYPES_H
1811 #include <sys/types.h>
1813 #ifdef HAVE_SYS_PARAM_H
1814 #include <sys/param.h>
1816 #ifdef HAVE_SYS_MOUNT_H
1817 #include <sys/mount.h>
1819 #ifdef HAVE_SYS_TIME_H
1820 #include <sys/time.h>
1822 #ifdef HAVE_SYS_PROC_H
1823 #include <sys/proc.h>
1825 #ifdef HAVE_SYS_SA_H
1828 #ifdef HAVE_SYS_SYSPROTO_H
1829 #include <sys/sysproto.h>
1831 #ifdef HAVE_SYS_SYSCALLARGS_H
1832 #include <sys/syscallargs.h>
1835 struct sys_setgroups_args)
1837 AC_HAVE_KERNEL_STRUCT_FIELD([
1838 #include <sys/types.h>
1839 #include <sys/time.h>
1840 #ifdef HAVE_SYS_CDEFS_H
1841 #include <sys/cdefs.h>
1843 #include <sys/conf.h>
1849 AC_HAVE_KERNEL_STRUCT_FIELD([
1850 #include <sys/types.h>
1851 #include <sys/time.h>
1852 #ifdef HAVE_SYS_CDEFS_H
1853 #include <sys/cdefs.h>
1855 #include <sys/conf.h>
1861 AC_HAVE_KERNEL_STRUCT_FIELD([
1862 #include <sys/types.h>
1863 #include <sys/time.h>
1864 #ifdef HAVE_SYS_CDEFS_H
1865 #include <sys/cdefs.h>
1867 #include <sys/conf.h>
1873 AC_HAVE_KERNEL_STRUCT_FIELD([
1874 #include <sys/types.h>
1875 #include <sys/time.h>
1876 #ifdef HAVE_SYS_CDEFS_H
1877 #include <sys/cdefs.h>
1879 #include <sys/conf.h>
1885 AC_HAVE_KERNEL_STRUCT_FIELD([
1886 #include <sys/types.h>
1887 #include <sys/time.h>
1888 #ifdef HAVE_SYS_CDEFS_H
1889 #include <sys/cdefs.h>
1891 #include <sys/conf.h>
1897 AC_HAVE_KERNEL_STRUCT_FIELD([
1898 #include <sys/types.h>
1899 #include <sys/time.h>
1900 #ifdef HAVE_SYS_CDEFS_H
1901 #include <sys/cdefs.h>
1903 #include <sys/conf.h>
1909 AC_HAVE_KERNEL_STRUCT_FIELD([
1910 #include <sys/types.h>
1911 #include <sys/time.h>
1912 #ifdef HAVE_SYS_CDEFS_H
1913 #include <sys/cdefs.h>
1915 #include <sys/conf.h>
1921 AC_HAVE_KERNEL_STRUCT_FIELD([
1922 #include <sys/types.h>
1923 #include <sys/time.h>
1924 #ifdef HAVE_SYS_CDEFS_H
1925 #include <sys/cdefs.h>
1927 #include <sys/conf.h>
1933 AC_HAVE_KERNEL_STRUCT_FIELD([
1934 #include <sys/types.h>
1935 #include <sys/time.h>
1936 #ifdef HAVE_SYS_CDEFS_H
1937 #include <sys/cdefs.h>
1939 #include <sys/conf.h>
1945 AC_HAVE_KERNEL_STRUCT_FIELD([
1946 #include <sys/types.h>
1947 #include <sys/time.h>
1948 #ifdef HAVE_SYS_CDEFS_H
1949 #include <sys/cdefs.h>
1951 #include <sys/conf.h>
1957 AC_HAVE_KERNEL_STRUCT_FIELD([
1958 #include <sys/types.h>
1959 #include <sys/time.h>
1960 #ifdef HAVE_SYS_CDEFS_H
1961 #include <sys/cdefs.h>
1963 #include <sys/conf.h>
1969 AC_HAVE_KERNEL_STRUCT_FIELD([
1970 #include <sys/types.h>
1971 #include <sys/time.h>
1972 #ifdef HAVE_SYS_CDEFS_H
1973 #include <sys/cdefs.h>
1975 #include <sys/conf.h>
1981 AC_HAVE_KERNEL_STRUCT_FIELD([
1982 #include <sys/types.h>
1983 #include <sys/time.h>
1984 #ifdef HAVE_SYS_CDEFS_H
1985 #include <sys/cdefs.h>
1987 #include <sys/conf.h>
1993 AC_HAVE_KERNEL_STRUCT_FIELD([
1994 #include <sys/types.h>
1995 #ifdef HAVE_SYS_CDEFS_H
1996 #include <sys/cdefs.h>
1998 #include <sys/uio.h>
1999 #include <sys/namei.h>
2005 AC_CHECK_BSD_UVM_ONLY
2011 elif test "$NNPFS_SUBDIR" = "linux"; then
2013 AC_CONFIG_FILES([nnpfs/linux/Makefile nnpfs/linux/bin/Makefile])
2015 dnl Linux devfs check
2016 AC_CHECK_HEADERS(linux/devfs_fs.h linux/stddef.h)
2018 AC_HAVE_KERNEL_STRUCT_FIELD([
2020 #include <asm/current.h>
2021 #include <linux/fs.h>
2027 AC_HAVE_LINUX_KERNEL_TYPES(int8_t int16_t int32_t int64_t)
2028 AC_HAVE_LINUX_KERNEL_TYPES(uint8_t uint16_t uint32_t uint64_t)
2030 AC_LINUX_FUNC_INIT_MUTEX
2031 AC_LINUX_GETATTR_THREE_ARGS
2033 elif test "$NNPFS_SUBDIR" = "solaris"; then
2035 AC_CONFIG_FILES([nnpfs/solaris/Makefile nnpfs/solaris/bin/Makefile])
2037 AC_HAVE_KERNEL_STRUCT_FIELD([
2038 #include <sys/types.h>
2039 #include <sys/vfs.h>
2040 typedef void (*freevfs_type)(struct vfs *);
2046 elif test "$NNPFS_SUBDIR" = "irix"; then
2048 AC_CONFIG_FILES([nnpfs/irix/Makefile nnpfs/irix/bin/Makefile])
2050 elif test "$NNPFS_SUBDIR" = "aix"; then
2052 AC_CONFIG_FILES([nnpfs/aix/Makefile nnpfs/aix/bin/Makefile])
2054 fi # end of OS-specific tests
2057 dnl Global kernel checks
2060 AC_CHECK_KERNEL_FUNCS(strlcpy)
2063 dnl Arla configuration. Default values, overrided below if needed
2066 arla_AC_SUBST_VALUE(ARLA_CONF_HIGHVNODES,4000)
2067 arla_AC_SUBST_VALUE(ARLA_CONF_LOWVNODES,3000)
2068 arla_AC_SUBST_VALUE(ARLA_CONF_HIGHBYTES,1400M)
2069 arla_AC_SUBST_VALUE(ARLA_CONF_LOWBYTES,700M)
2071 dnl override section
2073 case "$target_os" in
2075 ARLA_CONF_HIGHVNODES=40000
2076 ARLA_CONF_LOWVNODES=30000
2081 # Libtool vs automake stuff
2084 LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's/\.o/\.lo/g'`
2087 AH_BOTTOM([#ifdef ROKEN_RENAME
2088 #include "roken_rename.h"
2093 AC_OUTPUT(Makefile \
2104 appl/aafs/Makefile \
2105 appl/aafs-perl/Makefile \
2106 appl/kalog/Makefile \
2107 appl/afsmgr/Makefile \
2108 appl/afsutils/Makefile \
2109 appl/amon/Makefile \
2110 appl/afstool/Makefile \
2113 appl/perf/Makefile \
2114 appl/udebug/Makefile \
2118 appl/mac/install/Info.plist \
2119 appl/mac/Arla_Configuration/Makefile \
2120 appl/mac/Arla_Configuration/Info.plist \
2121 appl/mac/arlacmm/Makefile \
2122 appl/mac/mafslog/Makefile \
2125 lib/roken/Makefile \
2127 lib/editline/Makefile \
2130 lib/bufdir/Makefile \
2135 tools/gnats/Makefile \
2136 tools/release-tools/Makefile \
2138 milko/lib/Makefile \
2139 milko/lib/vstatus/Makefile \
2140 milko/lib/dpart/Makefile \
2141 milko/lib/voldb/Makefile \
2142 milko/lib/vld/Makefile \
2143 milko/lib/ropa/Makefile \
2144 milko/lib/msecurity/Makefile \
2145 milko/lib/mlog/Makefile \
2146 milko/lib/mdb/Makefile \
2147 milko/appl/Makefile \
2148 milko/appl/sked/Makefile \
2149 milko/appl/bootstrap/Makefile \
2151 milko/vldb/Makefile \
2152 milko/pts/Makefile \
2153 milko/bos/Makefile \
2156 AC_KRB_VERSION(arla)