Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 621)
+++ CMakeLists.txt	(revision 631)
@@ -18,6 +18,4 @@
 FIND_PACKAGE(COIN)
 
-ADD_DEFINITIONS(-DHAVE_CONFIG_H)
-
 IF(MSVC)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
@@ -30,5 +28,5 @@
 
 INCLUDE(CheckTypeSize)
-CHECK_TYPE_SIZE("long long" LONG_LONG)
+CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
 
 ENABLE_TESTING()
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 567)
+++ Makefile.am	(revision 629)
@@ -12,9 +12,10 @@
 	m4/lx_check_glpk.m4 \
 	m4/lx_check_soplex.m4 \
-	m4/lx_check_clp.m4 \
-	m4/lx_check_cbc.m4 \
+	m4/lx_check_coin.m4 \
 	CMakeLists.txt \
 	cmake/FindGhostscript.cmake \
+	cmake/FindCPLEX.cmake \
 	cmake/FindGLPK.cmake \
+	cmake/FindCOIN.cmake \
 	cmake/version.cmake.in \
 	cmake/version.cmake \
Index: cmake/FindCOIN.cmake
===================================================================
--- cmake/FindCOIN.cmake	(revision 621)
+++ cmake/FindCOIN.cmake	(revision 634)
@@ -2,26 +2,46 @@
 
 FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
-  PATHS ${COIN_ROOT_DIR}/include)
-
-FIND_LIBRARY(COIN_CBC_LIBRARY libCbc
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_CGL_LIBRARY libCgl
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_CLP_LIBRARY libClp
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_OSI_LIBRARY libOsi
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol
-  PATHS ${COIN_ROOT_DIR}/lib)
-FIND_LIBRARY(COIN_VOL_LIBRARY libVol
-  PATHS ${COIN_ROOT_DIR}/lib)
+  HINTS ${COIN_ROOT_DIR}/include
+)
+FIND_LIBRARY(COIN_CBC_LIBRARY
+  NAMES Cbc libCbc
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
+  NAMES CbcSolver libCbcSolver
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CGL_LIBRARY
+  NAMES Cgl libCgl
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_CLP_LIBRARY
+  NAMES Clp libClp
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
+  NAMES CoinUtils libCoinUtils
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_LIBRARY
+  NAMES Osi libOsi
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
+  NAMES OsiCbc libOsiCbc
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
+  NAMES OsiClp libOsiClp
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
+  NAMES OsiVol libOsiVol
+  HINTS ${COIN_ROOT_DIR}/lib
+)
+FIND_LIBRARY(COIN_VOL_LIBRARY
+  NAMES Vol libVol
+  HINTS ${COIN_ROOT_DIR}/lib
+)
 
 INCLUDE(FindPackageHandleStandardArgs)
@@ -62,7 +82,7 @@
 
 IF(COIN_FOUND)
-  SET(HAVE_LP TRUE)
-  SET(HAVE_MIP TRUE)
-  SET(HAVE_CLP TRUE)
-  SET(HAVE_CBC TRUE)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_CLP TRUE)
+  SET(LEMON_HAVE_CBC TRUE)
 ENDIF(COIN_FOUND)
Index: cmake/FindCPLEX.cmake
===================================================================
--- cmake/FindCPLEX.cmake	(revision 620)
+++ cmake/FindCPLEX.cmake	(revision 636)
@@ -1,9 +1,16 @@
+SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
+
 FIND_PATH(CPLEX_INCLUDE_DIR
   ilcplex/cplex.h
-  PATHS "C:/ILOG/CPLEX91/include")
-
+  PATHS "C:/ILOG/CPLEX91/include"
+  PATHS "/opt/ilog/cplex91/include"
+  HINTS ${CPLEX_ROOT_DIR}/include
+)
 FIND_LIBRARY(CPLEX_LIBRARY
-  NAMES cplex91
-  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda")
+  cplex91
+  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
+  PATHS "/opt/ilog/cplex91/bin"
+  HINTS ${CPLEX_ROOT_DIR}/bin
+)
 
 INCLUDE(FindPackageHandleStandardArgs)
@@ -12,9 +19,13 @@
 FIND_PATH(CPLEX_BIN_DIR
   cplex91.dll
-  PATHS "C:/ILOG/CPLEX91/bin/x86_win32")
+  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
+)
 
 IF(CPLEX_FOUND)
   SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
   SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
