--- libzeitgeist/Makefile.am.orig	2020-03-14 20:51:52.000000000 -0700
+++ libzeitgeist/Makefile.am	2020-03-14 20:57:18.000000000 -0700
@@ -188,6 +188,8 @@
 # This is what g-ir-scanner does.
 libzeitgeist_dlname = \
 	`$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\{1,\}\)'/\1/p" libzeitgeist-2.0.la`
+libzeitgeist_libdir = \
+	`$(SED) -n "s/^libdir='\([A-Za-z0-9.+-/]\{1,\}\)'/\1/p" libzeitgeist-2.0.la`
 
 if HAVE_INTROSPECTION
 libzeitgeist_2_0_gir_VALASOURCES = \
@@ -211,7 +213,7 @@
 
 Zeitgeist-2.0.typelib: libzeitgeist-2.0.la
 Zeitgeist-2.0.typelib: Zeitgeist-2.0.gir
-	${INTROSPECTION_COMPILER} -l ${libzeitgeist_dlname} --includedir ${INTROSPECTION_GIRDIR} -o $@ $^
+	${INTROSPECTION_COMPILER} -l ${libzeitgeist_libdir}/${libzeitgeist_dlname} --includedir ${INTROSPECTION_GIRDIR} -o $@ $^
 
 GIRS = Zeitgeist-2.0.gir
 
