Changeset 428


Ignore:
Timestamp:
Jul 19, 2007 6:15:01 PM (13 years ago)
Author:
andreasw
Message:

added AC_COIN_HAS_GLPK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r427 r428  
    29882988]) # AC_COIN_HAS_MUMPS
    29892989
     2990###########################################################################
     2991#                             COIN_HAS_GLPK                               #
     2992###########################################################################
     2993
     2994# This macro checks for a library containing the GLPK library.  It
     2995# checks if the user has provided --with-glpk-lib and --with-glpk-incdir
     2996# flags, and it not, it checks if the ThirdParty/Glpk project is available.
     2997
     2998AC_DEFUN([AC_COIN_HAS_GLPK],
     2999[
     3000if test "$PACKAGE_NAME" = ThirdPartyGlpk; then
     3001  coin_glpkobjdir=../Glpk
     3002else
     3003  coin_glpkobjdir=../ThirdParty/Glpk
     3004fi
     3005coin_glpksrcdir=$abs_source_dir/$coin_glpkobjdir
     3006
     3007AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],
     3008    [_glp_lpx_simplex glp_lpx_simplex])
     3009
     3010MAKEOKFILE=.MakeOk
     3011use_glpk="$GLPKLIB"
     3012if test "$GLPKLIB" == ""; then
     3013
     3014  # Check if the Glpk's ThirdParty project has been configured
     3015  if test "$PACKAGE_NAME" != ThirdPartyGlpk; then
     3016    if test -r $coin_glpkobjdir/.MakeOk; then
     3017      use_glpk=BUILD
     3018    fi
     3019  fi
     3020fi
     3021
     3022if test x"$use_glpk" == xBUILD; then
     3023
     3024  GLPKCOINLIB=`cd $coin_glpkobjdir; pwd`/libcoinglpk.la
     3025  AC_SUBST(GLPKCOINLIB)
     3026
     3027  GLPKINCDIR="$coin_glpksrcdir/glpk/include"
     3028  AC_DEFINE(COIN_HAS_GLPK,[1],[Define to 1 if the Glpk package is used])
     3029
     3030  # This is a "true" for AM_CONDITIONAL(COIN_HAS_GLPK)
     3031  COIN_HAS_GLPK_TRUE=
     3032  COIN_HAS_GLPK_FALSE='#'
     3033
     3034  coin_has_glpk=yes
     3035
     3036  AC_MSG_NOTICE([Using Glpk in ThirdParty])
     3037fi
     3038
     3039AM_CONDITIONAL([COIN_BUILD_GLPK],[test x"$use_glpk" = xBUILD])
     3040
     3041]) # AC_COIN_HAS_GLPK
Note: See TracChangeset for help on using the changeset viewer.