X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Ffnmatch.m4;h=22ba35cf1598a36fe566e43beb4d0b4b071f2512;hb=e4aa7fe91e3fa0e763e05ca9038c28d970928e4f;hp=a4b1ca4d39fa903b35b04ade1a4a8a515e1437e2;hpb=1f8c872f267bc608644d6de67aa5fab6285a8533;p=gnulib.git diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index a4b1ca4d3..22ba35cf1 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,6 +1,6 @@ -# Check for fnmatch - serial 5. +# Check for fnmatch - serial 7. -# Copyright (C) 2000-2007, 2009-2010 Free Software Foundation, Inc. +# Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -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]) +])