]> Dogcows Code - chaz/tar/blob - m4/fnmatch.m4
Mention the GNU C library.
[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, 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("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
15 || fnmatch("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) != 0
16 || fnmatch("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
17 }],
18 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
19 ac_cv_func_fnmatch_works=no)])
20 if test $ac_cv_func_fnmatch_works = yes; then
21 AC_DEFINE(HAVE_FNMATCH)
22 fi
23 ])
This page took 0.035107 seconds and 5 git commands to generate.