summaryrefslogtreecommitdiffstats
path: root/spice_codegen.py
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-21 13:16:18 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-05-03 14:44:10 +0200
commit7e30572ab1d51d5b8a7f6f9b9a3472d59a0ea167 (patch)
treec433489e304d97dab1da09c9328b0830d8a25aa7 /spice_codegen.py
parent78c1465ed309d2e8937dc00a19635f40c8a4b05a (diff)
downloadspice-7e30572ab1d51d5b8a7f6f9b9a3472d59a0ea167.tar.gz
spice-7e30572ab1d51d5b8a7f6f9b9a3472d59a0ea167.tar.xz
spice-7e30572ab1d51d5b8a7f6f9b9a3472d59a0ea167.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 3a9989d7..4dad06c4 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")