]> Dogcows Code - chaz/tar/blob - m4/fnmatch.m4
Add a couple more test cases to catch bugs in glibc 2.1.95.
[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([#include <fnmatch.h>
11 main() {
12 exit (fnmatch ("a*", "abc", 0) != 0
13 || fnmatch("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
14 || fnmatch("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
15 || fnmatch("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
16 }],
17 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
18 ac_cv_func_fnmatch_works=no)])
19 if test $ac_cv_func_fnmatch_works = yes; then
20 AC_DEFINE(HAVE_FNMATCH)
21 fi
22 ])
This page took 0.038658 seconds and 5 git commands to generate.