+  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
+  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 ENDIF(CPLEX_FOUND)
 
@@ -22,6 +33,6 @@
 
 IF(CPLEX_FOUND)
-  SET(HAVE_LP TRUE)
-  SET(HAVE_MIP TRUE)
-  SET(HAVE_CPLEX TRUE)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_CPLEX TRUE)
 ENDIF(CPLEX_FOUND)
Index: cmake/FindGLPK.cmake
===================================================================
--- cmake/FindGLPK.cmake	(revision 619)
+++ cmake/FindGLPK.cmake	(revision 638)
@@ -1,2 +1,4 @@
+SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory")
+
 SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]")
 GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE)
@@ -4,12 +6,44 @@
 FIND_PATH(GLPK_INCLUDE_DIR
   glpk.h
-  PATHS ${GLPK_REGKEY}/include)
+  PATHS ${GLPK_REGKEY}/include
+  HINTS ${GLPK_ROOT_DIR}/include
+)
+FIND_LIBRARY(GLPK_LIBRARY
+  glpk
+  PATHS ${GLPK_REGKEY}/lib
+  HINTS ${GLPK_ROOT_DIR}/lib
+)
 
-FIND_LIBRARY(GLPK_LIBRARY
-  NAMES glpk
-  PATHS ${GLPK_REGKEY}/lib)
+IF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
+  FILE(READ ${GLPK_INCLUDE_DIR}/glpk.h GLPK_GLPK_H)
+
+  STRING(REGEX MATCH "define[ ]+GLP_MAJOR_VERSION[ ]+[0-9]+" GLPK_MAJOR_VERSION_LINE "${GLPK_GLPK_H}")
+  STRING(REGEX REPLACE "define[ ]+GLP_MAJOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MAJOR "${GLPK_MAJOR_VERSION_LINE}")
+
+  STRING(REGEX MATCH "define[ ]+GLP_MINOR_VERSION[ ]+[0-9]+" GLPK_MINOR_VERSION_LINE "${GLPK_GLPK_H}")
+  STRING(REGEX REPLACE "define[ ]+GLP_MINOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MINOR "${GLPK_MINOR_VERSION_LINE}")
+
+  SET(GLPK_VERSION_STRING "${GLPK_VERSION_MAJOR}.${GLPK_VERSION_MINOR}")
+
+  IF(GLPK_FIND_VERSION)
+    IF(GLPK_FIND_VERSION_COUNT GREATER 2)
+      MESSAGE(SEND_ERROR "unexpected version string")
+    ENDIF(GLPK_FIND_VERSION_COUNT GREATER 2)
+
+    MATH(EXPR GLPK_REQUESTED_VERSION "${GLPK_FIND_VERSION_MAJOR}*100 + ${GLPK_FIND_VERSION_MINOR}")
+    MATH(EXPR GLPK_FOUND_VERSION "${GLPK_VERSION_MAJOR}*100 + ${GLPK_VERSION_MINOR}")
+
+    IF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+      SET(GLPK_PROPER_VERSION_FOUND FALSE)
+    ELSE(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+      SET(GLPK_PROPER_VERSION_FOUND TRUE)
+    ENDIF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
+  ELSE(GLPK_FIND_VERSION)
+    SET(GLPK_PROPER_VERSION_FOUND TRUE)
+  ENDIF(GLPK_FIND_VERSION)
+ENDIF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
 
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
 
 IF(GLPK_FOUND)
@@ -22,6 +56,6 @@
 
 IF(GLPK_FOUND)
-  SET(HAVE_LP TRUE)
-  SET(HAVE_MIP TRUE)
-  SET(HAVE_GLPK TRUE)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_GLPK TRUE)
 ENDIF(GLPK_FOUND)
Index: configure.ac
===================================================================
--- configure.ac	(revision 568)
+++ configure.ac	(revision 627)
@@ -26,5 +26,5 @@
 AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
 if test x"$long_long_found" = x"yes"; then
-  AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
+  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
 fi
 
Index: lemon/CMakeLists.txt
===================================================================
--- lemon/CMakeLists.txt	(revision 621)
+++ lemon/CMakeLists.txt	(revision 627)
@@ -19,5 +19,5 @@
 )
 
-IF(HAVE_GLPK)
+IF(LEMON_HAVE_GLPK)
   SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
@@ -27,20 +27,20 @@
     INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
   ENDIF(WIN32)
-ENDIF(HAVE_GLPK)
+ENDIF(LEMON_HAVE_GLPK)
 
-IF(HAVE_CPLEX)
+IF(LEMON_HAVE_CPLEX)
   SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
   INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
-ENDIF(HAVE_CPLEX)
+ENDIF(LEMON_HAVE_CPLEX)
 
-IF(HAVE_CLP)
+IF(LEMON_HAVE_CLP)
   SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
   INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
-ENDIF(HAVE_CLP)
+ENDIF(LEMON_HAVE_CLP)
 
-IF(HAVE_CBC)
+IF(LEMON_HAVE_CBC)
   SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
   INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
-ENDIF(HAVE_CBC)
+ENDIF(LEMON_HAVE_CBC)
 
 ADD_LIBRARY(lemon ${LEMON_SOURCES})
@@ -56,2 +56,7 @@
   COMPONENT headers
   FILES_MATCHING PATTERN "*.h")
