# HG changeset patch # User Alpar Juttner # Date 2009-01-12 13:22:11 # Node ID 69928a704ffb1263a513409e81a4704fd2b7c754 # Parent aff6888e71c9b44de0ade09d5dad55593d4ae766 Add HAVE_LP and HAVE_MIP #defines diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,9 @@ #LX_CHECK_CPLEX #LX_CHECK_SOPLEX +AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"]) +AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"]) + dnl Disable/enable building the demo programs. AC_ARG_ENABLE([demo], AS_HELP_STRING([--enable-demo], [build the demo programs]) diff --git a/lemon/config.h.in b/lemon/config.h.in --- a/lemon/config.h.in +++ b/lemon/config.h.in @@ -1,3 +1,9 @@ +/* Define to 1 if you have any LP solver. */ +#undef HAVE_LP + +/* Define to 1 if you have any MIP solver. */ +#undef HAVE_MIP + /* Define to 1 if you have CPLEX. */ #undef HAVE_CPLEX diff --git a/m4/lx_check_cplex.m4 b/m4/lx_check_cplex.m4 --- a/m4/lx_check_cplex.m4 +++ b/m4/lx_check_cplex.m4 @@ -62,6 +62,10 @@ if test x"$lx_cplex_found" = x"yes"; then AC_DEFINE([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.]) + lx_mip_found=yes + AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) AC_MSG_RESULT([yes]) else CPLEX_CFLAGS="" diff --git a/m4/lx_check_glpk.m4 b/m4/lx_check_glpk.m4 --- a/m4/lx_check_glpk.m4 +++ b/m4/lx_check_glpk.m4 @@ -60,6 +60,10 @@ if test x"$lx_glpk_found" = x"yes"; then AC_DEFINE([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.]) + lx_mip_found=yes + AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) AC_MSG_RESULT([yes]) else GLPK_CFLAGS="" diff --git a/m4/lx_check_soplex.m4 b/m4/lx_check_soplex.m4 --- a/m4/lx_check_soplex.m4 +++ b/m4/lx_check_soplex.m4 @@ -56,6 +56,8 @@ if test x"$lx_soplex_found" = x"yes"; then AC_DEFINE([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_MSG_RESULT([yes]) else SOPLEX_CXXFLAGS=""