nptl dependencies
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..04204c7
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1 @@
+config
diff --git a/INSTALL b/INSTALL
index 9a641ae..c850a12 100755
--- a/INSTALL
+++ b/INSTALL
@@ -21,6 +21,7 @@
 		echo "	NPTL not found."
 		echo "SYSVERSION=2.4" >$PLAN9/config
 	fi
+	rm -f ./a.out
 fi
 echo "Building mk..."
 cd src
diff --git a/lib/linux-isnptl.c b/lib/linux-isnptl.c
new file mode 100644
index 0000000..d28fe87
--- /dev/null
+++ b/lib/linux-isnptl.c
@@ -0,0 +1,15 @@
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(void)
+{
+	ulong x;
+
+	x = (ulong)pthread_self();
+	if(x < 1024*1024)
+		exit(1);	/* NOT NPTL */
+	exit(0);
+}
diff --git a/man/man1/install.1 b/man/man1/install.1
index e070ffb..8a3155e 100644
--- a/man/man1/install.1
+++ b/man/man1/install.1
@@ -40,7 +40,17 @@
 The system uses different threading implementations on Linux 2.6 and
 later kernels than on 2.4 and earlier;
 and on FreeBSD 5 and later kernels than on FreeBSD 4 and earlier.
-Running binaries from one class on another may not work.
+Running binaries from one class on another will not work.
+.PP
+Some Linux 2.6 systems (e.g., Gentoo) do not use the new NPTL pthread library
+even though the kernel supports them.  On these systems, plan9port must 
+fall back on the threading code intended for Linux 2.4.  To accomplish this,
+.I INSTALL
+checks whether the running system uses NPTL and sets
+.B SYSVERSION
+in
+.B \*9/config
+accordingly.
 .SH FILES
 .TP
 .B \*9/lib/moveplan9.files