+
+INSTALL(
+  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
+  DESTINATION include/lemon
+  COMPONENT headers)
Index: lemon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 611)
+++ lemon/Makefile.am	(revision 639)
@@ -16,5 +16,6 @@
 	lemon/bits/windows.cc
 
-
+nodist_lemon_HEADERS = lemon/config.h	
+	
 lemon_libemon_la_CXXFLAGS = \
 	$(AM_CXXFLAGS) \
@@ -58,4 +59,5 @@
 	lemon/bfs.h \
 	lemon/bin_heap.h \
+	lemon/cbc.h \
 	lemon/circulation.h \
 	lemon/clp.h \
Index: lemon/bits/default_map.h
===================================================================
--- lemon/bits/default_map.h	(revision 617)
+++ lemon/bits/default_map.h	(revision 627)
@@ -98,5 +98,5 @@
 
 
-#if defined HAVE_LONG_LONG
+#if defined LEMON_HAVE_LONG_LONG
 
   // long long
Index: lemon/config.h.cmake
===================================================================
--- lemon/config.h.cmake	(revision 621)
+++ lemon/config.h.cmake	(revision 627)
@@ -1,7 +1,7 @@
-#cmakedefine HAVE_LONG_LONG 1
-#cmakedefine HAVE_LP 1
-#cmakedefine HAVE_MIP 1
-#cmakedefine HAVE_GLPK 1
-#cmakedefine HAVE_CPLEX 1
-#cmakedefine HAVE_CLP 1
-#cmakedefine HAVE_CBC 1
+#cmakedefine LEMON_HAVE_LONG_LONG 1
+#cmakedefine LEMON_HAVE_LP 1
+#cmakedefine LEMON_HAVE_MIP 1
+#cmakedefine LEMON_HAVE_GLPK 1
+#cmakedefine LEMON_HAVE_CPLEX 1
+#cmakedefine LEMON_HAVE_CLP 1
+#cmakedefine LEMON_HAVE_CBC 1
Index: lemon/config.h.in
===================================================================
--- lemon/config.h.in	(revision 567)
+++ lemon/config.h.in	(revision 627)
@@ -1,23 +1,23 @@
 /* Define to 1 if you have long long */
-#undef HAVE_LONG_LONG
+#undef LEMON_HAVE_LONG_LONG
 
 /* Define to 1 if you have any LP solver. */
-#undef HAVE_LP
+#undef LEMON_HAVE_LP
 
 /* Define to 1 if you have any MIP solver. */
-#undef HAVE_MIP
+#undef LEMON_HAVE_MIP
 
 /* Define to 1 if you have CPLEX. */
-#undef HAVE_CPLEX
+#undef LEMON_HAVE_CPLEX
 
 /* Define to 1 if you have GLPK. */
-#undef HAVE_GLPK
+#undef LEMON_HAVE_GLPK
 
 /* Define to 1 if you have SOPLEX */
-#undef HAVE_SOPLEX
+#undef LEMON_HAVE_SOPLEX
 
 /* Define to 1 if you have CLP */
