1 AC_REVISION($Revision$)dnl
3 AC_INIT(arla, 0.91pre, [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}
149 [ --with-sys=dir use dir as your kernel source code directory
150 default $default_sys],
152 [SYS="$default_sys"])
155 AC_ARG_WITH(kernel-obj,
156 [ --with-kernel-obj=dir use dir as your kernel build directory (used on
157 FreeBSD to find your actual kernel parameters)],
158 [FBSDKERNBUILDDIR=KERNBUILDDIR\=$withval],
160 AC_SUBST(FBSDKERNBUILDDIR)
162 AC_ARG_WITH(bsd-make,
163 [ --with-bsd-make=prog when using a bsd and cross compiling we need
164 to know your make, default /usr/bin/make],
166 [BSDMAKE="/usr/bin/make"])
170 nnpfs_target="$target_os"
172 [ --disable-nnpfs build arla w/o nnpfs],
173 [if test "$enableval" = "no" ; then
174 nnpfs_target="without_nnpfs";
177 AC_MSG_CHECKING(for kernel stuff)
178 case "$nnpfs_target" in
180 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/sunos
181 KERNEL_SRCS='sunos-subr.c'
185 AC_MSG_RESULT(SunOS 4.1.x)
188 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/solaris
189 KERNEL_SRCS='solaris-subr.c'
193 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_KERNEL"
194 AC_MSG_RESULT(Solaris)
195 case "$target_cpu" in
196 sparc64) AC_DEFINE(NEED_VICEIOCTL32, 1,
197 [define if you need 32 bit compat pioctl])
198 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_SYSCALL32 -D_SYSCALL32_IMPL"
203 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/irix
204 KERNEL_SRCS='irix-subr.c'
206 ip=`hinv -c processor | awk '$4 ~ /IP/ { print $4}'`
207 cpu=`hinv -t cpu | awk '{print $3}'`
208 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D$ip -D$cpu -DR4000"
213 AC_DEFINE(IRIX_64, 1, [define this if on Irix6.4 or higher]) ;;
218 KERNEL_SRCS='hpux-subr.c'
221 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
222 AC_MSG_WARN(No kernel support for $target_os, compiling only user-level stuff)
225 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/aix
226 KERNEL_SRCS='aix-subr.c'
232 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
233 KERNEL_SRCS='bsd-subr.c'
235 AC_WERROR(BSD_WERROR)
237 cat > conftest.mk << END
238 .include <bsd.lkm.mk>
239 .if defined(UVM) && (\${UVM} != "no")
246 @echo \$(CFLAGS) \$(CPPFLAGS)
248 ac_out=`$BSDMAKE S=$SYS -f conftest.mk echo 2> /dev/null`
253 -I*) if test "$i" != -I. -a "$i" != "-I`pwd`"; then
254 incl="$incl${incl:+ }$i"
257 -D*) defs="$defs${defs:+ }$i" ;;
258 -m*) flags="$flags${flags:+ }$i" ;;
259 -f*) flags="$flags${flags:+ }$i" ;;
263 ## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
264 # make sure we compile with -mno-fp-regs on alpha
265 if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
267 flags="$flags${flags:+ }-mno-fp-regs"
269 if test `uname -m` = pmax
271 KERNEL_CFLAGS="${KERNEL_CFLAGS} -G 0 -mno-abicalls -mno-half-pic"
272 KERNEL_LDFLAGS="${KERNEL_LDFLAGS} -G 0 -Ttext 0x80030000 -T ${SYS}/arch/mips/conf/kern.ldscript"
274 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -D_LKM"
275 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
276 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
278 if test `uname -m` = pmax
280 ac_kernel_ld='${KERNEL_LD} ${KERNEL_LDFLAGS} -o conftest $LDFLAGS -R $KERNEL conftest.o -e _foo 1>&5'
283 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'
288 AC_MSG_RESULT(OpenBSD)
290 netbsd* | netbsdelf*)
291 AC_WERROR(BSD_WERROR)
292 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
293 KERNEL_SRCS='bsd-subr.c'
296 cat > conftest.mk << END
297 .include <bsd.kmod.mk>
305 @echo \$(CFLAGS) \$(CPPFLAGS)
307 ac_out=`$BSDMAKE S=$SYS -f conftest.mk echo 2> /dev/null`
310 set X $ac_out ; shift
311 while test $# != 0; do
314 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
315 incl="$incl${incl:+ }$1"
320 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
321 incl="$incl${incl:+ }-isystem $1"
325 -D*) defs="$defs${defs:+ }$1" ;;
326 -m*) flags="$flags${flags:+ }$1" ;;
327 -f*) flags="$flags${flags:+ }$1" ;;
332 ## -DKERNEL -DLKM -DACTUALLY_LKM_NOT_KERNEL ??
333 # make sure we compile with -mno-fp-regs on alpha
334 if test `uname -m` = alpha -a `expr "$flags" : ".*-mno-fp-regs"` -eq 0
336 flags="$flags${flags:+ }-mno-fp-regs"
338 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $defs${defs:+ }$flags${flags:+ }$incl"
339 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
341 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'
348 dnl Ok, lets build the symlinks the lkm needs
349 dnl First make sure the directory and file exists
350 dnl Then run make depend to create the symlinks
351 dnl And a last thing in this ugly hack, add a -I to that directory
353 test -d include/netbsd-lkm || \
354 "$srcdir"/mkinstalldirs include/netbsd-lkm > /dev/null 2>/dev/null
356 kakasrcdir=`cd $srcdir && pwd`
358 (cd include/netbsd-lkm && \
359 $BSDMAKE S="$SYS" foosrc=$kakasrcdir/include/netbsd-lkm \
360 -f "$kakasrcdir"/include/netbsd-lkm/Makefile depend>/dev/null)
362 KERNEL_CPPFLAGS="$KERNEL_CPPFLAGS -I`pwd`/include/netbsd-lkm"
364 if test "X$smp" != "Xno" -a "X$smp" != "X"; then
365 KERNEL_CPPFLAGS="$KERNEL_CPPFLAGS -DMULTIPROCESSOR"
368 AC_MSG_RESULT(NetBSD)
371 AC_WERROR(BSD_WERROR)
372 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
373 KERNEL_SRCS='bsd-subr.c'
378 if test "X$smp" != "Xno" -a "X$xmp" != "X"; then
384 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-O"
385 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DVFS_KLD -DKLD_MODULE -I$SYS/arch -I$SYS -I."
389 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'
392 AC_MSG_RESULT(DragonFly)
394 freebsd[[56789]]* | freebsdelf[[56789]]*)
395 AC_MSG_RESULT([FreeBSD [[56789]].x])
396 KERNEL=`sysctl -n kern.bootfile`
397 AC_WERROR(BSD_WERROR)
399 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
400 KERNEL_SRCS='bsd-subr.c'
402 KERNEL=`sysctl -n kern.bootfile`
404 cat > conftest.mk << END
407 .include <bsd.kmod.mk>
409 @echo \$(CFLAGS) \$(CPPFLAGS)
411 ac_out=`$BSDMAKE SYSDIR=$SYS -f conftest.mk echo 2> /dev/null`
414 set X $ac_out ; shift
415 while test $# != 0; do
418 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
419 incl="$incl${incl:+ }$1"
424 if test "$1" != -I. -a "$1" != "-I`pwd`"; then
425 incl="$incl${incl:+ }-isystem $1"
429 -D*) defs="$defs${defs:+ }$1" ;;
430 -m*) flags="$flags${flags:+ }$1" ;;
431 -f*) flags="$flags${flags:+ }$1" ;;
436 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -I. $defs${defs:+ }$flags${flags:+ }$incl"
437 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
442 freebsd[[34]]* | freebsdelf[[34]]*)
443 AC_MSG_RESULT([FreeBSD [[34]].x])
444 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
445 KERNEL_SRCS='bsd-subr.c'
447 KERNEL=`sysctl -n kern.bootfile`
448 AC_WERROR(BSD_WERROR)
449 AC_MSG_CHECKING(for kernel object format)
451 case `file $KERNEL 2>/dev/null` in
452 *ELF*) kernobjformat=elf ;;
454 AC_MSG_RESULT($kernobjformat)
456 AC_MSG_CHECKING(for kld)
457 dnl Default to kld if freebsd4.0
460 if test "X$kld" = "X"; then
463 if test "X$smp" != "Xno" -a "X$xmp" != "X"; then
470 AC_SUBST(FREEBSD_GENSETDEFS)
472 dnl Or if the kernel is ELF
473 case "$kernobjformat" in
475 if test "X$kld" = "X"; then
480 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-O"
481 if test `uname -m` = alpha -a `expr X"$KERNEL_CFLAGS" : ".*-mno-fp-regs"` -eq 0
483 KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-mno-fp-regs"
485 if test "$kld" = "yes"; then
486 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DVFS_KLD -DKLD_MODULE -I$SYS/arch -I$SYS -I."
487 test_KERNEL_CFLAGS="-$kernobjformat ${KERNEL_CFLAGS}"
489 case "$kernobjformat" in
490 aout) extra_LDFLAGS="-A" ;;
491 elf) extra_LDFLAGS="-R" ;;
492 *) AC_MSG_ERROR([Unknown object format $kernobjformat])
494 ac_kernel_ld='${LD-ld} -$kernobjformat -o conftest $LDFLAGS $extra_LDFLAGS $KERNEL conftest.o -e _foo 1>&AC_FD_CC'
498 if test "$kernobjformat" != "aout"; then
499 AC_MSG_WARN([You cannot build LKMs against $kernobjformat kernels])
501 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} $smp -DKERNEL -D_KERNEL -DLKM -D_LKM -DVFS_LKM -DACTUALLY_LKM_NOT_KERNEL -I$SYS/arch -I$SYS -I."
502 test_KERNEL_CFLAGS="-aout ${KERNEL_CFLAGS}"
504 ac_kernel_ld='${LD-ld} -aout -o conftest $LDFLAGS -A $KERNEL conftest.o -e _foo 1>&AC_FD_CC'
510 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'
517 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/bsd
518 KERNEL_SRCS='bsd-subr.c'
521 case "$nnpfs_target" in
522 darwin6.*) COM_APPLE_KERNEL_BSD="6.0" ;;
523 darwin7.*) COM_APPLE_KERNEL_BSD="6.0" ;;
524 darwin8.*) COM_APPLE_KERNEL_BSD="6.0" ;;
525 darwin*) COM_APPLE_KERNEL_BSD="1.1" ;;
526 *) AC_MSG_ERROR([Unknown kernel version])
528 AC_CONFIG_FILES([nnpfs/bsd/Info.plist])
530 AC_SUBST(COM_APPLE_KERNEL_BSD)
532 ac_cv_func_mmap_fixed_mapped=no dnl disable mmap for darwin
534 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -DKERNEL -D_KERNEL -I/System/Library/Frameworks/Kernel.framework/Headers -static -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API"
535 case "$nnpfs_target" in
539 KERNEL_CPPFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
540 CPPFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
541 CFLAGS="${KERNEL_CPPFLAGS} -traditional-cpp"
545 YDR_CPPFLAGS="-traditional-cpp"
547 LDFLAGS="${LDFLAGS} -flat_namespace"
548 KERNEL_CFLAGS="${KERNEL_CFLAGS} -fno-common -Wno-format -pipe -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch -fno-builtin"
549 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
557 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'
559 AC_DEFINE([BIND_8_COMPAT], 1,
560 [Define to pull in bind8 glue for darwin.])
565 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/linux
566 KERNEL_SRCS='bsd-subr.c'
569 if test "X$smp" = "Xno"; then
573 KERNEL_CPPFLAGS="-I$SYS/include -DMODULE -D__KERNEL__ $smp ${KERNEL_CPPFLAGS} "
574 case "$target_cpu" in
576 KERNEL_CC=${KERNEL_CC:-$CC}
577 KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fp-regs -ffixed-8" ;;
579 KERNEL_CFLAGS="${KERNEL_CFLAGS} -mno-fpu -ffixed-g4 -fcall-used-g5 -fcall-used-g7"
580 KERNEL_LD_FLAGS="-m elf64_sparc"
581 KERNEL_CC=${KERNEL_CC:-sparc64-linux-gcc}
582 AC_DEFINE(NEED_VICEIOCTL32, 1,
583 [define if you need 32 bit compat pioctl]) ;;
586 KERNEL_CC=${KERNEL_CC:-$CC} ;;
588 KERNEL_CC=${KERNEL_CC:-$CC} ;;
590 test_KERNEL_CFLAGS="${KERNEL_CFLAGS}"
595 AC_MSG_RESULT(mingw32)
596 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
597 KERNEL_SRCS=unknown-subr.c
603 AC_MSG_RESULT(cygwin/VC)
604 AC_MSG_WARN([No kernel support for NT])
605 if test "$with_pthreads" = "windows"; then
606 AC_MSG_WARN([Using LWP on windows native threads])
611 PLWP_INC_FLAGS="-DWINDOWS_THREADS_LWP"
613 AC_MSG_WARN([Using LWP on asm threads or pthreads])
615 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
616 KERNEL_SRCS=unknown-subr.c
623 if test "$nnpfs_target" != "without_nnpfs"; then
624 AC_MSG_WARN([No kernel support for $target_os, compiling only user-level stuff])
626 KERNEL_INCLUDE=-I`(cd $srcdir; pwd)`/nnpfs/unknown
627 KERNEL_SRCS=unknown-subr.c
634 dnl ydr need special flags
635 AC_SUBST(YDR_CPPFLAGS)
638 AM_CONDITIONAL(DFLY, expr "$target_os" : "dragonfly.*" >/dev/null 2>&1)
641 AM_CONDITIONAL(FBSD5, test X"$FREEBSD5" = Xyes)
643 dnl are we linux-ia64
644 AM_CONDITIONAL(LINUX_IA64, test X"$LINUX_IA64" = Xyes)
646 dnl support for native readdir
647 AM_CONDITIONAL(NNPFS_AFS_READDIR, false)
651 AM_CONDITIONAL(DCE, false)
652 AM_CONDITIONAL(MACOSX, test `expr "$nnpfs_target" : darwin` != 0)
654 AC_ARG_WITH(lwp-redzone,
655 [ --without-lwp-redzone don't use redzone for (asm)lwp],
656 [lwpredzone=$withval],
659 AM_CONDITIONAL(LWP_REDZONE, test X$lwpredzone != Xno)
661 # Check where to put the cache
663 AC_ARG_WITH(arlacachedir,
664 [ --with-arlacachedir=dir use dir as cachedir instead of \$prefix/cache],
665 [ARLACACHEDIR=$withval],
666 [ARLACACHEDIR='${prefix}/cache'])
668 # Check where to find the configuration
670 AC_ARG_WITH(arlaconffile,
671 [ --with-arlaconffile=file use file for configuration instead of \$prefix/etc/arla.conf],
672 [ARLACONFFILE=$withval],
673 [ARLACONFFILE='${sysconfdir}/arla.conf'])
675 # Check where to store partitions
677 AC_ARG_WITH(milkopart,
678 [ --with-milkopart=dir location of milko partitions (default /)],
679 [MILKO_ROOT='-DMILKO_ROOT=\"$withval\"'],
680 [MILKO_ROOT='-DMILKO_ROOT=\"/\"'])
686 [ --enable-knfs make afs nfs-mountable],
687 [ARLA_KNFS="-DARLA_KNFS"])
692 dnl If we want to use pthreads
695 AC_SUBST(LWP_PROCESS)
696 AC_SUBST(PLWP_LIB_FLAGS)
697 AC_SUBST(PLWP_INC_FLAGS)
706 dnl AC_CHECK_TYPE(nlink_t, int)
709 dnl Tests for readline/editline
712 rk_TEST_PACKAGE(readline,
714 #include <readline.h>],-lreadline,,, READLINE)
716 if test "$with_readline" = "no"; then
717 AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses)
718 if test "$ac_cv_funclib_tgetent" = "no"; then
719 AC_MSG_ERROR([Could not find tgetent, needed by edit/editline])
721 AC_FIND_FUNC_NO_LIBS(readline, editline edit readline, [], [], [$LIB_tgetent])
722 if test "$ac_cv_func_readline" = "no"; then
723 AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
724 if test "$ac_cv_func_el_init" = yes; then
725 editline_OBJS=edit_compat.o
726 LIB_readline='-L'`pwd`'/lib/editline -leditline '"$LIB_el_init";
727 INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
729 editline_OBJS="editline.o complete.o sysunix.o"
730 LIB_readline='-L'`pwd`'/lib/editline -leditline'
731 INCLUDE_readline='-I'`pwd`'/lib/editline -I$(top_srcdir)/lib/editline'
735 AC_DEFINE(HAVE_READLINE, 1, [define if you have a function readline])
737 LIB_readline_ac="$LIB_readline $LIB_tgetent"
738 LIB_readline="$LIB_readline \$(LIB_tgetent)"
745 [ --disable-mmap don't use mmap],
746 [if test "$enableval" = "no"; then
747 ac_cv_func_mmap_fixed_mapped=no
751 AC_ARG_ENABLE(dynamic-afs,
752 [ --disable-dynamic-afs don't use loaded AFS library with AIX],[
753 if test "$enableval" = "no"; then
759 AC_ARG_ENABLE(linux-syscall,
760 AC_HELP_STRING([--disable-linux-syscall],[don't modify the syscall table on linux]),
761 [if test "$enableval" = "no" ; then
764 if test "$syscallhack" = "yes"; then
765 AC_DEFINE(SYSCALLHACK, 1, [define to enable syscall table modification on linux])
769 AC_ARG_ENABLE(linux-group-pags,
770 AC_HELP_STRING([--disable-linux-group-pags],[don't use groups for pags on linux]),
771 [if test "$enableval" = "no" ; then
774 if test "$grouppags" = "yes"; then
775 AC_DEFINE(GROUPPAGS, 1, [define to enable groups-based pags on linux])
781 AC_SUBST(LIB_readline)
782 AC_SUBST(INCLUDE_readline)
783 AC_SUBST(editline_OBJS)dnl
784 if test "$editline_OBJS" != ""; then
785 editline_dir=editline
787 AC_SUBST(editline_dir)
792 AC_SUBST(KERNEL_INCLUDE)
793 AC_SUBST(KERNEL_SRCS)
794 AC_SUBST(KERNEL_HDRS)
795 AC_SUBST(KERNEL_CPPFLAGS)
796 AC_SUBST(KERNEL_CFLAGS)
797 AC_SUBST(KERNEL_LD_FLAGS)
803 AC_SUBST(NNPFS_SUBDIR)
806 AC_SUBST(ARLACACHEDIR)
807 AC_SUBST(ARLACONFFILE)
812 dnl Various checks for headers and their contents
842 netinet/in6_machtypes.h \
899 AC_CHECK_HEADERS([net/if.h], , , [AC_INCLUDES_DEFAULT
900 #if HAVE_SYS_SOCKET_H
901 #include <sys/socket.h>
904 AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT
905 #ifdef HAVE_NETINET6_IN6_H
906 #include <netinet6/in6.h>
915 ], , , [AC_INCLUDES_DEFAULT
916 #ifdef HAVE_SYS_PARAM_H
917 #include <sys/param.h>
923 ], , , [AC_INCLUDES_DEFAULT
924 #ifdef HAVE_SYS_PARAM_H
925 #include <sys/param.h>
927 #ifdef HAVE_SYS_MOUNT_H
928 #include <sys/mount.h>
935 AC_CHECK_HEADERS([resolv.h], , , [AC_INCLUDES_DEFAULT
936 #ifdef HAVE_SYS_TYPES_H
937 #include <sys/types.h>
939 #ifdef HAVE_NETINET_IN_H
940 #include <netinet/in.h>
942 #ifdef HAVE_ARPA_NAMESER_H
943 #include <arpa/nameser.h>
950 dnl These need to before roken checks
953 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
954 AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
955 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
956 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
957 AM_CONDITIONAL(have_glob_h, test "$ac_cv_header_glob_h" = yes)
958 AM_CONDITIONAL(do_roken_rename, true)
961 dnl and this is for kernel header files
964 save_CPPFLAGS="${CPPFLAGS}"
965 CPPFLAGS="${KERNEL_CPPFLAGS}"
968 miscfs/genfs/genfs.h \
969 miscfs/syncfs/syncfs.h \
980 CPPFLAGS="${save_CPPFLAGS}"
984 dnl Check for endian-ness
1001 dnl Check for __FUNCTION__
1007 dnl Check for __attribute__
1016 AC_ENABLE_SHARED(no)
1022 # It is said that the kerberos junk needs to be after ac_check_roken,
1023 # but I didn't notice that, so we include some to have a good place
1024 # to check for existing roken in
1027 AC_CHECK_KERBEROS(54auto)
1029 #end krb, continue roken stuff
1033 # oh, and put sl here, too
1037 if test "X$ac_cv_arla_with_roken" = "Xyes" ; then
1039 #LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
1041 dnl inlined parts of rk_ROKEN, seems to be needed by sl and rx sometimes.
1052 AM_CONDITIONAL(ARLA_LOCAL_ROKEN, test X$ac_cv_arla_with_roken = Xyes)
1056 if test "X$ac_cv_found_krb5" = "Xyes" ; then
1057 RXKAD_LIBS_extra="$RXKAD_LIBS_extra $KRB5_LIB_FLAGS"
1060 if test "X$RXKAD_LIBS_extra" != "X" ; then
1061 RXKAD_LIBS="\$(top_builddir)/rxkad/librxkad.la $RXKAD_LIBS_extra"
1063 AM_CONDITIONAL(RXKAD, test "X$RXKAD_LIBS_extra" != "X")
1065 dnl AC_TYPE_KRB_PRINCIPAL
1066 dnl AC_FUNC_KRB_GET_ERR_TEXT
1067 dnl AC_FUNC_KRB_GET_DEFAULT_TKT_ROOT
1068 dnl AC_FUNC_KRB_GET_DEFAULT_PRINCIPAL
1069 dnl AC_FUNC_KRB_KDCTIMEOFDAY
1070 AC_FUNC_KAFS_SETTOKEN_RXKAD
1076 dnl AC_FIND_FUNC_NO_LIBS2(tf_init, "", , , [$KRB4_LIB_FLAGS])
1078 dnl if test "$ac_cv_func_tf_init" = yes; then
1079 dnl APPL_SUBDIRS="$APPL_SUBDIRS kalog"
1084 dnl Check for strange operating systems that you need to handle differently
1089 if test "$krb_cv_sys_aix" = yes ;then
1090 if test "$aix_dynamic_afs" = yes; then
1091 AFS_EXTRA_OBJS='$(srcdir)/afsl.exp dlfcn.o'
1092 AFS_EXTRA_LIBS=afslib.so
1093 # this works differently in AIX <=3 and 4
1094 if test `uname -v` = 4 ; then
1095 AFS_EXTRA_LD="-bnoentry"
1097 AFS_EXTRA_LD="-e _nostart"
1100 AIX_EXTRA_KAFS="-lld"
1102 AFS_EXTRA_OBJS='$(srcdir)/afsl.exp afslib.o'
1104 AFS_EXTRA_DEFS='-DSTATIC_AFS_SYSCALLS'
1107 AC_SUBST(AFS_EXTRA_OBJS)dnl
1108 AC_SUBST(AFS_EXTRA_LIBS)dnl
1109 AC_SUBST(AFS_EXTRA_LD)dnl
1110 AC_SUBST(AFS_EXTRA_DEFS)dnl
1111 AC_SUBST(AIX_EXTRA_KAFS)dnl
1115 dnl Check for struct winsize
1118 AC_KRB_STRUCT_WINSIZE
1121 dnl Various checks for libraries and their contents
1124 AC_FIND_FUNC(syslog, syslog)
1127 dnl System V is have misplaced the socket routines, should really be in libc
1130 AC_FIND_FUNC(socket, socket)
1131 AC_FIND_FUNC(gethostbyname, nsl)
1132 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
1134 dnl we don't actually use v6 functions in this code, but some generic
1135 dnl functions such as getnameinfo et al can reside in libraries that are
1136 dnl found by this macro
1140 AC_FIND_FUNC(res_search, resolv,
1143 #ifdef HAVE_SYS_TYPES_H
1144 #include <sys/types.h>
1146 #ifdef HAVE_NETINET_IN_H
1147 #include <netinet/in.h>
1149 #ifdef HAVE_ARPA_NAMESER_H
1150 #include <arpa/nameser.h>
1152 #ifdef HAVE_RESOLV_H
1158 AC_FIND_FUNC(res_init, resolv,
1161 #ifdef HAVE_SYS_TYPES_H
1162 #include <sys/types.h>
1164 #ifdef HAVE_NETINET_IN_H
1165 #include <netinet/in.h>
1167 #ifdef HAVE_ARPA_NAMESER_H
1168 #include <arpa/nameser.h>
1170 #ifdef HAVE_RESOLV_H
1176 AC_FIND_FUNC(dn_expand, resolv,
1179 #ifdef HAVE_SYS_TYPES_H
1180 #include <sys/types.h>
1182 #ifdef HAVE_NETINET_IN_H
1183 #include <netinet/in.h>
1185 #ifdef HAVE_ARPA_NAMESER_H
1186 #include <arpa/nameser.h>
1188 #ifdef HAVE_RESOLV_H
1196 AC_CHECK_FUNCS(strtoll strtoq getrusage thr_yield)
1198 AC_EGREP_HEADER(sigaction, signal.h,
1199 AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [define if you have sigaction]))
1201 save_CPPFLAGS="${CPPFLAGS}"
1202 AC_HAVE_TYPES([int8_t int16_t int32_t int64_t])
1203 AC_HAVE_TYPES([int16 int32])
1204 AC_HAVE_TYPES([u_int8_t u_int16_t u_int32_t u_int64_t])
1205 AC_HAVE_TYPES([uint8_t uint16_t uint32_t uint64_t])
1206 AC_HAVE_TYPES([u_int16 u_int32])
1207 AC_HAVE_TYPES([bool ssize_t])
1208 AC_HAVE_TYPES([register_t]) dnl really only needed for bsd nnpfs
1209 AC_HAVE_TYPES([uintptr_t]) dnl really only needed for bsd nnpfs
1210 AC_HAVE_TYPES([intptr_t])
1211 AC_HAVE_TYPES([off64_t])
1212 AC_CHECK_HEADERS([ktypes.h com_err.h et/com_err.h])
1213 COMERR_CPPFLAGS="$CPPFLAGS"
1214 AC_SUBST(COMERR_CPPFLAGS)
1215 CPPFLAGS="${save_CPPFLAGS}"
1220 dnl check for old libkafs
1223 dnl AC_FIND_FUNC_NO_LIBS2(krb_afslog_uid, "", , , [$KAFS_LIBS $KRB4_LIB_FLAGS])
1226 AC_CHECK_FUNC(localtime_r,[
1227 AC_DEFINE([HAVE_LOCALTIME_R], 1, [define if there exists a localtime_r])])
1233 AC_CHECK_FUNCS(getfh fhopen)
1235 AC_CHECK_FUNCS(getattrlist setattrlist)
1237 AC_CHECK_FUNCS(statvfs)
1239 rk_CHECK_VAR(optreset,[#include <stdlib.h>])dnl
1246 #include <sys/types.h>
1247 #include <sys/time.h>
1248 #ifdef HAVE_UNISTD_H
1251 #ifdef HAVE_WINSOCK_H
1252 #include <winsock.h>
1259 AC_HAVE_STRUCT_FIELD(struct dirent, d_type,
1260 [#ifdef HAVE_SYS_TYPES_H
1261 #include <sys/types.h>
1267 dnl Check for sa_len in sys/socket.h
1270 AC_HAVE_STRUCT_FIELD(struct sockaddr,
1272 [#include <sys/types.h>
1273 #include <sys/socket.h>])
1276 dnl Check for sin_len
1279 AC_HAVE_STRUCT_FIELD(struct sockaddr_in,
1281 [#include <sys/types.h>
1282 #include <sys/socket.h>
1283 #ifdef HAVE_NETINET_IN_H
1284 #include <netinet/in.h>
1288 dnl check for strange as stuff on solaris
1291 case "$target_os" in
1293 AC_CACHE_CHECK(if as supports .register, ac_cv_prog_as_register,[
1294 cat > conftest.s <<EOF
1295 .register %g2, #scratch
1296 .register %g3, #scratch
1297 .register %g6, #scratch
1298 .register %g7, #scratch
1300 if $AS conftest.s >/dev/null 2>&1; then
1301 ac_cv_prog_as_register=yes
1303 ac_cv_prog_as_register=no
1305 rm -f conftest.s a.out
1307 if test "$ac_cv_prog_as_register" = "yes"; then
1308 AC_DEFINE([PROG_AS_UNDERSTANDS_REGISTER], 1,
1309 [define this if your as understands .register])
1321 if test "$NNPFS_SUBDIR" = "bsd" -o "$NNPFS_SUBDIR" = "freebsd" ; then
1323 AC_CONFIG_FILES([nnpfs/bsd/Makefile nnpfs/bsd/bin/Makefile nnpfs/freebsd/Makefile])
1325 AC_ELF_OBJECT_FORMAT
1328 AC_CHECK_KERNEL_FUNCS([ \
1340 vfs_opv_init_default \
1341 vfs_opv_init_explicit \
1344 vfs_deallocate_syncvnode \
1352 vnode_pager_generic_putpages \
1353 vnode_pager_generic_getpages \
1354 vnode_pager_setsize \
1365 AC_CHECK_KERNEL_FUNC(memcpy, [0,0,0])
1367 AC_BSD_HEADER_VNODE_IF_H
1369 AC_KERNEL_NEED_PROTO([
1370 #ifdef HAVE_SYS_TYPES_H
1371 #include <sys/types.h>
1373 #ifdef HAVE_SYS_PARAM_H
1374 #include <sys/param.h>
1376 #ifdef HAVE_SYS_TIME_H
1377 #include <sys/time.h>
1379 #ifdef HAVE_SYS_PROC_H
1380 #include <sys/proc.h>
1382 #ifdef HAVE_SYS_VNODE_H
1383 #include <sys/vnode.h>
1388 AC_KERNEL_NEED_PROTO([
1389 #ifdef HAVE_SYS_TYPES_H
1390 #include <sys/types.h>
1392 #ifdef HAVE_SYS_PARAM_H
1393 #include <sys/param.h>
1395 #ifdef HAVE_SYS_TIME_H
1396 #include <sys/time.h>
1398 #ifdef HAVE_SYS_PROC_H
1399 #include <sys/proc.h>
1401 #include <sys/signal.h>
1402 #include <sys/signalvar.h>
1406 AC_KERNEL_NEED_PROTO([
1407 #ifdef HAVE_SYS_TYPES_H
1408 #include <sys/types.h>
1410 #ifdef HAVE_SYS_PARAM_H
1411 #include <sys/param.h>
1413 #ifdef HAVE_SYS_TIME_H
1414 #include <sys/time.h>
1416 #ifdef HAVE_SYS_PROC_H
1417 #include <sys/proc.h>
1419 #ifdef HAVE_SYS_VNODE_H
1420 #include <sys/vnode.h>
1422 #ifdef HAVE_SYS_VFS_PROTO_H
1423 #include <sys/vfs_proto.h>
1428 AC_KERNEL_NEED_PROTO([
1429 #ifdef HAVE_SYS_TYPES_H
1430 #include <sys/types.h>
1432 #ifdef HAVE_SYS_PARAM_H
1433 #include <sys/param.h>
1435 #ifdef HAVE_SYS_LIBKERN_H
1436 #include <sys/libkern.h>
1438 #ifdef HAVE_SYS_SYSTM_H
1439 #include <sys/systm.h>
1444 AC_CHECK_KERNEL_VAR(doforce, int)
1445 AC_CHECK_KERNEL_VAR(aout_sysent, struct sysent*,[#include <sys/systm.h>])
1446 AC_CHECK_KERNEL_VOP_T
1447 AC_BSD_FUNC_VFS_OBJECT_CREATE
1448 AC_BSD_FUNC_VOP_LOCK
1449 AC_BSD_FUNC_VFS_BUSY
1452 AC_BSD_FUNC_VFS_GETNEWFSID
1454 AC_BSD_FUNC_LOCKSTATUS
1455 AC_BSD_FUNC_SELRECORD
1461 dnl Find out if have have proc.p_sigmask
1464 AC_HAVE_STRUCT_FIELD(
1467 [#ifdef HAVE_SYS_TYPES_H
1468 #include <sys/types.h>
1470 #ifdef HAVE_SYS_PARAM_H
1471 #include <sys/param.h>
1473 #ifdef HAVE_SYS_TIME_H
1474 #include <sys/time.h>
1476 #ifdef HAVE_SYS_PROC_H
1477 #include <sys/proc.h>
1480 AC_HAVE_STRUCT_FIELD(
1483 [#ifdef HAVE_SYS_TYPES_H
1484 #include <sys/types.h>
1486 #ifdef HAVE_SYS_PARAM_H
1487 #include <sys/param.h>
1489 #ifdef HAVE_SYS_TIME_H
1490 #include <sys/time.h>
1492 #ifdef HAVE_SYS_PROC_H
1493 #include <sys/proc.h>
1496 AC_HAVE_KERNEL_STRUCT_FIELD([
1497 #ifdef HAVE_SYS_TYPES_H
1498 #include <sys/types.h>
1500 #ifdef HAVE_SYS_PARAM_H
1501 #include <sys/param.h>
1503 #ifdef HAVE_SYS_TIME_H
1504 #include <sys/time.h>
1506 #ifdef HAVE_SYS_PROC_H
1507 #include <sys/proc.h>
1509 #ifdef HAVE_SYS_VNODE_H
1510 #include <sys/vnode.h>
1512 #ifdef HAVE_SYS_MOUNT_H
1513 #include <sys/mount.h>
1520 AC_HAVE_KERNEL_STRUCT_FIELD([
1521 #ifdef HAVE_SYS_TYPES_H
1522 #include <sys/types.h>
1524 #ifdef HAVE_SYS_PARAM_H
1525 #include <sys/param.h>
1527 #ifdef HAVE_SYS_TIME_H
1528 #include <sys/time.h>
1530 #ifdef HAVE_SYS_PROC_H
1531 #include <sys/proc.h>
1533 #ifdef HAVE_SYS_VNODE_H
1534 #include <sys/vnode.h>
1536 #ifdef HAVE_SYS_MOUNT_H
1537 #include <sys/mount.h>
1544 AC_HAVE_KERNEL_STRUCT_FIELD([
1545 #include <sys/types.h>
1546 #include <sys/param.h>
1547 #include <sys/mount.h>
1553 AC_HAVE_KERNEL_STRUCT_FIELD([
1554 #include <sys/types.h>
1555 #include <sys/param.h>
1556 #include <sys/mount.h>
1562 AC_HAVE_KERNEL_STRUCT_FIELD([
1563 #include <sys/types.h>
1564 #ifdef HAVE_SYS_CDEFS_H
1565 #include <sys/cdefs.h>
1567 #include <sys/uio.h>
1573 AC_HAVE_KERNEL_STRUCT_FIELD([
1574 #include <sys/types.h>
1575 #include <sys/param.h>
1576 #include <sys/mount.h>
1579 struct vnodeopv_desc **,
1582 AC_HAVE_KERNEL_STRUCT_FIELD([
1583 #include <sys/types.h>
1584 #include <sys/param.h>
1585 #include <sys/mount.h>
1591 AC_HAVE_KERNEL_STRUCT_FIELD([
1592 #include <sys/types.h>
1593 #include <sys/param.h>
1594 #include <sys/mount.h>
1600 AC_HAVE_KERNEL_STRUCT_FIELD([
1601 #include <sys/types.h>
1602 #include <sys/param.h>
1603 #include <sys/mount.h>
1609 AC_HAVE_KERNEL_STRUCT_FIELD([
1610 #include <sys/types.h>
1611 #include <sys/param.h>
1612 #include <sys/mount.h>
1615 struct sysctl_oid *,
1618 AC_HAVE_KERNEL_STRUCT_FIELD([
1619 #include <sys/types.h>
1620 #include <sys/param.h>
1621 #include <sys/mount.h>
1627 save_test_KERNEL_CFLAGS="$test_KERNEL_CFLAGS"
1628 test_KERNEL_CFLAGS="$test_KERNEL_CFLAGS $BSD_WERROR"
1630 AC_HAVE_KERNEL_STRUCT_FIELD([
1631 #include <sys/types.h>
1632 #include <sys/param.h>
1633 #include <sys/time.h>
1634 #include <sys/proc.h>
1635 #include <sys/mount.h>
1636 typedef int (*mount_type)(struct mount *, const char *, void *, struct nameidata *, struct proc *);
1642 test_KERNEL_CFLAGS="$save_test_KERNEL_CFLAGS"
1644 AC_HAVE_KERNEL_STRUCT_FIELD([
1645 #include <sys/types.h>
1646 #include <sys/param.h>
1647 #include <sys/mount.h>
1653 AC_HAVE_KERNEL_STRUCT_FIELD([
1654 #include <sys/types.h>
1655 #include <sys/param.h>
1656 #include <sys/mount.h>
1662 AC_HAVE_KERNEL_STRUCT_FIELD([
1663 #include <sys/types.h>
1664 #include <sys/param.h>
1665 #include <sys/mount.h>
1671 AC_HAVE_KERNEL_STRUCT_FIELD([
1672 #include <sys/types.h>
1673 #include <sys/param.h>
1674 #include <sys/mount.h>
1680 AC_HAVE_KERNEL_STRUCT_FIELD([
1681 #include <sys/types.h>
1682 #include <sys/param.h>
1683 #include <sys/mount.h>
1689 AC_HAVE_KERNEL_STRUCT_FIELD([
1690 #include <sys/types.h>
1691 #include <sys/param.h>
1692 #include <sys/mount.h>
1698 AC_HAVE_KERNEL_STRUCT_FIELD([
1699 #include <sys/types.h>
1700 #include <sys/param.h>
1701 #include <sys/mount.h>
1707 AC_HAVE_KERNEL_STRUCT_FIELD([
1708 #include <sys/types.h>
1709 #include <sys/systm.h>
1710 #ifdef HAVE_SYS_SYSENT_H
1711 #include <sys/sysent.h>
1718 AC_HAVE_KERNEL_STRUCT_FIELD([
1719 #include <sys/types.h>
1720 #include <sys/systm.h>
1721 #ifdef HAVE_SYS_SYSENT_H
1722 #include <sys/sysent.h>
1729 AC_HAVE_KERNEL_STRUCT_FIELD([
1730 #ifdef HAVE_SYS_TYPES_H
1731 #include <sys/types.h>
1733 #ifdef HAVE_SYS_PARAM_H
1734 #include <sys/param.h>
1736 #ifdef HAVE_SYS_TIME_H
1737 #include <sys/time.h>
1739 #ifdef HAVE_SYS_PROC_H
1740 #include <sys/proc.h>
1742 #ifdef HAVE_SYS_VNODE_H
1743 #include <sys/vnode.h>
1745 #ifdef HAVE_SYS_MOUNT_H
1746 #include <sys/mount.h>
1753 AC_HAVE_KERNEL_STRUCT_FIELD([
1754 #include <sys/types.h>
1755 #include <sys/param.h>
1756 #include <sys/vnode.h>
1762 AC_HAVE_KERNEL_STRUCT_FIELD([
1763 #include <sys/types.h>
1764 #include <sys/param.h>
1765 #include <sys/vnode.h>
1771 AC_HAVE_KERNEL_STRUCT_FIELD([
1772 #include <sys/types.h>
1773 #include <sys/param.h>
1774 #include <sys/vnode.h>
1780 AC_HAVE_KERNEL_DEF([
1781 #ifdef HAVE_SYS_TYPES_H
1782 #include <sys/types.h>
1784 #ifdef HAVE_SYS_PARAM_H
1785 #include <sys/param.h>
1787 #ifdef HAVE_SYS_MOUNT_H
1788 #include <sys/mount.h>
1790 #ifdef HAVE_SYS_TIME_H
1791 #include <sys/time.h>
1793 #ifdef HAVE_SYS_PROC_H
1794 #include <sys/proc.h>
1796 #ifdef HAVE_SYS_SA_H
1799 #ifdef HAVE_SYS_SYSPROTO_H
1800 #include <sys/sysproto.h>
1802 #ifdef HAVE_SYS_SYSCALLARGS_H
1803 #include <sys/syscallargs.h>
1806 struct setgroups_args)
1808 AC_HAVE_KERNEL_DEF([
1809 #ifdef HAVE_SYS_TYPES_H
1810 #include <sys/types.h>
1812 #ifdef HAVE_SYS_PARAM_H
1813 #include <sys/param.h>
1815 #ifdef HAVE_SYS_MOUNT_H
1816 #include <sys/mount.h>
1818 #ifdef HAVE_SYS_TIME_H
1819 #include <sys/time.h>
1821 #ifdef HAVE_SYS_PROC_H
1822 #include <sys/proc.h>
1824 #ifdef HAVE_SYS_SA_H
1827 #ifdef HAVE_SYS_SYSPROTO_H
1828 #include <sys/sysproto.h>
1830 #ifdef HAVE_SYS_SYSCALLARGS_H
1831 #include <sys/syscallargs.h>
1834 struct sys_setgroups_args)
1836 AC_HAVE_KERNEL_STRUCT_FIELD([
1837 #include <sys/types.h>
1838 #include <sys/time.h>
1839 #ifdef HAVE_SYS_CDEFS_H
1840 #include <sys/cdefs.h>
1842 #include <sys/conf.h>
1848 AC_HAVE_KERNEL_STRUCT_FIELD([
1849 #include <sys/types.h>
1850 #include <sys/time.h>
1851 #ifdef HAVE_SYS_CDEFS_H
1852 #include <sys/cdefs.h>
1854 #include <sys/conf.h>
1860 AC_HAVE_KERNEL_STRUCT_FIELD([
1861 #include <sys/types.h>
1862 #include <sys/time.h>
1863 #ifdef HAVE_SYS_CDEFS_H
1864 #include <sys/cdefs.h>
1866 #include <sys/conf.h>
1872 AC_HAVE_KERNEL_STRUCT_FIELD([
1873 #include <sys/types.h>
1874 #include <sys/time.h>
1875 #ifdef HAVE_SYS_CDEFS_H
1876 #include <sys/cdefs.h>
1878 #include <sys/conf.h>
1884 AC_HAVE_KERNEL_STRUCT_FIELD([
1885 #include <sys/types.h>
1886 #include <sys/time.h>
1887 #ifdef HAVE_SYS_CDEFS_H
1888 #include <sys/cdefs.h>
1890 #include <sys/conf.h>
1896 AC_HAVE_KERNEL_STRUCT_FIELD([
1897 #include <sys/types.h>
1898 #include <sys/time.h>
1899 #ifdef HAVE_SYS_CDEFS_H
1900 #include <sys/cdefs.h>
1902 #include <sys/conf.h>
1908 AC_HAVE_KERNEL_STRUCT_FIELD([
1909 #include <sys/types.h>
1910 #include <sys/time.h>
1911 #ifdef HAVE_SYS_CDEFS_H
1912 #include <sys/cdefs.h>
1914 #include <sys/conf.h>
1920 AC_HAVE_KERNEL_STRUCT_FIELD([
1921 #include <sys/types.h>
1922 #include <sys/time.h>
1923 #ifdef HAVE_SYS_CDEFS_H
1924 #include <sys/cdefs.h>
1926 #include <sys/conf.h>
1932 AC_HAVE_KERNEL_STRUCT_FIELD([
1933 #include <sys/types.h>
1934 #include <sys/time.h>
1935 #ifdef HAVE_SYS_CDEFS_H
1936 #include <sys/cdefs.h>
1938 #include <sys/conf.h>
1944 AC_HAVE_KERNEL_STRUCT_FIELD([
1945 #include <sys/types.h>
1946 #include <sys/time.h>
1947 #ifdef HAVE_SYS_CDEFS_H
1948 #include <sys/cdefs.h>
1950 #include <sys/conf.h>
1956 AC_HAVE_KERNEL_STRUCT_FIELD([
1957 #include <sys/types.h>
1958 #include <sys/time.h>
1959 #ifdef HAVE_SYS_CDEFS_H
1960 #include <sys/cdefs.h>
1962 #include <sys/conf.h>
1968 AC_HAVE_KERNEL_STRUCT_FIELD([
1969 #include <sys/types.h>
1970 #include <sys/time.h>
1971 #ifdef HAVE_SYS_CDEFS_H
1972 #include <sys/cdefs.h>
1974 #include <sys/conf.h>
1980 AC_HAVE_KERNEL_STRUCT_FIELD([
1981 #include <sys/types.h>
1982 #include <sys/time.h>
1983 #ifdef HAVE_SYS_CDEFS_H
1984 #include <sys/cdefs.h>
1986 #include <sys/conf.h>
1992 AC_HAVE_KERNEL_STRUCT_FIELD([
1993 #include <sys/types.h>
1994 #ifdef HAVE_SYS_CDEFS_H
1995 #include <sys/cdefs.h>
1997 #include <sys/uio.h>
1998 #include <sys/namei.h>
2004 AC_CHECK_BSD_UVM_ONLY
2010 elif test "$NNPFS_SUBDIR" = "linux"; then
2012 AC_CONFIG_FILES([nnpfs/linux/Makefile nnpfs/linux/bin/Makefile])
2014 dnl Linux devfs check
2015 AC_CHECK_HEADERS(linux/devfs_fs.h linux/stddef.h)
2017 AC_HAVE_KERNEL_STRUCT_FIELD([
2019 #include <asm/current.h>
2020 #include <linux/fs.h>
2026 AC_HAVE_LINUX_KERNEL_TYPES(int8_t int16_t int32_t int64_t)
2027 AC_HAVE_LINUX_KERNEL_TYPES(uint8_t uint16_t uint32_t uint64_t)
2029 AC_LINUX_FUNC_INIT_MUTEX
2031 elif test "$NNPFS_SUBDIR" = "solaris"; then
2033 AC_CONFIG_FILES([nnpfs/solaris/Makefile nnpfs/solaris/bin/Makefile])
2035 AC_HAVE_KERNEL_STRUCT_FIELD([
2036 #include <sys/types.h>
2037 #include <sys/vfs.h>
2038 typedef void (*freevfs_type)(struct vfs *);
2044 elif test "$NNPFS_SUBDIR" = "irix"; then
2046 AC_CONFIG_FILES([nnpfs/irix/Makefile nnpfs/irix/bin/Makefile])
2048 elif test "$NNPFS_SUBDIR" = "aix"; then
2050 AC_CONFIG_FILES([nnpfs/aix/Makefile nnpfs/aix/bin/Makefile])
2052 fi # end of OS-specific tests
2055 dnl Global kernel checks
2058 AC_CHECK_KERNEL_FUNCS(strlcpy)
2061 dnl Arla configuration. Default values, overrided below if needed
2064 arla_AC_SUBST_VALUE(ARLA_CONF_HIGHVNODES,4000)
2065 arla_AC_SUBST_VALUE(ARLA_CONF_LOWVNODES,3000)
2066 arla_AC_SUBST_VALUE(ARLA_CONF_HIGHBYTES,1400M)
2067 arla_AC_SUBST_VALUE(ARLA_CONF_LOWBYTES,700M)
2069 dnl override section
2071 case "$target_os" in
2073 ARLA_CONF_HIGHVNODES=40000
2074 ARLA_CONF_LOWVNODES=30000
2079 # Libtool vs automake stuff
2082 LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's/\.o/\.lo/g'`
2085 AH_BOTTOM([#ifdef ROKEN_RENAME
2086 #include "roken_rename.h"
2091 AC_OUTPUT(Makefile \
2096 nnpfs/dummer/Makefile \
2103 appl/aafs/Makefile \
2104 appl/aafs-perl/Makefile \
2105 appl/kalog/Makefile \
2106 appl/afsmgr/Makefile \
2107 appl/afsutils/Makefile \
2108 appl/amon/Makefile \
2109 appl/afstool/Makefile \
2111 appl/rxgklog/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)