>From 5fef422c49de3f1c220fb0082af9246569af420d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 18 Aug 2018 21:31:30 +0200 Subject: [PATCH 1/3] glob-h: Revert Paul Eggert's revert. * m4/glob_h.m4: Revert to previous state. * modules/glob-h: Likewise. --- ChangeLog | 6 ++++++ m4/glob_h.m4 | 18 +++++++++++++++++- modules/glob-h | 7 ++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 120b4e9..973abae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-08-18 Bruno Haible + + glob-h: Revert Paul Eggert's revert. + * m4/glob_h.m4: Revert to previous state. + * modules/glob-h: Likewise. + 2018-08-18 Paul Eggert glob-h: always build glob.h diff --git a/m4/glob_h.m4 b/m4/glob_h.m4 index 9fe49c7..717cf54 100644 --- a/m4/glob_h.m4 +++ b/m4/glob_h.m4 @@ -1,4 +1,4 @@ -# glob_h.m4 serial 2 +# glob_h.m4 serial 3 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, @@ -21,6 +21,22 @@ AC_DEFUN([gl_GLOB_H], fi AC_SUBST([HAVE_GLOB_H]) + m4_ifdef([gl_POSIXCHECK], + [GLOB_H=glob.h], + [GLOB_H='' + if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then + dnl Override always, to support the C++ GNULIB_NAMESPACE. + GLOB_H=glob.h + else + if test $ac_cv_header_glob_h != yes; then + dnl Provide a substitute file. + GLOB_H=glob.h + fi + fi + ]) + AC_SUBST([GLOB_H]) + AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) + dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include diff --git a/modules/glob-h b/modules/glob-h index b61bc33..b490a73 100644 --- a/modules/glob-h +++ b/modules/glob-h @@ -20,9 +20,10 @@ configure.ac: gl_GLOB_H Makefile.am: -BUILT_SOURCES += glob.h +BUILT_SOURCES += $(GLOB_H) # We need the following in order to create . +if GL_GENERATE_GLOB_H glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f address@hidden $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -43,6 +44,10 @@ glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( < $(srcdir)/glob.in.h; \ } > address@hidden && \ mv address@hidden $@ +else +glob.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += glob.h glob.h-t Include: -- 2.7.4