with-bsd-kernel-headers-20030630
authorJim Rees <rees@umich.edu>
Mon, 30 Jun 2003 20:44:50 +0000 (20:44 +0000)
committerJim Rees <rees@umich.edu>
Mon, 30 Jun 2003 20:44:50 +0000 (20:44 +0000)
add --with-bsd-kernel-headers configure option
thanks to nathan for help with this

acinclude.m4
src/libafs/MakefileProto.FBSD.in
src/libafs/MakefileProto.OBSD.in

index 1bb1a6c..e800f80 100644 (file)
@@ -39,6 +39,9 @@ AC_ARG_WITH(dux-kernel-headers,
 AC_ARG_WITH(linux-kernel-headers,
 [  --with-linux-kernel-headers=path            use the kernel headers found at path(optional, defaults to /usr/src/linux)]
 )
+AC_ARG_WITH(bsd-kernel-headers,
+[  --with-bsd-kernel-headers=path      use the kernel headers found at path(optional, defaults to /usr/src/sys)]
+)
 AC_ARG_ENABLE(kernel-module,
 [  --disable-kernel-module                     disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
 )
@@ -694,6 +697,12 @@ if test "$enable_insecure" = "yes"; then
        WITH_INSECURE=YES
 fi
 
+if test "x$with_bsd_kernel_headers" != "x"; then
+       BSD_KERNEL_PATH="$with_bsd_kernel_headers"
+else
+       BSD_KERNEL_PATH="/usr/src/sys"
+fi
+
 # Fast restart
 if test "$enable_supergroups" = "yes"; then
        AC_DEFINE(SUPERGROUPS, 1, [define if you want to have support for nested pts groups])
@@ -814,6 +823,7 @@ AC_SUBST(AFS_PARAM_COMMON)
 AC_SUBST(ENABLE_KERNEL_MODULE)
 AC_SUBST(LIB_AFSDB)
 AC_SUBST(LINUX_KERNEL_PATH)
+AC_SUBST(BSD_KERNEL_PATH)
 AC_SUBST(LINUX_VERSION)
 AC_SUBST(MKAFS_OSTYPE)
 AC_SUBST(TOP_OBJDIR)
index 3c032d1..87669d3 100644 (file)
@@ -28,7 +28,7 @@ AFS_OS_NONFSOBJS = \
 
 
 # System specific build commands and flags
-KSRC = /usr/src/sys
+KSRC = @BSD_KERNEL_PATH@
 KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
        -DKLD_MODULE -elf -mpreferred-stack-boundary=2
 DBUG = -O2
index c4d71dc..d2e70f9 100644 (file)
@@ -11,7 +11,7 @@ srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
 
 # System specific build commands and flags
-KSRC = /usr/src/sys
+KSRC = @BSD_KERNEL_PATH@
 KFLAGS= -Wall -nostdinc
 <i386_obsd33>
 KFLAGS+= -fno-stack-protector