--- fileutils-3.16.orig/configure.in	Sun Jan 26 12:04:10 1997
+++ fileutils-3.16/configure.in	Sun Sep  6 12:08:57 1998
@@ -120,8 +120,9 @@
    AC_DEFINE(HAVE_STRUCT_UTIMBUF)
 fi
 
+AM_GLIBC
 AC_FUNC_FNMATCH
-if test $ac_cv_func_fnmatch_works = no; then
+if test $ac_cv_func_fnmatch_works = no && test $ac_cv_gnu_library = no; then
   LIBOBJS="$LIBOBJS fnmatch.o"
   AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch)
 fi
--- /dev/null	Mon Dec 31 21:00:00 1979
+++ fileutils-3.16/m4/glibc.m4	Sun Sep  6 12:10:18 1998
@@ -0,0 +1,23 @@
+#serial 1
+
+dnl From Gordon Matzigkeit.
+dnl Test for the GNU C Library.
+dnl FIXME: this should migrate into libit.
+
+AC_DEFUN(AM_GLIBC,
+[AC_CACHE_CHECK(whether we are using the GNU C Library,
+  ac_cv_gnu_library,
+[AC_EGREP_CPP([Thanks for using GNU],
+[#include <features.h>
+#ifdef __GNU_LIBRARY__
+Thanks for using GNU
+#endif],
+  ac_cv_gnu_library=yes, ac_cv_gnu_library=no)])
+AC_CACHE_CHECK(for version 2 of the GNU C Library,
+  ac_cv_glibc,
+[AC_EGREP_CPP([Thanks for using GNU too],
+[#include <features.h>
+#ifdef __GLIBC__
+Thanks for using GNU too
+#endif],
+  ac_cv_glibc=yes, ac_cv_glibc=no)])])dnl
--- fileutils-3.16.orig/m4/Makefile.am	Sun Dec 22 22:33:31 1996
+++ fileutils-3.16/m4/Makefile.am	Sun Sep  6 11:43:26 1998
@@ -5,7 +5,7 @@
 #   |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
 EXTRA_DIST = README \
 ccstdc.m4 dmalloc.m4 error.m4 getgroups.m4 getline.m4 getloadavg.m4 \
-gettext.m4 header.m4 init.m4 install.m4 jm-mktime.m4 jm-winsz1.m4 \
+gettext.m4 glibc.m4 header.m4 init.m4 install.m4 jm-mktime.m4 jm-winsz1.m4 \
 jm-winsz2.m4 lcmessage.m4 lispdir.m4 maintainer.m4 memcmp.m4 mktime.m4 \
 obstack.m4 progtest.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strftime.m4 \
 strtod.m4 termios.m4 uptime.m4 winsz.m4
