ba7b08
diff --git a/configure.ac b/configure.ac
ba7b08
index 059ca8b..2ff18a8 100644
ba7b08
--- a/configure.ac
ba7b08
+++ b/configure.ac
ba7b08
@@ -772,7 +772,7 @@ LUA_EOF
ba7b08
           done
ba7b08
         fi
ba7b08
 
ba7b08
-        LUA_RRD_LIBDIR="$langpref/lib/lua/$lua_vdot"
ba7b08
+        LUA_RRD_LIBDIR="$libdir/lua/$lua_vdot"
ba7b08
         # if lua 5.0 can't find compat-5.1, force installation of
ba7b08
         # compat-5.1.lua together with RRDtool.
ba7b08
         if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then
ba7b08
diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am
ba7b08
index c0e8b0f..265191d 100644
ba7b08
--- a/bindings/tcl/Makefile.am
ba7b08
+++ b/bindings/tcl/Makefile.am
ba7b08
@@ -27,8 +27,9 @@ tclpkgdir = @TCL_PACKAGE_DIR@
ba7b08
 tclpkg_DATA = pkgIndex.tcl
ba7b08
 tclpkg_SCRIPTS = ifOctets.tcl
ba7b08
 else
ba7b08
-pkgdata_DATA = pkgIndex.tcl
ba7b08
-pkgdata_SCRIPTS = ifOctets.tcl
ba7b08
+pkgindexdir = $(pkglibdir)
ba7b08
+pkgindex_DATA = pkgIndex.tcl
ba7b08
+pkgindex_SCRIPTS = ifOctets.tcl
ba7b08
 endif
ba7b08
 
ba7b08
 # Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as