-#undef HAVE_CLP
+#undef LEMON_HAVE_CLP
 
 /* Define to 1 if you have CBC */
-#undef HAVE_CBC
+#undef LEMON_HAVE_CBC
Index: lemon/core.h
===================================================================
--- lemon/core.h	(revision 617)
+++ lemon/core.h	(revision 639)
@@ -23,5 +23,5 @@
 #include <algorithm>
 
-#include <lemon/core.h>
+#include <lemon/config.h>
 #include <lemon/bits/enable_if.h>
 #include <lemon/bits/traits.h>
Index: lemon/lp.h
===================================================================
--- lemon/lp.h	(revision 462)
+++ lemon/lp.h	(revision 627)
@@ -23,11 +23,11 @@
 
 
-#ifdef HAVE_GLPK
+#ifdef LEMON_HAVE_GLPK
 #include <lemon/glpk.h>
-#elif HAVE_CPLEX
+#elif LEMON_HAVE_CPLEX
 #include <lemon/cplex.h>
-#elif HAVE_SOPLEX
+#elif LEMON_HAVE_SOPLEX
 #include <lemon/soplex.h>
-#elif HAVE_CLP
+#elif LEMON_HAVE_CLP
 #include <lemon/clp.h>
 #endif
@@ -70,18 +70,18 @@
   typedef GlpkMip Mip;
 #else
-#ifdef HAVE_GLPK
+#ifdef LEMON_HAVE_GLPK
 # define LEMON_DEFAULT_LP GLPK
   typedef GlpkLp Lp;
 # define LEMON_DEFAULT_MIP GLPK
   typedef GlpkMip Mip;
-#elif HAVE_CPLEX
+#elif LEMON_HAVE_CPLEX
 # define LEMON_DEFAULT_LP CPLEX
   typedef CplexLp Lp;
 # define LEMON_DEFAULT_MIP CPLEX
   typedef CplexMip Mip;
-#elif HAVE_SOPLEX
+#elif LEMON_HAVE_SOPLEX
 # define DEFAULT_LP SOPLEX
   typedef SoplexLp Lp;
-#elif HAVE_CLP
+#elif LEMON_HAVE_CLP
 # define DEFAULT_LP CLP
   typedef ClpLp Lp;  
Index: m4/lx_check_coin.m4
===================================================================
--- m4/lx_check_coin.m4	(revision 568)
+++ m4/lx_check_coin.m4	(revision 627)
@@ -56,7 +56,7 @@
 
     if test x"$lx_clp_found" = x"yes"; then
-      AC_DEFINE([HAVE_CLP], [1], [Define to 1 if you have CLP.])
+      AC_DEFINE([LEMON_HAVE_CLP], [1], [Define to 1 if you have CLP.])
       lx_lp_found=yes
-      AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
+      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
       AC_MSG_RESULT([yes])
     else
@@ -116,9 +116,9 @@
 
       if test x"$lx_cbc_found" = x"yes"; then
-        AC_DEFINE([HAVE_CBC], [1], [Define to 1 if you have CBC.])
+        AC_DEFINE([LEMON_HAVE_CBC], [1], [Define to 1 if you have CBC.])
         lx_lp_found=yes
-        AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
+        AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
         lx_mip_found=yes
-        AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
+        AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
         AC_MSG_RESULT([yes])
       else
Index: m4/lx_check_cplex.m4
===================================================================
--- m4/lx_check_cplex.m4	(revision 457)
+++ m4/lx_check_cplex.m4	(revision 627)
@@ -62,9 +62,9 @@
 
     if test x"$lx_cplex_found" = x"yes"; then
-      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
+      AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
       lx_lp_found=yes
-      AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
+      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
       lx_mip_found=yes
-      AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
+      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
       AC_MSG_RESULT([yes])
     else
Index: m4/lx_check_glpk.m4
===================================================================
--- m4/lx_check_glpk.m4	(revision 459)
+++ m4/lx_check_glpk.m4	(revision 627)
@@ -65,9 +65,9 @@
 
     if test x"$lx_glpk_found" = x"yes"; then
-      AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
+      AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
       lx_lp_found=yes
-      AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
+      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
       lx_mip_found=yes
