diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22f67f5148930c627092e6c471add92e4eeeb0dd..711292f0273889e3454bc4b17dc95cc97175a770 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@ add_subdirectory("dune")
 add_subdirectory("src")
 
 if(HAVE_AMIRAMESH AND HAVE_IPOPT AND HAVE_PSURFACE AND HAVE_UG)
-  set(programs linelast viscoelast nonlinelast)
+  set(programs viscoelast nonlinelast)
   foreach(_program ${programs})
     add_executable(${_program} ${_program}.cc)
     add_dune_amiramesh_flags(${_program})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d25f2942b7450ff17fc5825e5f6fa12d81218ffa..1d124fbcbb2f7bd77ddb22dc03714c4924b78cb0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,7 @@
 if(ADOLC_FOUND AND IPOPT_FOUND AND PYTHONLIBS_FOUND AND dune-uggrid_FOUND)
-  set(programs finite-strain-elasticity)
+  set(programs finite-strain-elasticity
+               linear-elasticity)
+
   foreach(_program ${programs})
     add_executable(${_program} ${_program}.cc)
     add_dune_adolc_flags(${_program})
diff --git a/linelast.cc b/src/linear-elasticity.cc
similarity index 97%
rename from linelast.cc
rename to src/linear-elasticity.cc
index ae858f47441479e5f80d1d8c06126eb125193d48..126114be31d26cdf8487ebd4f94d724caba7b195 100644
--- a/linelast.cc
+++ b/src/linear-elasticity.cc
@@ -89,24 +89,36 @@ int main (int argc, char *argv[]) try
     GridType* grid= new GridType;
     grid->setRefinementType(GridType::COPY);
 
+#if HAVE_AMIRAMESH
     if (paramBoundaries)
         grid = AmiraMeshReader<GridType>::read(path + gridFile, PSurfaceBoundary<dim-1>::read(path + parFile));
     else
         grid = AmiraMeshReader<GridType>::read(path + gridFile);
+#else
+#warning You need libamiramesh for this code!
+#endif
 
     LevelBoundaryPatch coarseDirichletBoundary;
     coarseDirichletBoundary.setup(grid->levelGridView(0));
     readBoundaryPatch<GridType>(coarseDirichletBoundary, path + dirichletFile);
 
     VectorType coarseDirichletValues(grid->size(0, dim));
+#if HAVE_AMIRAMESH
     AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile);
+#else
+#warning You need libamiramesh for this code!
+#endif
 
     LevelBoundaryPatch coarseNeumannBoundary;
     coarseNeumannBoundary.setup(grid->levelGridView(0));
     readBoundaryPatch<GridType>(coarseNeumannBoundary, path + neumannFile);
 
     VectorType coarseNeumannValues(grid->size(0, dim));
+#if HAVE_AMIRAMESH
     AmiraMeshReader<GridType>::readFunction(coarseNeumannValues, path + neumannValuesFile);
+#else
+#warning You need libamiramesh for this code!
+#endif
     P1NodalBasis<GridType::LevelGridView> coarseBasis(grid->levelGridView(0));
 
     auto coarseDir = ::Functions::makeFunction(coarseBasis,coarseDirichletValues);
@@ -284,10 +296,14 @@ int main (int argc, char *argv[]) try
     }
 
   // Output result
+#if HAVE_AMIRAMESH
   LeafAmiraMeshWriter<GridType> amiramesh;
   amiramesh.addLeafGrid(*grid,true);
   amiramesh.addVertexData(x, grid->leafGridView(),true);
   amiramesh.write("resultGrid",1);
+#else
+#warning You need libamiramesh for this code!
+#endif
 
  } catch (Exception e) {