]> Savannah Git Hosting - gnulib.git/commitdiff
utime-h: Generate header file when module 'posixcheck' is in use.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Aug 2018 22:18:17 +0000 (00:18 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Aug 2018 22:18:17 +0000 (00:18 +0200)
* m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
UTIME_H to non-empty.

ChangeLog
m4/utime_h.m4

index 75022d0ac0c77c3cf04727e2e2acc6627fb60018..c7d0999d4dd689867f9a2b86a16915cf73eb0437 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 89e301ba27b2be32d9bee85647ebfd5d785aa170..ab459fe8f15143c5623d2553721620d8fd2f61b0 100644 (file)
@@ -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"])