Index: demo/lp_demo.cc
===================================================================
--- demo/lp_demo.cc	(revision 1577)
+++ demo/lp_demo.cc	(revision 1610)
@@ -25,28 +25,9 @@
 /// interface read \ref lemon::LpSolverBase "this".
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <lemon/lp.h>
 
 #include <iostream>
 
-
-#ifdef HAVE_GLPK
-#include <lemon/lp_glpk.h>
-#elif HAVE_CPLEX
-#include <lemon/lp_cplex.h>
-#endif
-
 using namespace lemon;
-
-
-
-#ifdef HAVE_GLPK
-typedef LpGlpk LpDefault;
-const char default_solver_name[]="GLPK";
-#elif HAVE_CPLEX
-typedef LpCplex LpDefault;
-const char default_solver_name[]="CPLEX";
-#endif
 
 int main()
@@ -56,7 +37,7 @@
 
   //A default solver is taken
-  LpDefault lp;
-  typedef LpDefault::Row Row;
-  typedef LpDefault::Col Col;
+  Lp lp;
+  typedef Lp::Row Row;
+  typedef Lp::Col Col;
   
 
Index: demo/lp_maxflow_demo.cc
===================================================================
--- demo/lp_maxflow_demo.cc	(revision 1583)
+++ demo/lp_maxflow_demo.cc	(revision 1610)
@@ -24,10 +24,7 @@
 /// constraints that arise in graph theory in our library LEMON .
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include<lemon/graph_reader.h>
 #include<lemon/list_graph.h>
+#include <lemon/lp.h>
 
 #include <fstream>
@@ -35,25 +32,11 @@
 
 
-#ifdef HAVE_GLPK
-#include <lemon/lp_glpk.h>
-#elif HAVE_CPLEX
-#include <lemon/lp_cplex.h>
-#endif
 
 using namespace lemon;
-
-#ifdef HAVE_GLPK
-typedef LpGlpk LpDefault;
-const char default_solver_name[]="GLPK";
-#elif HAVE_CPLEX
-typedef LpCplex LpDefault;
-const char default_solver_name[]="CPLEX";
-#endif
-
 
 template<class G,class C>
 double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
 {
-  LpDefault lp;
+  Lp lp;
   
   typedef G Graph;
@@ -66,5 +49,5 @@
   
   //Define a map on the edges for the variables of the LP problem
-  typename G::template EdgeMap<LpDefault::Col> x(g);
+  typename G::template EdgeMap<Lp::Col> x(g);
   lp.addColSet(x);
   
@@ -78,5 +61,5 @@
   //Flow conservation constraints for the nodes (except for 's' and 't')
   for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
-    LpDefault::Expr ex;
+    Lp::Expr ex;
     for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
     for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
@@ -85,5 +68,5 @@
   
   //Objective function: the flow value entering 't'
-  LpDefault::Expr obj;
+  Lp::Expr obj;
   for(InEdgeIt  e(g,t);e!=INVALID;++e) obj+=x[e];
   for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e];
@@ -94,5 +77,5 @@
   lp.max();
 
-#ifdef HAVE_GLPK
+#if DEFAULT_LP==GLPK
   lp.presolver(true);
   lp.messageLevel(3);
Index: lemon/lp.h
===================================================================
--- lemon/lp.h	(revision 1610)
+++ lemon/lp.h	(revision 1610)
@@ -0,0 +1,71 @@
+/* -*- C++ -*-
+ * lemon/lp.h - Part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_LP_H
+#define LEMON_LP_H
+
+#ifdef HAVE_CONFIG_H
+#include<lemon/config.h>
+#endif
+
+#ifdef HAVE_GLPK
+#include <lemon/lp_glpk.h>
+#elif HAVE_CPLEX
+#include <lemon/lp_cplex.h>
+#endif
+
+///\file
+///\brief Defines a default LP solver
+///\ingroup gen_opt_group
+namespace lemon {
+ 
+#ifdef DOXYGEN
+  ///The default LP solver identifier
+
+  ///The default LP solver identifier.
+  ///\ingroup gen_opt_group
+  ///
+  ///Currently, the possible values are \c GLPK or \c CPLEX
+#define DEFAULT_LP SOLVER
+  ///The default LP solver
+
+  ///The default LP solver.
+  ///\ingroup gen_opt_group
+  ///
+  ///Currently, it is either \c LpGlpk or \c LpCplex
+  typedef LpGlpk Lp;
+  ///The default LP solver identifier string
+
+  ///The default LP solver identifier string.
+  ///\ingroup gen_opt_group
+  ///
+  ///Currently, the possible values are "GLPK" or "CPLEX"
+  const char default_solver_name[]="SOLVER";  
+#else
+#ifdef HAVE_GLPK
+#define DEFAULT_LP GLPK
+  typedef LpGlpk Lp;
+  const char default_solver_name[]="GLPK";
+#elif HAVE_CPLEX
+#define DEFAULT_LP CPLEX
+  typedef LpCplex Lp;
+  const char default_solver_name[]="CPLEX";
+#endif
+#endif
+ 
+} //namespace lemon
+
+#endif //LEMON_LP_BASE_H
Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 1542)
+++ lemon/lp_base.h	(revision 1610)
@@ -26,6 +26,4 @@
 #include<lemon/error.h>
 #include<lemon/invalid.h>
-
-//#include"lin_expr.h"
 
 ///\file
