s4-waf: replace stdint.h and stdbool.h on systems that don't have them
authorAndrew Tridgell <tridge@samba.org>
Thu, 25 Mar 2010 03:32:58 +0000 (14:32 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:06 +0000 (20:27 +1000)
lib/replace/hdr_replace.h [new file with mode: 0644]
lib/replace/wscript

diff --git a/lib/replace/hdr_replace.h b/lib/replace/hdr_replace.h
new file mode 100644 (file)
index 0000000..6cfa50f
--- /dev/null
@@ -0,0 +1,2 @@
+/* this is a replacement header for a missing system header */
+#include "replace.h"
index e457c5f84596f2284472f4f50e8522caa0e9b221..8424319a1a02d12b03ecb864126e2466db7a4431 100644 (file)
@@ -318,3 +318,15 @@ def build(bld):
 
     bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c',
                         enabled=bld.CONFIG_SET('REPLACE_GETPASS'))
+
+    # build replacements for stdint.h and stdbool.h if needed
+    bld.SAMBA_GENERATOR('replace_stdint_h',
+                        rule='cp ${SRC} ${TGT}',
+                        source='hdr_replace.h',
+                        target='stdint.h',
+                        enabled = not bld.CONFIG_SET('HAVE_STDINT_H'))
+    bld.SAMBA_GENERATOR('replace_stdbool_h',
+                        rule='cp ${SRC} ${TGT}',
+                        source='hdr_replace.h',
+                        target='stdbool.h',
+                        enabled = not bld.CONFIG_SET('HAVE_STDBOOL_H'))