]> Dogcows Code - chaz/tar/blob - m4/fnmatch.m4
(dumpdir_size,get_gnu_dumpdir)
[chaz/tar] / m4 / fnmatch.m4
1 dnl This is a copy of autoconf 2.13, except we also check that
2 dnl FNM_FILE_NAME | FNM_LEADING_DIR works.
3 dnl
4 undefine([AC_FUNC_FNMATCH])
5 AC_DEFUN(AC_FUNC_FNMATCH,
6 [AC_CACHE_CHECK(for working GNU-style fnmatch, ac_cv_func_fnmatch_works,
7 # Some versions of Solaris, SCO, and the GNU C Library
8 # have a broken or incompatible fnmatch.
9 # So we run a test program. If we are cross-compiling, take no chance.
10 # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
11 [AC_TRY_RUN([#include <fnmatch.h>
12 main() {
13 exit (fnmatch ("a*", "abc", 0) != 0
14 || fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) != FNM_NOMATCH
15 || fnmatch("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
16 || fnmatch("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
17 || fnmatch("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
18 }],
19 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
20 ac_cv_func_fnmatch_works=no)])
21 if test $ac_cv_func_fnmatch_works = yes; then
22 AC_DEFINE(HAVE_FNMATCH)
23 fi
24 ])
This page took 0.03542 seconds and 4 git commands to generate.