changeset 39768:d734cfac6fc0

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.
author Bruno Haible <bruno@clisp.org>
date Mon, 06 Aug 2018 00:18:17 +0200
parents 904aa2c14b63
children 40762ae92d3c
files ChangeLog m4/utime_h.m4
diffstat 2 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 06 00:16:43 2018 +0200
+++ b/ChangeLog	Mon Aug 06 00:18:17 2018 +0200
@@ -1,3 +1,9 @@
+2018-08-05  Bruno Haible  <bruno@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  <bruno@clisp.org>
 
 	monetary: Generate header file when module 'posixcheck' is in use.
--- a/m4/utime_h.m4	Mon Aug 06 00:16:43 2018 +0200
+++ b/m4/utime_h.m4	Mon Aug 06 00:18:17 2018 +0200
@@ -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 @@
   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"])