diff --git a/mex/build/k_order_perturbation.am b/mex/build/k_order_perturbation.am
index 7102bc77e0e4add348366b9fa570a4b1c318c8c1..c872333b5cf58fada80b9dff7e516ec859099cdb 100644
--- a/mex/build/k_order_perturbation.am
+++ b/mex/build/k_order_perturbation.am
@@ -3,10 +3,9 @@ mex_PROGRAMS = k_order_perturbation
 TOPDIR = $(top_srcdir)/../../sources/k_order_perturbation
 LIBKORDER_DIR = $(top_srcdir)/../../sources/libkorder
 
-k_order_perturbation_CPPFLAGS = $(AM_CPPFLAGS) -I$(LIBKORDER_DIR) -I$(LIBKORDER_DIR)/kord -I$(LIBKORDER_DIR)/tl -I$(LIBKORDER_DIR)/utils -I$(LIBKORDER_DIR)/sylv -I$(LIBKORDER_DIR)/integ -I$(TOPDIR) $(CPPFLAGS_MATIO)
+k_order_perturbation_CPPFLAGS = $(AM_CPPFLAGS) -I$(LIBKORDER_DIR) -I$(LIBKORDER_DIR)/kord -I$(LIBKORDER_DIR)/tl -I$(LIBKORDER_DIR)/utils -I$(LIBKORDER_DIR)/sylv -I$(LIBKORDER_DIR)/integ -I$(TOPDIR)
 
-k_order_perturbation_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MATIO)
-k_order_perturbation_LDADD = ../libkorder/libkorder.a $(LIBADD_DLOPEN) $(LIBADD_MATIO)
+k_order_perturbation_LDADD = ../libkorder/libkorder.a $(LIBADD_DLOPEN)
 
 nodist_k_order_perturbation_SOURCES = k_order_perturbation.cc
 
diff --git a/mex/build/k_order_welfare.am b/mex/build/k_order_welfare.am
index 26f24226ab5ab633468df791e07fa3a0ee0edaf7..8fdcdde6cfe04adacf7c4f645b2207be0f015181 100644
--- a/mex/build/k_order_welfare.am
+++ b/mex/build/k_order_welfare.am
@@ -3,10 +3,9 @@ mex_PROGRAMS = k_order_welfare
 TOPDIR = $(top_srcdir)/../../sources/k_order_welfare
 LIBKORDER_DIR = $(top_srcdir)/../../sources/libkorder
 
-k_order_welfare_CPPFLAGS = $(AM_CPPFLAGS) -I$(TOPDIR) -I$(LIBKORDER_DIR) -I$(LIBKORDER_DIR)/tl -I$(LIBKORDER_DIR)/kord -I$(LIBKORDER_DIR)/sylv -I$(LIBKORDER_DIR)/utils $(CPPFLAGS_MATIO)
+k_order_welfare_CPPFLAGS = $(AM_CPPFLAGS) -I$(TOPDIR) -I$(LIBKORDER_DIR) -I$(LIBKORDER_DIR)/tl -I$(LIBKORDER_DIR)/kord -I$(LIBKORDER_DIR)/sylv -I$(LIBKORDER_DIR)/utils
 
-k_order_welfare_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MATIO)
-k_order_welfare_LDADD = ../libkorder/libkorder.a $(LIBADD_DLOPEN) $(LIBADD_MATIO)
+k_order_welfare_LDADD = ../libkorder/libkorder.a $(LIBADD_DLOPEN)
 
 nodist_k_order_welfare_SOURCES = \
 	k_order_welfare.cc \
diff --git a/mex/build/libkorder.am b/mex/build/libkorder.am
index 6c7d573fc78b550b529662f41a96edd26857cc3d..7f0ed700c75f4485710e58d576639f2bd6b8d869 100644
--- a/mex/build/libkorder.am
+++ b/mex/build/libkorder.am
@@ -2,7 +2,7 @@ noinst_LIBRARIES = libkorder.a
 
 TOPDIR = $(top_srcdir)/../../sources/libkorder
 
-libkorder_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(TOPDIR) -I$(TOPDIR)/tl -I$(TOPDIR)/sylv -I$(TOPDIR)/kord -I$(TOPDIR)/utils $(CPPFLAGS_MATIO)
+libkorder_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(TOPDIR) -I$(TOPDIR)/tl -I$(TOPDIR)/sylv -I$(TOPDIR)/kord -I$(TOPDIR)/utils
 
 # TODO: fix the codebase so that the following line is no longer needed
 libkorder_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-unused-parameter