The modules iconv-h, monetary, utime-h install their header file only
conditionally. But that condition needs to evaluate to true if module
'posixcheck' is in use. This series of patches fixes it.


2018-08-05  Bruno Haible  <br...@clisp.org>

        utime-h: Generate header file when module 'posixcheck' is in use.
        * m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
        UTIME_H to non-empty.

2018-08-05  Bruno Haible  <br...@clisp.org>

        monetary: Generate header file when module 'posixcheck' is in use.
        * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
        use, set MONETARY_H to non-empty.

2018-08-05  Bruno Haible  <br...@clisp.org>

        iconv-h: Generate header file when module 'posixcheck' is in use.
        * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
        set ICONV_H to non-empty.

>From ea15aa4d315731a0a789aae5ef896c864a2c39df Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Mon, 6 Aug 2018 00:15:14 +0200
Subject: [PATCH 1/3] iconv-h: Generate header file when module 'posixcheck' is
 in use.

* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
set ICONV_H to non-empty.
---
 ChangeLog     | 6 ++++++
 m4/iconv_h.m4 | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d1c7c25..c36294f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-08-05  Bruno Haible  <br...@clisp.org>
 
+	iconv-h: Generate header file when module 'posixcheck' is in use.
+	* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
+	set ICONV_H to non-empty.
+
+2018-08-05  Bruno Haible  <br...@clisp.org>
+
 	Optimize the "checking whether ... is declared without a macro" checks.
 	Suggested by Paul Eggert in
 	<https://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00339.html>.
diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4
index f910faf..918969e 100644
--- a/m4/iconv_h.m4
+++ b/m4/iconv_h.m4
@@ -1,4 +1,4 @@
-# iconv_h.m4 serial 9
+# iconv_h.m4 serial 10
 dnl Copyright (C) 2007-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,
@@ -43,5 +43,6 @@ AC_DEFUN([gl_ICONV_H_DEFAULTS],
   REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN])
   REPLACE_ICONV_UTF=0;  AC_SUBST([REPLACE_ICONV_UTF])
   ICONV_H='';           AC_SUBST([ICONV_H])
+  m4_ifdef([gl_POSIXCHECK],[ICONV_H='iconv.h'])
   AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"])
 ])
-- 
2.7.4

>From 48b436436425794f1e3116e1bafe085a9de13ab5 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Mon, 6 Aug 2018 00:16:43 +0200
Subject: [PATCH 2/3] monetary: Generate header file when module 'posixcheck'
 is in use.

* m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
use, set MONETARY_H to non-empty.
---
 ChangeLog        | 6 ++++++
 m4/monetary_h.m4 | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c36294f..75022d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-08-05  Bruno Haible  <br...@clisp.org>
 
+	monetary: Generate header file when module 'posixcheck' is in use.
+	* m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
+	use, set MONETARY_H to non-empty.
+
+2018-08-05  Bruno Haible  <br...@clisp.org>
+
 	iconv-h: Generate header file when module 'posixcheck' is in use.
 	* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
 	set ICONV_H to non-empty.
diff --git a/m4/monetary_h.m4 b/m4/monetary_h.m4
index 7eb3b75..0866b80 100644
--- a/m4/monetary_h.m4
+++ b/m4/monetary_h.m4
@@ -1,4 +1,4 @@
-# monetary_h.m4 serial 1
+# monetary_h.m4 serial 2
 dnl Copyright (C) 2017-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,
@@ -18,7 +18,7 @@ AC_DEFUN([gl_MONETARY_H_BODY],
   AC_CHECK_HEADERS_ONCE([monetary.h])
   dnl For now, we provide a <monetary.h> wrapper only if the system already
   dnl has a <monetary.h>.
-  if test $ac_cv_header_monetary_h = yes; then
+  if m4_ifdef([gl_POSIXCHECK],[true],[test $ac_cv_header_monetary_h = yes]); then
     MONETARY_H='monetary.h'
 
     gl_CHECK_NEXT_HEADERS([monetary.h])
-- 
2.7.4

>From c9d2b6f28e7814f34a36801dd186d18776a4ff75 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Mon, 6 Aug 2018 00:18:17 +0200
Subject: [PATCH 3/3] utime-h: Generate header file when module 'posixcheck' is
 in use.

* m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
UTIME_H to non-empty.
---
 ChangeLog     |  6 ++++++
 m4/utime_h.m4 | 27 +++++++++++++++------------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 75022d0..c7d0999 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-08-05  Bruno Haible  <br...@clisp.org>
 
+	utime-h: Generate header file when module 'posixcheck' is in use.
+	* m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
+	UTIME_H to non-empty.
+
+2018-08-05  Bruno Haible  <br...@clisp.org>
+
 	monetary: Generate header file when module 'posixcheck' is in use.
 	* m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
 	use, set MONETARY_H to non-empty.
diff --git a/m4/utime_h.m4 b/m4/utime_h.m4
index 89e301b..ab459fe 100644
--- a/m4/utime_h.m4
+++ b/m4/utime_h.m4
@@ -1,4 +1,4 @@
-# utime_h.m4 serial 1
+# utime_h.m4 serial 2
 dnl Copyright (C) 2017-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,
@@ -20,17 +20,20 @@ AC_DEFUN([gl_UTIME_H],
   fi
   AC_SUBST([HAVE_UTIME_H])
 
-  UTIME_H=''
-  if test $ac_cv_header_utime_h != yes; then
-    dnl Provide a substitute <utime.h> file.
-    UTIME_H=utime.h
-  else
-    case "$host_os" in
-      mingw*) dnl Need special handling of 'struct utimbuf'.
-        UTIME_H=utime.h
-        ;;
-    esac
-  fi
+  m4_ifdef([gl_POSIXCHECK],
+    [UTIME_H=utime.h],
+    [UTIME_H=''
+     if test $ac_cv_header_utime_h != yes; then
+       dnl Provide a substitute <utime.h> file.
+       UTIME_H=utime.h
+     else
+       case "$host_os" in
+         mingw*) dnl Need special handling of 'struct utimbuf'.
+           UTIME_H=utime.h
+           ;;
+       esac
+     fi
+    ])
   AC_SUBST([UTIME_H])
   AM_CONDITIONAL([GL_GENERATE_UTIME_H], [test -n "$UTIME_H"])
 
-- 
2.7.4

Reply via email to