summaryrefslogtreecommitdiff
path: root/modules/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pthread')
-rw-r--r--modules/pthread7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/pthread b/modules/pthread
index 7aaaffac40..68551e14b3 100644
--- a/modules/pthread
+++ b/modules/pthread
@@ -20,7 +20,8 @@ BUILT_SOURCES += $(PTHREAD_H)
# We need the following in order to create <pthread.h> when the system
# doesn't have one that works with the given compiler.
-pthread.h: pthread.in.h
+if GL_GENERATE_PTHREAD_H
+pthread.h: pthread.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
@@ -33,6 +34,10 @@ pthread.h: pthread.in.h
< $(srcdir)/pthread.in.h; \
} > $@-t && \
mv $@-t $@
+else
+pthread.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += pthread.h pthread.h-t
Include: