diff --git a/dirneucoupling.cc b/dirneucoupling.cc
index 1d96c978994cf1e82193467edfc559d370f4a9b0..2fa0690c2c86310dda8adce3588b33e8fcf68d6c 100644
--- a/dirneucoupling.cc
+++ b/dirneucoupling.cc
@@ -414,6 +414,9 @@ int main (int argc, char *argv[]) try
                                                         rhs3d);
 
 #else
+#ifndef HAVE_LAPACKPP
+#error You need LaPack++ for this!
+#endif
         // For the time being the Neumann data coming from the rod is a dg function (== not continuous)
         // Maybe that is not necessary
         DGIndexSet<GridType> dgIndexSet(grid,grid.maxLevel());
diff --git a/src/averageinterface.hh b/src/averageinterface.hh
index 714be196672644aadbd75d533df9d65b13877232..1c80de6a88b0255fe4a169175f0c37880dadbba1 100644
--- a/src/averageinterface.hh
+++ b/src/averageinterface.hh
@@ -8,8 +8,11 @@
 #include <dune/ag-common/crossproduct.hh>
 #include <dune/ag-common/surfmassmatrix.hh>
 #include "svd.hh"
+
+#ifdef HAVE_LAPACKPP
 #include "lapackpp.h"
 #undef max
+#endif
 
 template <class GridType>
 class PressureAverager : public Ipopt::TNLP
@@ -651,6 +654,7 @@ void computeAveragePressureIPOpt(const Dune::FieldVector<double,GridType::dimens
 }
 
 
+#ifdef HAVE_LAPACKPP
 // Given a resultant force and torque (from a rod problem), this method computes the corresponding
 // Neumann data for a 3d elasticity problem.
 template <class GridType>
@@ -834,7 +838,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
 #endif
 
 }
-
+#endif
 
 
 template <class GridType>