changeset 39801:87507991a9fe

fnmatch-h: Formalize side effects from other modules. * m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
author Bruno Haible <bruno@clisp.org>
date Sun, 19 Aug 2018 20:58:58 +0200
parents 516c78d5715b
children e9e2c9e0bdca
files ChangeLog m4/fnmatch.m4 m4/fnmatch_h.m4
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Aug 19 20:57:24 2018 +0200
+++ b/ChangeLog	Sun Aug 19 20:58:58 2018 +0200
@@ -1,5 +1,9 @@
 2018-08-19  Bruno Haible  <bruno@clisp.org>
 
+	fnmatch-h: Formalize side effects from other modules.
+	* m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro.
+	* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
+
 	limits-h: Formalize side effects from other modules.
 	* m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
 	* m4/stdint.m4 (gl_STDINT_H): Invoke it.
--- a/m4/fnmatch.m4	Sun Aug 19 20:57:24 2018 +0200
+++ b/m4/fnmatch.m4	Sun Aug 19 20:58:58 2018 +0200
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 12.  -*- coding: utf-8 -*-
+# Check for fnmatch - serial 13.  -*- coding: utf-8 -*-
 
 # Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -125,8 +125,7 @@
     fi
   fi
   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
-    FNMATCH_H=fnmatch.h
-    AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
+    gl_REPLACE_FNMATCH_H
   fi
 ])
 
--- a/m4/fnmatch_h.m4	Sun Aug 19 20:57:24 2018 +0200
+++ b/m4/fnmatch_h.m4	Sun Aug 19 20:58:58 2018 +0200
@@ -1,4 +1,4 @@
-# fnmatch_h.m4 serial 3
+# fnmatch_h.m4 serial 4
 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,
@@ -49,6 +49,14 @@
     [fnmatch])
 ])
 
+dnl Unconditionally enables the replacement of <fnmatch.h>.
+AC_DEFUN([gl_REPLACE_FNMATCH_H],
+[
+  AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
+  FNMATCH_H='fnmatch.h'
+  AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
+])
+
 AC_DEFUN([gl_FNMATCH_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.