-      AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
+      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
       AC_MSG_RESULT([yes])
     else
Index: m4/lx_check_soplex.m4
===================================================================
--- m4/lx_check_soplex.m4	(revision 539)
+++ m4/lx_check_soplex.m4	(revision 627)
@@ -56,7 +56,7 @@
 
     if test x"$lx_soplex_found" = x"yes"; then
-      AC_DEFINE([HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
+      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
       lx_lp_found=yes
-      AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
+      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
       AC_MSG_RESULT([yes])
     else
Index: scripts/unify-sources.sh
===================================================================
--- scripts/unify-sources.sh	(revision 554)
+++ scripts/unify-sources.sh	(revision 628)
@@ -1,6 +1,11 @@
 #!/bin/bash
 
-YEAR=`date +2003-%Y`
+YEAR=`date +%Y`
 HGROOT=`hg root`
+
+function hg_year() {
+    if [ -n "$(hg st $1)" ]; then
+        echo $YEAR
+}
 
 # file enumaration modes
@@ -192,5 +197,5 @@
  * This file is a part of LEMON, a generic C++ optimization library.
  *
- * Copyright (C) "$YEAR"
+ * Copyright (C) 2003-"$(hg_year $1)"
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 621)
+++ test/CMakeLists.txt	(revision 627)
@@ -37,20 +37,20 @@
   unionfind_test)
 
-IF(HAVE_LP)
+IF(LEMON_HAVE_LP)
   ADD_EXECUTABLE(lp_test lp_test.cc)
   SET(LP_TEST_LIBS lemon)
-  IF(HAVE_GLPK)
+  IF(LEMON_HAVE_GLPK)
     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
-  ENDIF(HAVE_GLPK)
-  IF(HAVE_CPLEX)
+  ENDIF(LEMON_HAVE_GLPK)
+  IF(LEMON_HAVE_CPLEX)
     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
-  ENDIF(HAVE_CPLEX)
-  IF(HAVE_CLP)
+  ENDIF(LEMON_HAVE_CPLEX)
+  IF(LEMON_HAVE_CLP)
     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
-  ENDIF(HAVE_CLP)
+  ENDIF(LEMON_HAVE_CLP)
   TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
   ADD_TEST(lp_test lp_test)
 
-  IF(WIN32 AND HAVE_GLPK)
+  IF(WIN32 AND LEMON_HAVE_GLPK)
     GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
@@ -60,6 +60,6 @@
       COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     )
-  ENDIF(WIN32 AND HAVE_GLPK)
-  IF(WIN32 AND HAVE_CPLEX)
+  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
+  IF(WIN32 AND LEMON_HAVE_CPLEX)
     GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
@@ -67,23 +67,23 @@
       COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     )
-  ENDIF(WIN32 AND HAVE_CPLEX)
-ENDIF(HAVE_LP)
+  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
+ENDIF(LEMON_HAVE_LP)
 
-IF(HAVE_MIP)
+IF(LEMON_HAVE_MIP)
   ADD_EXECUTABLE(mip_test mip_test.cc)
   SET(MIP_TEST_LIBS lemon)
-  IF(HAVE_GLPK)
+  IF(LEMON_HAVE_GLPK)
     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
-  ENDIF(HAVE_GLPK)
-  IF(HAVE_CPLEX)
+  ENDIF(LEMON_HAVE_GLPK)
+  IF(LEMON_HAVE_CPLEX)
     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
-  ENDIF(HAVE_CPLEX)
-  IF(HAVE_CBC)
+  ENDIF(LEMON_HAVE_CPLEX)
+  IF(LEMON_HAVE_CBC)
     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
-  ENDIF(HAVE_CBC)
+  ENDIF(LEMON_HAVE_CBC)
   TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
   ADD_TEST(mip_test mip_test)
 
-  IF(WIN32 AND HAVE_GLPK)
+  IF(WIN32 AND LEMON_HAVE_GLPK)
     GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
@@ -93,6 +93,6 @@
       COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     )
-  ENDIF(WIN32 AND HAVE_GLPK)
-  IF(WIN32 AND HAVE_CPLEX)
+  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
+  IF(WIN32 AND LEMON_HAVE_CPLEX)
     GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
@@ -100,6 +100,6 @@
       COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     )
