merge from merge4 to merge5
diff --git a/ChangeLog b/ChangeLog
index 63f8b58..5ec4bac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 
 	* kernel: no allocation on write in direct_io mode
 
+	* move linux/fuse.h to fuse_kernel.h
+
 2004-11-30  Miklos Szeredi <miklos@szeredi.hu>
 
 	* kernel: clean up reading functions
diff --git a/configure.in b/configure.in
index 256bd7b..315886d 100644
--- a/configure.in
+++ b/configure.in
@@ -51,5 +51,5 @@
 
 AC_SUBST(subdirs2)
 
-AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile include/linux/Makefile])
+AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile])
 AC_OUTPUT
diff --git a/include/Makefile.am b/include/Makefile.am
index feb8cbd..f6f1600 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,9 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = linux
-
 fuseincludedir=$(includedir)/fuse
 fuseinclude_HEADERS = fuse.h
+noinst_HEADERS = fuse_kernel.h
 
 # remove fuse.h from old place to avoid collision with new one
 install-data-local:
diff --git a/include/linux/.cvsignore b/include/linux/.cvsignore
deleted file mode 100644
index 3e71cc3..0000000
--- a/include/linux/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile.in
-Makefile
-fuse.h
diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
deleted file mode 100644
index 486c3d4..0000000
--- a/include/linux/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-noinst_HEADERS = fuse.h
-
-all-local: fuse.h
-
-fuse.h:
-	ln -s ../../kernel/linux/fuse.h .
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 42d1807..2cb000e 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -7,9 +7,8 @@
 VERSION = @PACKAGE_VERSION@
 
 DISTFILES = Makefile.in configure.ac configure config.h.in ../install-sh \
-	dev.c dir.c file.c inode.c util.c fuse_i.h
+	dev.c dir.c file.c inode.c util.c fuse_i.h fuse_kernel.h
 COMPATDISTFILES = compat/parser.c compat/parser.h
-LINUXDISTFILES = linux/fuse.h
 
 fusemoduledir = @kmoduledir@/kernel/fs/fuse
 
@@ -40,12 +39,10 @@
 
 maintainer-clean: distclean
 
-distdir: $(DISTFILES) $(COMPATDISTFILES) $(LINUXDISTFILES)
+distdir: $(DISTFILES) $(COMPATDISTFILES)
 	cp -p $(DISTFILES) $(distdir)
 	mkdir $(distdir)/compat
 	cp -p $(COMPATDISTFILES) $(distdir)/compat
-	mkdir $(distdir)/linux
-	cp -p $(LINUXDISTFILES) $(distdir)/linux
 
 ifeq ($(majver), 2.4)
 
@@ -66,7 +63,7 @@
 fuse.o: $(fuse_objs)
 	$(LD) -r -o fuse.o $(fuse_objs)
 
-fuse_headers = fuse_i.h linux/fuse.h
+fuse_headers = fuse_i.h fuse_kernel.h
 
 dev.o: $(fuse_headers)
 dir.o: $(fuse_headers)
diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h
index b9dd4b8..0597621 100644
--- a/kernel/fuse_i.h
+++ b/kernel/fuse_i.h
@@ -6,8 +6,10 @@
     See the file COPYING.
 */
 
+#ifdef FUSE_MAINLINE
 #include <linux/fuse.h>
-#ifndef FUSE_MAINLINE
+#else
+#include "fuse_kernel.h"
 #include <linux/version.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
diff --git a/kernel/linux/fuse.h b/kernel/fuse_kernel.h
similarity index 100%
rename from kernel/linux/fuse.h
rename to kernel/fuse_kernel.h
diff --git a/lib/fuse.c b/lib/fuse.c
index eb10cdf..100b50f 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -8,7 +8,7 @@
 
 #include <config.h>
 #include "fuse_i.h"
-#include <linux/fuse.h>
+#include "fuse_kernel.h"
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/makeconf.sh b/makeconf.sh
index 34090e9..dc563d9 100755
--- a/makeconf.sh
+++ b/makeconf.sh
@@ -24,6 +24,8 @@
 	autoconf
     )
 fi
+echo Linking kernel header file...
+ln -sf ../kernel/fuse_kernel.h `dirname $0`/include
 
 rm -f config.cache config.status
 echo "To compile run './configure', and then 'make'."
diff --git a/util/fusermount.c b/util/fusermount.c
index ddf8603..5334ada 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -33,7 +33,6 @@
 #include <sys/fsuid.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#include <linux/fuse.h>
 
 #define FUSE_COMMFD_ENV         "_FUSE_COMMFD"