summaryrefslogtreecommitdiff
path: root/girepository/gdump.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-30 10:44:12 -0400
committerColin Walters <walters@verbum.org>2010-09-30 13:47:25 -0400
commit82e08ec5f5f2440ed5be2e5ca5954ebac2eb7775 (patch)
tree90512dfae632254505c8dcabffe376fd2bef194e /girepository/gdump.c
parentebef2cf9f1c5de556afd839e0a4c13db373d4a50 (diff)
downloadgobject-introspection-82e08ec5f5f2440ed5be2e5ca5954ebac2eb7775.tar.gz
scanner: Don't link to -lgirepository when dumpingGOBJECT_INTROSPECTION_0_9_9
This helps us avoid a problematic case where in say jhbuild, using a system (/usr/lib) glib, adding in -l girepository-1.0 will inject -L /path/to/builddir, when we don't want that. https://bugzilla.gnome.org/show_bug.cgi?id=630342
Diffstat (limited to 'girepository/gdump.c')
-rw-r--r--girepository/gdump.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/girepository/gdump.c b/girepository/gdump.c
index 84ac3c71..166a9e72 100644
--- a/girepository/gdump.c
+++ b/girepository/gdump.c
@@ -24,8 +24,15 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include "girepository.h"
+/* This file is both compiled into libgirepository.so, and installed
+ * on the filesystem. But for the dumper, we want to avoid linking
+ * to libgirepository; see
+ * https://bugzilla.gnome.org/show_bug.cgi?id=630342
+ */
+#ifdef G_IREPOSITORY_COMPILATION
#include "config.h"
+#include "girepository.h"
+#endif
#include <string.h>