Ignore:
Timestamp:
Mar 5, 2011 1:55:36 PM (9 years ago)
Author:
stefan
Message:

make WSMP recoginition and use similar to Ipopt's WSMP interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/configure.ac

    r1692 r1693  
    6161  AC_MSG_ERROR([Required package CoinUtils not available.])
    6262fi
    63 AC_COIN_CHECK_PACKAGE(Osi,       [osi],               [OsiClpLib])
     63AC_COIN_CHECK_PACKAGE(Osi,       [osi],       [OsiClpLib])
    6464AC_COIN_CHECK_PACKAGE(OsiTests,  [osi-unittests])
    6565AC_COIN_CHECK_PACKAGE(Sample,    [coindatasample])
     
    103103
    104104if test "$use_wsmp" != "no"; then
     105  # Check how to link against Fortran libraries from C
     106  AC_COIN_F77_WRAPPERS
     107
     108  coin_save_LIBS="$LIBS"
     109  # WSMP requires Blas, so provide CoinUtils libs, which may include Blas
     110  LIBS="$LIBS $use_wsmp $COINUTILS_LIBS"
     111  AC_LANG_PUSH([Fortran 77])
     112  AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works])
     113  AC_TRY_LINK([],[      call WSSMP()],
     114              [AC_MSG_RESULT(yes)],   
     115              [AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])])
     116  AC_LANG_POP([Fortran 77])
     117  LIBS="$coin_save_LIBS"
     118
     119  AC_DEFINE_UNQUOTED([COIN_HAS_WSMP], [1], [Define to 1 if the WSMP package is available])
     120 
    105121  CLPLIB_LIBS="$use_wsmp $CLPLIB_LIBS"
     122  CLPLIB_LIBS_INSTALLED="$use_wsmp $CLPLIB_LIBS_INSTALLED"
    106123  CLPLIB_PCLIBS="$use_wsmp $CLPLIB_PCLIBS"
    107 
    108   defval=
    109   AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp_)])
    110   AC_TRY_LINK([],[wssmp_()],
    111               [AC_MSG_RESULT(yes)
    112                defval=2],
    113               [AC_MSG_RESULT(no)])
    114   if test "$defval" = ""; then
    115     AC_MSG_CHECKING([whether user-supplied WSMP library \"$use_wsmp\" works (symbol wssmp)])
    116     AC_TRY_LINK([],[wssmp()],
    117                 [AC_MSG_RESULT(yes)
    118                  defval=3],
    119                 [AC_MSG_RESULT(no)])
    120   fi
    121   if test "x$defval" = "x"; then
    122     AC_MSG_ERROR([WSMP library $use_wsmp does not seem to work])
    123   fi
    124 
    125   AC_DEFINE_UNQUOTED([WSSMP_BARRIER], [$defval],
    126                      [Define to 2 if wssmp_ is available, and to 3 if wssmp is available])
    127124fi
     125AM_CONDITIONAL(COIN_HAS_WSMP, [test "$use_wsmp" != no])
    128126
    129127#############################################################################
Note: See TracChangeset for help on using the changeset viewer.