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