3 dnl Determine whether to add fnmatch.o to LIBOBJS and to
4 dnl define fnmatch to rpl_fnmatch.
9 # We look for fnmatch.h to avoid that the test fails in C++.
10 AC_DEFUN(kd_FUNC_FNMATCH_CASE,
11 [AC_CHECK_HEADERS(fnmatch.h)
12 AC_CACHE_CHECK(for working fnmatch with case folding, ac_cv_func_fnmatch_works,
13 # Some versions of Solaris or SCO have a broken fnmatch function.
14 # So we run a test program. If we are cross-compiling, take no chance.
15 # Also want FNM_CASEFOLD
16 # Thanks to John Oleynick and Franc,ois Pinard for this test.
27 exit (fnmatch ("A*", "abc", FNM_CASEFOLD) != 0);
29 ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
30 ac_cv_func_fnmatch_works=no)])
31 if test $ac_cv_func_fnmatch_works = yes; then
32 AC_DEFINE(HAVE_FNMATCH, 1,
33 [Define if your system has a working `fnmatch' function with case folding.])
38 AC_DEFUN(kd_FUNC_FNMATCH_CASE_RPL,
40 AC_REQUIRE([AM_GLIBC])
42 if test $ac_cv_func_fnmatch_works = no \
43 && test $ac_cv_gnu_library = no; then
45 LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
46 AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch,
47 [Define to rpl_fnmatch if the replacement function should be used.])