linux26-build-update-20060126
authorChas Williams <chas@cmf.nrl.navy.mil>
Thu, 26 Jan 2006 15:56:41 +0000 (15:56 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 26 Jan 2006 15:56:41 +0000 (15:56 +0000)
FIXES 25879

KBUILD_BASENAME will need to be set in 2.6.15 and later for configure to work usefully

src/cf/linux-test1.m4
src/cf/linux-test2.m4
src/cf/linux-test3.m4
src/cf/linux-test4.m4

index 6902d33..f562bab 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN([LINUX_INODE_SETATTR_RETURN_TYPE],[
 AC_MSG_CHECKING(for inode_setattr return type)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_func_inode_setattr_returns_int,
 [
 AC_TRY_COMPILE(
@@ -18,7 +18,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE],[
 AC_MSG_CHECKING(for write_inode return type)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_func_write_inode_returns_int,
 [
 AC_TRY_COMPILE(
@@ -34,7 +34,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 
 AC_DEFUN([LINUX_IOP_NAMEIDATA],[
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_MSG_CHECKING(whether inode_operations.create takes a nameidata)
 AC_CACHE_VAL(ac_cv_linux_func_i_create_takes_nameidata,
 [
@@ -102,7 +102,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 
 AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL],[
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_MSG_CHECKING(whether address_space_operations.writepage takes a writeback_control)
 AC_CACHE_VAL(ac_cv_linux_func_a_writepage_takes_writeback_control,
 [
@@ -124,7 +124,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 
 AC_DEFUN([LINUX_REFRIGERATOR],[
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_MSG_CHECKING(whether refrigerator takes PF_FREEZE)
 AC_CACHE_VAL(ac_cv_linux_func_refrigerator_takes_pf_freeze,
 [
index 1f47ca4..37d2d1a 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK], [
 AC_MSG_CHECKING(for gfp_mask in struct address_space)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask, 
 [
 AC_TRY_COMPILE(
@@ -16,7 +16,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BYTES], [
 AC_MSG_CHECKING(for i_bytes in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_bytes, 
 [
 AC_TRY_COMPILE(
@@ -31,7 +31,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM], [
 AC_MSG_CHECKING(for i_alloc_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_alloc_sem,
 [
 AC_TRY_COMPILE(
@@ -46,7 +46,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM], [
 AC_MSG_CHECKING(for i_truncate_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem,
 [
 AC_TRY_COMPILE(
@@ -61,7 +61,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK], [
 AC_MSG_CHECKING(for page_lock in struct address_space)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_page_lock, 
 [
 AC_TRY_COMPILE(
index e7d547f..76d90e8 100644 (file)
@@ -85,7 +85,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_KERNEL_SOCK_CREATE],[
 AC_MSG_CHECKING(for 5th argument in sock_create found in some SELinux kernels)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ -DKBUILD_BASENAME=\\"libafs\\" $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_kernel_sock_create_v,
 [
 AC_TRY_COMPILE(
@@ -101,7 +101,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK],[
 AC_MSG_CHECKING(for page_follow_link_light vs page_follow_link)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_kernel_page_follow_link,
 [
 AC_TRY_COMPILE(
index 64032f9..27b153e 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
 AC_MSG_CHECKING(for linux/completion.h existance)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
 [
 AC_TRY_COMPILE(
@@ -21,7 +21,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
 AC_MSG_CHECKING(for defined for_each_process)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_defines_for_each_process,
 [
 AC_TRY_COMPILE(
@@ -38,7 +38,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_DEFINES_PREV_TASK], [
 AC_MSG_CHECKING(for defined prev_task)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_defines_prev_task,
 [
 AC_TRY_COMPILE(
@@ -55,7 +55,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
 AC_MSG_CHECKING(for exported init_mm)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_init_mm,
 [
 AC_TRY_COMPILE(
@@ -72,7 +72,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_ADDRESS], [
 AC_MSG_CHECKING(for exported kallsyms_address_to_symbol)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address,
 [
 AC_TRY_COMPILE(
@@ -89,7 +89,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_SYMBOL], [
 AC_MSG_CHECKING(for exported kallsyms_symbol_to_address)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol,
 [
 AC_TRY_COMPILE(
@@ -106,7 +106,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_SYS_CALL_TABLE], [
 AC_MSG_CHECKING(for exported sys_call_table)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table,
 [
 AC_TRY_COMPILE(
@@ -123,7 +123,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_IA32_SYS_CALL_TABLE], [
 AC_MSG_CHECKING(for exported ia32_sys_call_table)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_ia32_sys_call_table,
 [
 AC_TRY_COMPILE(
@@ -140,7 +140,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_SYS_CHDIR], [
 AC_MSG_CHECKING(for exported sys_chdir)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir,
 [
 AC_TRY_COMPILE(
@@ -157,7 +157,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_SYS_CLOSE], [
 AC_MSG_CHECKING(for exported sys_close)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_close,
 [
 AC_TRY_COMPILE(
@@ -174,7 +174,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_EXPORTS_SYS_WAIT4], [
 AC_MSG_CHECKING(for exported sys_wait4)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_wait4,
 [
 AC_TRY_COMPILE(
@@ -191,7 +191,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
 AC_MSG_CHECKING(for i_cdev in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
 [
 AC_TRY_COMPILE(
@@ -207,7 +207,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DEVICES], [
 AC_MSG_CHECKING(for i_devices in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
 [
 AC_TRY_COMPILE(
@@ -223,7 +223,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS], [
 AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
 [
 AC_TRY_COMPILE(
@@ -239,7 +239,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
 AC_MSG_CHECKING(for inotify_lock in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_lock, 
 [
 AC_TRY_COMPILE(
@@ -254,7 +254,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
 AC_MSG_CHECKING(for inotify_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, 
 [
 AC_TRY_COMPILE(
@@ -270,7 +270,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
 AC_MSG_CHECKING(for i_mapping_overload in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
 [
 AC_TRY_COMPILE(
@@ -286,7 +286,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED], [
 AC_MSG_CHECKING(for i_mmap_shared in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
 [
 AC_TRY_COMPILE(
@@ -302,7 +302,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SECURITY], [
 AC_MSG_CHECKING(for i_security in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_security, 
 [
 AC_TRY_COMPILE(
@@ -318,7 +318,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
 AC_MSG_CHECKING(for i_sb_list in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_sb_list, 
 [
 AC_TRY_COMPILE(
@@ -334,7 +334,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE],[
 AC_MSG_CHECKING(for recalc_sigpending arg type)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void,
 [
 AC_TRY_COMPILE(
@@ -349,7 +349,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT], [
 AC_MSG_CHECKING(for parent in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent,
 [
 AC_TRY_COMPILE(
@@ -365,7 +365,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
 AC_MSG_CHECKING(for real_parent in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent,
 [
 AC_TRY_COMPILE(
@@ -381,7 +381,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG], [
 AC_MSG_CHECKING(for sig in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig,
 [
 AC_TRY_COMPILE(
@@ -396,7 +396,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK], [
 AC_MSG_CHECKING(for sigmask_lock in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock,
 [
 AC_TRY_COMPILE(
@@ -411,7 +411,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND], [
 AC_MSG_CHECKING(for sighand in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand,
 [
 AC_TRY_COMPILE(
@@ -426,7 +426,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
 AC_MSG_CHECKING(for rlim in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_rlim,
 [
 AC_TRY_COMPILE(
@@ -441,7 +441,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
 AC_MSG_CHECKING(for signal->rlim in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_signal_rlim,
 [
 AC_TRY_COMPILE(
@@ -456,7 +456,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE], [
 AC_MSG_CHECKING(for exit_state in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_exit_state,
 [
 AC_TRY_COMPILE(
@@ -471,7 +471,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
 AC_MSG_CHECKING(for alloc_inode in struct super_operations)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_super_has_alloc_inode, 
 [
 AC_TRY_COMPILE(