]> Dogcows Code - chaz/tar/blob - m4/fnmatch.m4
(AC_FUNC_FNMATCH): Include fnmatch.h when testing fnmatch.
[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("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR) != 0);
14 }],
15 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
16 ac_cv_func_fnmatch_works=no)])
17 if test $ac_cv_func_fnmatch_works = yes; then
18 AC_DEFINE(HAVE_FNMATCH)
19 fi
20 ])
This page took 0.037882 seconds and 5 git commands to generate.