Make better use of GNU Pth -- patch by Andy Dustman.
I can't test this, so I'm just checking it in with blind faith in Andy.
I've tested that it doesn't broeak a non-Pth build on Linux.

Changes include:

- There's a --with-pth configure option.

- Instead of _GNU_PTH, we test for HAVE_PTH.

- Better signal handling.

- (The config.h.in file is regenerated in a slightly different order.)
diff --git a/config.h.in b/config.h.in
index 9e4bdad..81831f9 100644
--- a/config.h.in
+++ b/config.h.in
@@ -103,9 +103,6 @@
    This is the case on Motorola V4 (R40V4.2) */
 #undef GETTIMEOFDAY_NO_TZ
 
-/* Define if you have GNU PTH threads */
-#undef _GNU_PTH
-
 /* Define this if your time.h defines altzone */
 #undef HAVE_ALTZONE
 
@@ -130,6 +127,9 @@
 /* Define if your compiler supports function prototypes */
 #undef HAVE_PROTOTYPES
 
+/* Define if you have GNU PTH threads */
+#undef HAVE_PTH
+
 /* Define if your compiler supports variable length function prototypes
    (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
 #undef HAVE_STDARG_PROTOTYPES
@@ -272,6 +272,9 @@
 /* The number of bytes in a void *.  */
 #undef SIZEOF_VOID_P
 
+/* Define if you have the _getpty function.  */
+#undef HAVE__GETPTY
+
 /* Define if you have the alarm function.  */
 #undef HAVE_ALARM
 
@@ -359,9 +362,6 @@
 /* Define if you have the getpid function.  */
 #undef HAVE_GETPID
 
-/* Define if you have the _getpty function.  */
-#undef HAVE__GETPTY
-
 /* Define if you have the getpwent function.  */
 #undef HAVE_GETPWENT
 
@@ -521,14 +521,14 @@
 /* Define if you have the waitpid function.  */
 #undef HAVE_WAITPID
 
-/* Define if you have the <db_185.h> header file.  */
-#undef HAVE_DB_185_H
+/* Define if you have the <db.h> header file.  */
+#undef HAVE_DB_H
 
 /* Define if you have the <db1/ndbm.h> header file.  */
 #undef HAVE_DB1_NDBM_H
 
-/* Define if you have the <db.h> header file.  */
-#undef HAVE_DB_H
+/* Define if you have the <db_185.h> header file.  */
+#undef HAVE_DB_185_H
 
 /* Define if you have the <dirent.h> header file.  */
 #undef HAVE_DIRENT_H