m4/lx_check_soplex.m4
changeset 1184 3c00344f49c9
parent 1183 cd72eae05bdf
parent 1182 6b79d93e812f
child 1185 c8d0179a32a2
child 1197 f179aa1045a4
     1.1 --- a/m4/lx_check_soplex.m4	Mon Jul 16 16:21:40 2018 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,73 +0,0 @@
     1.4 -AC_DEFUN([LX_CHECK_SOPLEX],
     1.5 -[
     1.6 -  AC_ARG_WITH([soplex],
     1.7 -AS_HELP_STRING([--with-soplex@<:@=PREFIX@:>@], [search for SOPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
     1.8 -AS_HELP_STRING([--without-soplex], [disable checking for SOPLEX]),
     1.9 -              [], [with_soplex=yes])
    1.10 -
    1.11 -  AC_ARG_WITH([soplex-includedir],
    1.12 -AS_HELP_STRING([--with-soplex-includedir=DIR], [search for SOPLEX headers in DIR]),
    1.13 -              [], [with_soplex_includedir=no])
    1.14 -
    1.15 -  AC_ARG_WITH([soplex-libdir],
    1.16 -AS_HELP_STRING([--with-soplex-libdir=DIR], [search for SOPLEX libraries in DIR]),
    1.17 -              [], [with_soplex_libdir=no])
    1.18 -
    1.19 -  lx_soplex_found=no
    1.20 -  if test x"$with_soplex" != x"no"; then
    1.21 -    AC_MSG_CHECKING([for SOPLEX])
    1.22 -
    1.23 -    if test x"$with_soplex_includedir" != x"no"; then
    1.24 -      SOPLEX_CXXFLAGS="-I$with_soplex_includedir"
    1.25 -    elif test x"$with_soplex" != x"yes"; then
    1.26 -      SOPLEX_CXXFLAGS="-I$with_soplex/src"
    1.27 -    fi
    1.28 -
    1.29 -    if test x"$with_soplex_libdir" != x"no"; then
    1.30 -      SOPLEX_LDFLAGS="-L$with_soplex_libdir"
    1.31 -    elif test x"$with_soplex" != x"yes"; then
    1.32 -      SOPLEX_LDFLAGS="-L$with_soplex/lib"
    1.33 -    fi
    1.34 -    SOPLEX_LIBS="-lsoplex -lz"
    1.35 -
    1.36 -    lx_save_cxxflags="$CXXFLAGS"
    1.37 -    lx_save_ldflags="$LDFLAGS"
    1.38 -    lx_save_libs="$LIBS"
    1.39 -    CXXFLAGS="$SOPLEX_CXXFLAGS"
    1.40 -    LDFLAGS="$SOPLEX_LDFLAGS"
    1.41 -    LIBS="$SOPLEX_LIBS"
    1.42 -
    1.43 -    lx_soplex_test_prog='
    1.44 -      #include <soplex.h>
    1.45 -
    1.46 -      int main(int argc, char** argv)
    1.47 -      {
    1.48 -        soplex::SoPlex soplex;
    1.49 -        return 0;
    1.50 -      }'
    1.51 -
    1.52 -    AC_LANG_PUSH(C++)
    1.53 -    AC_LINK_IFELSE([$lx_soplex_test_prog], [lx_soplex_found=yes], [lx_soplex_found=no])
    1.54 -    AC_LANG_POP(C++)
    1.55 -
    1.56 -    CXXFLAGS="$lx_save_cxxflags"
    1.57 -    LDFLAGS="$lx_save_ldflags"
    1.58 -    LIBS="$lx_save_libs"
    1.59 -
    1.60 -    if test x"$lx_soplex_found" = x"yes"; then
    1.61 -      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
    1.62 -      lx_lp_found=yes
    1.63 -      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    1.64 -      AC_MSG_RESULT([yes])
    1.65 -    else
    1.66 -      SOPLEX_CXXFLAGS=""
    1.67 -      SOPLEX_LDFLAGS=""
    1.68 -      SOPLEX_LIBS=""
    1.69 -      AC_MSG_RESULT([no])
    1.70 -    fi
    1.71 -  fi
    1.72 -  SOPLEX_LIBS="$SOPLEX_LDFLAGS $SOPLEX_LIBS"
    1.73 -  AC_SUBST(SOPLEX_CXXFLAGS)
    1.74 -  AC_SUBST(SOPLEX_LIBS)
    1.75 -  AM_CONDITIONAL([HAVE_SOPLEX], [test x"$lx_soplex_found" = x"yes"])
    1.76 -])