This patch is based on a patch by Laurynas Biveinis to allow Fileutils
to be built using autoconf 2.50. I found that his patch was not enough -
autoheader would barf on configure.in. I further patched configure.in
to make it more autoconf-2.50-ish.

Richard Dawe <richdawe@bigfoot.com> 2002-03-10

diff -pu3Nr filutil-4.0.orig/configure.in filutil-4.0/configure.in
--- filutil-4.0.orig/configure.in	Tue Nov 10 13:54:34 1998
+++ filutil-4.0/configure.in	Sat Mar  9 12:41:50 2002
@@ -1,16 +1,17 @@
 dnl Process this file with autoconf to produce a configure script. -*-m4-*-
-AC_INIT(src/ls.c)
+AC_INIT([fileutils], [4.0], [bug-fileutils@gnu.org])
+AC_CONFIG_SRCDIR(src/ls.c)
 AM_CONFIG_HEADER(config.h)
-AC_PREREQ(2.12)               dnl Minimum Autoconf version required.
+AC_PREREQ(2.50)               dnl Minimum Autoconf version required.
 
 AM_INIT_AUTOMAKE([fileutils], [4.0])
 GNU_PACKAGE="GNU $PACKAGE"
-AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE")
+AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE", [The package name])
 
 # Enable GNU extensions.
 # Define this here, not in acconfig's @TOP@ section, since definitions
 # in the latter don't make it into the configure-time tests.
-AC_DEFINE([_GNU_SOURCE])
+AC_DEFINE([_GNU_SOURCE], [/* empty */], [Enable GNU extensions])
 
 ALL_LINGUAS="cs de el es fr ko nl no pl pt ru sk sl sv"
 
@@ -24,6 +25,7 @@ AC_PROG_RANLIB
 AC_PROG_YACC
 AC_AIX
 AC_MINIX
+AC_EXEEXT
 
 dnl This test must come as early as possible after the compiler configuration
 dnl tests, because the choice of the file model can (in principle) affect
@@ -35,6 +37,7 @@ dnl that for the inline keyword, since i
 dnl which the compiler supports such features.
 AM_C_PROTOTYPES
 
+AC_PROG_CC_STDC
 AC_HEADER_MAJOR
 AC_HEADER_DIRENT
 AC_FUNC_CLOSEDIR_VOID
@@ -60,6 +63,10 @@ dnl For addext.c.  FIXME: put these in a
 AC_SYS_LONG_FILE_NAMES
 AC_CHECK_FUNC(pathconf)
 
+dnl (rdawe): DJGPP port: Check whether we have lstat() or not. Versions of
+dnl          DJGPP > 2.03 have support for symlinks.
+AC_CHECK_FUNCS(lstat)
+
 AC_CHECK_HEADERS(string.h fcntl.h limits.h sys/time.h sys/timeb.h \
     errno.h unistd.h stdlib.h \
     sys/param.h sys/statfs.h sys/fstyp.h mnttab.h mntent.h utime.h \
@@ -337,23 +344,24 @@ AM_GNU_GETTEXT
 # the ANSI2KNR-filtering rules.
 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
 
-AC_OUTPUT([Makefile
-           doc/Makefile
-	   intl/Makefile
-	   lib/Makefile
-	   man/Makefile
-	   m4/Makefile
-	   po/Makefile.in
-	   src/Makefile
-	   tests/Makefile
-	   tests/cp/Makefile
-	   tests/dircolors/Makefile
-	   tests/install/Makefile
-	   tests/ln/Makefile
-	   tests/ls/Makefile
-	   tests/ls-2/Makefile
-	   tests/mkdir/Makefile
-	   tests/mv/Makefile
-	   tests/rm/Makefile
-	   tests/touch/Makefile
-	  ])
+AC_CONFIG_FILES([Makefile
+                 doc/Makefile
+	         intl/Makefile
+	         lib/Makefile
+	         man/Makefile
+	         m4/Makefile
+	         po/Makefile.in
+	         src/Makefile
+	         tests/Makefile
+	         tests/cp/Makefile
+	         tests/dircolors/Makefile
+	         tests/install/Makefile
+	         tests/ln/Makefile
+	         tests/ls/Makefile
+	         tests/ls-2/Makefile
+	         tests/mkdir/Makefile
+	         tests/mv/Makefile
+	         tests/rm/Makefile
+	         tests/touch/Makefile])
+
+AC_OUTPUT
diff -pu3Nr filutil-4.0.orig/m4/check-type.m4 filutil-4.0/m4/check-type.m4
--- filutil-4.0.orig/m4/check-type.m4	Sun Aug 16 04:45:36 1998
+++ filutil-4.0/m4/check-type.m4	Sat Mar  9 11:46:42 2002
@@ -23,6 +23,6 @@ changequote([,]), [#include <sys/types.h
 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
 AC_MSG_RESULT($ac_cv_type_$1)
 if test $ac_cv_type_$1 = no; then
-  AC_DEFINE($1, $2)
+  AC_DEFINE($1, $2, [Define to $2 if definition of $1 is absent])
 fi
 ])
diff -pu3Nr filutil-4.0.orig/m4/const.m4 filutil-4.0/m4/const.m4
--- filutil-4.0.orig/m4/const.m4	Sat Jan 10 21:57:46 1998
+++ filutil-4.0/m4/const.m4	Sat Mar  9 11:46:42 2002
@@ -61,6 +61,6 @@ ccp = (char const *const *) p;
 changequote([, ])dnl
 ac_cv_c_const=yes, ac_cv_c_const=no)])
 if test $ac_cv_c_const = no; then
-  AC_DEFINE_UNQUOTED(const, [/* empty */])
+  AC_DEFINE_UNQUOTED(const, [/* empty */], [``const'' keyword])
 fi
 ])