-  ENDIF(WIN32 AND HAVE_CPLEX)
-ENDIF(HAVE_MIP)
+  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
+ENDIF(LEMON_HAVE_MIP)
 
 FOREACH(TEST_NAME ${TESTS})
Index: test/lp_test.cc
===================================================================
--- test/lp_test.cc	(revision 575)
+++ test/lp_test.cc	(revision 631)
@@ -22,21 +22,19 @@
 #include <lemon/tolerance.h>
 
-#ifdef HAVE_CONFIG_H
 #include <lemon/config.h>
-#endif
-
-#ifdef HAVE_GLPK
+
+#ifdef LEMON_HAVE_GLPK
 #include <lemon/glpk.h>
 #endif
 
-#ifdef HAVE_CPLEX
+#ifdef LEMON_HAVE_CPLEX
 #include <lemon/cplex.h>
 #endif
 
-#ifdef HAVE_SOPLEX
+#ifdef LEMON_HAVE_SOPLEX
 #include <lemon/soplex.h>
 #endif
 
-#ifdef HAVE_CLP
+#ifdef LEMON_HAVE_CLP
 #include <lemon/clp.h>
 #endif
@@ -380,5 +378,5 @@
   lpTest(lp_skel);
 
-#ifdef HAVE_GLPK
+#ifdef LEMON_HAVE_GLPK
   {
     GlpkLp lp_glpk1,lp_glpk2;
@@ -389,5 +387,5 @@
 #endif
 
-#ifdef HAVE_CPLEX
+#ifdef LEMON_HAVE_CPLEX
   try {
     CplexLp lp_cplex1,lp_cplex2;
@@ -400,5 +398,5 @@
 #endif
 
-#ifdef HAVE_SOPLEX
+#ifdef LEMON_HAVE_SOPLEX
   {
     SoplexLp lp_soplex1,lp_soplex2;
@@ -409,5 +407,5 @@
 #endif
 
-#ifdef HAVE_CLP
+#ifdef LEMON_HAVE_CLP
   {
     ClpLp lp_clp1,lp_clp2;
Index: test/mip_test.cc
===================================================================
--- test/mip_test.cc	(revision 575)
+++ test/mip_test.cc	(revision 631)
@@ -19,17 +19,15 @@
 #include "test_tools.h"
 
-#ifdef HAVE_CONFIG_H
 #include <lemon/config.h>
-#endif
 
-#ifdef HAVE_CPLEX
+#ifdef LEMON_HAVE_CPLEX
 #include <lemon/cplex.h>
 #endif
 
-#ifdef HAVE_GLPK
+#ifdef LEMON_HAVE_GLPK
 #include <lemon/glpk.h>
 #endif
 
-#ifdef HAVE_CBC
+#ifdef LEMON_HAVE_CBC
 #include <lemon/cbc.h>
 #endif
@@ -130,5 +128,5 @@
 {
 
-#ifdef HAVE_GLPK
+#ifdef LEMON_HAVE_GLPK
   {
     GlpkMip mip1;
@@ -138,5 +136,5 @@
 #endif
 
-#ifdef HAVE_CPLEX
+#ifdef LEMON_HAVE_CPLEX
   try {
     CplexMip mip2;
@@ -148,5 +146,5 @@
 #endif
 
-#ifdef HAVE_CBC
+#ifdef LEMON_HAVE_CBC
   {
     CbcMip mip1;
Index: tools/dimacs-solver.cc
===================================================================
--- tools/dimacs-solver.cc	(revision 640)
+++ tools/dimacs-solver.cc	(revision 644)
@@ -201,5 +201,5 @@
     .boolOption("int","Use 'int' for capacities, costs etc. (default)")
     .optionGroup("datatype","int")
-#ifdef HAVE_LONG_LONG
+#ifdef LEMON_HAVE_LONG_LONG
     .boolOption("long","Use 'long long' for capacities, costs etc.")
     .optionGroup("datatype","long")
@@ -268,5 +268,5 @@
   else if(ap.given("ldouble"))
     solve<long double>(ap,is,os,desc);
-#ifdef HAVE_LONG_LONG
+#ifdef LEMON_HAVE_LONG_LONG
   else if(ap.given("long"))
     solve<long long>(ap,is,os,desc);
