summaryrefslogtreecommitdiffstats
path: root/spice_codegen.py
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-21 13:16:18 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:52 +0100
commit61b344d7742c5e92154fdb85b7eecefd6d4993e3 (patch)
treefe975d4f0a66bcc8daa17bd6ec0c9cb1643d66b6 /spice_codegen.py
parent08326f733a2311ad241fad7146516c69840b675e (diff)
downloadspice-common-61b344d7742c5e92154fdb85b7eecefd6d4993e3.tar.gz
spice-common-61b344d7742c5e92154fdb85b7eecefd6d4993e3.tar.xz
spice-common-61b344d7742c5e92154fdb85b7eecefd6d4993e3.zip
add config.h to autogenerated files too
Modify the python (de)marshaller generator to add #include <config.h> at the beginning of the C files it generates
Diffstat (limited to 'spice_codegen.py')
-rwxr-xr-xspice_codegen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/spice_codegen.py b/spice_codegen.py
index 3a9989d..4dad06c 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -142,6 +142,10 @@ writer.set_option("source", os.path.basename(proto_file))
writer.public_prefix = options.prefix
+writer.writeln("#ifdef HAVE_CONFIG_H")
+writer.writeln("#include <config.h>")
+writer.writeln("#endif")
+
if options.assert_on_error:
writer.set_option("assert_on_error")