chiark / gitweb /
cgi-fcgi-perl: wip, doc comment
[chiark-utils.git] / cprogs / Makefile
index 64d4ba4d780f54fb104f82e02079d53d35818b95..cd82ab1bf55cbdc43881de5b0d1ab3685737d727 100644 (file)
@@ -28,16 +28,26 @@ include ../settings.make
 RWBUFFER_SIZE_MB=16
 
 PROGRAMS=              readbuffer writebuffer with-lock-ex xbatmon-simple \
-                       summer watershed rcopy-repeatedly xduplic-copier \
-                       acctdump
+                       summer watershed rcopy-repeatedly xduplic-copier
 SUIDSBINPROGRAMS=      really
 DAEMONS=               trivsoundd
 MAN1PAGES=             readbuffer.1 writebuffer.1 with-lock-ex.1 \
                        xduplic-copier.1
-MAN8PAGES=             trivsoundd.8 really.8 acctdump.8
+MAN8PAGES=             trivsoundd.8 really.8
 BUILTTXTDOCS=          watershed.txt
 TXTDOCS=               $(BUILTTXTDOCS)
 
+acctdump_cc_out:=$(shell \
+       printf "\#include <sys/types.h>\n\#include <sys/acct.h>" \
+               | $(CC) -E - 2>&1 >/dev/null \
+)
+ifeq (,$(acctdump_cc_out))
+PROGRAMS+=acctdump
+MAN8PAGES+=acctdump.8
+else
+$(warning Not building acctdump: $(acctdump_cc_out))
+endif
+
 TARGETS=       $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS) $(BUILTTXTDOCS)
 
 all:           $(TARGETS)