--- Makefile.in
+++ Makefile.in
@@ -600,7 +600,7 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
 toolexecdir = @toolexecdir@
-toolexeclibdir = @toolexeclibdir@
+toolexeclibdir = @libdir@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
--- include/Makefile.in
+++ include/Makefile.in
@@ -307,15 +307,15 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
 toolexecdir = @toolexecdir@
-toolexeclibdir = @toolexeclibdir@
+toolexeclibdir = @libdir@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 DISTCLEANFILES = ffitarget.h
 EXTRA_DIST = ffi.h.in ffi_common.h
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = @includedir@
 nodist_includes_HEADERS = ffi.h ffitarget.h
 all: all-am
 
 .SUFFIXES:
