Changeset 66


Ignore:
Timestamp:
Jan 14, 2009 9:37:27 AM (13 years ago)
Author:
stefan
Message:

recognize and link cplex library

Location:
trunk/Couenne
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/Makefile.in

    r1 r66  
    150150COIN_HAS_COUENNE_FALSE = @COIN_HAS_COUENNE_FALSE@
    151151COIN_HAS_COUENNE_TRUE = @COIN_HAS_COUENNE_TRUE@
     152COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
     153COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
    152154COIN_HAS_IPOPT_FALSE = @COIN_HAS_IPOPT_FALSE@
    153155COIN_HAS_IPOPT_TRUE = @COIN_HAS_IPOPT_TRUE@
     
    161163CPP = @CPP@
    162164CPPFLAGS = @CPPFLAGS@
     165CPXINCDIR = @CPXINCDIR@
     166CPXLIB = @CPXLIB@
    163167CXX = @CXX@
    164168CXXCPP = @CXXCPP@
  • trunk/Couenne/acinclude.m4

    r1 r66  
    64006400# This file is distributed under the Common Public License.
    64016401#
    6402 ## $Id: coin.m4 1168 2008-09-01 09:13:27Z stefan $
     6402## $Id: coin.m4 1112 2008-08-22 16:39:12Z andreasw $
    64036403#
    64046404# Author: Andreas Wachter    IBM      2006-04-14
     
    69246924# AC_MSG_NOTICE([C++ compiler candidates: $comps])
    69256925AC_PROG_CXX([$comps])
    6926 
    6927 #AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
    6928 #thus, we test here whether $CXX is actually working
    6929 AC_LANG_PUSH(C++)
    6930 AC_MSG_CHECKING([whether C++ compiler $CXX works]);
    6931 AC_COMPILE_IFELSE(
    6932   [AC_LANG_PROGRAM(, [int i=0;])],
    6933   [AC_MSG_RESULT(yes)],
    6934   [AC_MSG_RESULT(no)
    6935    AC_MSG_ERROR(failed to find a C++ compiler or C++ compiler $CXX does not work)]
    6936 )
    6937 AC_LANG_POP(C++)
     6926if test -z "$CXX" ; then
     6927  AC_MSG_ERROR([Failed to find a C++ compiler!])
     6928fi
    69386929
    69396930# It seems that we need to cleanup something here for the Windows
  • trunk/Couenne/configure

    r1 r66  
    473473#endif"
    474474
    475 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os ADDLIBS FADDLIBS ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS sol_cc_compiler CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX MPICXX EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOLM4 have_autoconf have_automake have_svn BUILDTOOLSDIR AUX_DIR abs_source_dir abs_lib_dir abs_include_dir abs_bin_dir HAVE_EXTERNALS_TRUE HAVE_EXTERNALS_FALSE host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ac_c_preproc_warn_flag ac_cxx_preproc_warn_flag RPATH_FLAGS LT_LDFLAGS THIRDPARTYSRCDIR THIRDPARTYOBJDIR THIRDPARTYDOCDIR COIN_HAS_THIRDPARTY_TRUE COIN_HAS_THIRDPARTY_FALSE COINUTILSSRCDIR COINUTILSOBJDIR COINUTILSDOCDIR COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE CLPSRCDIR CLPOBJDIR CLPDOCDIR COIN_HAS_CLP_TRUE COIN_HAS_CLP_FALSE BONMINSRCDIR BONMINOBJDIR BONMINDOCDIR COIN_HAS_BONMIN_TRUE COIN_HAS_BONMIN_FALSE IPOPTSRCDIR IPOPTOBJDIR IPOPTDOCDIR COIN_HAS_IPOPT_TRUE COIN_HAS_IPOPT_FALSE CBCSRCDIR CBCOBJDIR CBCDOCDIR COIN_HAS_CBC_TRUE COIN_HAS_CBC_FALSE OSISRCDIR OSIOBJDIR OSIDOCDIR COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE CGLSRCDIR CGLOBJDIR CGLDOCDIR COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE COUENNESRCDIR COUENNEOBJDIR COUENNEDOCDIR COIN_HAS_COUENNE_TRUE COIN_HAS_COUENNE_FALSE ASLLIB ASL_CPPFLAGS COIN_HAS_ASL_TRUE COIN_HAS_ASL_FALSE LIBEXT VPATH_DISTCLEANFILES LIBOBJS LTLIBOBJS'
     475ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os ADDLIBS FADDLIBS ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS sol_cc_compiler CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX MPICXX EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOLM4 have_autoconf have_automake have_svn BUILDTOOLSDIR AUX_DIR abs_source_dir abs_lib_dir abs_include_dir abs_bin_dir HAVE_EXTERNALS_TRUE HAVE_EXTERNALS_FALSE host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ac_c_preproc_warn_flag ac_cxx_preproc_warn_flag RPATH_FLAGS LT_LDFLAGS THIRDPARTYSRCDIR THIRDPARTYOBJDIR THIRDPARTYDOCDIR COIN_HAS_THIRDPARTY_TRUE COIN_HAS_THIRDPARTY_FALSE COINUTILSSRCDIR COINUTILSOBJDIR COINUTILSDOCDIR COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE CLPSRCDIR CLPOBJDIR CLPDOCDIR COIN_HAS_CLP_TRUE COIN_HAS_CLP_FALSE BONMINSRCDIR BONMINOBJDIR BONMINDOCDIR COIN_HAS_BONMIN_TRUE COIN_HAS_BONMIN_FALSE IPOPTSRCDIR IPOPTOBJDIR IPOPTDOCDIR COIN_HAS_IPOPT_TRUE COIN_HAS_IPOPT_FALSE CBCSRCDIR CBCOBJDIR CBCDOCDIR COIN_HAS_CBC_TRUE COIN_HAS_CBC_FALSE OSISRCDIR OSIOBJDIR OSIDOCDIR COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE CGLSRCDIR CGLOBJDIR CGLDOCDIR COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE COUENNESRCDIR COUENNEOBJDIR COUENNEDOCDIR COIN_HAS_COUENNE_TRUE COIN_HAS_COUENNE_FALSE ASLLIB ASL_CPPFLAGS COIN_HAS_ASL_TRUE COIN_HAS_ASL_FALSE CPXINCDIR CPXLIB COIN_HAS_CPX_TRUE COIN_HAS_CPX_FALSE LIBEXT VPATH_DISTCLEANFILES LIBOBJS LTLIBOBJS'
    476476ac_subst_files=''
    477477
     
    10931093                          optimize for fast installation [default=yes]
    10941094  --disable-libtool-lock  avoid locking (might break parallel builds)
     1095  --enable-cplex-libcheck use disable-cplex-libcheck to skip the
     1096                          link check at configuration time
    10951097
    10961098Optional Packages:
     
    11091111  --with-asldir           specify path to AMPL solver directory (or BUILD for
    11101112                          compilation, or "no" for disabling AMPL)
     1113  --with-cplex-incdir specify the header file directory for library Cplex
     1114  --with-cplex-lib specify the flags used to link with the library Cplex
    11111115
    11121116Some influential environment variables:
     
    35053509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    35063510
    3507 
    3508 #AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
    3509 #thus, we test here whether $CXX is actually working
    3510 ac_ext=cc
    3511 ac_cpp='$CXXCPP $CPPFLAGS'
    3512 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    3513 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    3514 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    3515 
    3516 echo "$as_me:$LINENO: checking whether C++ compiler $CXX works" >&5
    3517 echo $ECHO_N "checking whether C++ compiler $CXX works... $ECHO_C" >&6;
    3518 cat >conftest.$ac_ext <<_ACEOF
    3519 /* confdefs.h.  */
    3520 _ACEOF
    3521 cat confdefs.h >>conftest.$ac_ext
    3522 cat >>conftest.$ac_ext <<_ACEOF
    3523 /* end confdefs.h.  */
    3524 
    3525 int
    3526 main ()
    3527 {
    3528 int i=0;
    3529   ;
    3530   return 0;
    3531 }
    3532 _ACEOF
    3533 rm -f conftest.$ac_objext
    3534 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    3535   (eval $ac_compile) 2>conftest.er1
    3536   ac_status=$?
    3537   grep -v '^ *+' conftest.er1 >conftest.err
    3538   rm -f conftest.er1
    3539   cat conftest.err >&5
    3540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3541   (exit $ac_status); } &&
    3542          { ac_try='test -z "$ac_cxx_werror_flag"
    3543                          || test ! -s conftest.err'
    3544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3545   (eval $ac_try) 2>&5
    3546   ac_status=$?
    3547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3548   (exit $ac_status); }; } &&
    3549          { ac_try='test -s conftest.$ac_objext'
    3550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3551   (eval $ac_try) 2>&5
    3552   ac_status=$?
    3553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3554   (exit $ac_status); }; }; then
    3555   echo "$as_me:$LINENO: result: yes" >&5
    3556 echo "${ECHO_T}yes" >&6
    3557 else
    3558   echo "$as_me: failed program was:" >&5
    3559 sed 's/^/| /' conftest.$ac_ext >&5
    3560 
    3561 echo "$as_me:$LINENO: result: no" >&5
    3562 echo "${ECHO_T}no" >&6
    3563    { { echo "$as_me:$LINENO: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&5
    3564 echo "$as_me: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&2;}
     3511if test -z "$CXX" ; then
     3512  { { echo "$as_me:$LINENO: error: Failed to find a C++ compiler!" >&5
     3513echo "$as_me: error: Failed to find a C++ compiler!" >&2;}
    35653514   { (exit 1); exit 1; }; }
    3566 
    3567 fi
    3568 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    3569 ac_ext=cc
    3570 ac_cpp='$CXXCPP $CPPFLAGS'
    3571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    3572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    3573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    3574 
     3515fi
    35753516
    35763517# It seems that we need to cleanup something here for the Windows
     
    68516792*-*-irix6*)
    68526793  # Find out which ABI we are using.
    6853   echo '#line 6853 "configure"' > conftest.$ac_ext
     6794  echo '#line 6794 "configure"' > conftest.$ac_ext
    68546795  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    68556796  (eval $ac_compile) 2>&5
     
    79857926
    79867927# Provide some information about the compiler.
    7987 echo "$as_me:7987:" \
     7928echo "$as_me:7928:" \
    79887929     "checking for Fortran 77 compiler version" >&5
    79897930ac_compiler=`set X $ac_compile; echo $2`
     
    90528993   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    90538994   -e 's:$: $lt_compiler_flag:'`
    9054    (eval echo "\"\$as_me:9054: $lt_compile\"" >&5)
     8995   (eval echo "\"\$as_me:8995: $lt_compile\"" >&5)
    90558996   (eval "$lt_compile" 2>conftest.err)
    90568997   ac_status=$?
    90578998   cat conftest.err >&5
    9058    echo "$as_me:9058: \$? = $ac_status" >&5
     8999   echo "$as_me:8999: \$? = $ac_status" >&5
    90599000   if (exit $ac_status) && test -s "$ac_outfile"; then
    90609001     # The compiler can only warn and ignore the option if not recognized
     
    93209261   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    93219262   -e 's:$: $lt_compiler_flag:'`
    9322    (eval echo "\"\$as_me:9322: $lt_compile\"" >&5)
     9263   (eval echo "\"\$as_me:9263: $lt_compile\"" >&5)
    93239264   (eval "$lt_compile" 2>conftest.err)
    93249265   ac_status=$?
    93259266   cat conftest.err >&5
    9326    echo "$as_me:9326: \$? = $ac_status" >&5
     9267   echo "$as_me:9267: \$? = $ac_status" >&5
    93279268   if (exit $ac_status) && test -s "$ac_outfile"; then
    93289269     # The compiler can only warn and ignore the option if not recognized
     
    94249365   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    94259366   -e 's:$: $lt_compiler_flag:'`
    9426    (eval echo "\"\$as_me:9426: $lt_compile\"" >&5)
     9367   (eval echo "\"\$as_me:9367: $lt_compile\"" >&5)
    94279368   (eval "$lt_compile" 2>out/conftest.err)
    94289369   ac_status=$?
    94299370   cat out/conftest.err >&5
    9430    echo "$as_me:9430: \$? = $ac_status" >&5
     9371   echo "$as_me:9371: \$? = $ac_status" >&5
    94319372   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    94329373   then
     
    1176911710  lt_status=$lt_dlunknown
    1177011711  cat > conftest.$ac_ext <<EOF
    11771 #line 11771 "configure"
     11712#line 11712 "configure"
    1177211713#include "confdefs.h"
    1177311714
     
    1186911810  lt_status=$lt_dlunknown
    1187011811  cat > conftest.$ac_ext <<EOF
    11871 #line 11871 "configure"
     11812#line 11812 "configure"
    1187211813#include "confdefs.h"
    1187311814
     
    1421314154   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1421414155   -e 's:$: $lt_compiler_flag:'`
    14215    (eval echo "\"\$as_me:14215: $lt_compile\"" >&5)
     14156   (eval echo "\"\$as_me:14156: $lt_compile\"" >&5)
    1421614157   (eval "$lt_compile" 2>conftest.err)
    1421714158   ac_status=$?
    1421814159   cat conftest.err >&5
    14219    echo "$as_me:14219: \$? = $ac_status" >&5
     14160   echo "$as_me:14160: \$? = $ac_status" >&5
    1422014161   if (exit $ac_status) && test -s "$ac_outfile"; then
    1422114162     # The compiler can only warn and ignore the option if not recognized
     
    1431714258   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1431814259   -e 's:$: $lt_compiler_flag:'`
    14319    (eval echo "\"\$as_me:14319: $lt_compile\"" >&5)
     14260   (eval echo "\"\$as_me:14260: $lt_compile\"" >&5)
    1432014261   (eval "$lt_compile" 2>out/conftest.err)
    1432114262   ac_status=$?
    1432214263   cat out/conftest.err >&5
    14323    echo "$as_me:14323: \$? = $ac_status" >&5
     14264   echo "$as_me:14264: \$? = $ac_status" >&5
    1432414265   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1432514266   then
     
    1588715828   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1588815829   -e 's:$: $lt_compiler_flag:'`
    15889    (eval echo "\"\$as_me:15889: $lt_compile\"" >&5)
     15830   (eval echo "\"\$as_me:15830: $lt_compile\"" >&5)
    1589015831   (eval "$lt_compile" 2>conftest.err)
    1589115832   ac_status=$?
    1589215833   cat conftest.err >&5
    15893    echo "$as_me:15893: \$? = $ac_status" >&5
     15834   echo "$as_me:15834: \$? = $ac_status" >&5
    1589415835   if (exit $ac_status) && test -s "$ac_outfile"; then
    1589515836     # The compiler can only warn and ignore the option if not recognized
     
    1599115932   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1599215933   -e 's:$: $lt_compiler_flag:'`
    15993    (eval echo "\"\$as_me:15993: $lt_compile\"" >&5)
     15934   (eval echo "\"\$as_me:15934: $lt_compile\"" >&5)
    1599415935   (eval "$lt_compile" 2>out/conftest.err)
    1599515936   ac_status=$?
    1599615937   cat out/conftest.err >&5
    15997    echo "$as_me:15997: \$? = $ac_status" >&5
     15938   echo "$as_me:15938: \$? = $ac_status" >&5
    1599815939   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1599915940   then
     
    1819818139   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1819918140   -e 's:$: $lt_compiler_flag:'`
    18200    (eval echo "\"\$as_me:18200: $lt_compile\"" >&5)
     18141   (eval echo "\"\$as_me:18141: $lt_compile\"" >&5)
    1820118142   (eval "$lt_compile" 2>conftest.err)
    1820218143   ac_status=$?
    1820318144   cat conftest.err >&5
    18204    echo "$as_me:18204: \$? = $ac_status" >&5
     18145   echo "$as_me:18145: \$? = $ac_status" >&5
    1820518146   if (exit $ac_status) && test -s "$ac_outfile"; then
    1820618147     # The compiler can only warn and ignore the option if not recognized
     
    1846618407   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1846718408   -e 's:$: $lt_compiler_flag:'`
    18468    (eval echo "\"\$as_me:18468: $lt_compile\"" >&5)
     18409   (eval echo "\"\$as_me:18409: $lt_compile\"" >&5)
    1846918410   (eval "$lt_compile" 2>conftest.err)
    1847018411   ac_status=$?
    1847118412   cat conftest.err >&5
    18472    echo "$as_me:18472: \$? = $ac_status" >&5
     18413   echo "$as_me:18413: \$? = $ac_status" >&5
    1847318414   if (exit $ac_status) && test -s "$ac_outfile"; then
    1847418415     # The compiler can only warn and ignore the option if not recognized
     
    1857018511   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1857118512   -e 's:$: $lt_compiler_flag:'`
    18572    (eval echo "\"\$as_me:18572: $lt_compile\"" >&5)
     18513   (eval echo "\"\$as_me:18513: $lt_compile\"" >&5)
    1857318514   (eval "$lt_compile" 2>out/conftest.err)
    1857418515   ac_status=$?
    1857518516   cat out/conftest.err >&5
    18576    echo "$as_me:18576: \$? = $ac_status" >&5
     18517   echo "$as_me:18517: \$? = $ac_status" >&5
    1857718518   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1857818519   then
     
    2217522116
    2217622117
     22118# CPLEX library
     22119ac_ext=c
     22120ac_cpp='$CPP $CPPFLAGS'
     22121ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     22122ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     22123ac_compiler_gnu=$ac_cv_c_compiler_gnu
     22124
     22125
     22126  echo "$as_me:$LINENO: checking if user provides library for Cplex" >&5
     22127echo $ECHO_N "checking if user provides library for Cplex... $ECHO_C" >&6
     22128
     22129# Check for header file directory
     22130
     22131
     22132# Check whether --with-cplex-incdir or --without-cplex-incdir was given.
     22133if test "${with_cplex_incdir+set}" = set; then
     22134  withval="$with_cplex_incdir"
     22135  CPXINCDIR=`cd $withval; pwd`
     22136fi;
     22137
     22138# Check for library directory
     22139
     22140
     22141# Check whether --with-cplex-lib or --without-cplex-lib was given.
     22142if test "${with_cplex_lib+set}" = set; then
     22143  withval="$with_cplex_lib"
     22144  CPXLIB=$withval
     22145fi;
     22146
     22147# Switch to disable library check if requested
     22148
     22149  # Check whether --enable-cplex-libcheck or --disable-cplex-libcheck was given.
     22150if test "${enable_cplex_libcheck+set}" = set; then
     22151  enableval="$enable_cplex_libcheck"
     22152  cplex_libcheck=$enableval
     22153else
     22154  cplex_libcheck=yes
     22155fi;
     22156
     22157# At this point, if we're going to use the library, both LBRYINCDIR and
     22158# LBRYLIB must be defined and not empty.
     22159
     22160  if test x"$CPXINCDIR" != x || test x"$CPXLIB" != x; then
     22161    if test x"$CPXINCDIR" = x || test x"$CPXLIB" = x; then
     22162      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&5
     22163echo "$as_me: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&2;}
     22164   { (exit 1); exit 1; }; }
     22165    fi
     22166    coin_has_cpx=true
     22167    echo "$as_me:$LINENO: result: yes" >&5
     22168echo "${ECHO_T}yes" >&6
     22169  else
     22170    coin_has_cpx=false
     22171    echo "$as_me:$LINENO: result: no" >&5
     22172echo "${ECHO_T}no" >&6
     22173  fi
     22174
     22175# If we have instructions for use, consider header and link checks.
     22176
     22177  if test $coin_has_cpx = true; then
     22178
     22179# If argument 3 (file) is given, check for the file. Typically this will be a
     22180# header file, but that's not assumed.
     22181
     22182    if test -r $CPXINCDIR/cplex.h; then
     22183
     22184  :
     22185else
     22186  { { echo "$as_me:$LINENO: error: Cannot find file cplex.h in $CPXINCDIR" >&5
     22187echo "$as_me: error: Cannot find file cplex.h in $CPXINCDIR" >&2;}
     22188   { (exit 1); exit 1; }; }
     22189  :
     22190fi
     22191
     22192
     22193# Now see if we can link the function. There are arguments for and against
     22194# assuming argument 3 is a header file declaring the function. A correct
     22195# function declaration is the main argument in favour. Having to cope with
     22196# possible dependencies or other oddities are the main arguments against.
     22197# Force the use of C as the best single choice amongst C++, C, and Fortran.
     22198# Obviously, this has limits.
     22199
     22200    if test x"$cplex_libcheck" != xno; then
     22201           coin_save_LIBS="$LIBS"
     22202           LIBS="$CPXLIB $ADDLIBS"
     22203           coin_CPX_link=no
     22204           ac_ext=c
     22205ac_cpp='$CPP $CPPFLAGS'
     22206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     22207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     22208ac_compiler_gnu=$ac_cv_c_compiler_gnu
     22209
     22210           for fnm in CPXgetstat ; do
     22211             echo "$as_me:$LINENO: checking whether symbol $fnm is available with CPX" >&5
     22212echo $ECHO_N "checking whether symbol $fnm is available with CPX... $ECHO_C" >&6
     22213             cat >conftest.$ac_ext <<_ACEOF
     22214/* confdefs.h.  */
     22215_ACEOF
     22216cat confdefs.h >>conftest.$ac_ext
     22217cat >>conftest.$ac_ext <<_ACEOF
     22218/* end confdefs.h.  */
     22219
     22220int
     22221main ()
     22222{
     22223$fnm()
     22224  ;
     22225  return 0;
     22226}
     22227_ACEOF
     22228rm -f conftest.$ac_objext conftest$ac_exeext
     22229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     22230  (eval $ac_link) 2>conftest.er1
     22231  ac_status=$?
     22232  grep -v '^ *+' conftest.er1 >conftest.err
     22233  rm -f conftest.er1
     22234  cat conftest.err >&5
     22235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22236  (exit $ac_status); } &&
     22237         { ac_try='test -z "$ac_c_werror_flag"
     22238                         || test ! -s conftest.err'
     22239  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22240  (eval $ac_try) 2>&5
     22241  ac_status=$?
     22242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22243  (exit $ac_status); }; } &&
     22244         { ac_try='test -s conftest$ac_exeext'
     22245  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22246  (eval $ac_try) 2>&5
     22247  ac_status=$?
     22248  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22249  (exit $ac_status); }; }; then
     22250  echo "$as_me:$LINENO: result: yes" >&5
     22251echo "${ECHO_T}yes" >&6
     22252                  coin_CPX_link=yes
     22253                  break
     22254else
     22255  echo "$as_me: failed program was:" >&5
     22256sed 's/^/| /' conftest.$ac_ext >&5
     22257
     22258echo "$as_me:$LINENO: result: no" >&5
     22259echo "${ECHO_T}no" >&6
     22260fi
     22261rm -f conftest.err conftest.$ac_objext \
     22262      conftest$ac_exeext conftest.$ac_ext
     22263           done
     22264           ac_ext=c
     22265ac_cpp='$CPP $CPPFLAGS'
     22266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     22267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     22268ac_compiler_gnu=$ac_cv_c_compiler_gnu
     22269
     22270           if test x"$coin_CPX_link" = xyes ; then
     22271             LIBS="$coin_save_LIBS"
     22272           else
     22273             { { echo "$as_me:$LINENO: error: Cannot find symbol(s) CPXgetstat with CPX" >&5
     22274echo "$as_me: error: Cannot find symbol(s) CPXgetstat with CPX" >&2;}
     22275   { (exit 1); exit 1; }; }
     22276           fi
     22277         fi
     22278
     22279
     22280# If we make it this far, we've verified the file and linked the function. Add
     22281# the necessary link flags to ADDLIBS and define the preprocessor symbol
     22282# COIN_HAS_LBRY.
     22283
     22284    ADDLIBS="$CPXLIB $ADDLIBS"
     22285
     22286cat >>confdefs.h <<\_ACEOF
     22287#define COIN_HAS_CPX 1
     22288_ACEOF
     22289
     22290  fi
     22291
     22292# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
     22293# automake conditional. These actions must occur unconditionally.
     22294
     22295
     22296
     22297
     22298
     22299if test $coin_has_cpx = true; then
     22300  COIN_HAS_CPX_TRUE=
     22301  COIN_HAS_CPX_FALSE='#'
     22302else
     22303  COIN_HAS_CPX_TRUE='#'
     22304  COIN_HAS_CPX_FALSE=
     22305fi
     22306
     22307
     22308ac_ext=c
     22309ac_cpp='$CPP $CPPFLAGS'
     22310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     22311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     22312ac_compiler_gnu=$ac_cv_c_compiler_gnu
     22313
     22314
    2217722315##############################################################################
    2217822316#                   VPATH links for example input files                      #
     
    2245622594Usually this means the macro was only invoked conditionally." >&5
    2245722595echo "$as_me: error: conditional \"COIN_HAS_ASL\" was never defined.
     22596Usually this means the macro was only invoked conditionally." >&2;}
     22597   { (exit 1); exit 1; }; }
     22598fi
     22599if test -z "${COIN_HAS_CPX_TRUE}" && test -z "${COIN_HAS_CPX_FALSE}"; then
     22600  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPX\" was never defined.
     22601Usually this means the macro was only invoked conditionally." >&5
     22602echo "$as_me: error: conditional \"COIN_HAS_CPX\" was never defined.
    2245822603Usually this means the macro was only invoked conditionally." >&2;}
    2245922604   { (exit 1); exit 1; }; }
     
    2314423289s,@COIN_HAS_ASL_TRUE@,$COIN_HAS_ASL_TRUE,;t t
    2314523290s,@COIN_HAS_ASL_FALSE@,$COIN_HAS_ASL_FALSE,;t t
     23291s,@CPXINCDIR@,$CPXINCDIR,;t t
     23292s,@CPXLIB@,$CPXLIB,;t t
     23293s,@COIN_HAS_CPX_TRUE@,$COIN_HAS_CPX_TRUE,;t t
     23294s,@COIN_HAS_CPX_FALSE@,$COIN_HAS_CPX_FALSE,;t t
    2314623295s,@LIBEXT@,$LIBEXT,;t t
    2314723296s,@VPATH_DISTCLEANFILES@,$VPATH_DISTCLEANFILES,;t t
  • trunk/Couenne/configure.ac

    r1 r66  
    7474AC_COIN_HAS_ASL
    7575
     76# CPLEX library
     77AC_LANG_PUSH(C)
     78AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
     79AC_LANG_POP(C)
     80
    7681##############################################################################
    7782#                   VPATH links for example input files                      #
  • trunk/Couenne/inc/config_couenne.h.in

    r1 r66  
    2727/* Define to 1 if the Couenne package is used */
    2828#undef COIN_HAS_COUENNE
     29
     30/* Define to 1 if the Cplex package is available */
     31#undef COIN_HAS_CPX
    2932
    3033/* Define to 1 if the Ipopt package is used */
  • trunk/Couenne/src/Makefile.in

    r39 r66  
    289289COIN_HAS_COUENNE_FALSE = @COIN_HAS_COUENNE_FALSE@
    290290COIN_HAS_COUENNE_TRUE = @COIN_HAS_COUENNE_TRUE@
     291COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
     292COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
    291293COIN_HAS_IPOPT_FALSE = @COIN_HAS_IPOPT_FALSE@
    292294COIN_HAS_IPOPT_TRUE = @COIN_HAS_IPOPT_TRUE@
     
    300302CPP = @CPP@
    301303CPPFLAGS = @CPPFLAGS@
     304CPXINCDIR = @CPXINCDIR@
     305CPXLIB = @CPXLIB@
    302306CXX = @CXX@
    303307CXXCPP = @CXXCPP@
  • trunk/Couenne/src/main/Makefile.am

    r25 r66  
    3030        $(IPOPTOBJDIR)/src/LinAlg/liblinalg.la
    3131
    32 #if COIN_HAS_CPX
    33 #     COINLIBS += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
    34 #endif
     32if COIN_HAS_CPX
     33     COINLIBS += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
     34endif
    3535
    3636COINLIBS += \
     
    3838     $(CLPOBJDIR)/src/libClp.la \
    3939     $(COINUTILSOBJDIR)/src/libCoinUtils.la
    40 
    41 #if COIN_HAS_CPX
    42 #COINLIBS += \
    43 #        $(CPXLIB)
    44 #endif
    45 
    4640
    4741#IPOPTLIBS = \
     
    9387        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess`
    9488
    95 #if COIN_HAS_CPX
    96 #  AM_CPPFLAGS += \
    97 #       -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
    98 #       -I`$(CYGPATH_W) $(CPXINCDIR)`
    99 #endif
     89if COIN_HAS_CPX
     90  AM_CPPFLAGS += \
     91        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
     92        -I`$(CYGPATH_W) $(CPXINCDIR)`
     93endif
    10094
    10195AM_CPPFLAGS += $(ASL_CPPFLAGS)
  • trunk/Couenne/src/main/Makefile.in

    r25 r66  
    4545@COIN_HAS_ASL_TRUE@bin_PROGRAMS = couenne$(EXEEXT)
    4646@COIN_HAS_COUENNE_TRUE@am__append_1 = $(COUENNEOBJDIR)/src/libCouenne.la
     47@COIN_HAS_CPX_TRUE@am__append_2 = $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
     48@COIN_HAS_CPX_TRUE@am__append_3 = \
     49@COIN_HAS_CPX_TRUE@     -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
     50@COIN_HAS_CPX_TRUE@     -I`$(CYGPATH_W) $(CPXINCDIR)`
     51
    4752
    4853#if COIN_HAS_FILTERSQP
    4954#  AM_CPPFLAGS += -I`$(CYGPATH_W) $(BONMINSRCDIR)/src/Interfaces/Filter`
    5055#endif
    51 @COIN_HAS_COUENNE_TRUE@am__append_2 = \
     56@COIN_HAS_COUENNE_TRUE@am__append_4 = \
    5257@COIN_HAS_COUENNE_TRUE@ -I`$(CYGPATH_W) $(COUENNESRCDIR)/src/convex` \
    5358@COIN_HAS_COUENNE_TRUE@ -I`$(CYGPATH_W) $(COUENNESRCDIR)/src/disjunctive` \
     
    7681@COIN_HAS_COUENNE_TRUE@am__DEPENDENCIES_1 =  \
    7782@COIN_HAS_COUENNE_TRUE@ $(COUENNEOBJDIR)/src/libCouenne.la
    78 am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(CBCOBJDIR)/src/libCbc.la \
     83@COIN_HAS_CPX_TRUE@am__DEPENDENCIES_2 =  \
     84@COIN_HAS_CPX_TRUE@     $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
     85am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(CBCOBJDIR)/src/libCbc.la \
    7986        $(CGLOBJDIR)/src/libCgl.la \
    8087        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
     
    8491        $(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
    8592        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la \
    86         $(IPOPTOBJDIR)/src/LinAlg/liblinalg.la \
     93        $(IPOPTOBJDIR)/src/LinAlg/liblinalg.la $(am__DEPENDENCIES_2) \
    8794        $(OSIOBJDIR)/src/libOsi.la $(CLPOBJDIR)/src/libClp.la \
    8895        $(COINUTILSOBJDIR)/src/libCoinUtils.la
    89 am__DEPENDENCIES_3 =
    90 couenne_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
    91         $(am__DEPENDENCIES_3)
     96am__DEPENDENCIES_4 =
     97couenne_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \
     98        $(am__DEPENDENCIES_4)
    9299DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/inc
    93100depcomp = $(SHELL) $(top_srcdir)/../depcomp
     
    157164COIN_HAS_COUENNE_FALSE = @COIN_HAS_COUENNE_FALSE@
    158165COIN_HAS_COUENNE_TRUE = @COIN_HAS_COUENNE_TRUE@
     166COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
     167COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
    159168COIN_HAS_IPOPT_FALSE = @COIN_HAS_IPOPT_FALSE@
    160169COIN_HAS_IPOPT_TRUE = @COIN_HAS_IPOPT_TRUE@
     
    168177CPP = @CPP@
    169178CPPFLAGS = @CPPFLAGS@
     179CPXINCDIR = @CPXINCDIR@
     180CPXLIB = @CPXLIB@
    170181CXX = @CXX@
    171182CXXCPP = @CXXCPP@
     
    199210LIBEXT = @LIBEXT@
    200211LIBOBJS = @LIBOBJS@
    201 
    202 #if COIN_HAS_CPX
    203 #COINLIBS += \
    204 #        $(CPXLIB)
    205 #endif
    206212
    207213#IPOPTLIBS = \
     
    299305target_alias = @target_alias@
    300306AUTOMAKE_OPTIONS = foreign
    301 
    302 #if COIN_HAS_CPX
    303 #     COINLIBS += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
    304 #endif
    305307COINLIBS = $(am__append_1) $(CBCOBJDIR)/src/libCbc.la \
    306308        $(CGLOBJDIR)/src/libCgl.la \
     
    311313        $(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
    312314        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la \
    313         $(IPOPTOBJDIR)/src/LinAlg/liblinalg.la \
     315        $(IPOPTOBJDIR)/src/LinAlg/liblinalg.la $(am__append_2) \
    314316        $(OSIOBJDIR)/src/libOsi.la $(CLPOBJDIR)/src/libClp.la \
    315317        $(COINUTILSOBJDIR)/src/libCoinUtils.la
     
    317319# Here list all include flags, relative to this "srcdir" directory.  This
    318320# "cygpath" stuff is necessary to compile with native compilers on Windows
    319 
    320 #if COIN_HAS_CPX
    321 #  AM_CPPFLAGS += \
    322 #       -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
    323 #       -I`$(CYGPATH_W) $(CPXINCDIR)`
    324 #endif
    325321AM_CPPFLAGS = -I`$(CYGPATH_W) $(BONMINOBJDIR)/inc` -I`$(CYGPATH_W) \
    326322        $(BONMINSRCDIR)/src/Algorithms` -I`$(CYGPATH_W) \
     
    354350        $(CGLSRCDIR)/src/CglTwomir` -I`$(CYGPATH_W) \
    355351        $(CGLSRCDIR)/src/CglKnapsackCover` -I`$(CYGPATH_W) \
    356         $(CGLSRCDIR)/src/CglPreProcess` $(ASL_CPPFLAGS) \
    357         $(am__append_2)
     352        $(CGLSRCDIR)/src/CglPreProcess` $(am__append_3) \
     353        $(ASL_CPPFLAGS) $(am__append_4)
    358354couenne_SOURCES = BonCouenne.cpp
    359355couenne_LDADD = \
  • trunk/Couenne/test/Makefile.in

    r1 r66  
    107107COIN_HAS_COUENNE_FALSE = @COIN_HAS_COUENNE_FALSE@
    108108COIN_HAS_COUENNE_TRUE = @COIN_HAS_COUENNE_TRUE@
     109COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
     110COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
    109111COIN_HAS_IPOPT_FALSE = @COIN_HAS_IPOPT_FALSE@
    110112COIN_HAS_IPOPT_TRUE = @COIN_HAS_IPOPT_TRUE@
     
    118120CPP = @CPP@
    119121CPPFLAGS = @CPPFLAGS@
     122CPXINCDIR = @CPXINCDIR@
     123CPXLIB = @CPXLIB@
    120124CXX = @CXX@
    121125CXXCPP = @CXXCPP@
Note: See TracChangeset for help on using the changeset viewer.