config/lp.m4
changeset 1489 f7e9cc3bc2da
parent 1488 92755f9a4e2a
child 1490 fa2b73784343
     1.1 --- a/config/lp.m4	Tue Jun 14 19:19:59 2005 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,150 +0,0 @@
     1.4 -AC_DEFUN([LX_CHECK_GLPK],
     1.5 -[
     1.6 -  AC_ARG_WITH([glpk],
     1.7 -AS_HELP_STRING([--with-glpk@<:@=PREFIX@:>@], [search for GLPK under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
     1.8 -AS_HELP_STRING([--without-glpk], [disable checking for GLPK]),
     1.9 -              [], [with_glpk=yes])
    1.10 -
    1.11 -  AC_ARG_WITH([glpk-includedir],
    1.12 -AS_HELP_STRING([--with-glpk-includedir=DIR], [search for GLPK headers in DIR]),
    1.13 -              [], [with_glpk_includedir=no])
    1.14 -
    1.15 -  AC_ARG_WITH([glpk-libdir],
    1.16 -AS_HELP_STRING([--with-glpk-libdir=DIR], [search for GLPK libraries in DIR]),
    1.17 -              [], [with_glpk_libdir=no])
    1.18 -
    1.19 -  lx_glpk_found=no
    1.20 -  if test x"$with_glpk" != x"no"; then
    1.21 -    AC_MSG_CHECKING([for GLPK])
    1.22 -
    1.23 -    if test x"$with_glpk_includedir" != x"no"; then
    1.24 -      GLPK_CFLAGS="-I$with_glpk_includedir"
    1.25 -    elif test x"$with_glpk" != x"yes"; then
    1.26 -      GLPK_CFLAGS="-I$with_glpk/include"
    1.27 -    fi
    1.28 -
    1.29 -    if test x"$with_glpk_libdir" != x"no"; then
    1.30 -      GLPK_LDFLAGS="-L$with_glpk_libdir"
    1.31 -    elif test x"$with_glpk" != x"yes"; then
    1.32 -      GLPK_LDFLAGS="-L$with_glpk/lib"
    1.33 -    fi
    1.34 -    GLPK_LIBS="-lglpk"
    1.35 -
    1.36 -    lx_save_cxxflags="$CXXFLAGS"
    1.37 -    lx_save_ldflags="$LDFLAGS"
    1.38 -    lx_save_libs="$LIBS"
    1.39 -    CXXFLAGS="$GLPK_CFLAGS"
    1.40 -    LDFLAGS="$GLPK_LDFLAGS"
    1.41 -    LIBS="$GLPK_LIBS"
    1.42 -
    1.43 -    lx_glpk_test_prog='
    1.44 -      extern "C" {
    1.45 -      #include <glpk.h>
    1.46 -      }
    1.47 -
    1.48 -      int main(int argc, char* argv[])
    1.49 -      {
    1.50 -        LPX *lp;
    1.51 -        lp = lpx_create_prob();
    1.52 -        lpx_delete_prob(lp);
    1.53 -        return 0;
    1.54 -      }'
    1.55 -
    1.56 -    AC_LANG_PUSH(C++)
    1.57 -    AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no])
    1.58 -    AC_LANG_POP(C++)
    1.59 -
    1.60 -    CXXFLAGS="$lx_save_cxxflags"
    1.61 -    LDFLAGS="$lx_save_ldflags"
    1.62 -    LIBS="$lx_save_libs"
    1.63 -
    1.64 -    if test x"$lx_glpk_found" = x"yes"; then
    1.65 -      AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    1.66 -      AC_MSG_RESULT([yes])
    1.67 -    else
    1.68 -      GLPK_CFLAGS=""
    1.69 -      GLPK_LDFLAGS=""
    1.70 -      GLPK_LIBS=""
    1.71 -      AC_MSG_RESULT([no])
    1.72 -    fi
    1.73 -  fi
    1.74 -  GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS"
    1.75 -  AC_SUBST(GLPK_CFLAGS)
    1.76 -  AC_SUBST(GLPK_LIBS)
    1.77 -  AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
    1.78 -])
    1.79 -
    1.80 -
    1.81 -AC_DEFUN([LX_CHECK_CPLEX],
    1.82 -[
    1.83 -  AC_ARG_WITH([cplex],
    1.84 -AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
    1.85 -AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
    1.86 -              [], [with_cplex=yes])
    1.87 -
    1.88 -  AC_ARG_WITH([cplex-includedir],
    1.89 -AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
    1.90 -              [], [with_cplex_includedir=no])
    1.91 -
    1.92 -  AC_ARG_WITH([cplex-libdir],
    1.93 -AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
    1.94 -              [], [with_cplex_libdir=no])
    1.95 -
    1.96 -  lx_cplex_found=no
    1.97 -  if test x"$with_cplex" != x"no"; then
    1.98 -    AC_MSG_CHECKING([for CPLEX])
    1.99 -
   1.100 -    if test x"$with_cplex_includedir" != x"no"; then
   1.101 -      CPLEX_CFLAGS="-I$with_cplex_includedir"
   1.102 -    elif test x"$with_cplex" != x"yes"; then
   1.103 -      CPLEX_CFLAGS="-I$with_cplex/include"
   1.104 -    fi
   1.105 -
   1.106 -    if test x"$with_cplex_libdir" != x"no"; then
   1.107 -      CPLEX_LDFLAGS="-L$with_cplex_libdir"
   1.108 -    elif test x"$with_cplex" != x"yes"; then
   1.109 -      CPLEX_LDFLAGS="-L$with_cplex/lib"
   1.110 -    fi
   1.111 -    CPLEX_LIBS="-lcplex -lm -lpthread"
   1.112 -
   1.113 -    lx_save_cxxflags="$CXXFLAGS"
   1.114 -    lx_save_ldflags="$LDFLAGS"
   1.115 -    lx_save_libs="$LIBS"
   1.116 -    CXXFLAGS="$CPLEX_CFLAGS"
   1.117 -    LDFLAGS="$CPLEX_LDFLAGS"
   1.118 -    LIBS="$CPLEX_LIBS"
   1.119 -
   1.120 -    lx_cplex_test_prog='
   1.121 -      extern "C" {
   1.122 -      #include <ilcplex/cplex.h>
   1.123 -      }
   1.124 -
   1.125 -      int main(int argc, char* argv[])
   1.126 -      {
   1.127 -        CPXENVptr env = NULL;
   1.128 -        return 0;
   1.129 -      }'
   1.130 -
   1.131 -    AC_LANG_PUSH(C++)
   1.132 -    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
   1.133 -    AC_LANG_POP(C++)
   1.134 -
   1.135 -    CXXFLAGS="$lx_save_cxxflags"
   1.136 -    LDFLAGS="$lx_save_ldflags"
   1.137 -    LIBS="$lx_save_libs"
   1.138 -
   1.139 -    if test x"$lx_cplex_found" = x"yes"; then
   1.140 -      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
   1.141 -      AC_MSG_RESULT([yes])
   1.142 -    else
   1.143 -      CPLEX_CFLAGS=""
   1.144 -      CPLEX_LDFLAGS=""
   1.145 -      CPLEX_LIBS=""
   1.146 -      AC_MSG_RESULT([no])
   1.147 -    fi
   1.148 -  fi
   1.149 -  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
   1.150 -  AC_SUBST(CPLEX_CFLAGS)
   1.151 -  AC_SUBST(CPLEX_LIBS)
   1.152 -  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
   1.153 -])