]> Dogcows Code - chaz/tar/commitdiff
Initial revision
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Sep 1999 06:12:58 +0000 (06:12 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 20 Sep 1999 06:12:58 +0000 (06:12 +0000)
m4/fnmatch.m4 [new file with mode: 0644]

diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
new file mode 100644 (file)
index 0000000..5654a41
--- /dev/null
@@ -0,0 +1,19 @@
+dnl This is a copy of autoconf 2.13, except we also check that
+dnl FNM_FILE_NAME | FNM_LEADING_DIR works.
+dnl
+undefine([AC_FUNC_FNMATCH])
+AC_DEFUN(AC_FUNC_FNMATCH,
+[AC_CACHE_CHECK(for GNU-style fnmatch, ac_cv_func_fnmatch_works,
+# Some versions of Solaris or SCO have a broken or incompatible fnmatch.
+# So we run a test program.  If we are cross-compiling, take no chance.
+# Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
+[AC_TRY_RUN([main() {
+  exit (fnmatch ("a*", "abc", 0) != 0
+       || fnmatch("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
+}],
+ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
+ac_cv_func_fnmatch_works=no)])
+if test $ac_cv_func_fnmatch_works = yes; then
+  AC_DEFINE(HAVE_FNMATCH)
+fi
+])
This page took 0.023059 seconds and 4 git commands to generate.