diff --git a/config.ami.template b/config.ami.template
index be998464..1be0ccbd 100644
--- a/config.ami.template
+++ b/config.ami.template
@@ -162,6 +162,12 @@
 /* Define vfork as fork if vfork does not work.  */
 #undef vfork
 
+/* Name of this package (needed by automake) */
+#define PACKAGE "%PACKAGE%"
+
+/* Version of this package (needed by automake) */
+#define VERSION "%VERSION%"
+
 /* Define to the name of the SCCS `get' command.  */
 #define SCCS_GET "get"
 
diff --git a/config.h-vms.template b/config.h-vms.template
index 513ea112..a41ae06f 100644
--- a/config.h-vms.template
+++ b/config.h-vms.template
@@ -114,7 +114,7 @@
 /* #undef NO_MINUS_C_MINUS_O */
 
 /* Define to `int' if <sys/types.h> doesn't define.  */
-#define pid_t int
+/* #undef pid_t */
 
 /* Define if the system does not provide POSIX.1 features except
    with this defined.  */
@@ -153,7 +153,7 @@
 /* #undef SYS_SIGLIST_DECLARED */
 
 /* Define to `int' if <sys/types.h> doesn't define.  */
-#define uid_t int
+/* #undef uid_t */
 
 /* Define for Encore UMAX.  */
 /* #undef UMAX */
@@ -162,6 +162,12 @@
    instead of <sys/cpustats.h>.  */
 /* #undef UMAX4_3 */
 
+/* Name of this package (needed by automake) */
+#define PACKAGE "%PACKAGE%"
+
+/* Version of this package (needed by automake) */
+#define VERSION "%VERSION%"
+
 /* Define vfork as fork if vfork does not work.  */
 /* #undef vfork */
 
diff --git a/config.h.W32.template b/config.h.W32.template
index 9af79e23..cf8a8886 100644
--- a/config.h.W32.template
+++ b/config.h.W32.template
@@ -176,6 +176,12 @@
 /* Define vfork as fork if vfork does not work.  */
 #undef vfork
 
+/* Name of this package (needed by automake) */
+#define PACKAGE "%PACKAGE%"
+
+/* Version of this package (needed by automake) */
+#define VERSION "%VERSION%"
+
 /* Define to the name of the SCCS `get' command.  */
 #undef SCCS_GET
 #define SCCS_GET "echo no sccs get"
diff --git a/configh.dos.template b/configh.dos.template
index 455c549b..852b6f8f 100644
--- a/configh.dos.template
+++ b/configh.dos.template
@@ -1,80 +1,24 @@
 /* Generated automatically from configure.in by autoheader.  DO NOT EDIT!  */
 
-#define INCLUDEDIR "c:/djgpp/include"
-#define LIBDIR "c:/djgpp/lib"
+/* Many things are defined already by a system header.  */
+#include <sys/config.h>
 
-/* Define if you have dirent.h.  */
-#define HAVE_DIRENT_H
+/* Name of this package (needed by automake) */
+#define PACKAGE "%PACKAGE%"
 
-/* Define if you have the strcoll function and it is properly defined.  */
-#define HAVE_STRCOLL
-
-/* Define if you have unistd.h.  */
-#define HAVE_UNISTD_H
-
-/* Define as the return type of signal handlers (int or void).  */
-#define RETSIGTYPE void
-
-/* Define if you have the ANSI C header files.  */
-#ifndef STDC_HEADERS
-#define STDC_HEADERS
-#endif
-
-/* Define if `sys_siglist' is declared by <signal.h>.  */
-#undef SYS_SIGLIST_DECLARED
-
-/* Define if you have sys_siglist.  */
-#undef HAVE_SYS_SIGLIST
-
-/* Define if you have _sys_siglist.  */
-#undef HAVE__SYS_SIGLIST
-
-/* Define if you have psignal.  */
-#define HAVE_PSIGNAL
-
-/* Define if you have strsignal.  */
-#undef HAVE_STRSIGNAL
+/* Version of this package (needed by automake) */
+#define VERSION "%VERSION%"
 
 /* Define NSIG.  */
 #define NSIG SIGMAX
 
-/* Define if you have getdtablesize.  */
-#define HAVE_GETDTABLESIZE
-
-/* Define if you have dup2.  */
-#define HAVE_DUP2
-
-/* Define if you have getcwd.  */
-#define HAVE_GETCWD
-
 /* Define if you have sigsetmask.  */
-#define HAVE_SIGSETMASK
-
-/* Define if you have setlinebuf.  */
-#define HAVE_SETLINEBUF
-
-/* Define if you have the <limits.h> header file.  */
-#define HAVE_LIMITS_H
-
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <fcntl.h> header file.  */
-#define HAVE_FCNTL_H
-
-/* Define if you have the <string.h> header file.  */
-#define HAVE_STRING_H
+#define HAVE_SIGSETMASK 1
 
 /* Define if you have the <memory.h> header file.  */
-#define HAVE_MEMORY_H
+#define HAVE_MEMORY_H 1
 
 /* Define if you have the memmove function.  */
-#define HAVE_MEMMOVE
-
-/* Define if you have the `strerror' function.  */
-#define HAVE_STRERROR
-
-/* Define if you have the <sys/wait.h> header file.  */
-#define HAVE_SYS_WAIT_H
+#define HAVE_MEMMOVE 1
 
 #define SCCS_GET "get"