Support non-blocking pipe I/O and SIGPIPE in pwrite().
[pspp] / modules / errno
index 221bebf0de67afcc2959d2b0d88e05607d9c7c27..95169015533ab42556824b85fc09554c15a9eb1e 100644 (file)
@@ -12,14 +12,12 @@ configure.ac:
 gl_HEADER_ERRNO_H
 
 Makefile.am:
-nodist_pkginclude_HEADERS += $(ERRNO_H)
-EXTRA_HEADERS += errno.h
-
 BUILT_SOURCES += $(ERRNO_H)
 
 # We need the following in order to create <errno.h> when the system
 # doesn't have one that is POSIX compliant.
-errno.h: errno.in.h
+if GL_GENERATE_ERRNO_H
+errno.h: errno.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@@ -35,6 +33,10 @@ errno.h: errno.in.h
              < $(srcdir)/errno.in.h; \
        } > $@-t && \
        mv $@-t $@
+else
+errno.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 MOSTLYCLEANFILES += errno.h errno.h-t
 
 Include: