diff --git a/gir/Makefile.am b/gir/Makefile.am
index f480e86..9bc9ef4 100644
--- a/gir/Makefile.am
+++ b/gir/Makefile.am
@@ -24,6 +24,7 @@ GCONF_LIBDIR=`pkg-config --variable=libdir gconf-2.0`
 GConf.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace GConf \
             --include=GObject.gir \
+            --library-path=$(GCONF_LIBDIR) \
             --library=gconf-2 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -39,6 +40,7 @@ SOUP_LIBDIR=`pkg-config --variable=libdir libsoup-2.4`
 Soup.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace Soup \
             --include=Gio.gir \
+            --library-path=$(LIBSOUP_LIBDIR) \
             --library=soup-2.4 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -54,6 +56,7 @@ GNOMEKEYRING_LIBDIR=`pkg-config --variable=libdir gnome-keyring-1`
 GnomeKeyring.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace GnomeKeyring \
             --include=GObject.gir \
+            --library-path=$(GNOMEKEYRING_LIBDIR) \
             --library=gnome-keyring \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -72,6 +75,7 @@ Pango.gir: $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace Pango \
             --include=GObject.gir \
             --include=cairo.gir \
+            --library-path=$(PANGO_LIBDIR) \
             --library=pango-1.0 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -90,6 +94,7 @@ PangoFT2.gir: fontconfig.gir freetype2.gir Pango.gir $(G_IR_SCANNER)
             --include=Pango.gir \
             --include=$(srcdir)/freetype2.gir \
             --include=$(srcdir)/fontconfig.gir \
+            --library-path=$(PANGOFT2_LIBDIR) \
             --library=pangoft2-1.0 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -107,6 +112,7 @@ PangoCairo.gir: cairo.gir Pango.gir $(G_IR_SCANNER)
             --include=GObject.gir \
             --include=Pango.gir \
             --include=$(srcdir)/cairo.gir \
+            --library-path=$(PANGOCAIRO_LIBDIR) \
             --library=pangocairo-1.0 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -124,6 +130,7 @@ PangoXft.gir: fontconfig.gir xft.gir xlib.gir Pango.gir PangoFT2.gir $(G_IR_SCAN
             --include=$(srcdir)/xft.gir \
             --include=$(srcdir)/xlib.gir \
             --include=$(srcdir)/PangoFT2.gir \
+            --library-path=$(PANGOXFT_LIBDIR) \
             --library=pangoxft-1.0 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -141,6 +148,7 @@ PangoX.gir: xlib.gir Pango.gir $(G_IR_SCANNER)
             --include=GObject.gir \
             --include=$(srcdir)/xlib.gir \
             --include=Pango.gir \
+            --library-path=$(PANGOX_LIBDIR) \
             --library=pangox-1.0 \
 	    $(NOCLOSURE) \
             --output $@ \
@@ -162,6 +170,7 @@ PopplerGlib.gir: $(G_IR_SCANNER)
              --include=$(srcdir)/Pango.gir \
              --include=$(srcdir)/Gdk.gir \
              --include=$(srcdir)/cairo.gir \
+             --library-path=$(POPPLER_LIBDIR) \
              --library=poppler-glib \
              $(NOCLOSURE) \
              --output $@ \
@@ -179,6 +188,7 @@ ATK_LIBDIR=`pkg-config --variable=libdir atk`
 Atk.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace Atk \
              --include=GObject.gir \
+             --library-path=$(ATK_LIBDIR) \
 	     --library=atk-1.0 \
 	     $(NOCLOSURE) \
              --output $@ \
@@ -195,6 +205,7 @@ GDKPIXBUF_LIBDIR=`pkg-config --variable=libdir gdk-pixbuf-2.0`
 GdkPixbuf.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace GdkPixbuf --strip-prefix=Gdk \
              --include=Gio.gir \
+             --library-path=$(GDKPIXBUF_LIBDIR) \
 	     --library=gdk_pixbuf-2.0 \
 	     $(NOCLOSURE) \
              --output $@ \
@@ -214,6 +225,7 @@ Gdk.gir: cairo.gir Pango.gir xlib.gir GdkPixbuf.gir $(G_IR_SCANNER)
              --include=Pango.gir \
              --include=$(srcdir)/xlib.gir \
              --include=GdkPixbuf.gir \
+             --library-path=$(GDK_LIBDIR) \
 	     --library=gdk-x11-2.0 \
 	     $(NOCLOSURE) \
              --output $@ \
@@ -239,6 +251,7 @@ Gtk.gir: cairo.gir Pango.gir Atk.gir xlib.gir GdkPixbuf.gir Gdk.gir gtk-x11-2.0.
              --include=Atk.gir \
              --include=GdkPixbuf.gir \
              --include=Gdk.gir \
+             --library-path=$(GTK_LIBDIR) \
 	     --library=gtk-x11-2.0 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -268,6 +281,7 @@ WebKit.gir: JSCore.gir Gtk.gir $(G_IR_SCANNER)
              --include=GObject.gir \
              --include=Gtk.gir \
              --include=JSCore.gir \
+             --library-path=$(WEBKIT_LIBDIR) \
 	     --library=webkit-1.0 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -288,6 +302,7 @@ NOTIFY_LIBDIR=`pkg-config --variable=libdir libnotify`
 Notify.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace Notify \
              --include=Gtk.gir \
+             --library-path=$(NOTIFY_LIBDIR) \
 	     --library=notify \
 	     $(NOCLOSURE) \
              --pkg gtk+-2.0 \
@@ -304,6 +319,7 @@ GTKSOURCEVIEW_LIBDIR=`pkg-config --variable=libdir gtksourceview-2.0`
 GtkSource.gir: $(G_IR_SCANNER) Gtk.gir
 	$(G_IR_SCANNER) -v --namespace GtkSource \
              --include=Gtk.gir \
+             --library-path=$(GTKSOURCEVIEW_LIBDIR) \
 	     --library=gtksourceview-2.0 \
 	     $(NOCLOSURE) \
              --pkg gtk+-2.0 \
@@ -320,6 +336,7 @@ VTE_LIBDIR=`pkg-config --variable=libdir vte`
 Vte.gir: $(G_IR_SCANNER) Gtk.gir
 	$(G_IR_SCANNER) -v --namespace Vte \
              --include=Gtk.gir \
+             --library-path=$(VTE_LIBDIR) \
 	     --library=vte \
 	     $(NOCLOSURE) \
              --pkg gtk+-2.0 \
@@ -336,6 +353,7 @@ CLUTTER_LIBDIR=`pkg-config --variable=libdir clutter-0.8`
 ClutterJson.gir: $(G_IR_SCANNER) 
 	$(G_IR_SCANNER) -v --namespace ClutterJson \
              --include=GObject.gir \
+	     --library-path=$(CLUTTER_LIBDIR) \
 	     --library=clutter-glx-0.8 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -353,6 +371,7 @@ Clutter.gir: ClutterJson.gir GdkPixbuf.gir Pango.gir PangoCairo.gir $(G_IR_SCANN
              --include=PangoCairo.gir \
              --include=GdkPixbuf.gir \
              --include=ClutterJson.gir \
+	     --library-path=$(CLUTTER_LIBDIR) \
 	     --library=clutter-glx-0.8 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -373,6 +392,7 @@ ClutterGtk.gir: Clutter.gir Gtk.gir $(G_IR_SCANNER)
              --include=GObject.gir \
              --include=Gtk.gir \
              --include=Clutter.gir \
+	     --library-path=$(CLUTTERGTK_LIBDIR) \
 	     --library=clutter-gtk-0.8 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -391,6 +411,7 @@ ClutterCairo.gir: Clutter.gir cairo.gir $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace ClutterCairo \
              --include=cairo.gir \
              --include=Clutter.gir \
+	     --library-path=$(CLUTTERCAIRO_LIBDIR) \
 	     --library=clutter-cairo-0.8 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -409,6 +430,7 @@ GooCanvas.gir: Gtk.gir $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace GooCanvas \
 	     --strip-prefix=Goo \
              --include=Gtk.gir \
+	     --library-path=$(GOOCANVAS_LIBDIR) \
 	     --library=goocanvas \
 	     $(NOCLOSURE) \
              --pkg goocanvas \
@@ -427,6 +449,7 @@ Gst.gir: libxml2.gir $(G_IR_SCANNER)
              --include=GObject.gir \
              --include=GModule.gir \
              --include=libxml2.gir \
+	     --library-path=$(GST_LIBDIR) \
 	     --library=gstreamer-0.10 \
 	     $(NOCLOSURE) \
              --pkg gobject-2.0 \
@@ -496,6 +519,7 @@ MissionControl.gir: $(G_IR_SCANNER)
 	$(G_IR_SCANNER) -v --namespace MissionControl \
 	     --strip-prefix=mc \
              --include=$(srcdir)/LibTelepathy.gir \
+	     --library-path=$(MISSIONCONTROL_LIBDIR) \
 	     --library=missioncontrol-client \
 	     $(NOCLOSURE) \
              --pkg libmissioncontrol \
