+2018-08-13 Bruno Haible <bruno@clisp.org>
+
+ fnmatch, fnmatch-gnu: Fix compilation error on Mac OS X.
+ Reported by Jeroen Meijer <jjgmeijer@gmail.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
+ and by Paul J. Lucas <paul@lucasmail.org> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
+ * m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
+ (gl_FNMATCH_H_GNU): New macro.
+ * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Require gl_FNMATCH_H_GNU.
+
2018-08-11 Bruno Haible <bruno@clisp.org>
setlocale: Trivial simplification.
2018-08-10 Bruno Haible <bruno@clisp.org>
- fnmatch: Fix compilation error in C++ namespace mode on Mac OS X.
+ fnmatch-gnu: Fix compilation error in C++ namespace mode on Mac OS X.
* modules/fnmatch-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/fnmatch.in.h (fnmatch): Skip _GL_CXXALIASWARN if module
'fnmatch-gnu' is in use.
-# Check for fnmatch - serial 10. -*- coding: utf-8 -*-
+# Check for fnmatch - serial 11. -*- coding: utf-8 -*-
# Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
[
m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU])
+ AC_REQUIRE([gl_FNMATCH_H_GNU])
AC_REQUIRE([gl_FUNC_FNMATCH_POSIX])
])
-# fnmatch_h.m4 serial 2
+# fnmatch_h.m4 serial 3
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl From Bruno Haible.
-AC_DEFUN([gl_FNMATCH_H],
+# Request a POSIX compliant <fnmatch.h> include file.
+AC_DEFUN_ONCE([gl_FNMATCH_H],
[
AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
[fnmatch])
])
+# Request a POSIX compliant <fnmatch.h> include file with GNU extensions.
+AC_DEFUN([gl_FNMATCH_H_GNU],
+[
+ AC_REQUIRE([gl_FNMATCH_H])
+ if test -z "$FNMATCH_H"; then
+ AC_CACHE_CHECK([whether <fnmatch.h> has the GNU extensions],
+ [gl_cv_header_fnmatch_h_gnu],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <fnmatch.h>]],
+ [[int gnu_flags = FNM_FILE_NAME | FNM_LEADING_DIR | FNM_CASEFOLD | FNM_EXTMATCH;]])],
+ [gl_cv_header_fnmatch_h_gnu=yes],
+ [gl_cv_header_fnmatch_h_gnu=no])
+ ])
+ if test $gl_cv_header_fnmatch_h_gnu != yes; then
+ FNMATCH_H=fnmatch.h
+ AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
+ fi
+ fi
+])
+
AC_DEFUN([gl_FNMATCH_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.