diff --git a/xslt-config.in b/xslt-config.in
index f68df0f..b9bd2f4 100644
--- a/xslt-config.in
+++ b/xslt-config.in
@@ -1,6 +1,7 @@
 #! /bin/sh

-prefix=@prefix@
+prefix="$(cd "$(dirname "$0")/.." && pwd)"
+libxml2_prefix="$(cd "$prefix/../../libxml2/v2" && pwd)"
 exec_prefix=@exec_prefix@
 exec_prefix_set=no
 includedir=@includedir@
