Make better use of Autoconf.
[gnulib.git] / modules / sys_time
blobcfb7ddd2d9649ecf3816ba30a8ea3440162619bb
1 Description:
2 A <sys/time.h> that conforms better to POSIX.
4 Files:
5 lib/sys_time.in.h
6 m4/sys_time_h.m4
7 m4/sys_socket_h.m4
9 Depends-on:
10 include_next
11 snippet/arg-nonnull
12 snippet/c++defs
13 snippet/warn-on-use
15 configure.ac:
16 gl_HEADER_SYS_TIME_H
17 AC_PROG_MKDIR_P
19 Makefile.am:
20 BUILT_SOURCES += sys/time.h
22 # We need the following in order to create <sys/time.h> when the system
23 # doesn't have one that works with the given compiler.
24 sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
25         $(AM_V_at)$(MKDIR_P) sys
26         $(AM_V_GEN)rm -f $@-t $@ && \
27         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
28           sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
29               -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
30               -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
31               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
32               -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
33               -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
34               -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
35               -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
36               -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
37               -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
38               -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
39               -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
40               -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
41               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
42               -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
43               < $(srcdir)/sys_time.in.h; \
44         } > $@-t && \
45         mv $@-t $@
46 MOSTLYCLEANFILES += sys/time.h sys/time.h-t
48 Include:
49 <sys/time.h>
51 License:
52 LGPLv2+
54 Maintainer:
55 all