]> Dogcows Code - chaz/tar/blob - m4/fnmatch.m4
Initial revision
[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 GNU-style fnmatch, ac_cv_func_fnmatch_works,
7 # Some versions of Solaris or SCO have a broken or incompatible fnmatch.
8 # So we run a test program. If we are cross-compiling, take no chance.
9 # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
10 [AC_TRY_RUN([main() {
11 exit (fnmatch ("a*", "abc", 0) != 0
12 || fnmatch("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
13 }],
14 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
15 ac_cv_func_fnmatch_works=no)])
16 if test $ac_cv_func_fnmatch_works = yes; then
17 AC_DEFINE(HAVE_FNMATCH)
18 fi
19 ])
This page took 0.039015 seconds and 5 git commands to generate.