>From 4172747f577878df970b8494cc7d0d7042d9894e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 19 Aug 2018 21:00:35 +0200 Subject: [PATCH 3/3] glob-h: Formalize side effects from other modules. * m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro. * m4/glob.m4 (gl_GLOB): Invoke it. --- ChangeLog | 4 ++++ m4/glob.m4 | 5 ++--- m4/glob_h.m4 | 10 +++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38d1ae3..f43e400 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2018-08-19 Bruno Haible + glob-h: Formalize side effects from other modules. + * m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro. + * m4/glob.m4 (gl_GLOB): Invoke it. + 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. diff --git a/m4/glob.m4 b/m4/glob.m4 index 69fd2ab..53a1911 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 20 +# glob.m4 serial 21 dnl Copyright (C) 2005-2007, 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, @@ -69,8 +69,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 fi if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then - GLOB_H=glob.h - AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) + gl_REPLACE_GLOB_H fi ]) diff --git a/m4/glob_h.m4 b/m4/glob_h.m4 index d504c06..3ac78a8 100644 --- a/m4/glob_h.m4 +++ b/m4/glob_h.m4 @@ -1,4 +1,4 @@ -# glob_h.m4 serial 4 +# glob_h.m4 serial 5 dnl Copyright (C) 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, @@ -44,6 +44,14 @@ AC_DEFUN_ONCE([gl_GLOB_H], [glob globfree glob_pattern_p]) ]) +dnl Unconditionally enables the replacement of . +AC_DEFUN([gl_REPLACE_GLOB_H], +[ + AC_REQUIRE([gl_GLOB_H_DEFAULTS]) + GLOB_H='glob.h' + AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) +]) + AC_DEFUN([gl_GLOB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. -- 2.7.4