X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ffnmatch.m4;h=22ba35cf1598a36fe566e43beb4d0b4b071f2512;hb=fb733077fcd97a36e1ffdb292387943df8e1b9b4;hp=9b537a7e0ccd851e7c968ae9800e4936c97e6549;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 9b537a7e0..22ba35cf1 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,4 +1,4 @@ -# Check for fnmatch - serial 5. +# Check for fnmatch - serial 7. # Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -65,6 +65,8 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], return 1; if (!y ("a*", "abc", 0)) return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) return 2; if (!y ("a\\\\bc", "abc", 0)) @@ -126,19 +128,9 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], rm -f "$gl_source_base/fnmatch.h" else FNMATCH_H=fnmatch.h - AC_LIBOBJ([fnmatch]) - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], - [Define to a replacement function name for fnmatch().]) - dnl Prerequisites of lib/fnmatch.c. - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_DECLS([isblank], [], [], [#include ]) - AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) - AC_CHECK_HEADERS_ONCE([wctype.h]) fi AC_SUBST([FNMATCH_H]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. @@ -148,3 +140,17 @@ AC_DEFUN([gl_FUNC_FNMATCH_GNU], AC_REQUIRE([gl_FUNC_FNMATCH_POSIX]) ]) + +AC_DEFUN([gl_PREREQ_FNMATCH], +[ + dnl We must choose a different name for our function, since on ELF systems + dnl a broken fnmatch() in libc.so would override our fnmatch() if it is + dnl compiled into a shared library. + AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], + [Define to a replacement function name for fnmatch().]) + dnl Prerequisites of lib/fnmatch.c. + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_CHECK_DECLS([isblank], [], [], [#include ]) + AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) + AC_CHECK_HEADERS_ONCE([wctype.h]) +])