From 124d79935c87241abe7b1f48c609311353661289 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 19 Aug 2018 11:47:06 +0200 Subject: [PATCH] glob: Fix another compilation error when glob.h is not replaced. Reported by Reuben Thomas in . * m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed. * m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE. --- ChangeLog | 8 ++++++++ m4/glob.m4 | 7 ++++++- m4/glob_h.m4 | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6f24fae9b..a65daf6d8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-08-19 Bruno Haible + + glob: Fix another compilation error when glob.h is not replaced. + Reported by Reuben Thomas in + . + * m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed. + * m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE. + 2018-08-18 Bruno Haible fnmatch: Avoid conflicting macro definitions of 'fnmatch'. diff --git a/m4/glob.m4 b/m4/glob.m4 index a9af4e4c16..69fd2ab14f 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 19 +# glob.m4 serial 20 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, @@ -67,6 +67,11 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 REPLACE_GLOB_PATTERN_P=1 fi 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"]) + fi ]) # Prerequisites of lib/glob.c and lib/globfree.c. diff --git a/m4/glob_h.m4 b/m4/glob_h.m4 index 717cf54f03..d504c06815 100644 --- a/m4/glob_h.m4 +++ b/m4/glob_h.m4 @@ -1,4 +1,4 @@ -# glob_h.m4 serial 3 +# glob_h.m4 serial 4 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, @@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -AC_DEFUN([gl_GLOB_H], +AC_DEFUN_ONCE([gl_GLOB_H], [ AC_REQUIRE([gl_GLOB_H_DEFAULTS]) m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) -- 2.39.5