]> Savannah Git Hosting - gnulib.git/commitdiff
glob: Fix another compilation error when glob.h is not replaced.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Aug 2018 09:47:06 +0000 (11:47 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Aug 2018 09:47:06 +0000 (11:47 +0200)
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.

* 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
m4/glob.m4
m4/glob_h.m4

index e6f24fae9b9998d12e0ea702805f411ce39c2d97..a65daf6d8fd59ff7812259f72e685f3848c34fc1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-08-19  Bruno Haible  <bruno@clisp.org>
+
+       glob: Fix another compilation error when glob.h is not replaced.
+       Reported by Reuben Thomas <rrt@sc3d.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
+       * 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  <bruno@clisp.org>
 
        fnmatch: Avoid conflicting macro definitions of 'fnmatch'.
index a9af4e4c1607cfde26450733c7fd74228582443f..69fd2ab14fd02ca5db9958e335ef799eb1b9edeb 100644 (file)
@@ -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.
index 717cf54f0395bbb65447f2dcf8139eb1e8c4bc2f..d504c0681564c6e05de1e3ef9b996e3acc78768e 100644 (file)
@@ -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])])