From 8579cb76f5993bd217355d75a6e176c4da919aa0 Mon Sep 17 00:00:00 2001 From: Aykut Bulut Date: Thu, 4 Aug 2016 15:07:44 -0400 Subject: [PATCH] Picking solver during configure is fixed. --- Makefile.am | 25 +- Makefile.in | 23 +- configure | 9487 +++++++++++++++---------------- configure.ac | 49 +- src/CglConicIPM/CglConicIPM.cpp | 152 +- src/CglConicIPM/CglConicIPM.hpp | 90 +- src/CglConicIPM/Makefile.am | 12 + src/CglConicIPM/Makefile.in | 13 +- src/Makefile.am | 10 +- src/Makefile.in | 11 +- 10 files changed, 4663 insertions(+), 5209 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6da3d61..72921d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,27 @@ AUTOMAKE_OPTIONS = foreign +######################################################################## +# Common Flags # +######################################################################## + +LDADD = $(CGLCONICLIB_LIBS) +DEPENDENCIES = $(CGLCONICLIB_DEPENDENCIES) +AM_CPPFLAGS = $(CGLCONICLIB_CFLAGS) + + +if IPOPT_IPM_SOLVER + AM_CPPFLAGS += -D__OSI_IPOPT__ +endif + +if MOSEK_IPM_SOLVER + AM_CPPFLAGS += -D__OSI_MOSEK__ +endif + +if CPLEX_IPM_SOLVER + AM_CPPFLAGS += -D__OSI_CPLEX__ +endif + ######################################################################## # Subdirectories # ######################################################################## @@ -25,8 +46,8 @@ SUBDIRS = src # Here we need include all files that are not mentioned in other Makefiles # EXTRA_DIST = examples/cgl1.cpp \ -# examples/cgl_data_test.cpp \ -# examples/Makefile.in +# examples/cgl_data_test.cpp \ +# examples/Makefile.in EXTRA_DIST = ######################################################################## diff --git a/Makefile.in b/Makefile.in index 1f1d745..1528337 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,6 +52,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@IPOPT_IPM_SOLVER_TRUE@am__append_1 = -D__OSI_IPOPT__ +@MOSEK_IPM_SOLVER_TRUE@am__append_2 = -D__OSI_MOSEK__ +@CPLEX_IPM_SOLVER_TRUE@am__append_3 = -D__OSI_CPLEX__ DIST_COMMON = README $(am__configure_deps) \ $(srcdir)/BuildTools/Makemain.inc $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/cglconic-uninstalled.pc.in \ @@ -60,8 +63,8 @@ DIST_COMMON = README $(am__configure_deps) \ $(top_srcdir)/examples/Makefile.in AUTHORS COPYING ChangeLog \ INSTALL NEWS TODO config.guess config.sub depcomp install-sh \ ltmain.sh missing -@HAVE_EXTERNALS_TRUE@am__append_1 = Dependencies -@HAVE_EXTERNALS_TRUE@am__append_2 = .Dependencies-stamp +@HAVE_EXTERNALS_TRUE@am__append_4 = Dependencies +@HAVE_EXTERNALS_TRUE@am__append_5 = .Dependencies-stamp subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ @@ -388,6 +391,14 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign +######################################################################## +# Common Flags # +######################################################################## +LDADD = $(CGLCONICLIB_LIBS) +DEPENDENCIES = $(CGLCONICLIB_DEPENDENCIES) +AM_CPPFLAGS = $(CGLCONICLIB_CFLAGS) $(am__append_1) $(am__append_2) \ + $(am__append_3) + ######################################################################## # Subdirectories # ######################################################################## @@ -406,9 +417,9 @@ SUBDIRS = src # Here we need include all files that are not mentioned in other Makefiles # EXTRA_DIST = examples/cgl1.cpp \ -# examples/cgl_data_test.cpp \ -# examples/Makefile.in -EXTRA_DIST = $(am__append_1) +# examples/cgl_data_test.cpp \ +# examples/Makefile.in +EXTRA_DIST = $(am__append_4) ######################################################################## # Installation of the addlibs file # @@ -423,7 +434,7 @@ addlibsdir = $(DESTDIR)$(datadir)/coin/doc/CglConic CLEANFILES = # Files that are generated and should be cleaned with make distclean -DISTCLEANFILES = $(am__append_2) $(VPATH_DISTCLEANFILES) +DISTCLEANFILES = $(am__append_5) $(VPATH_DISTCLEANFILES) DocFiles = README AUTHORS LICENSE DocInstallDir = $(datadir)/coin/doc/$(PACKAGE_NAME) COIN_HAS_DOXYGEN = @COIN_HAS_DOXYGEN_TRUE@TRUE diff --git a/configure b/configure index 4831872..7e575ef 100755 --- a/configure +++ b/configure @@ -479,7 +479,7 @@ ac_includes_default="\ # include #endif" -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 ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE have_svnversion CGLCONIC_SVN_REV CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS sol_cc_compiler CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COIN_CC_IS_CL_TRUE COIN_CC_IS_CL_FALSE MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX COIN_CXX_IS_CL_TRUE COIN_CXX_IS_CL_FALSE MPICXX EGREP LN_S 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 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 DEPENDENCY_LINKING_TRUE DEPENDENCY_LINKING_FALSE LT_LDFLAGS PKG_CONFIG ac_ct_PKG_CONFIG COIN_HAS_PKGCONFIG_TRUE COIN_HAS_PKGCONFIG_FALSE COIN_PKG_CONFIG_PATH COIN_PKG_CONFIG_PATH_UNINSTALLED COINUTILS_LIBS COINUTILS_CFLAGS COINUTILS_DATA COINUTILS_DEPENDENCIES COINUTILS_LIBS_INSTALLED COINUTILS_CFLAGS_INSTALLED COINUTILS_DATA_INSTALLED CGLCONICLIB_CFLAGS CGLCONICLIB_LIBS CGLCONICLIB_PCLIBS CGLCONICLIB_PCREQUIRES CGLCONICLIB_DEPENDENCIES CGLCONICLIB_CFLAGS_INSTALLED CGLCONICLIB_LIBS_INSTALLED COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE OSI_LIBS OSI_CFLAGS OSI_DATA OSI_DEPENDENCIES OSI_LIBS_INSTALLED OSI_CFLAGS_INSTALLED OSI_DATA_INSTALLED COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE OSICLP_LIBS OSICLP_CFLAGS OSICLP_DATA OSICLP_DEPENDENCIES OSICLP_LIBS_INSTALLED OSICLP_CFLAGS_INSTALLED OSICLP_DATA_INSTALLED COIN_HAS_OSICLP_TRUE COIN_HAS_OSICLP_FALSE CGL_LIBS CGL_CFLAGS CGL_DATA CGL_DEPENDENCIES CGL_LIBS_INSTALLED CGL_CFLAGS_INSTALLED CGL_DATA_INSTALLED COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE OSICONIC_LIBS OSICONIC_CFLAGS OSICONIC_DATA OSICONIC_DEPENDENCIES OSICONIC_LIBS_INSTALLED OSICONIC_CFLAGS_INSTALLED OSICONIC_DATA_INSTALLED COIN_HAS_OSICONIC_TRUE COIN_HAS_OSICONIC_FALSE COLA_LIBS COLA_CFLAGS COLA_DATA COLA_DEPENDENCIES COLA_LIBS_INSTALLED COLA_CFLAGS_INSTALLED COLA_DATA_INSTALLED COIN_HAS_COLA_TRUE COIN_HAS_COLA_FALSE OSIIPOPT_LIBS OSIIPOPT_CFLAGS OSIIPOPT_DATA OSIIPOPT_DEPENDENCIES OSIIPOPT_LIBS_INSTALLED OSIIPOPT_CFLAGS_INSTALLED OSIIPOPT_DATA_INSTALLED COIN_HAS_OSIIPOPT_TRUE COIN_HAS_OSIIPOPT_FALSE SAMPLE_LIBS SAMPLE_CFLAGS SAMPLE_DATA SAMPLE_DEPENDENCIES SAMPLE_LIBS_INSTALLED SAMPLE_CFLAGS_INSTALLED SAMPLE_DATA_INSTALLED COIN_HAS_SAMPLE_TRUE COIN_HAS_SAMPLE_FALSE FLIBS BLAS_LIBS BLAS_CFLAGS BLAS_DATA BLAS_DEPENDENCIES BLAS_LIBS_INSTALLED BLAS_CFLAGS_INSTALLED BLAS_DATA_INSTALLED COIN_HAS_BLAS_TRUE COIN_HAS_BLAS_FALSE LAPACK_LIBS LAPACK_CFLAGS LAPACK_DATA LAPACK_DEPENDENCIES LAPACK_LIBS_INSTALLED LAPACK_CFLAGS_INSTALLED LAPACK_DATA_INSTALLED COIN_HAS_LAPACK_TRUE COIN_HAS_LAPACK_FALSE CPLEX_LIBS CPLEX_CFLAGS CPLEX_DATA CPLEX_DEPENDENCIES CPLEX_LIBS_INSTALLED CPLEX_CFLAGS_INSTALLED CPLEX_DATA_INSTALLED COIN_HAS_CPLEX_TRUE COIN_HAS_CPLEX_FALSE MOSEK_LIBS MOSEK_CFLAGS MOSEK_DATA MOSEK_DEPENDENCIES MOSEK_LIBS_INSTALLED MOSEK_CFLAGS_INSTALLED MOSEK_DATA_INSTALLED COIN_HAS_MOSEK_TRUE COIN_HAS_MOSEK_FALSE IPOPT_IPM_SOLVER_TRUE IPOPT_IPM_SOLVER_FALSE MOSEK_IPM_SOLVER_TRUE MOSEK_IPM_SOLVER_FALSE CPLEX_IPM_SOLVER_TRUE CPLEX_IPM_SOLVER_FALSE CGLCONIC_SUBDIRS CGLCONIC_SUBLIBS coin_have_doxygen coin_have_latex coin_doxy_usedot coin_doxy_tagname coin_doxy_logname COIN_HAS_DOXYGEN_TRUE COIN_HAS_DOXYGEN_FALSE COIN_HAS_LATEX_TRUE COIN_HAS_LATEX_FALSE coin_doxy_tagfiles coin_doxy_excludes LIBEXT VPATH_DISTCLEANFILES ABSBUILDDIR LIBOBJS LTLIBOBJS' +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 ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE have_svnversion CGLCONIC_SVN_REV CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS sol_cc_compiler CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COIN_CC_IS_CL_TRUE COIN_CC_IS_CL_FALSE MPICC CXXDEFS ADD_CXXFLAGS DBG_CXXFLAGS OPT_CXXFLAGS CXX CXXFLAGS ac_ct_CXX COIN_CXX_IS_CL_TRUE COIN_CXX_IS_CL_FALSE MPICXX EGREP LN_S 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 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 DEPENDENCY_LINKING_TRUE DEPENDENCY_LINKING_FALSE LT_LDFLAGS PKG_CONFIG ac_ct_PKG_CONFIG COIN_HAS_PKGCONFIG_TRUE COIN_HAS_PKGCONFIG_FALSE COIN_PKG_CONFIG_PATH COIN_PKG_CONFIG_PATH_UNINSTALLED COINUTILS_LIBS COINUTILS_CFLAGS COINUTILS_DATA COINUTILS_DEPENDENCIES COINUTILS_LIBS_INSTALLED COINUTILS_CFLAGS_INSTALLED COINUTILS_DATA_INSTALLED CGLCONICLIB_CFLAGS CGLCONICLIB_LIBS CGLCONICLIB_PCLIBS CGLCONICLIB_PCREQUIRES CGLCONICLIB_DEPENDENCIES CGLCONICLIB_CFLAGS_INSTALLED CGLCONICLIB_LIBS_INSTALLED COIN_HAS_COINUTILS_TRUE COIN_HAS_COINUTILS_FALSE OSI_LIBS OSI_CFLAGS OSI_DATA OSI_DEPENDENCIES OSI_LIBS_INSTALLED OSI_CFLAGS_INSTALLED OSI_DATA_INSTALLED COIN_HAS_OSI_TRUE COIN_HAS_OSI_FALSE OSICLP_LIBS OSICLP_CFLAGS OSICLP_DATA OSICLP_DEPENDENCIES OSICLP_LIBS_INSTALLED OSICLP_CFLAGS_INSTALLED OSICLP_DATA_INSTALLED COIN_HAS_OSICLP_TRUE COIN_HAS_OSICLP_FALSE CGL_LIBS CGL_CFLAGS CGL_DATA CGL_DEPENDENCIES CGL_LIBS_INSTALLED CGL_CFLAGS_INSTALLED CGL_DATA_INSTALLED COIN_HAS_CGL_TRUE COIN_HAS_CGL_FALSE OSICONIC_LIBS OSICONIC_CFLAGS OSICONIC_DATA OSICONIC_DEPENDENCIES OSICONIC_LIBS_INSTALLED OSICONIC_CFLAGS_INSTALLED OSICONIC_DATA_INSTALLED COIN_HAS_OSICONIC_TRUE COIN_HAS_OSICONIC_FALSE COLA_LIBS COLA_CFLAGS COLA_DATA COLA_DEPENDENCIES COLA_LIBS_INSTALLED COLA_CFLAGS_INSTALLED COLA_DATA_INSTALLED COIN_HAS_COLA_TRUE COIN_HAS_COLA_FALSE OSIIPOPT_LIBS OSIIPOPT_CFLAGS OSIIPOPT_DATA OSIIPOPT_DEPENDENCIES OSIIPOPT_LIBS_INSTALLED OSIIPOPT_CFLAGS_INSTALLED OSIIPOPT_DATA_INSTALLED COIN_HAS_OSIIPOPT_TRUE COIN_HAS_OSIIPOPT_FALSE CPLEX_LIBS CPLEX_CFLAGS CPLEX_DATA CPLEX_DEPENDENCIES CPLEX_LIBS_INSTALLED CPLEX_CFLAGS_INSTALLED CPLEX_DATA_INSTALLED COIN_HAS_CPLEX_TRUE COIN_HAS_CPLEX_FALSE MOSEK_LIBS MOSEK_CFLAGS MOSEK_DATA MOSEK_DEPENDENCIES MOSEK_LIBS_INSTALLED MOSEK_CFLAGS_INSTALLED MOSEK_DATA_INSTALLED COIN_HAS_MOSEK_TRUE COIN_HAS_MOSEK_FALSE IPOPT_IPM_SOLVER_TRUE IPOPT_IPM_SOLVER_FALSE MOSEK_IPM_SOLVER_TRUE MOSEK_IPM_SOLVER_FALSE CPLEX_IPM_SOLVER_TRUE CPLEX_IPM_SOLVER_FALSE SAMPLE_LIBS SAMPLE_CFLAGS SAMPLE_DATA SAMPLE_DEPENDENCIES SAMPLE_LIBS_INSTALLED SAMPLE_CFLAGS_INSTALLED SAMPLE_DATA_INSTALLED COIN_HAS_SAMPLE_TRUE COIN_HAS_SAMPLE_FALSE FLIBS BLAS_LIBS BLAS_CFLAGS BLAS_DATA BLAS_DEPENDENCIES BLAS_LIBS_INSTALLED BLAS_CFLAGS_INSTALLED BLAS_DATA_INSTALLED COIN_HAS_BLAS_TRUE COIN_HAS_BLAS_FALSE LAPACK_LIBS LAPACK_CFLAGS LAPACK_DATA LAPACK_DEPENDENCIES LAPACK_LIBS_INSTALLED LAPACK_CFLAGS_INSTALLED LAPACK_DATA_INSTALLED COIN_HAS_LAPACK_TRUE COIN_HAS_LAPACK_FALSE CGLCONIC_SUBDIRS CGLCONIC_SUBLIBS coin_have_doxygen coin_have_latex coin_doxy_usedot coin_doxy_tagname coin_doxy_logname COIN_HAS_DOXYGEN_TRUE COIN_HAS_DOXYGEN_FALSE COIN_HAS_LATEX_TRUE COIN_HAS_LATEX_FALSE coin_doxy_tagfiles coin_doxy_excludes LIBEXT VPATH_DISTCLEANFILES ABSBUILDDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1151,6 +1151,15 @@ Optional Packages: --with-osiipopt-incdir directory with header files for using package OsiIpopt --with-osiipopt-datadir directory with data files for using package OsiIpopt + --with-cplex-lib linker flags for using package Cplex + --with-cplex-incdir directory with header files for using package Cplex + --with-cplex-datadir directory with data files for using package Cplex + --with-mosek-lib linker flags for using package Mosek + --with-mosek-incdir directory with header files for using package Mosek + --with-mosek-datadir directory with data files for using package Mosek + --with-ipm-solver[=ipmsolver] + specify the IPM solver in small letters(default + ipmsolver=ipopt) --with-sample-lib linker flags for using package Sample --with-sample-incdir directory with header files for using package Sample --with-sample-datadir directory with data files for using package Sample @@ -1164,15 +1173,6 @@ Optional Packages: --with-lapack-lib linker flags for using package Lapack --with-lapack-incdir directory with header files for using package Lapack --with-lapack-datadir directory with data files for using package Lapack - --with-cplex-lib linker flags for using package Cplex - --with-cplex-incdir directory with header files for using package Cplex - --with-cplex-datadir directory with data files for using package Cplex - --with-mosek-lib linker flags for using package Mosek - --with-mosek-incdir directory with header files for using package Mosek - --with-mosek-datadir directory with data files for using package Mosek - --with-ipm-solver[=ipmsolver] - specify the IPM solver in small letters(default - ipmsolver=ipopt) --with-dot use dot (from graphviz) when creating documentation with doxygen if available; --without-dot to disable @@ -4090,7 +4090,7 @@ echo "$as_me: Will use MPI C++ compiler $MPICXX" >&6;} CXX="$MPICXX" fi -# correct the LD variable in a build with MS or Intel-windows compiler +# correct the LD variable in a build with MS or intel compiler case "$CXX" in clang* ) ;; cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*) @@ -4105,6 +4105,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # Initialize automake and libtool { @@ -5873,7 +5879,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5876 "configure"' > conftest.$ac_ext + echo '#line 5882 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7007,7 +7013,7 @@ fi # Provide some information about the compiler. -echo "$as_me:7010:" \ +echo "$as_me:7016:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -7145,11 +7151,11 @@ else fi G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu @@ -8074,11 +8080,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8077: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8083: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8081: \$? = $ac_status" >&5 + echo "$as_me:8087: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8342,11 +8348,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8345: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8351: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8349: \$? = $ac_status" >&5 + echo "$as_me:8355: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8446,11 +8452,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8449: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8455: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8453: \$? = $ac_status" >&5 + echo "$as_me:8459: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10791,7 +10797,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13244: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13242: \$? = $ac_status" >&5 + echo "$as_me:13248: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13339,11 +13345,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13342: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13348: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13346: \$? = $ac_status" >&5 + echo "$as_me:13352: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14526,11 +14532,11 @@ else fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC=$lt_save_CC LDCXX=$LD @@ -14909,11 +14915,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14912: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14918: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14916: \$? = $ac_status" >&5 + echo "$as_me:14922: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15013,11 +15019,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15016: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15022: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15020: \$? = $ac_status" >&5 + echo "$as_me:15026: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17113,11 +17119,11 @@ else fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" @@ -17220,11 +17226,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17223: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17229: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17227: \$? = $ac_status" >&5 + echo "$as_me:17233: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17488,11 +17494,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17491: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17497: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17495: \$? = $ac_status" >&5 + echo "$as_me:17501: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17592,11 +17598,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17595: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17601: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17599: \$? = $ac_status" >&5 + echo "$as_me:17605: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18068,7 +18074,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -18129,7 +18135,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -19712,11 +19718,11 @@ else fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" @@ -20193,11 +20199,11 @@ else fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" @@ -20284,6 +20290,7 @@ echo "$as_me: Build is \"$build\"." >&6;} case $build in *-mingw*) CYGPATH_W=echo + mydos2unix= ;; esac @@ -20547,6 +20554,9 @@ fi #END } +# Get the EXEXT variable for CYGWIN + + ############################################################################# # COIN-OR components # ############################################################################# @@ -24358,39 +24368,52 @@ echo "$as_me: error: Required package OsiIpopt is not available." >&2;} { (exit 1); exit 1; }; } fi +############################################################################# +# Third party solvers # +############################################################################# -echo "$as_me:$LINENO: checking for COIN-OR package Sample" >&5 -echo $ECHO_N "checking for COIN-OR package Sample... $ECHO_C" >&6 +# Check which third party solvers are available -coin_has_sample=notGiven +echo "$as_me:$LINENO: checking for COIN-OR package Cplex" >&5 +echo $ECHO_N "checking for COIN-OR package Cplex... $ECHO_C" >&6 + +coin_has_cplex=notGiven # check if user wants to skip package in any case if test x"$COIN_SKIP_PROJECTS" != x; then for dir in $COIN_SKIP_PROJECTS; do - if test $dir = "Sample"; then - coin_has_sample=skipping + if test $dir = "Cplex"; then + coin_has_cplex=skipping fi done fi -if test "$coin_has_sample" != skipping; then +if test "$coin_has_cplex" != skipping; then -# Check whether --with-m4_tolower(Sample) or --without-m4_tolower(Sample) was given. -if test "${with_sample+set}" = set; then - withval="$with_sample" +# Check whether --with-m4_tolower(Cplex) or --without-m4_tolower(Cplex) was given. +if test "${with_cplex+set}" = set; then + withval="$with_cplex" if test "$withval" = no ; then - coin_has_sample=skipping + coin_has_cplex=skipping fi fi; fi -SAMPLE_LIBS= -SAMPLE_CFLAGS= -SAMPLE_DATA= -SAMPLE_DEPENDENCIES= -SAMPLE_PCLIBS= -SAMPLE_PCREQUIRES= +CPLEX_LIBS= +CPLEX_CFLAGS= +CPLEX_DATA= +CPLEX_DEPENDENCIES= +CPLEX_PCLIBS= +CPLEX_PCREQUIRES= + + + + + + + + @@ -24401,69 +24424,72 @@ SAMPLE_PCREQUIRES= #check if user provided LIBS, CFLAGS, or DATA for package or disables use of package -if test $coin_has_sample != skipping; then +if test $coin_has_cplex != skipping; then -# Check whether --with-m4_tolower(Sample)-lib or --without-m4_tolower(Sample)-lib was given. -if test "${with_sample_lib+set}" = set; then - withval="$with_sample_lib" +# Check whether --with-m4_tolower(Cplex)-lib or --without-m4_tolower(Cplex)-lib was given. +if test "${with_cplex_lib+set}" = set; then + withval="$with_cplex_lib" if test "$withval" = no ; then - coin_has_sample=skipping + coin_has_cplex=skipping else - coin_has_sample=yes - SAMPLE_LIBS="$withval" - SAMPLE_PCLIBS="$withval" + coin_has_cplex=yes + CPLEX_LIBS="$withval" + CPLEX_PCLIBS="$withval" + + CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" + CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - SAMPLE_LIBS_INSTALLED="$withval" - + CPLEX_LIBS_INSTALLED="$withval" + CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" fi fi fi; fi -if test $coin_has_sample != skipping; then +if test $coin_has_cplex != skipping; then -# Check whether --with-m4_tolower(Sample)-incdir or --without-m4_tolower(Sample)-incdir was given. -if test "${with_sample_incdir+set}" = set; then - withval="$with_sample_incdir" +# Check whether --with-m4_tolower(Cplex)-incdir or --without-m4_tolower(Cplex)-incdir was given. +if test "${with_cplex_incdir+set}" = set; then + withval="$with_cplex_incdir" if test "$withval" = no ; then - coin_has_sample=skipping + coin_has_cplex=skipping else - coin_has_sample=yes - SAMPLE_CFLAGS="-I`${CYGPATH_W} $withval`" - + coin_has_cplex=yes + CPLEX_CFLAGS="-I`${CYGPATH_W} $withval`" + CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - SAMPLE_CFLAGS_INSTALLED="$SAMPLE_CFLAGS" - + CPLEX_CFLAGS_INSTALLED="$CPLEX_CFLAGS" + CGLCONICLIB_CFLAGS_INSTALLED="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" fi fi fi; fi -if test $coin_has_sample != skipping; then +if test $coin_has_cplex != skipping; then -# Check whether --with-m4_tolower(Sample)-datadir or --without-m4_tolower(Sample)-datadir was given. -if test "${with_sample_datadir+set}" = set; then - withval="$with_sample_datadir" +# Check whether --with-m4_tolower(Cplex)-datadir or --without-m4_tolower(Cplex)-datadir was given. +if test "${with_cplex_datadir+set}" = set; then + withval="$with_cplex_datadir" if test "$withval" = no ; then - coin_has_sample=skipping + coin_has_cplex=skipping else - coin_has_sample=yes - SAMPLE_DATA="$withval" + coin_has_cplex=yes + CPLEX_DATA="$withval" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - SAMPLE_DATA_INSTALLED="$withval" + CPLEX_DATA_INSTALLED="$withval" fi fi fi; fi -if test $coin_has_sample = notGiven; then +if test $coin_has_cplex = notGiven; then if test -n "$PKG_CONFIG" ; then # set search path for pkg-config # need to export variable to be sure that the following pkg-config gets these values @@ -24476,9 +24502,9 @@ if test $coin_has_sample = notGiven; then if test -n "$PKG_CONFIG" ; then - if $PKG_CONFIG --exists "coindatasample"; then - SAMPLE_VERSIONS=`$PKG_CONFIG --modversion "coindatasample" 2>/dev/null | tr '\n' ' '` - cflags=`$PKG_CONFIG --cflags "coindatasample" 2>/dev/null` + if $PKG_CONFIG --exists "osicplex"; then + CPLEX_VERSIONS=`$PKG_CONFIG --modversion "osicplex" 2>/dev/null | tr '\n' ' '` + cflags=`$PKG_CONFIG --cflags "osicplex" 2>/dev/null` # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's # but only do this if is not trivial @@ -24486,35 +24512,39 @@ if test -n "$PKG_CONFIG" ; then # need to put into brackets since otherwise autoconf replaces the brackets in the sed command cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - SAMPLE_CFLAGS="$cflags" - SAMPLE_LIBS=`$PKG_CONFIG --libs "coindatasample" 2>/dev/null` - SAMPLE_DATA=`$PKG_CONFIG --variable=datadir "coindatasample" 2>/dev/null` - coin_has_sample=yes - echo "$as_me:$LINENO: result: yes: $SAMPLE_VERSIONS" >&5 -echo "${ECHO_T}yes: $SAMPLE_VERSIONS" >&6 + CPLEX_CFLAGS="$cflags" + CPLEX_LIBS=`$PKG_CONFIG --libs "osicplex" 2>/dev/null` + CPLEX_DATA=`$PKG_CONFIG --variable=datadir "osicplex" 2>/dev/null` + coin_has_cplex=yes + echo "$as_me:$LINENO: result: yes: $CPLEX_VERSIONS" >&5 +echo "${ECHO_T}yes: $CPLEX_VERSIONS" >&6 # adjust linker flags for (i)cl compiler # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; then - SAMPLE_LIBS=`echo " $SAMPLE_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + CPLEX_LIBS=`echo " $CPLEX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` fi - SAMPLE_PCREQUIRES="coindatasample" + CPLEX_PCREQUIRES="osicplex" - # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in + # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib + + CGLCONICLIB_PCREQUIRES="osicplex $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$CPLEX_LIBS $CGLCONICLIB_LIBS" else - SAMPLE_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coindatasample"` - coin_has_sample=notGiven - echo "$as_me:$LINENO: result: not given: $SAMPLE_PKG_ERRORS" >&5 -echo "${ECHO_T}not given: $SAMPLE_PKG_ERRORS" >&6 + CPLEX_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "osicplex"` + coin_has_cplex=notGiven + echo "$as_me:$LINENO: result: not given: $CPLEX_PKG_ERRORS" >&5 +echo "${ECHO_T}not given: $CPLEX_PKG_ERRORS" >&6 fi else - { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Sample without pkg-config\"" >&5 -echo "$as_me: error: \"Cannot check for existance of module Sample without pkg-config\"" >&2;} + { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Cplex without pkg-config\"" >&5 +echo "$as_me: error: \"Cannot check for existance of module Cplex without pkg-config\"" >&2;} { (exit 1); exit 1; }; } fi @@ -24529,21 +24559,21 @@ fi echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 -echo "$as_me:$LINENO: checking for COIN-OR package Sample (fallback)" >&5 -echo $ECHO_N "checking for COIN-OR package Sample (fallback)... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for COIN-OR package Cplex (fallback)" >&5 +echo $ECHO_N "checking for COIN-OR package Cplex (fallback)... $ECHO_C" >&6 -coin_has_sample=notGiven -SAMPLE_LIBS= -SAMPLE_LIBS_INSTALLED= -SAMPLE_CFLAGS= -SAMPLE_CFLAGS_INSTALLED= -SAMPLE_DATA= -SAMPLE_DATA_INSTALLED= -SAMPLE_PCLIBS= -SAMPLE_PCREQUIRES= +coin_has_cplex=notGiven +CPLEX_LIBS= +CPLEX_LIBS_INSTALLED= +CPLEX_CFLAGS= +CPLEX_CFLAGS_INSTALLED= +CPLEX_DATA= +CPLEX_DATA_INSTALLED= +CPLEX_PCLIBS= +CPLEX_PCREQUIRES= -# initial list of dependencies is "coindatasample", but we need to filter out version number specifications (= x, <= x, >= x, != x) -projtoprocess="coindatasample" +# initial list of dependencies is "osicplex", but we need to filter out version number specifications (= x, <= x, >= x, != x) +projtoprocess="osicplex" # we first expand the list of projects to process by adding all dependencies just behind the project which depends on it # further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards @@ -24584,11 +24614,11 @@ echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` # read DATA from $pcfile, if _DATA is still empty - if test "x$SAMPLE_DATA" = x ; then + if test "x$CPLEX_DATA" = x ; then projdatadir= pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` eval `sh -c "$pcfilemod"` - SAMPLE_DATA="$projdatadir" + CPLEX_DATA="$projdatadir" fi allproj="$allproj $proj" @@ -24605,14 +24635,14 @@ echo "${ECHO_T}no, dependency $proj not available" >&6 allpcifiles="$pcifile:$allpcifiles" # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty - if test "x$SAMPLE_DATA_INSTALLED" = x ; then + if test "x$CPLEX_DATA_INSTALLED" = x ; then projdatadir= pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` eval `sh -c "$pcifilemod"` if test "${CYGPATH_W}" != "echo"; then projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" fi - SAMPLE_DATA_INSTALLED="$projdatadir" + CPLEX_DATA_INSTALLED="$projdatadir" fi fi @@ -24663,10 +24693,10 @@ if test "$allproj" != fail ; then if test "${CYGPATH_W}" != "echo"; then projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - SAMPLE_CFLAGS="$projcflags $SAMPLE_CFLAGS" + CPLEX_CFLAGS="$projcflags $CPLEX_CFLAGS" # set LIBS variable - SAMPLE_LIBS="$projlibs $SAMPLE_LIBS" + CPLEX_LIBS="$projlibs $CPLEX_LIBS" # remember that we have processed $pcfile pcfilesprocessed="$pcfilesprocessed:$pcfile" @@ -24711,10 +24741,10 @@ if test "$allproj" != fail ; then if test "${CYGPATH_W}" != "echo"; then projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - SAMPLE_CFLAGS_INSTALLED="$projcflags $SAMPLE_CFLAGS_INSTALLED" + CPLEX_CFLAGS_INSTALLED="$projcflags $CPLEX_CFLAGS_INSTALLED" # set LIBS variable - SAMPLE_LIBS_INSTALLED="$projlibs $SAMPLE_LIBS_INSTALLED" + CPLEX_LIBS_INSTALLED="$projlibs $CPLEX_LIBS_INSTALLED" # remember that we have processed $pcfile pcfilesprocessed="$pcfilesprocessed:$pcfile" @@ -24724,12 +24754,12 @@ if test "$allproj" != fail ; then # finish up - coin_has_sample=yes + coin_has_cplex=yes echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_SAMPLE 1 +#define COIN_HAS_CPLEX 1 _ACEOF @@ -24740,24 +24770,30 @@ _ACEOF # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; then - SAMPLE_LIBS=`echo " $SAMPLE_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - SAMPLE_LIBS_INSTALLED=`echo " $SAMPLE_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` + CPLEX_LIBS=`echo " $CPLEX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + CPLEX_LIBS_INSTALLED=`echo " $CPLEX_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` fi - SAMPLE_PCREQUIRES="coindatasample" + CPLEX_PCREQUIRES="osicplex" + + CGLCONICLIB_PCREQUIRES="osicplex $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$CPLEX_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_CFLAGS_INSTALLED="$CPLEX_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" + CGLCONICLIB_LIBS_INSTALLED="$CPLEX_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" fi -if test $coin_has_sample != notGiven && - test $coin_has_sample != skipping; then - COIN_HAS_SAMPLE_TRUE= - COIN_HAS_SAMPLE_FALSE='#' +if test $coin_has_cplex != notGiven && + test $coin_has_cplex != skipping; then + COIN_HAS_CPLEX_TRUE= + COIN_HAS_CPLEX_FALSE='#' else - COIN_HAS_SAMPLE_TRUE='#' - COIN_HAS_SAMPLE_FALSE= + COIN_HAS_CPLEX_TRUE='#' + COIN_HAS_CPLEX_FALSE= fi @@ -24765,15 +24801,15 @@ fi fi else - echo "$as_me:$LINENO: result: $coin_has_sample" >&5 -echo "${ECHO_T}$coin_has_sample" >&6 + echo "$as_me:$LINENO: result: $coin_has_cplex" >&5 +echo "${ECHO_T}$coin_has_cplex" >&6 fi -if test $coin_has_sample != skipping && - test $coin_has_sample != notGiven ; then +if test $coin_has_cplex != skipping && + test $coin_has_cplex != notGiven ; then cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_SAMPLE 1 +#define COIN_HAS_CPLEX 1 _ACEOF @@ -24791,1826 +24827,1469 @@ fi; # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows # then remove everything of the form -xxx # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) - SAMPLE_DEPENDENCIES=`echo " $SAMPLE_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + CPLEX_DEPENDENCIES=`echo " $CPLEX_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + + CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` fi if test 1 = 0 ; then #change this test to enable a bit of debugging output - if test -n "$SAMPLE_CFLAGS" ; then - { echo "$as_me:$LINENO: Sample CFLAGS are $SAMPLE_CFLAGS" >&5 -echo "$as_me: Sample CFLAGS are $SAMPLE_CFLAGS" >&6;} + if test -n "$CPLEX_CFLAGS" ; then + { echo "$as_me:$LINENO: Cplex CFLAGS are $CPLEX_CFLAGS" >&5 +echo "$as_me: Cplex CFLAGS are $CPLEX_CFLAGS" >&6;} fi - if test -n "$SAMPLE_LIBS" ; then - { echo "$as_me:$LINENO: Sample LIBS are $SAMPLE_LIBS" >&5 -echo "$as_me: Sample LIBS are $SAMPLE_LIBS" >&6;} + if test -n "$CPLEX_LIBS" ; then + { echo "$as_me:$LINENO: Cplex LIBS are $CPLEX_LIBS" >&5 +echo "$as_me: Cplex LIBS are $CPLEX_LIBS" >&6;} fi - if test -n "$SAMPLE_DEPENDENCIES" ; then - { echo "$as_me:$LINENO: Sample DEPENDENCIES are $SAMPLE_DEPENDENCIES" >&5 -echo "$as_me: Sample DEPENDENCIES are $SAMPLE_DEPENDENCIES" >&6;} + if test -n "$CPLEX_DEPENDENCIES" ; then + { echo "$as_me:$LINENO: Cplex DEPENDENCIES are $CPLEX_DEPENDENCIES" >&5 +echo "$as_me: Cplex DEPENDENCIES are $CPLEX_DEPENDENCIES" >&6;} fi - if test -n "$SAMPLE_DATA" ; then - { echo "$as_me:$LINENO: Sample DATA is $SAMPLE_DATA" >&5 -echo "$as_me: Sample DATA is $SAMPLE_DATA" >&6;} + if test -n "$CPLEX_DATA" ; then + { echo "$as_me:$LINENO: Cplex DATA is $CPLEX_DATA" >&5 +echo "$as_me: Cplex DATA is $CPLEX_DATA" >&6;} fi - if test -n "$SAMPLE_PCLIBS" ; then - { echo "$as_me:$LINENO: Sample PCLIBS are $SAMPLE_PCLIBS" >&5 -echo "$as_me: Sample PCLIBS are $SAMPLE_PCLIBS" >&6;} + if test -n "$CPLEX_PCLIBS" ; then + { echo "$as_me:$LINENO: Cplex PCLIBS are $CPLEX_PCLIBS" >&5 +echo "$as_me: Cplex PCLIBS are $CPLEX_PCLIBS" >&6;} fi - if test -n "$SAMPLE_PCREQUIRES" ; then - { echo "$as_me:$LINENO: Sample PCREQUIRES are $SAMPLE_PCREQUIRES" >&5 -echo "$as_me: Sample PCREQUIRES are $SAMPLE_PCREQUIRES" >&6;} + if test -n "$CPLEX_PCREQUIRES" ; then + { echo "$as_me:$LINENO: Cplex PCREQUIRES are $CPLEX_PCREQUIRES" >&5 +echo "$as_me: Cplex PCREQUIRES are $CPLEX_PCREQUIRES" >&6;} fi + { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 +echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} + { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 +echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} + { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 +echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} + fi fi # Define the Makefile conditional -if test $coin_has_sample != notGiven && - test $coin_has_sample != skipping; then - COIN_HAS_SAMPLE_TRUE= - COIN_HAS_SAMPLE_FALSE='#' +if test $coin_has_cplex != notGiven && + test $coin_has_cplex != skipping; then + COIN_HAS_CPLEX_TRUE= + COIN_HAS_CPLEX_FALSE='#' else - COIN_HAS_SAMPLE_TRUE='#' - COIN_HAS_SAMPLE_FALSE= + COIN_HAS_CPLEX_TRUE='#' + COIN_HAS_CPLEX_FALSE= fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 -echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_v+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main +echo "$as_me:$LINENO: checking for COIN-OR package Mosek" >&5 +echo $ECHO_N "checking for COIN-OR package Mosek... $ECHO_C" >&6 - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_f77_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat >conftest.$ac_ext <<_ACEOF - program main +coin_has_mosek=notGiven - end -_ACEOF +# check if user wants to skip package in any case +if test x"$COIN_SKIP_PROJECTS" != x; then + for dir in $COIN_SKIP_PROJECTS; do + if test $dir = "Mosek"; then + coin_has_mosek=skipping + fi + done +fi -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FFLAGS=$FFLAGS -FFLAGS="$FFLAGS $ac_verb" -(eval echo $as_me:24893: \"$ac_link\") >&5 -ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f77_v_output" >&5 -FFLAGS=$ac_save_FFLAGS +if test "$coin_has_mosek" != skipping; then -rm -f conftest* +# Check whether --with-m4_tolower(Mosek) or --without-m4_tolower(Mosek) was given. +if test "${with_mosek+set}" = set; then + withval="$with_mosek" + if test "$withval" = no ; then + coin_has_mosek=skipping + fi -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_f77_v_output="`echo $ac_f77_v_output | - grep 'LPATH is:' | - sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" +fi; +fi -case $ac_f77_v_output in - # If we are using xlf then replace all the commas with spaces. - *xlfentry*) - ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; +MOSEK_LIBS= +MOSEK_CFLAGS= +MOSEK_DATA= +MOSEK_DEPENDENCIES= +MOSEK_PCLIBS= +MOSEK_PCREQUIRES= - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; - # If we are using Cray Fortran then delete quotes. - # Use "\"" instead of '"' for font-lock-mode. - # FIXME: a more general fix for quoted arguments with spaces? - *cft90*) - ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; -esac - # look for -l* and *.a constructs in the output - for ac_arg in $ac_f77_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_f77_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_f77_v"; then - { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 -echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 -echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 -echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5 -echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6 -if test "${ac_cv_f77_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$FLIBS" != "x"; then - ac_cv_f77_libs="$FLIBS" # Let the user override the test. -else -cat >conftest.$ac_ext <<_ACEOF - program main - end -_ACEOF -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FFLAGS=$FFLAGS -FFLAGS="$FFLAGS $ac_cv_prog_f77_v" -(eval echo $as_me:24971: \"$ac_link\") >&5 -ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f77_v_output" >&5 -FFLAGS=$ac_save_FFLAGS -rm -f conftest* -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_f77_v_output="`echo $ac_f77_v_output | - grep 'LPATH is:' | - sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" -case $ac_f77_v_output in - # If we are using xlf then replace all the commas with spaces. - *xlfentry*) - ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; - # If we are using Cray Fortran then delete quotes. - # Use "\"" instead of '"' for font-lock-mode. - # FIXME: a more general fix for quoted arguments with spaces? - *cft90*) - ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; -esac -ac_cv_f77_libs= +#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package +if test $coin_has_mosek != skipping; then -# Save positional arguments (if any) -ac_save_positional="$@" +# Check whether --with-m4_tolower(Mosek)-lib or --without-m4_tolower(Mosek)-lib was given. +if test "${with_mosek_lib+set}" = set; then + withval="$with_mosek_lib" + if test "$withval" = no ; then + coin_has_mosek=skipping + else + coin_has_mosek=yes + MOSEK_LIBS="$withval" + MOSEK_PCLIBS="$withval" -set X $ac_f77_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done + CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" + CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" - if test x"$ac_exists" = xtrue; then - : -else - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + MOSEK_LIBS_INSTALLED="$withval" + CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" + fi + fi + +fi; fi - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done +if test $coin_has_mosek != skipping; then - if test x"$ac_exists" = xtrue; then - : -else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" - done -else - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi +# Check whether --with-m4_tolower(Mosek)-incdir or --without-m4_tolower(Mosek)-incdir was given. +if test "${with_mosek_incdir+set}" = set; then + withval="$with_mosek_incdir" + if test "$withval" = no ; then + coin_has_mosek=skipping + else + coin_has_mosek=yes + MOSEK_CFLAGS="-I`${CYGPATH_W} $withval`" + CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + MOSEK_CFLAGS_INSTALLED="$MOSEK_CFLAGS" + CGLCONICLIB_CFLAGS_INSTALLED="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" + fi + fi + +fi; fi - ;; - # Ignore these flags. - -lang* | -lcrt[01].o | -lcrtbegin.o | -lc | -lgcc | -libmil | -LANG:=*) - ;; - -lkernel32) - test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" - ;; - -[LRuY]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done +if test $coin_has_mosek != skipping; then - if test x"$ac_exists" = xtrue; then - : -else - ac_arg="$ac_arg $ac_j" - ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" +# Check whether --with-m4_tolower(Mosek)-datadir or --without-m4_tolower(Mosek)-datadir was given. +if test "${with_mosek_datadir+set}" = set; then + withval="$with_mosek_datadir" + if test "$withval" = no ; then + coin_has_mosek=skipping + else + coin_has_mosek=yes + MOSEK_DATA="$withval" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + MOSEK_DATA_INSTALLED="$withval" + fi + fi + +fi; fi - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break +if test $coin_has_mosek = notGiven; then + if test -n "$PKG_CONFIG" ; then + # set search path for pkg-config + # need to export variable to be sure that the following pkg-config gets these values + coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" + export PKG_CONFIG_PATH + + # let pkg-config do it's magic + + + +if test -n "$PKG_CONFIG" ; then + if $PKG_CONFIG --exists "osimosek"; then + MOSEK_VERSIONS=`$PKG_CONFIG --modversion "osimosek" 2>/dev/null | tr '\n' ' '` + cflags=`$PKG_CONFIG --cflags "osimosek" 2>/dev/null` + # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files + # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's + # but only do this if is not trivial + if test "$CYGPATH_W" != "echo" ; then + # need to put into brackets since otherwise autoconf replaces the brackets in the sed command + cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - done + MOSEK_CFLAGS="$cflags" + MOSEK_LIBS=`$PKG_CONFIG --libs "osimosek" 2>/dev/null` + MOSEK_DATA=`$PKG_CONFIG --variable=datadir "osimosek" 2>/dev/null` + coin_has_mosek=yes + echo "$as_me:$LINENO: result: yes: $MOSEK_VERSIONS" >&5 +echo "${ECHO_T}yes: $MOSEK_VERSIONS" >&6 - if test x"$ac_exists" = xtrue; then - : -else - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + MOSEK_LIBS=`echo " $MOSEK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + fi + MOSEK_PCREQUIRES="osimosek" - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift + # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`echo $ac_f77_v_output | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" - done + CGLCONICLIB_PCREQUIRES="osimosek $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$MOSEK_LIBS $CGLCONICLIB_LIBS" + + + + else + MOSEK_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "osimosek"` + coin_has_mosek=notGiven + echo "$as_me:$LINENO: result: not given: $MOSEK_PKG_ERRORS" >&5 +echo "${ECHO_T}not given: $MOSEK_PKG_ERRORS" >&6 + + fi else - ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" + { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Mosek without pkg-config\"" >&5 +echo "$as_me: error: \"Cannot check for existance of module Mosek without pkg-config\"" >&2;} + { (exit 1); exit 1; }; } fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 -echo "${ECHO_T}$ac_cv_f77_libs" >&6 -FLIBS="$ac_cv_f77_libs" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + # reset PKG_CONFIG_PATH variable + PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" + export PKG_CONFIG_PATH -echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5 -echo $ECHO_N "checking for dummy main to link with Fortran libraries... $ECHO_C" >&6 -if test "${ac_cv_f77_dummy_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_f77_dm_save_LIBS=$LIBS - LIBS="$LIBS $FLIBS" - ac_fortran_dm_var=F77_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + else + echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 +echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 - # First, try linking without a dummy main: - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +echo "$as_me:$LINENO: checking for COIN-OR package Mosek (fallback)" >&5 +echo $ECHO_N "checking for COIN-OR package Mosek (fallback)... $ECHO_C" >&6 -#ifdef F77_DUMMY_MAIN +coin_has_mosek=notGiven +MOSEK_LIBS= +MOSEK_LIBS_INSTALLED= +MOSEK_CFLAGS= +MOSEK_CFLAGS_INSTALLED= +MOSEK_DATA= +MOSEK_DATA_INSTALLED= +MOSEK_PCLIBS= +MOSEK_PCREQUIRES= -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +# initial list of dependencies is "osimosek", but we need to filter out version number specifications (= x, <= x, >= x, != x) +projtoprocess="osimosek" -#endif -int -main () -{ +# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it +# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards +# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples +# also, we setup the DATA variable +allproj="" +allpcfiles="" +allpcifiles="" +while test "x$projtoprocess" != x ; do - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_fortran_dummy_main=none -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + for proj in $projtoprocess ; do + # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it + pcfile="" + save_IFS="$IFS" + IFS=":" + for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do + # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again + if test -r "$dir/${proj}-uninstalled.pc" ; then + pcfile="$dir/$proj-uninstalled.pc" + if test -r "$dir/${proj}.pc" ; then + pcifile="$dir/${proj}.pc" + else + { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 +echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} + pcifile= + fi + break + fi + done + IFS="$save_IFS" -ac_cv_fortran_dummy_main=unknown -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + if test "x$pcfile" != x ; then + # read dependencies from $pcfile and filter it + projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef F77_DUMMY_MAIN + # add projrequires to the front of the list of projects that have to be processed next + # at the same time, remove $proj from this list + projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # read DATA from $pcfile, if _DATA is still empty + if test "x$MOSEK_DATA" = x ; then + projdatadir= + pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` + eval `sh -c "$pcfilemod"` + MOSEK_DATA="$projdatadir" + fi -#endif -int -main () -{ + allproj="$allproj $proj" + allpcfiles="$pcfile:$allpcfiles" - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_fortran_dummy_main=$ac_func; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + else + echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 +echo "${ECHO_T}no, dependency $proj not available" >&6 + allproj=fail + break 2 + fi -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main - rm -f conftest* - LIBS=$ac_f77_dm_save_LIBS + if test "x$pcifile" != x ; then + allpcifiles="$pcifile:$allpcifiles" -fi -echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 -echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6 -F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown; then - if test $F77_DUMMY_MAIN != none; then + # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty + if test "x$MOSEK_DATA_INSTALLED" = x ; then + projdatadir= + pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` + eval `sh -c "$pcifilemod"` + if test "${CYGPATH_W}" != "echo"; then + projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" + fi + MOSEK_DATA_INSTALLED="$projdatadir" + fi -cat >>confdefs.h <<_ACEOF -#define F77_DUMMY_MAIN $F77_DUMMY_MAIN -_ACEOF + fi - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + break + done + + # remove spaces on begin of $projtoprocess + projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` + +done + +if test "$allproj" != fail ; then + + # now go through the list of .pc files and assemble compiler and linker flags + # important is here to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcfiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done + fi + + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` + + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" + + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + MOSEK_CFLAGS="$projcflags $MOSEK_CFLAGS" + + # set LIBS variable + MOSEK_LIBS="$projlibs $MOSEK_LIBS" + + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" + + done + IFS="$save_IFS" + + + # now go through the list of .pc files for installed projects and assemble compiler and linker flags + # important is here again to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcifiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done + fi + + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` + + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" + + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + MOSEK_CFLAGS_INSTALLED="$projcflags $MOSEK_CFLAGS_INSTALLED" + + # set LIBS variable + MOSEK_LIBS_INSTALLED="$projlibs $MOSEK_LIBS_INSTALLED" + + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" + + done + IFS="$save_IFS" + + + # finish up + coin_has_mosek=yes + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF -#define FC_DUMMY_MAIN_EQ_F77 1 +#define COIN_HAS_MOSEK 1 _ACEOF + + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), + # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", + # everything of the form "-lname" by "libname.lib", and + # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + MOSEK_LIBS=`echo " $MOSEK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + MOSEK_LIBS_INSTALLED=`echo " $MOSEK_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` fi + + MOSEK_PCREQUIRES="osimosek" + + CGLCONICLIB_PCREQUIRES="osimosek $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$MOSEK_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_CFLAGS_INSTALLED="$MOSEK_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" + CGLCONICLIB_LIBS_INSTALLED="$MOSEK_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" + + fi + + + +if test $coin_has_mosek != notGiven && + test $coin_has_mosek != skipping; then + COIN_HAS_MOSEK_TRUE= + COIN_HAS_MOSEK_FALSE='#' else - { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails -See \`config.log' for more details." >&5 -echo "$as_me: error: linking to Fortran libraries from C fails -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + COIN_HAS_MOSEK_TRUE='#' + COIN_HAS_MOSEK_FALSE= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 -echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6 -if test "${ac_cv_f77_mangling+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + else - cat >conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - mv conftest.$ac_objext cfortran_test.$ac_objext + echo "$as_me:$LINENO: result: $coin_has_mosek" >&5 +echo "${ECHO_T}$coin_has_mosek" >&6 +fi - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" +if test $coin_has_mosek != skipping && + test $coin_has_mosek != notGiven ; then - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_MOSEK 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. +if test "${enable_interpackage_dependencies+set}" = set; then + enableval="$enable_interpackage_dependencies" -#endif -int -main () -{ -$ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_success=yes; break 2 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + enable_interpackage_dependencies=yes +fi; -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + if test $enable_interpackage_dependencies = yes ; then + # construct dependencies variables from LIBS variables + # we add an extra space in LIBS so we can substitute out everything starting with " -" + # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows + # then remove everything of the form -xxx + # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) + MOSEK_DEPENDENCIES=`echo " $MOSEK_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac + CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + fi -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -#ifdef F77_DUMMY_MAIN + if test 1 = 0 ; then #change this test to enable a bit of debugging output + if test -n "$MOSEK_CFLAGS" ; then + { echo "$as_me:$LINENO: Mosek CFLAGS are $MOSEK_CFLAGS" >&5 +echo "$as_me: Mosek CFLAGS are $MOSEK_CFLAGS" >&6;} + fi + if test -n "$MOSEK_LIBS" ; then + { echo "$as_me:$LINENO: Mosek LIBS are $MOSEK_LIBS" >&5 +echo "$as_me: Mosek LIBS are $MOSEK_LIBS" >&6;} + fi + if test -n "$MOSEK_DEPENDENCIES" ; then + { echo "$as_me:$LINENO: Mosek DEPENDENCIES are $MOSEK_DEPENDENCIES" >&5 +echo "$as_me: Mosek DEPENDENCIES are $MOSEK_DEPENDENCIES" >&6;} + fi + if test -n "$MOSEK_DATA" ; then + { echo "$as_me:$LINENO: Mosek DATA is $MOSEK_DATA" >&5 +echo "$as_me: Mosek DATA is $MOSEK_DATA" >&6;} + fi + if test -n "$MOSEK_PCLIBS" ; then + { echo "$as_me:$LINENO: Mosek PCLIBS are $MOSEK_PCLIBS" >&5 +echo "$as_me: Mosek PCLIBS are $MOSEK_PCLIBS" >&6;} + fi + if test -n "$MOSEK_PCREQUIRES" ; then + { echo "$as_me:$LINENO: Mosek PCREQUIRES are $MOSEK_PCREQUIRES" >&5 +echo "$as_me: Mosek PCREQUIRES are $MOSEK_PCREQUIRES" >&6;} + fi -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 +echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} + { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 +echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} + { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 +echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} -#endif -int -main () -{ -$ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_success_extra=yes; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + fi +fi +# Define the Makefile conditional + + +if test $coin_has_mosek != notGiven && + test $coin_has_mosek != skipping; then + COIN_HAS_MOSEK_TRUE= + COIN_HAS_MOSEK_FALSE='#' +else + COIN_HAS_MOSEK_TRUE='#' + COIN_HAS_MOSEK_FALSE= fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - if test "$ac_success_extra" = "yes"; then - ac_cv_f77_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" - else - ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" - else - ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" - fi - else - ac_cv_f77_mangling="unknown" - fi - else - ac_cv_f77_mangling="unknown" - fi - LIBS=$ac_save_LIBS - rm -f cfortran_test* conftest* + + +############################################################################# +# Check for IPM solver # +############################################################################# +echo "$as_me:$LINENO: checking for CglConic default IPM solver" >&5 +echo $ECHO_N "checking for CglConic default IPM solver... $ECHO_C" >&6 + +# Check whether --with-ipm-solver or --without-ipm-solver was given. +if test "${with_ipm_solver+set}" = set; then + withval="$with_ipm_solver" + cglconic_ipm_solver=$withval else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cglconic_ipm_solver=ipopt +fi; -{ { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compile a simple Fortran program -See \`config.log' for more details." >&2;} +found_package=true +case $cglconic_ipm_solver in + ipopt) + echo "$as_me:$LINENO: result: Ipopt" >&5 +echo "${ECHO_T}Ipopt" >&6 + if test $coin_has_osiipopt = unavailable || test $coin_has_osiipopt = skipping; \ + then + found_package=false + fi + ;; + mosek) + echo "$as_me:$LINENO: result: Mosek" >&5 +echo "${ECHO_T}Mosek" >&6 + if test $coin_has_mosek = false; \ + then + found_package=false + fi + ;; + cplex) + echo "$as_me:$LINENO: result: Cplex" >&5 +echo "${ECHO_T}Cplex" >&6 + if test $coin_has_cplex = false; \ + then + found_package=false + fi + ;; + *) + { { echo "$as_me:$LINENO: error: Unknown IPM solver!" >&5 +echo "$as_me: error: Unknown IPM solver!" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + +if test $found_package = false; then + { { echo "$as_me:$LINENO: error: Couldn't find the $cglconic_ipm_solver package!" >&5 +echo "$as_me: error: Couldn't find the $cglconic_ipm_solver package!" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +if test $cglconic_ipm_solver = ipopt && +test $coin_has_coindepend = yes; then + IPOPT_IPM_SOLVER_TRUE= + IPOPT_IPM_SOLVER_FALSE='#' +else + IPOPT_IPM_SOLVER_TRUE='#' + IPOPT_IPM_SOLVER_FALSE= fi -echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 -echo "${ECHO_T}$ac_cv_f77_mangling" >&6 -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test $cglconic_ipm_solver = mosek && +test $coin_has_mosek = yes; then + MOSEK_IPM_SOLVER_TRUE= + MOSEK_IPM_SOLVER_FALSE='#' +else + MOSEK_IPM_SOLVER_TRUE='#' + MOSEK_IPM_SOLVER_FALSE= +fi + -# Check whether --with-blas or --without-blas was given. -if test "${with_blas+set}" = set; then - withval="$with_blas" - use_blas="$withval" + +if test $cglconic_ipm_solver = cplex && +test $coin_has_cplex = yes; then + CPLEX_IPM_SOLVER_TRUE= + CPLEX_IPM_SOLVER_FALSE='#' else - use_blas= -fi; + CPLEX_IPM_SOLVER_TRUE='#' + CPLEX_IPM_SOLVER_FALSE= +fi -# if user specified --with-blas-lib, then we should give COIN_CHECK_PACKAGE -# preference -# Check whether --with-blas-lib or --without-blas-lib was given. -if test "${with_blas_lib+set}" = set; then - withval="$with_blas_lib" - use_blas=BUILD -fi; +# Check thirdparty libraries -# Check if user supplied option makes sense -if test x"$use_blas" != x; then - if test "$use_blas" = "BUILD"; then - # we come to this later - : - elif test "$use_blas" != "no"; then - coin_save_LIBS="$LIBS" - LIBS="$use_blas $LIBS" - if test "$F77" != unavailable ; then - coin_need_flibs=no - echo "$as_me:$LINENO: checking whether user supplied BLASLIB=\"$use_blas\" works" >&5 -echo $ECHO_N "checking whether user supplied BLASLIB=\"$use_blas\" works... $ECHO_C" >&6 - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +echo "$as_me:$LINENO: checking for COIN-OR package Sample" >&5 +echo $ECHO_N "checking for COIN-OR package Sample... $ECHO_C" >&6 -int -main () -{ - call daxpy - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +coin_has_sample=notGiven -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} - { (exit 1); exit 1; }; } +# check if user wants to skip package in any case +if test x"$COIN_SKIP_PROJECTS" != x; then + for dir in $COIN_SKIP_PROJECTS; do + if test $dir = "Sample"; then + coin_has_sample=skipping + fi + done fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; - c) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdaxpy="$ac_val" +if test "$coin_has_sample" != skipping; then -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Check whether --with-m4_tolower(Sample) or --without-m4_tolower(Sample) was given. +if test "${with_sample+set}" = set; then + withval="$with_sample" + if test "$withval" = no ; then + coin_has_sample=skipping + fi - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdaxpy(); -#ifdef F77_DUMMY_MAIN +fi; +fi -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +SAMPLE_LIBS= +SAMPLE_CFLAGS= +SAMPLE_DATA= +SAMPLE_DEPENDENCIES= +SAMPLE_PCLIBS= +SAMPLE_PCREQUIRES= -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -flink_try=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdaxpy(); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} - { (exit 1); exit 1; }; } -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} - { (exit 1); exit 1; }; } - fi - fi - ;; - cc|cpp) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} -#ifdef F77_DUMMY_MAIN +#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package +if test $coin_has_sample != skipping; then -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +# Check whether --with-m4_tolower(Sample)-lib or --without-m4_tolower(Sample)-lib was given. +if test "${with_sample_lib+set}" = set; then + withval="$with_sample_lib" + if test "$withval" = no ; then + coin_has_sample=skipping + else + coin_has_sample=yes + SAMPLE_LIBS="$withval" + SAMPLE_PCLIBS="$withval" -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + SAMPLE_LIBS_INSTALLED="$withval" -flink_try=no + fi + fi + +fi; fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +if test $coin_has_sample != skipping; then -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 +# Check whether --with-m4_tolower(Sample)-incdir or --without-m4_tolower(Sample)-incdir was given. +if test "${with_sample_incdir+set}" = set; then + withval="$with_sample_incdir" + if test "$withval" = no ; then + coin_has_sample=skipping + else + coin_has_sample=yes + SAMPLE_CFLAGS="-I`${CYGPATH_W} $withval`" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + SAMPLE_CFLAGS_INSTALLED="$SAMPLE_CFLAGS" -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} - { (exit 1); exit 1; }; } + fi + fi + +fi; fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} - { (exit 1); exit 1; }; } - fi - fi - ;; -esac - use_blas="$use_blas $FLIBS" - else - { echo "$as_me:$LINENO: checking whether user supplied BLASLIB=\"$use_blas\" works with C linkage" >&5 -echo "$as_me: checking whether user supplied BLASLIB=\"$use_blas\" works with C linkage" >&6;} - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test $coin_has_sample != skipping; then - echo "$as_me:$LINENO: checking for daxpy" >&5 -echo $ECHO_N "checking for daxpy... $ECHO_C" >&6 -if test "${ac_cv_func_daxpy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define daxpy to an innocuous variant, in case declares daxpy. - For example, HP-UX 11i declares gettimeofday. */ -#define daxpy innocuous_daxpy +# Check whether --with-m4_tolower(Sample)-datadir or --without-m4_tolower(Sample)-datadir was given. +if test "${with_sample_datadir+set}" = set; then + withval="$with_sample_datadir" + if test "$withval" = no ; then + coin_has_sample=skipping + else + coin_has_sample=yes + SAMPLE_DATA="$withval" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + SAMPLE_DATA_INSTALLED="$withval" + fi + fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char daxpy (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi; +fi -#ifdef __STDC__ -# include -#else -# include -#endif +if test $coin_has_sample = notGiven; then + if test -n "$PKG_CONFIG" ; then + # set search path for pkg-config + # need to export variable to be sure that the following pkg-config gets these values + coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" + export PKG_CONFIG_PATH -#undef daxpy + # let pkg-config do it's magic -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char daxpy (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_daxpy) || defined (__stub___daxpy) -choke me -#else -char (*f) () = daxpy; -#endif -#ifdef __cplusplus -} -#endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +if test -n "$PKG_CONFIG" ; then + if $PKG_CONFIG --exists "coindatasample"; then + SAMPLE_VERSIONS=`$PKG_CONFIG --modversion "coindatasample" 2>/dev/null | tr '\n' ' '` + cflags=`$PKG_CONFIG --cflags "coindatasample" 2>/dev/null` + # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files + # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's + # but only do this if is not trivial + if test "$CYGPATH_W" != "echo" ; then + # need to put into brackets since otherwise autoconf replaces the brackets in the sed command + cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + SAMPLE_CFLAGS="$cflags" + SAMPLE_LIBS=`$PKG_CONFIG --libs "coindatasample" 2>/dev/null` + SAMPLE_DATA=`$PKG_CONFIG --variable=datadir "coindatasample" 2>/dev/null` + coin_has_sample=yes + echo "$as_me:$LINENO: result: yes: $SAMPLE_VERSIONS" >&5 +echo "${ECHO_T}yes: $SAMPLE_VERSIONS" >&6 -#endif -int -main () -{ -return f != daxpy; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_daxpy=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + SAMPLE_LIBS=`echo " $SAMPLE_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + fi + SAMPLE_PCREQUIRES="coindatasample" -ac_cv_func_daxpy=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_daxpy" >&5 -echo "${ECHO_T}$ac_cv_func_daxpy" >&6 -if test $ac_cv_func_daxpy = yes; then - : + # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in + + + + else + SAMPLE_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coindatasample"` + coin_has_sample=notGiven + echo "$as_me:$LINENO: result: not given: $SAMPLE_PKG_ERRORS" >&5 +echo "${ECHO_T}not given: $SAMPLE_PKG_ERRORS" >&6 + + fi else - { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 -echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Sample without pkg-config\"" >&5 +echo "$as_me: error: \"Cannot check for existance of module Sample without pkg-config\"" >&2;} { (exit 1); exit 1; }; } fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - fi - LIBS="$coin_save_LIBS" - fi -else -# Try to autodetect the library for blas based on build system - #AC_MSG_CHECKING([default locations for BLAS]) - case $build in - *-sgi-*) - echo "$as_me:$LINENO: checking whether -lcomplib.sgimath has BLAS" >&5 -echo $ECHO_N "checking whether -lcomplib.sgimath has BLAS... $ECHO_C" >&6 - coin_need_flibs=no - coin_save_LIBS="$LIBS" - LIBS="-lcomplib.sgimath $LIBS" - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # reset PKG_CONFIG_PATH variable + PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" + export PKG_CONFIG_PATH -#endif -int -main () -{ - call daxpy - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - use_blas="-lcomplib.sgimath" - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + else + echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 +echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: checking for COIN-OR package Sample (fallback)" >&5 +echo $ECHO_N "checking for COIN-OR package Sample (fallback)... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; - c) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +coin_has_sample=notGiven +SAMPLE_LIBS= +SAMPLE_LIBS_INSTALLED= +SAMPLE_CFLAGS= +SAMPLE_CFLAGS_INSTALLED= +SAMPLE_DATA= +SAMPLE_DATA_INSTALLED= +SAMPLE_PCLIBS= +SAMPLE_PCREQUIRES= -cfuncdaxpy="$ac_val" +# initial list of dependencies is "coindatasample", but we need to filter out version number specifications (= x, <= x, >= x, != x) +projtoprocess="coindatasample" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it +# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards +# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples +# also, we setup the DATA variable +allproj="" +allpcfiles="" +allpcifiles="" +while test "x$projtoprocess" != x ; do - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdaxpy(); -#ifdef F77_DUMMY_MAIN + for proj in $projtoprocess ; do + # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it + pcfile="" + save_IFS="$IFS" + IFS=":" + for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do + # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again + if test -r "$dir/${proj}-uninstalled.pc" ; then + pcfile="$dir/$proj-uninstalled.pc" + if test -r "$dir/${proj}.pc" ; then + pcifile="$dir/${proj}.pc" + else + { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 +echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} + pcifile= + fi + break + fi + done + IFS="$save_IFS" -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + if test "x$pcfile" != x ; then + # read dependencies from $pcfile and filter it + projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # add projrequires to the front of the list of projects that have to be processed next + # at the same time, remove $proj from this list + projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` -flink_try=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_blas="-lcomplib.sgimath" - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + # read DATA from $pcfile, if _DATA is still empty + if test "x$SAMPLE_DATA" = x ; then + projdatadir= + pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` + eval `sh -c "$pcfilemod"` + SAMPLE_DATA="$projdatadir" + fi + + allproj="$allproj $proj" + allpcfiles="$pcfile:$allpcfiles" else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdaxpy(); -#ifdef F77_DUMMY_MAIN + echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 +echo "${ECHO_T}no, dependency $proj not available" >&6 + allproj=fail + break 2 + fi -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + if test "x$pcifile" != x ; then + allpcifiles="$pcifile:$allpcifiles" -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_blas="-lcomplib.sgimath" - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty + if test "x$SAMPLE_DATA_INSTALLED" = x ; then + projdatadir= + pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` + eval `sh -c "$pcifilemod"` + if test "${CYGPATH_W}" != "echo"; then + projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" + fi + SAMPLE_DATA_INSTALLED="$projdatadir" + fi + fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + break + done -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + # remove spaces on begin of $projtoprocess + projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` + +done + +if test "$allproj" != fail ; then + + # now go through the list of .pc files and assemble compiler and linker flags + # important is here to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcfiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done fi - ;; - cc|cpp) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdaxpy="$ac_val" + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} -#ifdef F77_DUMMY_MAIN + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + SAMPLE_CFLAGS="$projcflags $SAMPLE_CFLAGS" -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # set LIBS variable + SAMPLE_LIBS="$projlibs $SAMPLE_LIBS" -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" -flink_try=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + done + IFS="$save_IFS" + + + # now go through the list of .pc files for installed projects and assemble compiler and linker flags + # important is here again to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcifiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done fi - if test $flink_try = yes; then - use_blas="-lcomplib.sgimath" - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} -#ifdef F77_DUMMY_MAIN + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" -#endif -int -main () -{ -$cfuncdaxpy() - ; - return 0; -} + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + SAMPLE_CFLAGS_INSTALLED="$projcflags $SAMPLE_CFLAGS_INSTALLED" + + # set LIBS variable + SAMPLE_LIBS_INSTALLED="$projlibs $SAMPLE_LIBS_INSTALLED" + + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" + + done + IFS="$save_IFS" + + + # finish up + coin_has_sample=yes + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_SAMPLE 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_blas="-lcomplib.sgimath" - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), + # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", + # everything of the form "-lname" by "libname.lib", and + # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + SAMPLE_LIBS=`echo " $SAMPLE_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + SAMPLE_LIBS_INSTALLED=`echo " $SAMPLE_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` + fi + + SAMPLE_PCREQUIRES="coindatasample" + + +fi + + + +if test $coin_has_sample != notGiven && + test $coin_has_sample != skipping; then + COIN_HAS_SAMPLE_TRUE= + COIN_HAS_SAMPLE_FALSE='#' else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + COIN_HAS_SAMPLE_TRUE='#' + COIN_HAS_SAMPLE_FALSE= +fi -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + + + fi + +else + echo "$as_me:$LINENO: result: $coin_has_sample" >&5 +echo "${ECHO_T}$coin_has_sample" >&6 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi - ;; -esac - LIBS="$coin_save_LIBS" - ;; +if test $coin_has_sample != skipping && + test $coin_has_sample != notGiven ; then -# Ideally, we'd use -library=sunperf, but it's an imperfect world. Studio -# cc doesn't recognise -library, it wants -xlic_lib. Studio 12 CC doesn't -# recognise -xlic_lib. Libtool doesn't like -xlic_lib anyway. Sun claims -# that CC and cc will understand -library in Studio 13. The main extra -# function of -xlic_lib and -library is to arrange for the Fortran run-time -# libraries to be linked for C++ and C. We can arrange that explicitly. - *-*-solaris*) - echo "$as_me:$LINENO: checking for BLAS in libsunperf" >&5 -echo $ECHO_N "checking for BLAS in libsunperf... $ECHO_C" >&6 - coin_need_flibs=no - coin_save_LIBS="$LIBS" - LIBS="-lsunperf $FLIBS $LIBS" - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_SAMPLE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. +if test "${enable_interpackage_dependencies+set}" = set; then + enableval="$enable_interpackage_dependencies" -#endif -int -main () -{ - call daxpy - ; - return 0; -} +else + enable_interpackage_dependencies=yes +fi; + + if test $enable_interpackage_dependencies = yes ; then + # construct dependencies variables from LIBS variables + # we add an extra space in LIBS so we can substitute out everything starting with " -" + # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows + # then remove everything of the form -xxx + # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) + SAMPLE_DEPENDENCIES=`echo " $SAMPLE_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + + fi + + if test 1 = 0 ; then #change this test to enable a bit of debugging output + if test -n "$SAMPLE_CFLAGS" ; then + { echo "$as_me:$LINENO: Sample CFLAGS are $SAMPLE_CFLAGS" >&5 +echo "$as_me: Sample CFLAGS are $SAMPLE_CFLAGS" >&6;} + fi + if test -n "$SAMPLE_LIBS" ; then + { echo "$as_me:$LINENO: Sample LIBS are $SAMPLE_LIBS" >&5 +echo "$as_me: Sample LIBS are $SAMPLE_LIBS" >&6;} + fi + if test -n "$SAMPLE_DEPENDENCIES" ; then + { echo "$as_me:$LINENO: Sample DEPENDENCIES are $SAMPLE_DEPENDENCIES" >&5 +echo "$as_me: Sample DEPENDENCIES are $SAMPLE_DEPENDENCIES" >&6;} + fi + if test -n "$SAMPLE_DATA" ; then + { echo "$as_me:$LINENO: Sample DATA is $SAMPLE_DATA" >&5 +echo "$as_me: Sample DATA is $SAMPLE_DATA" >&6;} + fi + if test -n "$SAMPLE_PCLIBS" ; then + { echo "$as_me:$LINENO: Sample PCLIBS are $SAMPLE_PCLIBS" >&5 +echo "$as_me: Sample PCLIBS are $SAMPLE_PCLIBS" >&6;} + fi + if test -n "$SAMPLE_PCREQUIRES" ; then + { echo "$as_me:$LINENO: Sample PCREQUIRES are $SAMPLE_PCREQUIRES" >&5 +echo "$as_me: Sample PCREQUIRES are $SAMPLE_PCREQUIRES" >&6;} + fi + + fi +fi + +# Define the Makefile conditional + + +if test $coin_has_sample != notGiven && + test $coin_has_sample != skipping; then + COIN_HAS_SAMPLE_TRUE= + COIN_HAS_SAMPLE_FALSE='#' +else + COIN_HAS_SAMPLE_TRUE='#' + COIN_HAS_SAMPLE_FALSE= +fi + + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 +echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_v+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main + + end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_blas='-lsunperf' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + ac_cv_prog_f77_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat >conftest.$ac_ext <<_ACEOF + program main -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + end +_ACEOF -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; - c) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_verb" +(eval echo $as_me:26016: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS -cfuncdaxpy="$ac_val" +rm -f conftest* -ac_ext=c +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; + + # If we are using Cray Fortran then delete quotes. + # Use "\"" instead of '"' for font-lock-mode. + # FIXME: a more general fix for quoted arguments with spaces? + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_f77_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_f77_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_f77_v"; then + { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 +echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 +echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5 +echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6 +if test "${ac_cv_f77_libs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$FLIBS" != "x"; then + ac_cv_f77_libs="$FLIBS" # Let the user override the test. +else + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_cv_prog_f77_v" +(eval echo $as_me:26094: \"$ac_link\") >&5 +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` +echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -f conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;; + + # If we are using Cray Fortran then delete quotes. + # Use "\"" instead of '"' for font-lock-mode. + # FIXME: a more general fix for quoted arguments with spaces? + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;; +esac + + + +ac_cv_f77_libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f77_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt[01].o | -lcrtbegin.o | -lc | -lgcc | -libmil | -LANG:=*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + ;; + -[LRuY]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" +fi + + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`echo $ac_f77_v_output | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 +echo "${ECHO_T}$ac_cv_f77_libs" >&6 +FLIBS="$ac_cv_f77_libs" + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5 +echo $ECHO_N "checking for dummy main to link with Fortran libraries... $ECHO_C" >&6 +if test "${ac_cv_f77_dummy_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_f77_dm_save_LIBS=$LIBS + LIBS="$LIBS $FLIBS" + ac_fortran_dm_var=F77_DUMMY_MAIN + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF + # First, try linking without a dummy main: + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdaxpy(); + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -26622,7 +26301,7 @@ void $cfuncdaxpy(); int main () { -$cfuncdaxpy() + ; return 0; } @@ -26649,35 +26328,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - flink_try=yes + ac_cv_fortran_dummy_main=none else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -flink_try=no +ac_cv_fortran_dummy_main=unknown fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_blas='-lsunperf' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdaxpy(); +#define $ac_fortran_dm_var $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -26689,7 +26358,7 @@ void $cfuncdaxpy(); int main () { -$cfuncdaxpy() + ; return 0; } @@ -26716,62 +26385,125 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_blas='-lsunperf' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - - + ac_cv_fortran_dummy_main=$ac_func; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi - ;; - cc|cpp) - ac_ext=f + done + fi + ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DAXPY" ;; - lower*) ac_val="daxpy" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac + ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main + rm -f conftest* + LIBS=$ac_f77_dm_save_LIBS -cfuncdaxpy="$ac_val" +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 +echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6 +F77_DUMMY_MAIN=$ac_cv_f77_dummy_main +if test "$F77_DUMMY_MAIN" != unknown; then + if test $F77_DUMMY_MAIN != none; then -ac_ext=c +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF + + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + +cat >>confdefs.h <<\_ACEOF +#define FC_DUMMY_MAIN_EQ_F77 1 +_ACEOF + + fi +fi +else + { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails +See \`config.log' for more details." >&5 +echo "$as_me: error: linking to Fortran libraries from C fails +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 +echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6 +if test "${ac_cv_f77_mangling+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -26783,7 +26515,7 @@ extern "C" {void $cfuncdaxpy();} int main () { -$cfuncdaxpy() +$ac_func (); ; return 0; } @@ -26810,35 +26542,55 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - flink_try=yes + ac_success=yes; break 2 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -flink_try=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_blas='-lsunperf' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 + done + done + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdaxpy();} + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -26850,7 +26602,7 @@ extern "C" {void $cfuncdaxpy();} int main () { -$cfuncdaxpy() +$ac_func (); ; return 0; } @@ -26877,47 +26629,94 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_blas='-lsunperf' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 -echo "${ECHO_T}yes: $use_blas" >&6 - - + ac_success_extra=yes; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + done + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_f77_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" + else + ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" + else + ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_f77_mangling="unknown" fi - fi - ;; -esac + else + ac_cv_f77_mangling="unknown" + fi - LIBS="$coin_save_LIBS" - ;; + LIBS=$ac_save_LIBS + rm -f cfortran_test* conftest* +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - *-cygwin* | *-mingw*) - case "$CC" in - clang* ) ;; - cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*) - coin_save_LIBS="$LIBS" - LIBS="mkl_intel_c.lib mkl_sequential.lib mkl_core.lib $LIBS" - if test "$F77" != unavailable ; then - echo "$as_me:$LINENO: checking for BLAS in MKL (32bit)" >&5 -echo $ECHO_N "checking for BLAS in MKL (32bit)... $ECHO_C" >&6 - case $ac_ext in +{ { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 +echo "${ECHO_T}$ac_cv_f77_mangling" >&6 + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +# Check whether --with-blas or --without-blas was given. +if test "${with_blas+set}" = set; then + withval="$with_blas" + use_blas="$withval" +else + use_blas= +fi; + +# if user specified --with-blas-lib, then we should give COIN_CHECK_PACKAGE +# preference + +# Check whether --with-blas-lib or --without-blas-lib was given. +if test "${with_blas_lib+set}" = set; then + withval="$with_blas_lib" + use_blas=BUILD +fi; + +# Check if user supplied option makes sense +if test x"$use_blas" != x; then + if test "$use_blas" = "BUILD"; then + # we come to this later + : + elif test "$use_blas" != "no"; then + echo "$as_me:$LINENO: checking whether user supplied BLASLIB=\"$use_blas\" works" >&5 +echo $ECHO_N "checking whether user supplied BLASLIB=\"$use_blas\" works... $ECHO_C" >&6 + coin_need_flibs=no + coin_save_LIBS="$LIBS" + LIBS="$use_blas $LIBS" + case $ac_ext in f) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26926,14 +26725,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN - -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } - -#endif int main () { @@ -26951,7 +26742,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -26964,16 +26755,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 - else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 +echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -26992,11 +26787,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -27033,7 +26828,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27057,10 +26852,11 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 - else if test x"$FLIBS" != x; then flink_save_libs="$LIBS" @@ -27097,7 +26893,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27112,11 +26908,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 - else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -27124,12 +26921,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$flink_save_libs" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 +echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 +echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { (exit 1); exit 1; }; } fi fi ;; @@ -27147,11 +26950,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -27188,7 +26991,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27212,10 +27015,11 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 - else if test x"$FLIBS" != x; then flink_save_libs="$LIBS" @@ -27252,7 +27056,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27267,11 +27071,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 - else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -27279,143 +27084,36 @@ sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$flink_save_libs" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 +echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied BLAS library \"$use_blas\" does not work" >&5 +echo "$as_me: error: user supplied BLAS library \"$use_blas\" does not work" >&2;} + { (exit 1); exit 1; }; } fi fi ;; esac - else - { echo "$as_me:$LINENO: for BLAS in MKL (32bit) using C linkage" >&5 -echo "$as_me: for BLAS in MKL (32bit) using C linkage" >&6;} - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - echo "$as_me:$LINENO: checking for daxpy" >&5 -echo $ECHO_N "checking for daxpy... $ECHO_C" >&6 -if test "${ac_cv_func_daxpy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define daxpy to an innocuous variant, in case declares daxpy. - For example, HP-UX 11i declares gettimeofday. */ -#define daxpy innocuous_daxpy - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char daxpy (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef daxpy - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char daxpy (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_daxpy) || defined (__stub___daxpy) -choke me -#else -char (*f) () = daxpy; -#endif -#ifdef __cplusplus -} -#endif - -#ifdef F77_DUMMY_MAIN - -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } - -#endif -int -main () -{ -return f != daxpy; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_daxpy=yes + LIBS="$coin_save_LIBS" + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_daxpy=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_daxpy" >&5 -echo "${ECHO_T}$ac_cv_func_daxpy" >&6 -if test $ac_cv_func_daxpy = yes; then - use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi - LIBS="$coin_save_LIBS" - - if test "x$use_blas" = x ; then - LIBS="mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib $LIBS" - if test "$F77" != unavailable ; then - echo "$as_me:$LINENO: checking for BLAS in MKL (64bit)" >&5 -echo $ECHO_N "checking for BLAS in MKL (64bit)... $ECHO_C" >&6 - case $ac_ext in +# Try to autodetect the library for blas based on build system + #AC_MSG_CHECKING([default locations for BLAS]) + case $build in + *-sgi-*) + echo "$as_me:$LINENO: checking whether -lcomplib.sgimath has BLAS" >&5 +echo $ECHO_N "checking whether -lcomplib.sgimath has BLAS... $ECHO_C" >&6 + coin_need_flibs=no + coin_save_LIBS="$LIBS" + LIBS="-lcomplib.sgimath $LIBS" + case $ac_ext in f) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -27449,7 +27147,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27462,8 +27160,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas="-lcomplib.sgimath" + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -27490,11 +27191,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -27531,7 +27232,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27555,8 +27256,11 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas="-lcomplib.sgimath" + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -27595,7 +27299,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27610,8 +27314,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas="-lcomplib.sgimath" + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 @@ -27645,11 +27352,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -27686,7 +27393,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27710,8 +27417,11 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas="-lcomplib.sgimath" + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -27750,7 +27460,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27765,8 +27475,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas="-lcomplib.sgimath" + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 @@ -27788,138 +27501,21 @@ echo "${ECHO_T}no" >&6 ;; esac - else - { echo "$as_me:$LINENO: for BLAS in MKL (64bit) using C linkage" >&5 -echo "$as_me: for BLAS in MKL (64bit) using C linkage" >&6;} - # unset cached outcome of test with 32bit MKL - unset ac_cv_func_daxpy - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - echo "$as_me:$LINENO: checking for daxpy" >&5 -echo $ECHO_N "checking for daxpy... $ECHO_C" >&6 -if test "${ac_cv_func_daxpy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define daxpy to an innocuous variant, in case declares daxpy. - For example, HP-UX 11i declares gettimeofday. */ -#define daxpy innocuous_daxpy - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char daxpy (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef daxpy - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char daxpy (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_daxpy) || defined (__stub___daxpy) -choke me -#else -char (*f) () = daxpy; -#endif -#ifdef __cplusplus -} -#endif - -#ifdef F77_DUMMY_MAIN - -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } - -#endif -int -main () -{ -return f != daxpy; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_daxpy=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_daxpy=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_daxpy" >&5 -echo "${ECHO_T}$ac_cv_func_daxpy" >&6 -if test $ac_cv_func_daxpy = yes; then - use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi - LIBS="$coin_save_LIBS" - fi - ;; - esac + LIBS="$coin_save_LIBS" ;; - *-darwin*) - echo "$as_me:$LINENO: checking for BLAS in Veclib" >&5 -echo $ECHO_N "checking for BLAS in Veclib... $ECHO_C" >&6 +# Ideally, we'd use -library=sunperf, but it's an imperfect world. Studio +# cc doesn't recognise -library, it wants -xlic_lib. Studio 12 CC doesn't +# recognise -xlic_lib. Libtool doesn't like -xlic_lib anyway. Sun claims +# that CC and cc will understand -library in Studio 13. The main extra +# function of -xlic_lib and -library is to arrange for the Fortran run-time +# libraries to be linked for C++ and C. We can arrange that explicitly. + *-*-solaris*) + echo "$as_me:$LINENO: checking for BLAS in libsunperf" >&5 +echo $ECHO_N "checking for BLAS in libsunperf... $ECHO_C" >&6 coin_need_flibs=no coin_save_LIBS="$LIBS" - LIBS="-framework Accelerate $LIBS" + LIBS="-lsunperf $FLIBS $LIBS" case $ac_ext in f) cat >conftest.$ac_ext <<_ACEOF @@ -27954,7 +27550,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -27967,7 +27563,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_blas='-framework Accelerate' + use_blas='-lsunperf' if test $coin_need_flibs = yes ; then use_blas="$use_blas $FLIBS" fi @@ -27998,11 +27594,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -28039,7 +27635,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28063,7 +27659,7 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='-framework Accelerate' + use_blas='-lsunperf' if test $coin_need_flibs = yes ; then use_blas="$use_blas $FLIBS" fi @@ -28106,7 +27702,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28121,7 +27717,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='-framework Accelerate' + use_blas='-lsunperf' if test $coin_need_flibs = yes ; then use_blas="$use_blas $FLIBS" fi @@ -28159,11 +27755,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -28200,7 +27796,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28224,7 +27820,7 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='-framework Accelerate' + use_blas='-lsunperf' if test $coin_need_flibs = yes ; then use_blas="$use_blas $FLIBS" fi @@ -28267,7 +27863,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28282,7 +27878,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='-framework Accelerate' + use_blas='-lsunperf' if test $coin_need_flibs = yes ; then use_blas="$use_blas $FLIBS" fi @@ -28310,15 +27906,16 @@ esac LIBS="$coin_save_LIBS" ;; - esac - if test -z "$use_blas" ; then - echo "$as_me:$LINENO: checking whether -lblas has BLAS" >&5 -echo $ECHO_N "checking whether -lblas has BLAS... $ECHO_C" >&6 - coin_need_flibs=no - coin_save_LIBS="$LIBS" - LIBS="-lblas $LIBS" - case $ac_ext in + *-cygwin* | *-mingw*) + case "$CC" in + clang* ) ;; + cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*) + coin_save_LIBS="$LIBS" + echo "$as_me:$LINENO: checking for BLAS in MKL (32bit)" >&5 +echo $ECHO_N "checking for BLAS in MKL (32bit)... $ECHO_C" >&6 + LIBS="mkl_intel_c.lib mkl_sequential.lib mkl_core.lib $LIBS" + case $ac_ext in f) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -28352,7 +27949,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28365,11 +27962,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_blas='-lblas' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -28396,11 +27990,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -28437,7 +28031,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28461,11 +28055,8 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='-lblas' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -28504,7 +28095,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28519,11 +28110,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='-lblas' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 @@ -28557,11 +28145,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -28598,7 +28186,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28622,11 +28210,8 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_blas='-lblas' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 else @@ -28665,7 +28250,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -28680,11 +28265,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_blas='-lblas' - if test $coin_need_flibs = yes ; then - use_blas="$use_blas $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_blas" >&5 + use_blas='mkl_intel_c.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 echo "${ECHO_T}yes: $use_blas" >&6 @@ -28706,618 +28288,407 @@ echo "${ECHO_T}no" >&6 ;; esac - LIBS="$coin_save_LIBS" - fi - - # If we have no other ideas, consider building BLAS. - if test -z "$use_blas" ; then - use_blas=BUILD - fi -fi - -if test "x$use_blas" = xBUILD ; then + LIBS="$coin_save_LIBS" -echo "$as_me:$LINENO: checking for COIN-OR package Blas" >&5 -echo $ECHO_N "checking for COIN-OR package Blas... $ECHO_C" >&6 + if test "x$use_blas" = x ; then + echo "$as_me:$LINENO: checking for BLAS in MKL (64bit)" >&5 +echo $ECHO_N "checking for BLAS in MKL (64bit)... $ECHO_C" >&6 + LIBS="mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -coin_has_blas=notGiven +#ifdef F77_DUMMY_MAIN -# check if user wants to skip package in any case -if test x"$COIN_SKIP_PROJECTS" != x; then - for dir in $COIN_SKIP_PROJECTS; do - if test $dir = "Blas"; then - coin_has_blas=skipping - fi - done -fi +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } -if test "$coin_has_blas" != skipping; then +#endif +int +main () +{ + call daxpy + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 -# Check whether --with-m4_tolower(Blas) or --without-m4_tolower(Blas) was given. -if test "${with_blas+set}" = set; then - withval="$with_blas" - if test "$withval" = no ; then - coin_has_blas=skipping - fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + c) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -BLAS_LIBS= -BLAS_CFLAGS= -BLAS_DATA= -BLAS_DEPENDENCIES= -BLAS_PCLIBS= -BLAS_PCREQUIRES= - - - - +cfuncdaxpy="$ac_val" +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdaxpy(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdaxpy() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdaxpy(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdaxpy() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + ;; + cc|cpp) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +cfuncdaxpy="$ac_val" -#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package -if test $coin_has_blas != skipping; then +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# Check whether --with-m4_tolower(Blas)-lib or --without-m4_tolower(Blas)-lib was given. -if test "${with_blas_lib+set}" = set; then - withval="$with_blas_lib" - if test "$withval" = no ; then - coin_has_blas=skipping - else - coin_has_blas=yes - BLAS_LIBS="$withval" - BLAS_PCLIBS="$withval" + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdaxpy();} +#ifdef F77_DUMMY_MAIN - CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" - CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - BLAS_LIBS_INSTALLED="$withval" - CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" - fi - fi +#endif +int +main () +{ +$cfuncdaxpy() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +flink_try=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 -if test $coin_has_blas != skipping; then + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdaxpy();} +#ifdef F77_DUMMY_MAIN -# Check whether --with-m4_tolower(Blas)-incdir or --without-m4_tolower(Blas)-incdir was given. -if test "${with_blas_incdir+set}" = set; then - withval="$with_blas_incdir" - if test "$withval" = no ; then - coin_has_blas=skipping - else - coin_has_blas=yes - BLAS_CFLAGS="-I`${CYGPATH_W} $withval`" - CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - BLAS_CFLAGS_INSTALLED="$BLAS_CFLAGS" - CGLCONICLIB_CFLAGS_INSTALLED="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" - fi - fi +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } -fi; -fi +#endif +int +main () +{ +$cfuncdaxpy() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_blas='mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib' + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 -if test $coin_has_blas != skipping; then -# Check whether --with-m4_tolower(Blas)-datadir or --without-m4_tolower(Blas)-datadir was given. -if test "${with_blas_datadir+set}" = set; then - withval="$with_blas_datadir" - if test "$withval" = no ; then - coin_has_blas=skipping - else - coin_has_blas=yes - BLAS_DATA="$withval" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - BLAS_DATA_INSTALLED="$withval" - fi - fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - -if test $coin_has_blas = notGiven; then - if test -n "$PKG_CONFIG" ; then - # set search path for pkg-config - # need to export variable to be sure that the following pkg-config gets these values - coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" - PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" - export PKG_CONFIG_PATH - - # let pkg-config do it's magic - - - -if test -n "$PKG_CONFIG" ; then - if $PKG_CONFIG --exists "coinblas"; then - BLAS_VERSIONS=`$PKG_CONFIG --modversion "coinblas" 2>/dev/null | tr '\n' ' '` - cflags=`$PKG_CONFIG --cflags "coinblas" 2>/dev/null` - # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files - # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's - # but only do this if is not trivial - if test "$CYGPATH_W" != "echo" ; then - # need to put into brackets since otherwise autoconf replaces the brackets in the sed command - cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi fi - BLAS_CFLAGS="$cflags" - BLAS_LIBS=`$PKG_CONFIG --libs "coinblas" 2>/dev/null` - BLAS_DATA=`$PKG_CONFIG --variable=datadir "coinblas" 2>/dev/null` - coin_has_blas=yes - echo "$as_me:$LINENO: result: yes: $BLAS_VERSIONS" >&5 -echo "${ECHO_T}yes: $BLAS_VERSIONS" >&6 - - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - BLAS_LIBS=`echo " $BLAS_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - fi - BLAS_PCREQUIRES="coinblas" - - # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib + ;; +esac - CGLCONICLIB_PCREQUIRES="coinblas $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" + LIBS="$coin_save_LIBS" + fi + ;; + esac + ;; + *-darwin*) + echo "$as_me:$LINENO: checking for BLAS in Veclib" >&5 +echo $ECHO_N "checking for BLAS in Veclib... $ECHO_C" >&6 + coin_need_flibs=no + coin_save_LIBS="$LIBS" + LIBS="-framework Accelerate $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - - else - BLAS_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coinblas"` - coin_has_blas=notGiven - echo "$as_me:$LINENO: result: not given: $BLAS_PKG_ERRORS" >&5 -echo "${ECHO_T}not given: $BLAS_PKG_ERRORS" >&6 - - fi -else - { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Blas without pkg-config\"" >&5 -echo "$as_me: error: \"Cannot check for existance of module Blas without pkg-config\"" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - # reset PKG_CONFIG_PATH variable - PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" - export PKG_CONFIG_PATH - - else - echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 -echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 - -echo "$as_me:$LINENO: checking for COIN-OR package Blas (fallback)" >&5 -echo $ECHO_N "checking for COIN-OR package Blas (fallback)... $ECHO_C" >&6 - -coin_has_blas=notGiven -BLAS_LIBS= -BLAS_LIBS_INSTALLED= -BLAS_CFLAGS= -BLAS_CFLAGS_INSTALLED= -BLAS_DATA= -BLAS_DATA_INSTALLED= -BLAS_PCLIBS= -BLAS_PCREQUIRES= - -# initial list of dependencies is "coinblas", but we need to filter out version number specifications (= x, <= x, >= x, != x) -projtoprocess="coinblas" - -# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it -# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards -# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples -# also, we setup the DATA variable -allproj="" -allpcfiles="" -allpcifiles="" -while test "x$projtoprocess" != x ; do - - for proj in $projtoprocess ; do - # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it - pcfile="" - save_IFS="$IFS" - IFS=":" - for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do - # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again - if test -r "$dir/${proj}-uninstalled.pc" ; then - pcfile="$dir/$proj-uninstalled.pc" - if test -r "$dir/${proj}.pc" ; then - pcifile="$dir/${proj}.pc" - else - { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 -echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} - pcifile= - fi - break - fi - done - IFS="$save_IFS" - - if test "x$pcfile" != x ; then - # read dependencies from $pcfile and filter it - projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` - - # add projrequires to the front of the list of projects that have to be processed next - # at the same time, remove $proj from this list - projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` - - # read DATA from $pcfile, if _DATA is still empty - if test "x$BLAS_DATA" = x ; then - projdatadir= - pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` - eval `sh -c "$pcfilemod"` - BLAS_DATA="$projdatadir" - fi - - allproj="$allproj $proj" - allpcfiles="$pcfile:$allpcfiles" - - else - echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 -echo "${ECHO_T}no, dependency $proj not available" >&6 - allproj=fail - break 2 - fi - - if test "x$pcifile" != x ; then - allpcifiles="$pcifile:$allpcifiles" - - # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty - if test "x$BLAS_DATA_INSTALLED" = x ; then - projdatadir= - pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` - eval `sh -c "$pcifilemod"` - if test "${CYGPATH_W}" != "echo"; then - projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" - fi - BLAS_DATA_INSTALLED="$projdatadir" - fi - - fi - - break - done - - # remove spaces on begin of $projtoprocess - projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` - -done - -if test "$allproj" != fail ; then - - # now go through the list of .pc files and assemble compiler and linker flags - # important is here to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" - - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcfiles ; do - - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi - - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` - - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" - - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - BLAS_CFLAGS="$projcflags $BLAS_CFLAGS" - - # set LIBS variable - BLAS_LIBS="$projlibs $BLAS_LIBS" - - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" - - done - IFS="$save_IFS" - - - # now go through the list of .pc files for installed projects and assemble compiler and linker flags - # important is here again to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" - - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcifiles ; do - - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi - - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` - - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" - - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - BLAS_CFLAGS_INSTALLED="$projcflags $BLAS_CFLAGS_INSTALLED" - - # set LIBS variable - BLAS_LIBS_INSTALLED="$projlibs $BLAS_LIBS_INSTALLED" - - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" - - done - IFS="$save_IFS" - - - # finish up - coin_has_blas=yes - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_BLAS 1 -_ACEOF - - - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), - # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", - # everything of the form "-lname" by "libname.lib", and - # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - BLAS_LIBS=`echo " $BLAS_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - BLAS_LIBS_INSTALLED=`echo " $BLAS_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` - fi - - BLAS_PCREQUIRES="coinblas" - - CGLCONICLIB_PCREQUIRES="coinblas $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_CFLAGS_INSTALLED="$BLAS_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" - CGLCONICLIB_LIBS_INSTALLED="$BLAS_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" - - -fi - - - -if test $coin_has_blas != notGiven && - test $coin_has_blas != skipping; then - COIN_HAS_BLAS_TRUE= - COIN_HAS_BLAS_FALSE='#' -else - COIN_HAS_BLAS_TRUE='#' - COIN_HAS_BLAS_FALSE= -fi - - - - fi - -else - echo "$as_me:$LINENO: result: $coin_has_blas" >&5 -echo "${ECHO_T}$coin_has_blas" >&6 -fi - -if test $coin_has_blas != skipping && - test $coin_has_blas != notGiven ; then - -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_BLAS 1 -_ACEOF - - - # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. -if test "${enable_interpackage_dependencies+set}" = set; then - enableval="$enable_interpackage_dependencies" - -else - enable_interpackage_dependencies=yes -fi; - - if test $enable_interpackage_dependencies = yes ; then - # construct dependencies variables from LIBS variables - # we add an extra space in LIBS so we can substitute out everything starting with " -" - # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows - # then remove everything of the form -xxx - # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) - BLAS_DEPENDENCIES=`echo " $BLAS_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - - CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - - fi - - if test 1 = 0 ; then #change this test to enable a bit of debugging output - if test -n "$BLAS_CFLAGS" ; then - { echo "$as_me:$LINENO: Blas CFLAGS are $BLAS_CFLAGS" >&5 -echo "$as_me: Blas CFLAGS are $BLAS_CFLAGS" >&6;} - fi - if test -n "$BLAS_LIBS" ; then - { echo "$as_me:$LINENO: Blas LIBS are $BLAS_LIBS" >&5 -echo "$as_me: Blas LIBS are $BLAS_LIBS" >&6;} - fi - if test -n "$BLAS_DEPENDENCIES" ; then - { echo "$as_me:$LINENO: Blas DEPENDENCIES are $BLAS_DEPENDENCIES" >&5 -echo "$as_me: Blas DEPENDENCIES are $BLAS_DEPENDENCIES" >&6;} - fi - if test -n "$BLAS_DATA" ; then - { echo "$as_me:$LINENO: Blas DATA is $BLAS_DATA" >&5 -echo "$as_me: Blas DATA is $BLAS_DATA" >&6;} - fi - if test -n "$BLAS_PCLIBS" ; then - { echo "$as_me:$LINENO: Blas PCLIBS are $BLAS_PCLIBS" >&5 -echo "$as_me: Blas PCLIBS are $BLAS_PCLIBS" >&6;} - fi - if test -n "$BLAS_PCREQUIRES" ; then - { echo "$as_me:$LINENO: Blas PCREQUIRES are $BLAS_PCREQUIRES" >&5 -echo "$as_me: Blas PCREQUIRES are $BLAS_PCREQUIRES" >&6;} - fi - - { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 -echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} - { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 -echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} - { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 -echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} - - fi -fi - -# Define the Makefile conditional - - -if test $coin_has_blas != notGiven && - test $coin_has_blas != skipping; then - COIN_HAS_BLAS_TRUE= - COIN_HAS_BLAS_FALSE='#' -else - COIN_HAS_BLAS_TRUE='#' - COIN_HAS_BLAS_FALSE= -fi - - - - -elif test "x$use_blas" != x && test "$use_blas" != no; then - coin_has_blas=yes - - -if test 0 = 0; then - COIN_HAS_BLAS_TRUE= - COIN_HAS_BLAS_FALSE='#' -else - COIN_HAS_BLAS_TRUE='#' - COIN_HAS_BLAS_FALSE= -fi - - -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_BLAS 1 -_ACEOF - - BLAS_LIBS="$use_blas" - BLAS_CFLAGS= - BLAS_DATA= - - - - - CGLCONICLIB_PCLIBS="$BLAS_LIBS $CGLCONICLIB_PCLIBS" - CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_LIBS_INSTALLED="$BLAS_LIBS $CGLCONICLIB_LIBS_INSTALLED" - - -else - coin_has_blas=no - - -if test 0 = 1; then - COIN_HAS_BLAS_TRUE= - COIN_HAS_BLAS_FALSE='#' -else - COIN_HAS_BLAS_TRUE='#' - COIN_HAS_BLAS_FALSE= -fi - -fi - - - - - - - - - - -# Check whether --with-lapack or --without-lapack was given. -if test "${with_lapack+set}" = set; then - withval="$with_lapack" - use_lapack=$withval -else - use_lapack= -fi; - -#if user specified --with-lapack-lib, then we should give COIN_HAS_PACKAGE preference - -# Check whether --with-lapack-lib or --without-lapack-lib was given. -if test "${with_lapack_lib+set}" = set; then - withval="$with_lapack_lib" - use_lapack=BUILD -fi; - -# Check if user supplied option makes sense -if test x"$use_lapack" != x; then - if test "$use_lapack" = "BUILD"; then - # we come to this later - : - elif test "$use_lapack" != no; then - use_lapack="$use_lapack $BLAS_LIBS" - coin_save_LIBS="$LIBS" - LIBS="$use_lapack $LIBS" - if test "$F77" != unavailable; then - echo "$as_me:$LINENO: checking whether user supplied LAPACKLIB=\"$use_lapack\" works" >&5 -echo $ECHO_N "checking whether user supplied LAPACKLIB=\"$use_lapack\" works... $ECHO_C" >&6 - coin_need_flibs=no - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef F77_DUMMY_MAIN +#ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -29328,7 +28699,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { - call dsyev + call daxpy ; return 0; } @@ -29342,7 +28713,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29355,11 +28726,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" + use_blas='-framework Accelerate' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else echo "$as_me: failed program was:" >&5 @@ -29367,9 +28739,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -29380,19 +28749,19 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" +cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -29403,7 +28772,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdsyev(); +void $cfuncdaxpy(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -29415,7 +28784,7 @@ void $cfuncdsyev(); int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -29429,7 +28798,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29453,11 +28822,12 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" + use_blas='-framework Accelerate' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else if test x"$FLIBS" != x; then @@ -29469,7 +28839,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdsyev(); +void $cfuncdaxpy(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -29481,7 +28851,7 @@ void $cfuncdsyev(); int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -29495,7 +28865,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29510,11 +28880,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" + use_blas='-framework Accelerate' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else @@ -29524,18 +28895,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$flink_save_libs" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } fi fi ;; @@ -29545,30 +28910,30 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +cfuncdaxpy="$ac_val" - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +extern "C" {void $cfuncdaxpy();} #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -29580,7 +28945,7 @@ extern "C" {void $cfuncdsyev();} int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -29594,7 +28959,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29618,11 +28983,12 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" + use_blas='-framework Accelerate' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else if test x"$FLIBS" != x; then @@ -29634,7 +29000,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +extern "C" {void $cfuncdaxpy();} #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -29646,7 +29012,7 @@ extern "C" {void $cfuncdsyev();} int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -29660,7 +29026,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29675,11 +29041,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" + use_blas='-framework Accelerate' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else @@ -29689,157 +29056,28 @@ sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$flink_save_libs" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } fi fi ;; esac - else - { echo "$as_me:$LINENO: whether user supplied LAPACKLIB=\"$use_lapack\" works with C linkage" >&5 -echo "$as_me: whether user supplied LAPACKLIB=\"$use_lapack\" works with C linkage" >&6;} - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - echo "$as_me:$LINENO: checking for dsyev" >&5 -echo $ECHO_N "checking for dsyev... $ECHO_C" >&6 -if test "${ac_cv_func_dsyev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dsyev to an innocuous variant, in case declares dsyev. - For example, HP-UX 11i declares gettimeofday. */ -#define dsyev innocuous_dsyev - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dsyev (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dsyev - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dsyev (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dsyev) || defined (__stub___dsyev) -choke me -#else -char (*f) () = dsyev; -#endif -#ifdef __cplusplus -} -#endif - -#ifdef F77_DUMMY_MAIN - -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } - -#endif -int -main () -{ -return f != dsyev; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dsyev=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dsyev=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dsyev" >&5 -echo "${ECHO_T}$ac_cv_func_dsyev" >&6 -if test $ac_cv_func_dsyev = yes; then - : -else - { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 -echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} - { (exit 1); exit 1; }; } -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + LIBS="$coin_save_LIBS" + ;; + esac - fi - LIBS="$coin_save_LIBS" - fi -else - if test x$coin_has_blas = xyes; then - # First try to see if LAPACK is already available with BLAS library + if test -z "$use_blas" ; then + echo "$as_me:$LINENO: checking whether -lblas has BLAS" >&5 +echo $ECHO_N "checking whether -lblas has BLAS... $ECHO_C" >&6 + coin_need_flibs=no coin_save_LIBS="$LIBS" - LIBS="$BLAS_LIBS $LIBS" - if test "$F77" != unavailable; then - coin_need_flibs=no - echo "$as_me:$LINENO: checking whether LAPACK is already available with BLAS library" >&5 -echo $ECHO_N "checking whether LAPACK is already available with BLAS library... $ECHO_C" >&6 - case $ac_ext in + LIBS="-lblas $LIBS" + case $ac_ext in f) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -29859,7 +29097,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { - call dsyev + call daxpy ; return 0; } @@ -29873,7 +29111,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29886,12 +29124,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_lapack="$BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + use_blas='-lblas' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else echo "$as_me: failed program was:" >&5 @@ -29909,19 +29147,19 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" +cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -29932,7 +29170,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdsyev(); +void $cfuncdaxpy(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -29944,7 +29182,7 @@ void $cfuncdsyev(); int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -29958,7 +29196,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -29982,12 +29220,12 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_lapack="$BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + use_blas='-lblas' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else if test x"$FLIBS" != x; then @@ -29999,7 +29237,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -void $cfuncdsyev(); +void $cfuncdaxpy(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -30011,7 +29249,7 @@ void $cfuncdsyev(); int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -30025,7 +29263,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -30040,12 +29278,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_lapack="$BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + use_blas='-lblas' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else @@ -30070,19 +29308,19 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; + upper*) ac_val="DAXPY" ;; + lower*) ac_val="daxpy" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" +cfuncdaxpy="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -30093,7 +29331,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +extern "C" {void $cfuncdaxpy();} #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -30105,7 +29343,7 @@ extern "C" {void $cfuncdsyev();} int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -30119,7 +29357,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -30143,12 +29381,12 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_lapack="$BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + use_blas='-lblas' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else if test x"$FLIBS" != x; then @@ -30160,7 +29398,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +extern "C" {void $cfuncdaxpy();} #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -30172,7 +29410,7 @@ extern "C" {void $cfuncdsyev();} int main () { -$cfuncdsyev() +$cfuncdaxpy() ; return 0; } @@ -30186,7 +29424,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -30201,12 +29439,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_lapack="$BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 + use_blas='-lblas' + if test $coin_need_flibs = yes ; then + use_blas="$use_blas $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_blas" >&5 +echo "${ECHO_T}yes: $use_blas" >&6 else @@ -30227,698 +29465,616 @@ echo "${ECHO_T}no" >&6 ;; esac - else - { echo "$as_me:$LINENO: checking whether LAPACK is already available with BLAS library" >&5 -echo "$as_me: checking whether LAPACK is already available with BLAS library" >&6;} - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - echo "$as_me:$LINENO: checking for dsyev" >&5 -echo $ECHO_N "checking for dsyev... $ECHO_C" >&6 -if test "${ac_cv_func_dsyev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dsyev to an innocuous variant, in case declares dsyev. - For example, HP-UX 11i declares gettimeofday. */ -#define dsyev innocuous_dsyev + LIBS="$coin_save_LIBS" + fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dsyev (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + # If we have no other ideas, consider building BLAS. + if test -z "$use_blas" ; then + use_blas=BUILD + fi +fi -#ifdef __STDC__ -# include -#else -# include -#endif +if test "x$use_blas" = xBUILD ; then -#undef dsyev +echo "$as_me:$LINENO: checking for COIN-OR package Blas" >&5 +echo $ECHO_N "checking for COIN-OR package Blas... $ECHO_C" >&6 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dsyev (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dsyev) || defined (__stub___dsyev) -choke me -#else -char (*f) () = dsyev; -#endif -#ifdef __cplusplus -} -#endif +coin_has_blas=notGiven -#ifdef F77_DUMMY_MAIN +# check if user wants to skip package in any case +if test x"$COIN_SKIP_PROJECTS" != x; then + for dir in $COIN_SKIP_PROJECTS; do + if test $dir = "Blas"; then + coin_has_blas=skipping + fi + done +fi -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +if test "$coin_has_blas" != skipping; then -#endif -int -main () -{ -return f != dsyev; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dsyev=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Check whether --with-m4_tolower(Blas) or --without-m4_tolower(Blas) was given. +if test "${with_blas+set}" = set; then + withval="$with_blas" + if test "$withval" = no ; then + coin_has_blas=skipping + fi -ac_cv_func_dsyev=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dsyev" >&5 -echo "${ECHO_T}$ac_cv_func_dsyev" >&6 -if test $ac_cv_func_dsyev = yes; then - use_lapack="$BLAS_LIBS" +fi; fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +BLAS_LIBS= +BLAS_CFLAGS= +BLAS_DATA= +BLAS_DEPENDENCIES= +BLAS_PCLIBS= +BLAS_PCREQUIRES= - fi - LIBS="$coin_save_LIBS" - fi - if test -z "$use_lapack"; then - # Try to autodetect the library for lapack based on build system - case $build in - # TODO: Is this check actually needed here, since -lcomplib.sigmath should have been recognized as Blas library, - # and above it is checked whether the Blas library already contains Lapack - *-sgi-*) - echo "$as_me:$LINENO: checking whether -lcomplib.sgimath has LAPACK" >&5 -echo $ECHO_N "checking whether -lcomplib.sgimath has LAPACK... $ECHO_C" >&6 - coin_save_LIBS="$LIBS" - coin_need_flibs=no - LIBS="-lcomplib.sgimath $BLAS_LIBS $LIBS" - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - call dsyev - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - use_lapack="-lcomplib.sgimath $BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; - c) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdsyev(); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -$cfuncdsyev() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -flink_try=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_lapack="-lcomplib.sgimath $BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdsyev(); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -$cfuncdsyev() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_lapack="-lcomplib.sgimath $BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package +if test $coin_has_blas != skipping; then -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi - ;; - cc|cpp) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +# Check whether --with-m4_tolower(Blas)-lib or --without-m4_tolower(Blas)-lib was given. +if test "${with_blas_lib+set}" = set; then + withval="$with_blas_lib" + if test "$withval" = no ; then + coin_has_blas=skipping + else + coin_has_blas=yes + BLAS_LIBS="$withval" + BLAS_PCLIBS="$withval" -cfuncdsyev="$ac_val" + CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" + CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + BLAS_LIBS_INSTALLED="$withval" + CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" + fi + fi - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} -#ifdef F77_DUMMY_MAIN +fi; +fi -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +if test $coin_has_blas != skipping; then -#endif -int -main () -{ -$cfuncdsyev() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Check whether --with-m4_tolower(Blas)-incdir or --without-m4_tolower(Blas)-incdir was given. +if test "${with_blas_incdir+set}" = set; then + withval="$with_blas_incdir" + if test "$withval" = no ; then + coin_has_blas=skipping + else + coin_has_blas=yes + BLAS_CFLAGS="-I`${CYGPATH_W} $withval`" + CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + BLAS_CFLAGS_INSTALLED="$BLAS_CFLAGS" + CGLCONICLIB_CFLAGS_INSTALLED="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" + fi + fi -flink_try=no +fi; fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_lapack="-lcomplib.sgimath $BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} -#ifdef F77_DUMMY_MAIN +if test $coin_has_blas != skipping; then -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +# Check whether --with-m4_tolower(Blas)-datadir or --without-m4_tolower(Blas)-datadir was given. +if test "${with_blas_datadir+set}" = set; then + withval="$with_blas_datadir" + if test "$withval" = no ; then + coin_has_blas=skipping + else + coin_has_blas=yes + BLAS_DATA="$withval" + # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables + if test -z "$PKG_CONFIG" ; then + BLAS_DATA_INSTALLED="$withval" + fi + fi -#endif -int -main () -{ -$cfuncdsyev() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_lapack="-lcomplib.sgimath $BLAS_LIBS" - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 +fi; +fi + +if test $coin_has_blas = notGiven; then + if test -n "$PKG_CONFIG" ; then + # set search path for pkg-config + # need to export variable to be sure that the following pkg-config gets these values + coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" + export PKG_CONFIG_PATH + # let pkg-config do it's magic -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi + +if test -n "$PKG_CONFIG" ; then + if $PKG_CONFIG --exists "coinblas"; then + BLAS_VERSIONS=`$PKG_CONFIG --modversion "coinblas" 2>/dev/null | tr '\n' ' '` + cflags=`$PKG_CONFIG --cflags "coinblas" 2>/dev/null` + # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files + # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's + # but only do this if is not trivial + if test "$CYGPATH_W" != "echo" ; then + # need to put into brackets since otherwise autoconf replaces the brackets in the sed command + cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - ;; -esac + BLAS_CFLAGS="$cflags" + BLAS_LIBS=`$PKG_CONFIG --libs "coinblas" 2>/dev/null` + BLAS_DATA=`$PKG_CONFIG --variable=datadir "coinblas" 2>/dev/null` + coin_has_blas=yes + echo "$as_me:$LINENO: result: yes: $BLAS_VERSIONS" >&5 +echo "${ECHO_T}yes: $BLAS_VERSIONS" >&6 - LIBS="$coin_save_LIBS" - ;; + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + BLAS_LIBS=`echo " $BLAS_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + fi + BLAS_PCREQUIRES="coinblas" - # See comments in COIN_CHECK_PACKAGE_BLAS. - # TODO: Is this check actually needed here, since -lsunperf should have been recognized as Blas library, - # and above it is checked whether the Blas library already contains Lapack - *-*-solaris*) - echo "$as_me:$LINENO: checking for LAPACK in libsunperf" >&5 -echo $ECHO_N "checking for LAPACK in libsunperf... $ECHO_C" >&6 - coin_need_flibs=no - coin_save_LIBS="$LIBS" - LIBS="-lsunperf $BLAS_LIBS $FLIBS $LIBS" - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib -#ifdef F77_DUMMY_MAIN + CGLCONICLIB_PCREQUIRES="coinblas $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - call dsyev - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - use_lapack='-lsunperf $BLAS_LIBS' - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + else + BLAS_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coinblas"` + coin_has_blas=notGiven + echo "$as_me:$LINENO: result: not given: $BLAS_PKG_ERRORS" >&5 +echo "${ECHO_T}not given: $BLAS_PKG_ERRORS" >&6 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + fi +else + { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Blas without pkg-config\"" >&5 +echo "$as_me: error: \"Cannot check for existance of module Blas without pkg-config\"" >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ;; - c) - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -case $ac_cv_f77_mangling in - upper*) ac_val="DSYEV" ;; - lower*) ac_val="dsyev" ;; - *) ac_val="unknown" ;; -esac -case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -cfuncdsyev="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test x"$coin_need_flibs" = xyes; then - flink_try=no; - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdsyev(); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + # reset PKG_CONFIG_PATH variable + PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" + export PKG_CONFIG_PATH -#endif -int -main () -{ -$cfuncdsyev() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - flink_try=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + else + echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 +echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 -flink_try=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test $flink_try = yes; then - use_lapack='-lsunperf $BLAS_LIBS' - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 -echo "${ECHO_T}yes: $use_lapack" >&6 +echo "$as_me:$LINENO: checking for COIN-OR package Blas (fallback)" >&5 +echo $ECHO_N "checking for COIN-OR package Blas (fallback)... $ECHO_C" >&6 + +coin_has_blas=notGiven +BLAS_LIBS= +BLAS_LIBS_INSTALLED= +BLAS_CFLAGS= +BLAS_CFLAGS_INSTALLED= +BLAS_DATA= +BLAS_DATA_INSTALLED= +BLAS_PCLIBS= +BLAS_PCREQUIRES= + +# initial list of dependencies is "coinblas", but we need to filter out version number specifications (= x, <= x, >= x, != x) +projtoprocess="coinblas" + +# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it +# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards +# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples +# also, we setup the DATA variable +allproj="" +allpcfiles="" +allpcifiles="" +while test "x$projtoprocess" != x ; do + + for proj in $projtoprocess ; do + # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it + pcfile="" + save_IFS="$IFS" + IFS=":" + for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do + # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again + if test -r "$dir/${proj}-uninstalled.pc" ; then + pcfile="$dir/$proj-uninstalled.pc" + if test -r "$dir/${proj}.pc" ; then + pcifile="$dir/${proj}.pc" + else + { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 +echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} + pcifile= + fi + break + fi + done + IFS="$save_IFS" + + if test "x$pcfile" != x ; then + # read dependencies from $pcfile and filter it + projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` + + # add projrequires to the front of the list of projects that have to be processed next + # at the same time, remove $proj from this list + projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` + + # read DATA from $pcfile, if _DATA is still empty + if test "x$BLAS_DATA" = x ; then + projdatadir= + pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` + eval `sh -c "$pcfilemod"` + BLAS_DATA="$projdatadir" + fi + + allproj="$allproj $proj" + allpcfiles="$pcfile:$allpcfiles" + + else + echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 +echo "${ECHO_T}no, dependency $proj not available" >&6 + allproj=fail + break 2 + fi + + if test "x$pcifile" != x ; then + allpcifiles="$pcifile:$allpcifiles" + + # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty + if test "x$BLAS_DATA_INSTALLED" = x ; then + projdatadir= + pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` + eval `sh -c "$pcifilemod"` + if test "${CYGPATH_W}" != "echo"; then + projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" + fi + BLAS_DATA_INSTALLED="$projdatadir" + fi + + fi + + break + done + + # remove spaces on begin of $projtoprocess + projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` + +done + +if test "$allproj" != fail ; then + + # now go through the list of .pc files and assemble compiler and linker flags + # important is here to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcfiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done + fi + + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` + + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" + + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + BLAS_CFLAGS="$projcflags $BLAS_CFLAGS" + + # set LIBS variable + BLAS_LIBS="$projlibs $BLAS_LIBS" + + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" + + done + IFS="$save_IFS" + + + # now go through the list of .pc files for installed projects and assemble compiler and linker flags + # important is here again to obey the reverse order that has been setup before, + # since then libraries that are required by several others should be after these other libraries + pcfilesprocessed="" + + save_IFS="$IFS" + IFS=":" + for pcfile in $allpcifiles ; do + + # if $pcfile has been processed already, skip this round + if test "x$pcfilesprocessed" != x ; then + for pcfiledone in $pcfilesprocessed ; do + if test "$pcfiledone" = "$pcfile" ; then + continue 2 + fi + done + fi + + # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: + # replace "Libs:" by "echo projlibs=" + # replace "Cflags:" by "echo projcflags=" + # remove every line starting with : + pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` + + # set projcflags and projlibs variables by running $pcfilemod + # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default + projcflags= + projlibs= + IFS="$save_IFS" + eval `sh -c "$pcfilemod"` + IFS=":" + + # add CYGPATH_W cludge into include flags and set CFLAGS variable + if test "${CYGPATH_W}" != "echo"; then + projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` + fi + BLAS_CFLAGS_INSTALLED="$projcflags $BLAS_CFLAGS_INSTALLED" + + # set LIBS variable + BLAS_LIBS_INSTALLED="$projlibs $BLAS_LIBS_INSTALLED" + + # remember that we have processed $pcfile + pcfilesprocessed="$pcfilesprocessed:$pcfile" + + done + IFS="$save_IFS" + + + # finish up + coin_has_blas=yes + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_BLAS 1 +_ACEOF + + + # adjust linker flags for (i)cl compiler + # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), + # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", + # everything of the form "-lname" by "libname.lib", and + # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` + if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; + then + BLAS_LIBS=`echo " $BLAS_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + BLAS_LIBS_INSTALLED=`echo " $BLAS_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` + fi + + BLAS_PCREQUIRES="coinblas" + + CGLCONICLIB_PCREQUIRES="coinblas $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$BLAS_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_CFLAGS_INSTALLED="$BLAS_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" + CGLCONICLIB_LIBS_INSTALLED="$BLAS_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" + + +fi + + + +if test $coin_has_blas != notGiven && + test $coin_has_blas != skipping; then + COIN_HAS_BLAS_TRUE= + COIN_HAS_BLAS_FALSE='#' +else + COIN_HAS_BLAS_TRUE='#' + COIN_HAS_BLAS_FALSE= +fi + + + + fi + +else + echo "$as_me:$LINENO: result: $coin_has_blas" >&5 +echo "${ECHO_T}$coin_has_blas" >&6 +fi + +if test $coin_has_blas != skipping && + test $coin_has_blas != notGiven ; then + +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_BLAS 1 +_ACEOF + + + # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. +if test "${enable_interpackage_dependencies+set}" = set; then + enableval="$enable_interpackage_dependencies" + +else + enable_interpackage_dependencies=yes +fi; + + if test $enable_interpackage_dependencies = yes ; then + # construct dependencies variables from LIBS variables + # we add an extra space in LIBS so we can substitute out everything starting with " -" + # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows + # then remove everything of the form -xxx + # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) + BLAS_DEPENDENCIES=`echo " $BLAS_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + + CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + + fi + + if test 1 = 0 ; then #change this test to enable a bit of debugging output + if test -n "$BLAS_CFLAGS" ; then + { echo "$as_me:$LINENO: Blas CFLAGS are $BLAS_CFLAGS" >&5 +echo "$as_me: Blas CFLAGS are $BLAS_CFLAGS" >&6;} + fi + if test -n "$BLAS_LIBS" ; then + { echo "$as_me:$LINENO: Blas LIBS are $BLAS_LIBS" >&5 +echo "$as_me: Blas LIBS are $BLAS_LIBS" >&6;} + fi + if test -n "$BLAS_DEPENDENCIES" ; then + { echo "$as_me:$LINENO: Blas DEPENDENCIES are $BLAS_DEPENDENCIES" >&5 +echo "$as_me: Blas DEPENDENCIES are $BLAS_DEPENDENCIES" >&6;} + fi + if test -n "$BLAS_DATA" ; then + { echo "$as_me:$LINENO: Blas DATA is $BLAS_DATA" >&5 +echo "$as_me: Blas DATA is $BLAS_DATA" >&6;} + fi + if test -n "$BLAS_PCLIBS" ; then + { echo "$as_me:$LINENO: Blas PCLIBS are $BLAS_PCLIBS" >&5 +echo "$as_me: Blas PCLIBS are $BLAS_PCLIBS" >&6;} + fi + if test -n "$BLAS_PCREQUIRES" ; then + { echo "$as_me:$LINENO: Blas PCREQUIRES are $BLAS_PCREQUIRES" >&5 +echo "$as_me: Blas PCREQUIRES are $BLAS_PCREQUIRES" >&6;} + fi + + { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 +echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} + { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 +echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} + { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 +echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} + + fi +fi + +# Define the Makefile conditional + + +if test $coin_has_blas != notGiven && + test $coin_has_blas != skipping; then + COIN_HAS_BLAS_TRUE= + COIN_HAS_BLAS_FALSE='#' +else + COIN_HAS_BLAS_TRUE='#' + COIN_HAS_BLAS_FALSE= +fi + + + + +elif test "x$use_blas" != x && test "$use_blas" != no; then + coin_has_blas=yes + + +if test 0 = 0; then + COIN_HAS_BLAS_TRUE= + COIN_HAS_BLAS_FALSE='#' +else + COIN_HAS_BLAS_TRUE='#' + COIN_HAS_BLAS_FALSE= +fi + + +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_BLAS 1 +_ACEOF + + BLAS_LIBS="$use_blas" + BLAS_CFLAGS= + BLAS_DATA= + + + + + CGLCONICLIB_PCLIBS="$BLAS_LIBS $CGLCONICLIB_PCLIBS" + CGLCONICLIB_LIBS="$BLAS_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_LIBS_INSTALLED="$BLAS_LIBS $CGLCONICLIB_LIBS_INSTALLED" + + +else + coin_has_blas=no + + +if test 0 = 1; then + COIN_HAS_BLAS_TRUE= + COIN_HAS_BLAS_FALSE='#' +else + COIN_HAS_BLAS_TRUE='#' + COIN_HAS_BLAS_FALSE= +fi + +fi + + + + + + + + + + +# Check whether --with-lapack or --without-lapack was given. +if test "${with_lapack+set}" = set; then + withval="$with_lapack" + use_lapack=$withval +else + use_lapack= +fi; + +#if user specified --with-lapack-lib, then we should give COIN_HAS_PACKAGE preference + +# Check whether --with-lapack-lib or --without-lapack-lib was given. +if test "${with_lapack_lib+set}" = set; then + withval="$with_lapack_lib" + use_lapack=BUILD +fi; + +# Check if user supplied option makes sense +if test x"$use_lapack" != x; then + if test "$use_lapack" = "BUILD"; then + # we come to this later + : + elif test "$use_lapack" != no; then + echo "$as_me:$LINENO: checking whether user supplied LAPACKLIB=\"$use_lapack\" works" >&5 +echo $ECHO_N "checking whether user supplied LAPACKLIB=\"$use_lapack\" works... $ECHO_C" >&6 + coin_need_flibs=no + use_lapack="$use_lapack $BLAS_LIBS" + coin_save_LIBS="$LIBS" + LIBS="$use_lapack $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - else - if test x"$FLIBS" != x; then - flink_save_libs="$LIBS" - LIBS="$LIBS $FLIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -void $cfuncdsyev(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -30930,7 +30086,7 @@ void $cfuncdsyev(); int main () { -$cfuncdsyev() + call dsyev ; return 0; } @@ -30944,7 +30100,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -30957,33 +30113,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - LIBS="$flink_save_libs" - coin_need_flibs=yes - use_lapack='-lsunperf $BLAS_LIBS' - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 echo "${ECHO_T}yes: $use_lapack" >&6 - else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -LIBS="$flink_save_libs" - echo "$as_me:$LINENO: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 +echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi ;; - cc|cpp) + c) ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -30997,11 +30146,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdsyev="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -31012,7 +30161,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +void $cfuncdsyev(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -31038,7 +30187,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31062,11 +30211,10 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_lapack='-lsunperf $BLAS_LIBS' - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 echo "${ECHO_T}yes: $use_lapack" >&6 else @@ -31079,7 +30227,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -extern "C" {void $cfuncdsyev();} +void $cfuncdsyev(); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -31105,7 +30253,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31120,11 +30268,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_lapack='-lsunperf $BLAS_LIBS' - if test $coin_need_flibs = yes ; then - use_lapack="$use_lapack $FLIBS" - fi - echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 echo "${ECHO_T}yes: $use_lapack" >&6 @@ -31135,40 +30282,208 @@ sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$flink_save_libs" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 +echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 +echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} + { (exit 1); exit 1; }; } fi fi ;; + cc|cpp) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac - LIBS="$coin_save_LIBS" - ;; - # On cygwin, do this check only if doscompile is disabled. The prebuilt library - # will want to link with cygwin, hence won't run standalone in DOS. - esac - fi - - if test -z "$use_lapack" ; then - echo "$as_me:$LINENO: checking whether -llapack has LAPACK" >&5 -echo $ECHO_N "checking whether -llapack has LAPACK... $ECHO_C" >&6 - coin_need_flibs=no - coin_save_LIBS="$LIBS" - LIBS="-llapack $BLAS_LIBS $LIBS" - case $ac_ext in - f) - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef F77_DUMMY_MAIN +cfuncdsyev="$ac_val" + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 + + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 +echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: user supplied LAPACK library \"$use_lapack\" does not work" >&5 +echo "$as_me: error: user supplied LAPACK library \"$use_lapack\" does not work" >&2;} + { (exit 1); exit 1; }; } + fi + fi + ;; +esac + + LIBS="$coin_save_LIBS" + fi +else + if test x$coin_has_blas = xyes; then + # First try to see if LAPACK is already available with BLAS library + echo "$as_me:$LINENO: checking whether LAPACK is already available with BLAS library" >&5 +echo $ECHO_N "checking whether LAPACK is already available with BLAS library... $ECHO_C" >&6 + coin_save_LIBS="$LIBS" + coin_need_flibs=no + LIBS="$BLAS_LIBS $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -31193,7 +30508,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31206,7 +30521,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - use_lapack='-llapack' + use_lapack="$BLAS_LIBS" if test $coin_need_flibs = yes ; then use_lapack="$use_lapack $FLIBS" fi @@ -31237,11 +30552,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdsyev="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -31278,7 +30593,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31302,7 +30617,7 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_lapack='-llapack' + use_lapack="$BLAS_LIBS" if test $coin_need_flibs = yes ; then use_lapack="$use_lapack $FLIBS" fi @@ -31345,7 +30660,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31360,7 +30675,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_lapack='-llapack' + use_lapack="$BLAS_LIBS" if test $coin_need_flibs = yes ; then use_lapack="$use_lapack $FLIBS" fi @@ -31398,11 +30713,11 @@ case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cfuncdsyev="$ac_val" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$coin_need_flibs" = xyes; then flink_try=no; @@ -31439,7 +30754,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31463,7 +30778,7 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $flink_try = yes; then - use_lapack='-llapack' + use_lapack="$BLAS_LIBS" if test $coin_need_flibs = yes ; then use_lapack="$use_lapack $FLIBS" fi @@ -31506,7 +30821,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -31521,7 +30836,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBS="$flink_save_libs" coin_need_flibs=yes - use_lapack='-llapack' + use_lapack="$BLAS_LIBS" if test $coin_need_flibs = yes ; then use_lapack="$use_lapack $FLIBS" fi @@ -31549,1124 +30864,1249 @@ esac LIBS="$coin_save_LIBS" fi + if test -z "$use_lapack"; then + # Try to autodetect the library for lapack based on build system + case $build in + # TODO: Is this check actually needed here, since -lcomplib.sigmath should have been recognized as Blas library, + # and above it is checked whether the Blas library already contains Lapack + *-sgi-*) + echo "$as_me:$LINENO: checking whether -lcomplib.sgimath has LAPACK" >&5 +echo $ECHO_N "checking whether -lcomplib.sgimath has LAPACK... $ECHO_C" >&6 + coin_save_LIBS="$LIBS" + coin_need_flibs=no + LIBS="-lcomplib.sgimath $BLAS_LIBS $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - # If we have no other ideas, consider building LAPACK. - if test -z "$use_lapack" ; then - use_lapack=BUILD - fi -fi - -if test "x$use_lapack" = xBUILD ; then - -echo "$as_me:$LINENO: checking for COIN-OR package Lapack" >&5 -echo $ECHO_N "checking for COIN-OR package Lapack... $ECHO_C" >&6 - -coin_has_lapack=notGiven +#ifdef F77_DUMMY_MAIN -# check if user wants to skip package in any case -if test x"$COIN_SKIP_PROJECTS" != x; then - for dir in $COIN_SKIP_PROJECTS; do - if test $dir = "Lapack"; then - coin_has_lapack=skipping - fi - done -fi +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } -if test "$coin_has_lapack" != skipping; then +#endif +int +main () +{ + call dsyev + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + use_lapack="-lcomplib.sgimath $BLAS_LIBS" + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 -# Check whether --with-m4_tolower(Lapack) or --without-m4_tolower(Lapack) was given. -if test "${with_lapack+set}" = set; then - withval="$with_lapack" - if test "$withval" = no ; then - coin_has_lapack=skipping - fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + c) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -LAPACK_LIBS= -LAPACK_CFLAGS= -LAPACK_DATA= -LAPACK_DEPENDENCIES= -LAPACK_PCLIBS= -LAPACK_PCREQUIRES= - - - - +cfuncdsyev="$ac_val" +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_lapack="-lcomplib.sgimath $BLAS_LIBS" + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack="-lcomplib.sgimath $BLAS_LIBS" + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + ;; + cc|cpp) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +cfuncdsyev="$ac_val" -#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package -if test $coin_has_lapack != skipping; then +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# Check whether --with-m4_tolower(Lapack)-lib or --without-m4_tolower(Lapack)-lib was given. -if test "${with_lapack_lib+set}" = set; then - withval="$with_lapack_lib" - if test "$withval" = no ; then - coin_has_lapack=skipping - else - coin_has_lapack=yes - LAPACK_LIBS="$withval" - LAPACK_PCLIBS="$withval" + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN - CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" - CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - LAPACK_LIBS_INSTALLED="$withval" - CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" - fi - fi - -fi; -fi - -if test $coin_has_lapack != skipping; then - -# Check whether --with-m4_tolower(Lapack)-incdir or --without-m4_tolower(Lapack)-incdir was given. -if test "${with_lapack_incdir+set}" = set; then - withval="$with_lapack_incdir" - if test "$withval" = no ; then - coin_has_lapack=skipping - else - coin_has_lapack=yes - LAPACK_CFLAGS="-I`${CYGPATH_W} $withval`" - CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - LAPACK_CFLAGS_INSTALLED="$LAPACK_CFLAGS" - CGLCONICLIB_CFLAGS_INSTALLED="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" - fi - fi - -fi; -fi - -if test $coin_has_lapack != skipping; then - -# Check whether --with-m4_tolower(Lapack)-datadir or --without-m4_tolower(Lapack)-datadir was given. -if test "${with_lapack_datadir+set}" = set; then - withval="$with_lapack_datadir" - if test "$withval" = no ; then - coin_has_lapack=skipping - else - coin_has_lapack=yes - LAPACK_DATA="$withval" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - LAPACK_DATA_INSTALLED="$withval" - fi - fi +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +flink_try=no fi - -if test $coin_has_lapack = notGiven; then - if test -n "$PKG_CONFIG" ; then - # set search path for pkg-config - # need to export variable to be sure that the following pkg-config gets these values - coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" - PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" - export PKG_CONFIG_PATH - - # let pkg-config do it's magic - - - -if test -n "$PKG_CONFIG" ; then - if $PKG_CONFIG --exists "coinlapack"; then - LAPACK_VERSIONS=`$PKG_CONFIG --modversion "coinlapack" 2>/dev/null | tr '\n' ' '` - cflags=`$PKG_CONFIG --cflags "coinlapack" 2>/dev/null` - # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files - # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's - # but only do this if is not trivial - if test "$CYGPATH_W" != "echo" ; then - # need to put into brackets since otherwise autoconf replaces the brackets in the sed command - cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - LAPACK_CFLAGS="$cflags" - LAPACK_LIBS=`$PKG_CONFIG --libs "coinlapack" 2>/dev/null` - LAPACK_DATA=`$PKG_CONFIG --variable=datadir "coinlapack" 2>/dev/null` - coin_has_lapack=yes - echo "$as_me:$LINENO: result: yes: $LAPACK_VERSIONS" >&5 -echo "${ECHO_T}yes: $LAPACK_VERSIONS" >&6 - - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - LAPACK_LIBS=`echo " $LAPACK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - fi - LAPACK_PCREQUIRES="coinlapack" - - # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib - - CGLCONICLIB_PCREQUIRES="coinlapack $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" - - - - else - LAPACK_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coinlapack"` - coin_has_lapack=notGiven - echo "$as_me:$LINENO: result: not given: $LAPACK_PKG_ERRORS" >&5 -echo "${ECHO_T}not given: $LAPACK_PKG_ERRORS" >&6 - - fi -else - { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Lapack without pkg-config\"" >&5 -echo "$as_me: error: \"Cannot check for existance of module Lapack without pkg-config\"" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - # reset PKG_CONFIG_PATH variable - PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" - export PKG_CONFIG_PATH - - else - echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 -echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 - -echo "$as_me:$LINENO: checking for COIN-OR package Lapack (fallback)" >&5 -echo $ECHO_N "checking for COIN-OR package Lapack (fallback)... $ECHO_C" >&6 - -coin_has_lapack=notGiven -LAPACK_LIBS= -LAPACK_LIBS_INSTALLED= -LAPACK_CFLAGS= -LAPACK_CFLAGS_INSTALLED= -LAPACK_DATA= -LAPACK_DATA_INSTALLED= -LAPACK_PCLIBS= -LAPACK_PCREQUIRES= - -# initial list of dependencies is "coinlapack", but we need to filter out version number specifications (= x, <= x, >= x, != x) -projtoprocess="coinlapack" - -# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it -# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards -# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples -# also, we setup the DATA variable -allproj="" -allpcfiles="" -allpcifiles="" -while test "x$projtoprocess" != x ; do - - for proj in $projtoprocess ; do - # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it - pcfile="" - save_IFS="$IFS" - IFS=":" - for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do - # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again - if test -r "$dir/${proj}-uninstalled.pc" ; then - pcfile="$dir/$proj-uninstalled.pc" - if test -r "$dir/${proj}.pc" ; then - pcifile="$dir/${proj}.pc" - else - { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 -echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} - pcifile= - fi - break - fi - done - IFS="$save_IFS" - - if test "x$pcfile" != x ; then - # read dependencies from $pcfile and filter it - projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` - - # add projrequires to the front of the list of projects that have to be processed next - # at the same time, remove $proj from this list - projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` - - # read DATA from $pcfile, if _DATA is still empty - if test "x$LAPACK_DATA" = x ; then - projdatadir= - pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` - eval `sh -c "$pcfilemod"` - LAPACK_DATA="$projdatadir" - fi - - allproj="$allproj $proj" - allpcfiles="$pcfile:$allpcfiles" + if test $flink_try = yes; then + use_lapack="-lcomplib.sgimath $BLAS_LIBS" + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 else - echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 -echo "${ECHO_T}no, dependency $proj not available" >&6 - allproj=fail - break 2 - fi - - if test "x$pcifile" != x ; then - allpcifiles="$pcifile:$allpcifiles" - - # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty - if test "x$LAPACK_DATA_INSTALLED" = x ; then - projdatadir= - pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` - eval `sh -c "$pcifilemod"` - if test "${CYGPATH_W}" != "echo"; then - projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" - fi - LAPACK_DATA_INSTALLED="$projdatadir" - fi - - fi - - break - done - - # remove spaces on begin of $projtoprocess - projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` - -done - -if test "$allproj" != fail ; then - - # now go through the list of .pc files and assemble compiler and linker flags - # important is here to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" - - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcfiles ; do - - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi - - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` - - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" - - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - LAPACK_CFLAGS="$projcflags $LAPACK_CFLAGS" - - # set LIBS variable - LAPACK_LIBS="$projlibs $LAPACK_LIBS" - - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" - - done - IFS="$save_IFS" - - - # now go through the list of .pc files for installed projects and assemble compiler and linker flags - # important is here again to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" - - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcifiles ; do - - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi - - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` - - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" - - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - LAPACK_CFLAGS_INSTALLED="$projcflags $LAPACK_CFLAGS_INSTALLED" - - # set LIBS variable - LAPACK_LIBS_INSTALLED="$projlibs $LAPACK_LIBS_INSTALLED" - - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" - - done - IFS="$save_IFS" - - - # finish up - coin_has_lapack=yes - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_LAPACK 1 + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), - # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", - # everything of the form "-lname" by "libname.lib", and - # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - LAPACK_LIBS=`echo " $LAPACK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - LAPACK_LIBS_INSTALLED=`echo " $LAPACK_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` - fi - - LAPACK_PCREQUIRES="coinlapack" - - CGLCONICLIB_PCREQUIRES="coinlapack $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_CFLAGS_INSTALLED="$LAPACK_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" - CGLCONICLIB_LIBS_INSTALLED="$LAPACK_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" - - -fi - - - -if test $coin_has_lapack != notGiven && - test $coin_has_lapack != skipping; then - COIN_HAS_LAPACK_TRUE= - COIN_HAS_LAPACK_FALSE='#' -else - COIN_HAS_LAPACK_TRUE='#' - COIN_HAS_LAPACK_FALSE= -fi - - - - fi - -else - echo "$as_me:$LINENO: result: $coin_has_lapack" >&5 -echo "${ECHO_T}$coin_has_lapack" >&6 -fi - -if test $coin_has_lapack != skipping && - test $coin_has_lapack != notGiven ; then - -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_LAPACK 1 +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack="-lcomplib.sgimath $BLAS_LIBS" + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. -if test "${enable_interpackage_dependencies+set}" = set; then - enableval="$enable_interpackage_dependencies" - -else - enable_interpackage_dependencies=yes -fi; - - if test $enable_interpackage_dependencies = yes ; then - # construct dependencies variables from LIBS variables - # we add an extra space in LIBS so we can substitute out everything starting with " -" - # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows - # then remove everything of the form -xxx - # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) - LAPACK_DEPENDENCIES=`echo " $LAPACK_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - - CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - - fi - - if test 1 = 0 ; then #change this test to enable a bit of debugging output - if test -n "$LAPACK_CFLAGS" ; then - { echo "$as_me:$LINENO: Lapack CFLAGS are $LAPACK_CFLAGS" >&5 -echo "$as_me: Lapack CFLAGS are $LAPACK_CFLAGS" >&6;} - fi - if test -n "$LAPACK_LIBS" ; then - { echo "$as_me:$LINENO: Lapack LIBS are $LAPACK_LIBS" >&5 -echo "$as_me: Lapack LIBS are $LAPACK_LIBS" >&6;} - fi - if test -n "$LAPACK_DEPENDENCIES" ; then - { echo "$as_me:$LINENO: Lapack DEPENDENCIES are $LAPACK_DEPENDENCIES" >&5 -echo "$as_me: Lapack DEPENDENCIES are $LAPACK_DEPENDENCIES" >&6;} - fi - if test -n "$LAPACK_DATA" ; then - { echo "$as_me:$LINENO: Lapack DATA is $LAPACK_DATA" >&5 -echo "$as_me: Lapack DATA is $LAPACK_DATA" >&6;} - fi - if test -n "$LAPACK_PCLIBS" ; then - { echo "$as_me:$LINENO: Lapack PCLIBS are $LAPACK_PCLIBS" >&5 -echo "$as_me: Lapack PCLIBS are $LAPACK_PCLIBS" >&6;} - fi - if test -n "$LAPACK_PCREQUIRES" ; then - { echo "$as_me:$LINENO: Lapack PCREQUIRES are $LAPACK_PCREQUIRES" >&5 -echo "$as_me: Lapack PCREQUIRES are $LAPACK_PCREQUIRES" >&6;} - fi - - { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 -echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} - { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 -echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} - { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 -echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} - - fi -fi - -# Define the Makefile conditional - - -if test $coin_has_lapack != notGiven && - test $coin_has_lapack != skipping; then - COIN_HAS_LAPACK_TRUE= - COIN_HAS_LAPACK_FALSE='#' else - COIN_HAS_LAPACK_TRUE='#' - COIN_HAS_LAPACK_FALSE= -fi - - - - -elif test "x$use_lapack" != x && test "$use_lapack" != no; then - coin_has_lapack=yes - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test 0 = 0; then - COIN_HAS_LAPACK_TRUE= - COIN_HAS_LAPACK_FALSE='#' -else - COIN_HAS_LAPACK_TRUE='#' - COIN_HAS_LAPACK_FALSE= +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + ;; +esac + LIBS="$coin_save_LIBS" + ;; -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_LAPACK 1 + # See comments in COIN_CHECK_PACKAGE_BLAS. + # TODO: Is this check actually needed here, since -lsunperf should have been recognized as Blas library, + # and above it is checked whether the Blas library already contains Lapack + *-*-solaris*) + echo "$as_me:$LINENO: checking for LAPACK in libsunperf" >&5 +echo $ECHO_N "checking for LAPACK in libsunperf... $ECHO_C" >&6 + coin_need_flibs=no + coin_save_LIBS="$LIBS" + LIBS="-lsunperf $BLAS_LIBS $FLIBS $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - LAPACK_LIBS="$use_lapack" - LAPACK_CFLAGS= - LAPACK_DATA= - - - - - CGLCONICLIB_PCLIBS="$LAPACK_LIBS $CGLCONICLIB_PCLIBS" - CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_LIBS_INSTALLED="$LAPACK_LIBS $CGLCONICLIB_LIBS_INSTALLED" - +#ifdef F77_DUMMY_MAIN -else - coin_has_lapack=no +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + call dsyev + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + use_lapack='-lsunperf $BLAS_LIBS' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 -if test 0 = 1; then - COIN_HAS_LAPACK_TRUE= - COIN_HAS_LAPACK_FALSE='#' else - COIN_HAS_LAPACK_TRUE='#' - COIN_HAS_LAPACK_FALSE= -fi - -fi - - - - - - - - - -############################################################################# -# Third party solvers # -############################################################################# - -# Check which third party solvers are available - -echo "$as_me:$LINENO: checking for COIN-OR package Cplex" >&5 -echo $ECHO_N "checking for COIN-OR package Cplex... $ECHO_C" >&6 - -coin_has_cplex=notGiven - -# check if user wants to skip package in any case -if test x"$COIN_SKIP_PROJECTS" != x; then - for dir in $COIN_SKIP_PROJECTS; do - if test $dir = "Cplex"; then - coin_has_cplex=skipping - fi - done -fi - -if test "$coin_has_cplex" != skipping; then - -# Check whether --with-m4_tolower(Cplex) or --without-m4_tolower(Cplex) was given. -if test "${with_cplex+set}" = set; then - withval="$with_cplex" - if test "$withval" = no ; then - coin_has_cplex=skipping - fi - -fi; -fi - -CPLEX_LIBS= -CPLEX_CFLAGS= -CPLEX_DATA= -CPLEX_DEPENDENCIES= -CPLEX_PCLIBS= -CPLEX_PCREQUIRES= - - - - - - - - - - - - - - - - - -#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package -if test $coin_has_cplex != skipping; then - -# Check whether --with-m4_tolower(Cplex)-lib or --without-m4_tolower(Cplex)-lib was given. -if test "${with_cplex_lib+set}" = set; then - withval="$with_cplex_lib" - if test "$withval" = no ; then - coin_has_cplex=skipping - else - coin_has_cplex=yes - CPLEX_LIBS="$withval" - CPLEX_PCLIBS="$withval" - - CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" - CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" - - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - CPLEX_LIBS_INSTALLED="$withval" - CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" - fi - fi - -fi; -fi - -if test $coin_has_cplex != skipping; then - -# Check whether --with-m4_tolower(Cplex)-incdir or --without-m4_tolower(Cplex)-incdir was given. -if test "${with_cplex_incdir+set}" = set; then - withval="$with_cplex_incdir" - if test "$withval" = no ; then - coin_has_cplex=skipping - else - coin_has_cplex=yes - CPLEX_CFLAGS="-I`${CYGPATH_W} $withval`" - CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - CPLEX_CFLAGS_INSTALLED="$CPLEX_CFLAGS" - CGLCONICLIB_CFLAGS_INSTALLED="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" - fi - fi - -fi; -fi - -if test $coin_has_cplex != skipping; then - -# Check whether --with-m4_tolower(Cplex)-datadir or --without-m4_tolower(Cplex)-datadir was given. -if test "${with_cplex_datadir+set}" = set; then - withval="$with_cplex_datadir" - if test "$withval" = no ; then - coin_has_cplex=skipping - else - coin_has_cplex=yes - CPLEX_DATA="$withval" - # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables - if test -z "$PKG_CONFIG" ; then - CPLEX_DATA_INSTALLED="$withval" - fi - fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + c) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac -if test $coin_has_cplex = notGiven; then - if test -n "$PKG_CONFIG" ; then - # set search path for pkg-config - # need to export variable to be sure that the following pkg-config gets these values - coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" - PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED" - export PKG_CONFIG_PATH - - # let pkg-config do it's magic - - - -if test -n "$PKG_CONFIG" ; then - if $PKG_CONFIG --exists "osicplex"; then - CPLEX_VERSIONS=`$PKG_CONFIG --modversion "osicplex" 2>/dev/null | tr '\n' ' '` - cflags=`$PKG_CONFIG --cflags "osicplex" 2>/dev/null` - # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files - # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's - # but only do this if is not trivial - if test "$CYGPATH_W" != "echo" ; then - # need to put into brackets since otherwise autoconf replaces the brackets in the sed command - cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - CPLEX_CFLAGS="$cflags" - CPLEX_LIBS=`$PKG_CONFIG --libs "osicplex" 2>/dev/null` - CPLEX_DATA=`$PKG_CONFIG --variable=datadir "osicplex" 2>/dev/null` - coin_has_cplex=yes - echo "$as_me:$LINENO: result: yes: $CPLEX_VERSIONS" >&5 -echo "${ECHO_T}yes: $CPLEX_VERSIONS" >&6 - - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - CPLEX_LIBS=`echo " $CPLEX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - fi - CPLEX_PCREQUIRES="osicplex" - - # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib - - CGLCONICLIB_PCREQUIRES="osicplex $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$CPLEX_LIBS $CGLCONICLIB_LIBS" +cfuncdsyev="$ac_val" +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN - else - CPLEX_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "osicplex"` - coin_has_cplex=notGiven - echo "$as_me:$LINENO: result: not given: $CPLEX_PKG_ERRORS" >&5 -echo "${ECHO_T}not given: $CPLEX_PKG_ERRORS" >&6 +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - fi +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes else - { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Cplex without pkg-config\"" >&5 -echo "$as_me: error: \"Cannot check for existance of module Cplex without pkg-config\"" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - # reset PKG_CONFIG_PATH variable - PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH" - export PKG_CONFIG_PATH - - else - echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 -echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 - -echo "$as_me:$LINENO: checking for COIN-OR package Cplex (fallback)" >&5 -echo $ECHO_N "checking for COIN-OR package Cplex (fallback)... $ECHO_C" >&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -coin_has_cplex=notGiven -CPLEX_LIBS= -CPLEX_LIBS_INSTALLED= -CPLEX_CFLAGS= -CPLEX_CFLAGS_INSTALLED= -CPLEX_DATA= -CPLEX_DATA_INSTALLED= -CPLEX_PCLIBS= -CPLEX_PCREQUIRES= +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_lapack='-lsunperf $BLAS_LIBS' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 -# initial list of dependencies is "osicplex", but we need to filter out version number specifications (= x, <= x, >= x, != x) -projtoprocess="osicplex" + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN -# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it -# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards -# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples -# also, we setup the DATA variable -allproj="" -allpcfiles="" -allpcifiles="" -while test "x$projtoprocess" != x ; do +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - for proj in $projtoprocess ; do - # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it - pcfile="" - save_IFS="$IFS" - IFS=":" - for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do - # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again - if test -r "$dir/${proj}-uninstalled.pc" ; then - pcfile="$dir/$proj-uninstalled.pc" - if test -r "$dir/${proj}.pc" ; then - pcifile="$dir/${proj}.pc" - else - { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5 -echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;} - pcifile= - fi - break - fi - done - IFS="$save_IFS" +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack='-lsunperf $BLAS_LIBS' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - if test "x$pcfile" != x ; then - # read dependencies from $pcfile and filter it - projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ ]\{0,\}[^ ]\{1,\}//g'` - # add projrequires to the front of the list of projects that have to be processed next - # at the same time, remove $proj from this list - projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # read DATA from $pcfile, if _DATA is still empty - if test "x$CPLEX_DATA" = x ; then - projdatadir= - pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` - eval `sh -c "$pcfilemod"` - CPLEX_DATA="$projdatadir" +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - allproj="$allproj $proj" - allpcfiles="$pcfile:$allpcfiles" - - else - echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5 -echo "${ECHO_T}no, dependency $proj not available" >&6 - allproj=fail - break 2 fi + ;; + cc|cpp) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac - if test "x$pcifile" != x ; then - allpcifiles="$pcifile:$allpcifiles" - - # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty - if test "x$CPLEX_DATA_INSTALLED" = x ; then - projdatadir= - pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` - eval `sh -c "$pcifilemod"` - if test "${CYGPATH_W}" != "echo"; then - projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" - fi - CPLEX_DATA_INSTALLED="$projdatadir" - fi +cfuncdsyev="$ac_val" - fi +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - break - done + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN - # remove spaces on begin of $projtoprocess - projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'` +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } -done +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "$allproj" != fail ; then +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_lapack='-lsunperf $BLAS_LIBS' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - # now go through the list of .pc files and assemble compiler and linker flags - # important is here to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcfiles ; do +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack='-lsunperf $BLAS_LIBS' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi fi - CPLEX_CFLAGS="$projcflags $CPLEX_CFLAGS" - - # set LIBS variable - CPLEX_LIBS="$projlibs $CPLEX_LIBS" - - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" + ;; +esac - done - IFS="$save_IFS" + LIBS="$coin_save_LIBS" + ;; + # On cygwin, do this check only if doscompile is disabled. The prebuilt library + # will want to link with cygwin, hence won't run standalone in DOS. + esac + fi + if test -z "$use_lapack" ; then + echo "$as_me:$LINENO: checking whether -llapack has LAPACK" >&5 +echo $ECHO_N "checking whether -llapack has LAPACK... $ECHO_C" >&6 + coin_need_flibs=no + coin_save_LIBS="$LIBS" + LIBS="-llapack $BLAS_LIBS $LIBS" + case $ac_ext in + f) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - # now go through the list of .pc files for installed projects and assemble compiler and linker flags - # important is here again to obey the reverse order that has been setup before, - # since then libraries that are required by several others should be after these other libraries - pcfilesprocessed="" +#ifdef F77_DUMMY_MAIN - save_IFS="$IFS" - IFS=":" - for pcfile in $allpcifiles ; do +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # if $pcfile has been processed already, skip this round - if test "x$pcfilesprocessed" != x ; then - for pcfiledone in $pcfilesprocessed ; do - if test "$pcfiledone" = "$pcfile" ; then - continue 2 - fi - done - fi +#endif +int +main () +{ + call dsyev + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + use_lapack='-llapack' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags: - # replace "Libs:" by "echo projlibs=" - # replace "Cflags:" by "echo projcflags=" - # remove every line starting with : - pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile` +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # set projcflags and projlibs variables by running $pcfilemod - # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default - projcflags= - projlibs= - IFS="$save_IFS" - eval `sh -c "$pcfilemod"` - IFS=":" +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + c) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac - # add CYGPATH_W cludge into include flags and set CFLAGS variable - if test "${CYGPATH_W}" != "echo"; then - projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` - fi - CPLEX_CFLAGS_INSTALLED="$projcflags $CPLEX_CFLAGS_INSTALLED" +cfuncdsyev="$ac_val" - # set LIBS variable - CPLEX_LIBS_INSTALLED="$projlibs $CPLEX_LIBS_INSTALLED" +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # remember that we have processed $pcfile - pcfilesprocessed="$pcfilesprocessed:$pcfile" + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN - done - IFS="$save_IFS" +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # finish up - coin_has_cplex=yes - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_lapack='-llapack' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_CPLEX 1 + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void $cfuncdsyev(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # adjust linker flags for (i)cl compiler - # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl), - # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`", - # everything of the form "-lname" by "libname.lib", and - # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` - if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; - then - CPLEX_LIBS=`echo " $CPLEX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - CPLEX_LIBS_INSTALLED=`echo " $CPLEX_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` - fi - - CPLEX_PCREQUIRES="osicplex" +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack='-llapack' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - CGLCONICLIB_PCREQUIRES="osicplex $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$CPLEX_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$CPLEX_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_CFLAGS_INSTALLED="$CPLEX_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" - CGLCONICLIB_LIBS_INSTALLED="$CPLEX_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + ;; + cc|cpp) + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DSYEV" ;; + lower*) ac_val="dsyev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac +cfuncdsyev="$ac_val" +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test $coin_has_cplex != notGiven && - test $coin_has_cplex != skipping; then - COIN_HAS_CPLEX_TRUE= - COIN_HAS_CPLEX_FALSE='#' -else - COIN_HAS_CPLEX_TRUE='#' - COIN_HAS_CPLEX_FALSE= -fi - - + if test x"$coin_need_flibs" = xyes; then + flink_try=no; + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN - fi +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + flink_try=yes else - echo "$as_me:$LINENO: result: $coin_has_cplex" >&5 -echo "${ECHO_T}$coin_has_cplex" >&6 -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $coin_has_cplex != skipping && - test $coin_has_cplex != notGiven ; then +flink_try=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test $flink_try = yes; then + use_lapack='-llapack' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 -cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_CPLEX 1 + else + if test x"$FLIBS" != x; then + flink_save_libs="$LIBS" + LIBS="$LIBS $FLIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" {void $cfuncdsyev();} +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } - # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given. -if test "${enable_interpackage_dependencies+set}" = set; then - enableval="$enable_interpackage_dependencies" - -else - enable_interpackage_dependencies=yes -fi; - - if test $enable_interpackage_dependencies = yes ; then - # construct dependencies variables from LIBS variables - # we add an extra space in LIBS so we can substitute out everything starting with " -" - # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows - # then remove everything of the form -xxx - # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) - CPLEX_DEPENDENCIES=`echo " $CPLEX_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` +#endif +int +main () +{ +$cfuncdsyev() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS="$flink_save_libs" + coin_need_flibs=yes + use_lapack='-llapack' + if test $coin_need_flibs = yes ; then + use_lapack="$use_lapack $FLIBS" + fi + echo "$as_me:$LINENO: result: yes: $use_lapack" >&5 +echo "${ECHO_T}yes: $use_lapack" >&6 - CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` - fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test 1 = 0 ; then #change this test to enable a bit of debugging output - if test -n "$CPLEX_CFLAGS" ; then - { echo "$as_me:$LINENO: Cplex CFLAGS are $CPLEX_CFLAGS" >&5 -echo "$as_me: Cplex CFLAGS are $CPLEX_CFLAGS" >&6;} - fi - if test -n "$CPLEX_LIBS" ; then - { echo "$as_me:$LINENO: Cplex LIBS are $CPLEX_LIBS" >&5 -echo "$as_me: Cplex LIBS are $CPLEX_LIBS" >&6;} - fi - if test -n "$CPLEX_DEPENDENCIES" ; then - { echo "$as_me:$LINENO: Cplex DEPENDENCIES are $CPLEX_DEPENDENCIES" >&5 -echo "$as_me: Cplex DEPENDENCIES are $CPLEX_DEPENDENCIES" >&6;} - fi - if test -n "$CPLEX_DATA" ; then - { echo "$as_me:$LINENO: Cplex DATA is $CPLEX_DATA" >&5 -echo "$as_me: Cplex DATA is $CPLEX_DATA" >&6;} - fi - if test -n "$CPLEX_PCLIBS" ; then - { echo "$as_me:$LINENO: Cplex PCLIBS are $CPLEX_PCLIBS" >&5 -echo "$as_me: Cplex PCLIBS are $CPLEX_PCLIBS" >&6;} - fi - if test -n "$CPLEX_PCREQUIRES" ; then - { echo "$as_me:$LINENO: Cplex PCREQUIRES are $CPLEX_PCREQUIRES" >&5 -echo "$as_me: Cplex PCREQUIRES are $CPLEX_PCREQUIRES" >&6;} +LIBS="$flink_save_libs" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi fi + ;; +esac - { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 -echo "$as_me: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&6;} - { echo "$as_me:$LINENO: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&5 -echo "$as_me: CglConicLib LIBS are $CGLCONICLIB_LIBS" >&6;} - { echo "$as_me:$LINENO: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&5 -echo "$as_me: CglConicLib DEPENDENCIES are $CGLCONICLIB_DEPENDENCIES" >&6;} - + LIBS="$coin_save_LIBS" fi -fi - -# Define the Makefile conditional - -if test $coin_has_cplex != notGiven && - test $coin_has_cplex != skipping; then - COIN_HAS_CPLEX_TRUE= - COIN_HAS_CPLEX_FALSE='#' -else - COIN_HAS_CPLEX_TRUE='#' - COIN_HAS_CPLEX_FALSE= + # If we have no other ideas, consider building LAPACK. + if test -z "$use_lapack" ; then + use_lapack=BUILD + fi fi +if test "x$use_lapack" = xBUILD ; then +echo "$as_me:$LINENO: checking for COIN-OR package Lapack" >&5 +echo $ECHO_N "checking for COIN-OR package Lapack... $ECHO_C" >&6 - -echo "$as_me:$LINENO: checking for COIN-OR package Mosek" >&5 -echo $ECHO_N "checking for COIN-OR package Mosek... $ECHO_C" >&6 - -coin_has_mosek=notGiven +coin_has_lapack=notGiven # check if user wants to skip package in any case if test x"$COIN_SKIP_PROJECTS" != x; then for dir in $COIN_SKIP_PROJECTS; do - if test $dir = "Mosek"; then - coin_has_mosek=skipping + if test $dir = "Lapack"; then + coin_has_lapack=skipping fi done fi -if test "$coin_has_mosek" != skipping; then +if test "$coin_has_lapack" != skipping; then -# Check whether --with-m4_tolower(Mosek) or --without-m4_tolower(Mosek) was given. -if test "${with_mosek+set}" = set; then - withval="$with_mosek" +# Check whether --with-m4_tolower(Lapack) or --without-m4_tolower(Lapack) was given. +if test "${with_lapack+set}" = set; then + withval="$with_lapack" if test "$withval" = no ; then - coin_has_mosek=skipping + coin_has_lapack=skipping fi fi; fi -MOSEK_LIBS= -MOSEK_CFLAGS= -MOSEK_DATA= -MOSEK_DEPENDENCIES= -MOSEK_PCLIBS= -MOSEK_PCREQUIRES= +LAPACK_LIBS= +LAPACK_CFLAGS= +LAPACK_DATA= +LAPACK_DEPENDENCIES= +LAPACK_PCLIBS= +LAPACK_PCREQUIRES= @@ -32685,24 +32125,24 @@ MOSEK_PCREQUIRES= #check if user provided LIBS, CFLAGS, or DATA for package or disables use of package -if test $coin_has_mosek != skipping; then +if test $coin_has_lapack != skipping; then -# Check whether --with-m4_tolower(Mosek)-lib or --without-m4_tolower(Mosek)-lib was given. -if test "${with_mosek_lib+set}" = set; then - withval="$with_mosek_lib" +# Check whether --with-m4_tolower(Lapack)-lib or --without-m4_tolower(Lapack)-lib was given. +if test "${with_lapack_lib+set}" = set; then + withval="$with_lapack_lib" if test "$withval" = no ; then - coin_has_mosek=skipping + coin_has_lapack=skipping else - coin_has_mosek=yes - MOSEK_LIBS="$withval" - MOSEK_PCLIBS="$withval" + coin_has_lapack=yes + LAPACK_LIBS="$withval" + LAPACK_PCLIBS="$withval" CGLCONICLIB_PCLIBS="$withval $CGLCONICLIB_PCLIBS" CGLCONICLIB_LIBS="$withval $CGLCONICLIB_LIBS" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - MOSEK_LIBS_INSTALLED="$withval" + LAPACK_LIBS_INSTALLED="$withval" CGLCONICLIB_LIBS_INSTALLED="$withval $CGLCONICLIB_LIBS_INSTALLED" fi fi @@ -32710,47 +32150,47 @@ if test "${with_mosek_lib+set}" = set; then fi; fi -if test $coin_has_mosek != skipping; then +if test $coin_has_lapack != skipping; then -# Check whether --with-m4_tolower(Mosek)-incdir or --without-m4_tolower(Mosek)-incdir was given. -if test "${with_mosek_incdir+set}" = set; then - withval="$with_mosek_incdir" +# Check whether --with-m4_tolower(Lapack)-incdir or --without-m4_tolower(Lapack)-incdir was given. +if test "${with_lapack_incdir+set}" = set; then + withval="$with_lapack_incdir" if test "$withval" = no ; then - coin_has_mosek=skipping + coin_has_lapack=skipping else - coin_has_mosek=yes - MOSEK_CFLAGS="-I`${CYGPATH_W} $withval`" + coin_has_lapack=yes + LAPACK_CFLAGS="-I`${CYGPATH_W} $withval`" CGLCONICLIB_CFLAGS="-I`${CYGPATH_W} $withval` $CGLCONICLIB_CFLAGS" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - MOSEK_CFLAGS_INSTALLED="$MOSEK_CFLAGS" - CGLCONICLIB_CFLAGS_INSTALLED="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" + LAPACK_CFLAGS_INSTALLED="$LAPACK_CFLAGS" + CGLCONICLIB_CFLAGS_INSTALLED="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS_INSTALLED" fi fi fi; fi -if test $coin_has_mosek != skipping; then +if test $coin_has_lapack != skipping; then -# Check whether --with-m4_tolower(Mosek)-datadir or --without-m4_tolower(Mosek)-datadir was given. -if test "${with_mosek_datadir+set}" = set; then - withval="$with_mosek_datadir" +# Check whether --with-m4_tolower(Lapack)-datadir or --without-m4_tolower(Lapack)-datadir was given. +if test "${with_lapack_datadir+set}" = set; then + withval="$with_lapack_datadir" if test "$withval" = no ; then - coin_has_mosek=skipping + coin_has_lapack=skipping else - coin_has_mosek=yes - MOSEK_DATA="$withval" + coin_has_lapack=yes + LAPACK_DATA="$withval" # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables if test -z "$PKG_CONFIG" ; then - MOSEK_DATA_INSTALLED="$withval" + LAPACK_DATA_INSTALLED="$withval" fi fi fi; fi -if test $coin_has_mosek = notGiven; then +if test $coin_has_lapack = notGiven; then if test -n "$PKG_CONFIG" ; then # set search path for pkg-config # need to export variable to be sure that the following pkg-config gets these values @@ -32763,9 +32203,9 @@ if test $coin_has_mosek = notGiven; then if test -n "$PKG_CONFIG" ; then - if $PKG_CONFIG --exists "osimosek"; then - MOSEK_VERSIONS=`$PKG_CONFIG --modversion "osimosek" 2>/dev/null | tr '\n' ' '` - cflags=`$PKG_CONFIG --cflags "osimosek" 2>/dev/null` + if $PKG_CONFIG --exists "coinlapack"; then + LAPACK_VERSIONS=`$PKG_CONFIG --modversion "coinlapack" 2>/dev/null | tr '\n' ' '` + cflags=`$PKG_CONFIG --cflags "coinlapack" 2>/dev/null` # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files # thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's # but only do this if is not trivial @@ -32773,39 +32213,39 @@ if test -n "$PKG_CONFIG" ; then # need to put into brackets since otherwise autoconf replaces the brackets in the sed command cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - MOSEK_CFLAGS="$cflags" - MOSEK_LIBS=`$PKG_CONFIG --libs "osimosek" 2>/dev/null` - MOSEK_DATA=`$PKG_CONFIG --variable=datadir "osimosek" 2>/dev/null` - coin_has_mosek=yes - echo "$as_me:$LINENO: result: yes: $MOSEK_VERSIONS" >&5 -echo "${ECHO_T}yes: $MOSEK_VERSIONS" >&6 + LAPACK_CFLAGS="$cflags" + LAPACK_LIBS=`$PKG_CONFIG --libs "coinlapack" 2>/dev/null` + LAPACK_DATA=`$PKG_CONFIG --variable=datadir "coinlapack" 2>/dev/null` + coin_has_lapack=yes + echo "$as_me:$LINENO: result: yes: $LAPACK_VERSIONS" >&5 +echo "${ECHO_T}yes: $LAPACK_VERSIONS" >&6 # adjust linker flags for (i)cl compiler # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl) if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; then - MOSEK_LIBS=`echo " $MOSEK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + LAPACK_LIBS=`echo " $LAPACK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` fi - MOSEK_PCREQUIRES="osimosek" + LAPACK_PCREQUIRES="coinlapack" # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in CglConicLib - CGLCONICLIB_PCREQUIRES="osimosek $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$MOSEK_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_PCREQUIRES="coinlapack $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" else - MOSEK_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "osimosek"` - coin_has_mosek=notGiven - echo "$as_me:$LINENO: result: not given: $MOSEK_PKG_ERRORS" >&5 -echo "${ECHO_T}not given: $MOSEK_PKG_ERRORS" >&6 + LAPACK_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coinlapack"` + coin_has_lapack=notGiven + echo "$as_me:$LINENO: result: not given: $LAPACK_PKG_ERRORS" >&5 +echo "${ECHO_T}not given: $LAPACK_PKG_ERRORS" >&6 fi else - { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Mosek without pkg-config\"" >&5 -echo "$as_me: error: \"Cannot check for existance of module Mosek without pkg-config\"" >&2;} + { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module Lapack without pkg-config\"" >&5 +echo "$as_me: error: \"Cannot check for existance of module Lapack without pkg-config\"" >&2;} { (exit 1); exit 1; }; } fi @@ -32820,21 +32260,21 @@ fi echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5 echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6 -echo "$as_me:$LINENO: checking for COIN-OR package Mosek (fallback)" >&5 -echo $ECHO_N "checking for COIN-OR package Mosek (fallback)... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for COIN-OR package Lapack (fallback)" >&5 +echo $ECHO_N "checking for COIN-OR package Lapack (fallback)... $ECHO_C" >&6 -coin_has_mosek=notGiven -MOSEK_LIBS= -MOSEK_LIBS_INSTALLED= -MOSEK_CFLAGS= -MOSEK_CFLAGS_INSTALLED= -MOSEK_DATA= -MOSEK_DATA_INSTALLED= -MOSEK_PCLIBS= -MOSEK_PCREQUIRES= +coin_has_lapack=notGiven +LAPACK_LIBS= +LAPACK_LIBS_INSTALLED= +LAPACK_CFLAGS= +LAPACK_CFLAGS_INSTALLED= +LAPACK_DATA= +LAPACK_DATA_INSTALLED= +LAPACK_PCLIBS= +LAPACK_PCREQUIRES= -# initial list of dependencies is "osimosek", but we need to filter out version number specifications (= x, <= x, >= x, != x) -projtoprocess="osimosek" +# initial list of dependencies is "coinlapack", but we need to filter out version number specifications (= x, <= x, >= x, != x) +projtoprocess="coinlapack" # we first expand the list of projects to process by adding all dependencies just behind the project which depends on it # further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards @@ -32875,11 +32315,11 @@ echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"` # read DATA from $pcfile, if _DATA is still empty - if test "x$MOSEK_DATA" = x ; then + if test "x$LAPACK_DATA" = x ; then projdatadir= pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile` eval `sh -c "$pcfilemod"` - MOSEK_DATA="$projdatadir" + LAPACK_DATA="$projdatadir" fi allproj="$allproj $proj" @@ -32896,14 +32336,14 @@ echo "${ECHO_T}no, dependency $proj not available" >&6 allpcifiles="$pcifile:$allpcifiles" # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty - if test "x$MOSEK_DATA_INSTALLED" = x ; then + if test "x$LAPACK_DATA_INSTALLED" = x ; then projdatadir= pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile` eval `sh -c "$pcifilemod"` if test "${CYGPATH_W}" != "echo"; then projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`" fi - MOSEK_DATA_INSTALLED="$projdatadir" + LAPACK_DATA_INSTALLED="$projdatadir" fi fi @@ -32954,10 +32394,10 @@ if test "$allproj" != fail ; then if test "${CYGPATH_W}" != "echo"; then projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - MOSEK_CFLAGS="$projcflags $MOSEK_CFLAGS" + LAPACK_CFLAGS="$projcflags $LAPACK_CFLAGS" # set LIBS variable - MOSEK_LIBS="$projlibs $MOSEK_LIBS" + LAPACK_LIBS="$projlibs $LAPACK_LIBS" # remember that we have processed $pcfile pcfilesprocessed="$pcfilesprocessed:$pcfile" @@ -33002,10 +32442,10 @@ if test "$allproj" != fail ; then if test "${CYGPATH_W}" != "echo"; then projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'` fi - MOSEK_CFLAGS_INSTALLED="$projcflags $MOSEK_CFLAGS_INSTALLED" + LAPACK_CFLAGS_INSTALLED="$projcflags $LAPACK_CFLAGS_INSTALLED" # set LIBS variable - MOSEK_LIBS_INSTALLED="$projlibs $MOSEK_LIBS_INSTALLED" + LAPACK_LIBS_INSTALLED="$projlibs $LAPACK_LIBS_INSTALLED" # remember that we have processed $pcfile pcfilesprocessed="$pcfilesprocessed:$pcfile" @@ -33015,12 +32455,12 @@ if test "$allproj" != fail ; then # finish up - coin_has_mosek=yes + coin_has_lapack=yes echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_MOSEK 1 +#define COIN_HAS_LAPACK 1 _ACEOF @@ -33031,30 +32471,30 @@ _ACEOF # everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path` if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ; then - MOSEK_LIBS=`echo " $MOSEK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` - MOSEK_LIBS_INSTALLED=`echo " $MOSEK_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` + LAPACK_LIBS=`echo " $LAPACK_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'` + LAPACK_LIBS_INSTALLED=`echo " $LAPACK_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'` fi - MOSEK_PCREQUIRES="osimosek" + LAPACK_PCREQUIRES="coinlapack" - CGLCONICLIB_PCREQUIRES="osimosek $CGLCONICLIB_PCREQUIRES" - CGLCONICLIB_CFLAGS="$MOSEK_CFLAGS $CGLCONICLIB_CFLAGS" - CGLCONICLIB_LIBS="$MOSEK_LIBS $CGLCONICLIB_LIBS" - CGLCONICLIB_CFLAGS_INSTALLED="$MOSEK_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" - CGLCONICLIB_LIBS_INSTALLED="$MOSEK_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" + CGLCONICLIB_PCREQUIRES="coinlapack $CGLCONICLIB_PCREQUIRES" + CGLCONICLIB_CFLAGS="$LAPACK_CFLAGS $CGLCONICLIB_CFLAGS" + CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_CFLAGS_INSTALLED="$LAPACK_CFLAGS_INSTALLED $CGLCONICLIB_CFLAGS_INSTALLED" + CGLCONICLIB_LIBS_INSTALLED="$LAPACK_LIBS_INSTALLED $CGLCONICLIB_LIBS_INSTALLED" fi -if test $coin_has_mosek != notGiven && - test $coin_has_mosek != skipping; then - COIN_HAS_MOSEK_TRUE= - COIN_HAS_MOSEK_FALSE='#' +if test $coin_has_lapack != notGiven && + test $coin_has_lapack != skipping; then + COIN_HAS_LAPACK_TRUE= + COIN_HAS_LAPACK_FALSE='#' else - COIN_HAS_MOSEK_TRUE='#' - COIN_HAS_MOSEK_FALSE= + COIN_HAS_LAPACK_TRUE='#' + COIN_HAS_LAPACK_FALSE= fi @@ -33062,15 +32502,15 @@ fi fi else - echo "$as_me:$LINENO: result: $coin_has_mosek" >&5 -echo "${ECHO_T}$coin_has_mosek" >&6 + echo "$as_me:$LINENO: result: $coin_has_lapack" >&5 +echo "${ECHO_T}$coin_has_lapack" >&6 fi -if test $coin_has_mosek != skipping && - test $coin_has_mosek != notGiven ; then +if test $coin_has_lapack != skipping && + test $coin_has_lapack != notGiven ; then cat >>confdefs.h <<\_ACEOF -#define COIN_HAS_MOSEK 1 +#define COIN_HAS_LAPACK 1 _ACEOF @@ -33088,36 +32528,36 @@ fi; # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows # then remove everything of the form -xxx # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl) - MOSEK_DEPENDENCIES=`echo " $MOSEK_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` + LAPACK_DEPENDENCIES=`echo " $LAPACK_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` CGLCONICLIB_DEPENDENCIES=`echo " $CGLCONICLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'` fi if test 1 = 0 ; then #change this test to enable a bit of debugging output - if test -n "$MOSEK_CFLAGS" ; then - { echo "$as_me:$LINENO: Mosek CFLAGS are $MOSEK_CFLAGS" >&5 -echo "$as_me: Mosek CFLAGS are $MOSEK_CFLAGS" >&6;} + if test -n "$LAPACK_CFLAGS" ; then + { echo "$as_me:$LINENO: Lapack CFLAGS are $LAPACK_CFLAGS" >&5 +echo "$as_me: Lapack CFLAGS are $LAPACK_CFLAGS" >&6;} fi - if test -n "$MOSEK_LIBS" ; then - { echo "$as_me:$LINENO: Mosek LIBS are $MOSEK_LIBS" >&5 -echo "$as_me: Mosek LIBS are $MOSEK_LIBS" >&6;} + if test -n "$LAPACK_LIBS" ; then + { echo "$as_me:$LINENO: Lapack LIBS are $LAPACK_LIBS" >&5 +echo "$as_me: Lapack LIBS are $LAPACK_LIBS" >&6;} fi - if test -n "$MOSEK_DEPENDENCIES" ; then - { echo "$as_me:$LINENO: Mosek DEPENDENCIES are $MOSEK_DEPENDENCIES" >&5 -echo "$as_me: Mosek DEPENDENCIES are $MOSEK_DEPENDENCIES" >&6;} + if test -n "$LAPACK_DEPENDENCIES" ; then + { echo "$as_me:$LINENO: Lapack DEPENDENCIES are $LAPACK_DEPENDENCIES" >&5 +echo "$as_me: Lapack DEPENDENCIES are $LAPACK_DEPENDENCIES" >&6;} fi - if test -n "$MOSEK_DATA" ; then - { echo "$as_me:$LINENO: Mosek DATA is $MOSEK_DATA" >&5 -echo "$as_me: Mosek DATA is $MOSEK_DATA" >&6;} + if test -n "$LAPACK_DATA" ; then + { echo "$as_me:$LINENO: Lapack DATA is $LAPACK_DATA" >&5 +echo "$as_me: Lapack DATA is $LAPACK_DATA" >&6;} fi - if test -n "$MOSEK_PCLIBS" ; then - { echo "$as_me:$LINENO: Mosek PCLIBS are $MOSEK_PCLIBS" >&5 -echo "$as_me: Mosek PCLIBS are $MOSEK_PCLIBS" >&6;} + if test -n "$LAPACK_PCLIBS" ; then + { echo "$as_me:$LINENO: Lapack PCLIBS are $LAPACK_PCLIBS" >&5 +echo "$as_me: Lapack PCLIBS are $LAPACK_PCLIBS" >&6;} fi - if test -n "$MOSEK_PCREQUIRES" ; then - { echo "$as_me:$LINENO: Mosek PCREQUIRES are $MOSEK_PCREQUIRES" >&5 -echo "$as_me: Mosek PCREQUIRES are $MOSEK_PCREQUIRES" >&6;} + if test -n "$LAPACK_PCREQUIRES" ; then + { echo "$as_me:$LINENO: Lapack PCREQUIRES are $LAPACK_PCREQUIRES" >&5 +echo "$as_me: Lapack PCREQUIRES are $LAPACK_PCREQUIRES" >&6;} fi { echo "$as_me:$LINENO: CglConicLib CFLAGS are $CGLCONICLIB_CFLAGS" >&5 @@ -33133,106 +32573,69 @@ fi # Define the Makefile conditional -if test $coin_has_mosek != notGiven && - test $coin_has_mosek != skipping; then - COIN_HAS_MOSEK_TRUE= - COIN_HAS_MOSEK_FALSE='#' +if test $coin_has_lapack != notGiven && + test $coin_has_lapack != skipping; then + COIN_HAS_LAPACK_TRUE= + COIN_HAS_LAPACK_FALSE='#' else - COIN_HAS_MOSEK_TRUE='#' - COIN_HAS_MOSEK_FALSE= + COIN_HAS_LAPACK_TRUE='#' + COIN_HAS_LAPACK_FALSE= fi +elif test "x$use_lapack" != x && test "$use_lapack" != no; then + coin_has_lapack=yes -############################################################################# -# Check for IPM solver # -############################################################################# -echo "$as_me:$LINENO: checking for CglConic default IPM solver" >&5 -echo $ECHO_N "checking for CglConic default IPM solver... $ECHO_C" >&6 -# Check whether --with-ipm-solver or --without-ipm-solver was given. -if test "${with_ipm_solver+set}" = set; then - withval="$with_ipm_solver" - cglconic_ipm_solver=$withval +if test 0 = 0; then + COIN_HAS_LAPACK_TRUE= + COIN_HAS_LAPACK_FALSE='#' else - cglconic_ipm_solver=ipopt -fi; + COIN_HAS_LAPACK_TRUE='#' + COIN_HAS_LAPACK_FALSE= +fi -found_package=true -case $cglconic_ipm_solver in - ipopt) - echo "$as_me:$LINENO: result: Ipopt" >&5 -echo "${ECHO_T}Ipopt" >&6 - if test $coin_has_osiipopt = unavailable || test $coin_has_osiipopt = skipping; \ - then - found_package=false - fi - ;; - mosek) - echo "$as_me:$LINENO: result: Mosek" >&5 -echo "${ECHO_T}Mosek" >&6 - if test $coin_has_mosek = false; \ - then - found_package=false - fi - ;; - cplex) - echo "$as_me:$LINENO: result: Cplex" >&5 -echo "${ECHO_T}Cplex" >&6 - if test $coin_has_cplex = false; \ - then - found_package=false - fi - ;; - *) - { { echo "$as_me:$LINENO: error: Unknown IPM solver!" >&5 -echo "$as_me: error: Unknown IPM solver!" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test $found_package = false; then - { { echo "$as_me:$LINENO: error: Couldn't find the $cglconic_ipm_solver package!" >&5 -echo "$as_me: error: Couldn't find the $cglconic_ipm_solver package!" >&2;} - { (exit 1); exit 1; }; } -fi +cat >>confdefs.h <<\_ACEOF +#define COIN_HAS_LAPACK 1 +_ACEOF + LAPACK_LIBS="$use_lapack" + LAPACK_CFLAGS= + LAPACK_DATA= -if test $cglconic_ipm_solver = ipopt && -test $coin_has_coindepend = yes; then - IPOPT_IPM_SOLVER_TRUE= - IPOPT_IPM_SOLVER_FALSE='#' -else - IPOPT_IPM_SOLVER_TRUE='#' - IPOPT_IPM_SOLVER_FALSE= -fi + CGLCONICLIB_PCLIBS="$LAPACK_LIBS $CGLCONICLIB_PCLIBS" + CGLCONICLIB_LIBS="$LAPACK_LIBS $CGLCONICLIB_LIBS" + CGLCONICLIB_LIBS_INSTALLED="$LAPACK_LIBS $CGLCONICLIB_LIBS_INSTALLED" -if test $cglconic_ipm_solver = mosek && -test $coin_has_mosek = yes; then - MOSEK_IPM_SOLVER_TRUE= - MOSEK_IPM_SOLVER_FALSE='#' -else - MOSEK_IPM_SOLVER_TRUE='#' - MOSEK_IPM_SOLVER_FALSE= -fi +else + coin_has_lapack=no -if test $cglconic_ipm_solver = cplex && -test $coin_has_cplex = yes; then - CPLEX_IPM_SOLVER_TRUE= - CPLEX_IPM_SOLVER_FALSE='#' +if test 0 = 1; then + COIN_HAS_LAPACK_TRUE= + COIN_HAS_LAPACK_FALSE='#' else - CPLEX_IPM_SOLVER_TRUE='#' - CPLEX_IPM_SOLVER_FALSE= + COIN_HAS_LAPACK_TRUE='#' + COIN_HAS_LAPACK_FALSE= +fi + fi + + + + + + + ############################################################################# # Solvers for unittesting # ############################################################################# @@ -33569,11 +32972,11 @@ done fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cc @@ -33898,11 +33301,11 @@ done fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cc @@ -34227,11 +33630,11 @@ done fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu @@ -34464,7 +33867,7 @@ fi coin_doxy_tagfiles= coin_doxy_excludes= -tmp="CoinUtils Osi OsiConic Cgl" +tmp="CoinUtils Osi OsiConic Cgl OsiIpopt" for proj in $tmp ; do lc_proj=`echo $proj | tr [A-Z] [a-z]` echo "$as_me:$LINENO: checking for doxygen doc'n for $proj " >&5 @@ -34847,6 +34250,55 @@ echo "$as_me: error: conditional \"COIN_HAS_OSIIPOPT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${COIN_HAS_CPLEX_TRUE}" && test -z "${COIN_HAS_CPLEX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPLEX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"COIN_HAS_CPLEX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${COIN_HAS_CPLEX_TRUE}" && test -z "${COIN_HAS_CPLEX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPLEX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"COIN_HAS_CPLEX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${COIN_HAS_MOSEK_TRUE}" && test -z "${COIN_HAS_MOSEK_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_MOSEK\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"COIN_HAS_MOSEK\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${COIN_HAS_MOSEK_TRUE}" && test -z "${COIN_HAS_MOSEK_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_MOSEK\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"COIN_HAS_MOSEK\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${IPOPT_IPM_SOLVER_TRUE}" && test -z "${IPOPT_IPM_SOLVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"IPOPT_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"IPOPT_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MOSEK_IPM_SOLVER_TRUE}" && test -z "${MOSEK_IPM_SOLVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MOSEK_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MOSEK_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CPLEX_IPM_SOLVER_TRUE}" && test -z "${CPLEX_IPM_SOLVER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CPLEX_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CPLEX_IPM_SOLVER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${COIN_HAS_SAMPLE_TRUE}" && test -z "${COIN_HAS_SAMPLE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_SAMPLE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -34917,55 +34369,6 @@ echo "$as_me: error: conditional \"COIN_HAS_LAPACK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${COIN_HAS_CPLEX_TRUE}" && test -z "${COIN_HAS_CPLEX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPLEX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"COIN_HAS_CPLEX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${COIN_HAS_CPLEX_TRUE}" && test -z "${COIN_HAS_CPLEX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPLEX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"COIN_HAS_CPLEX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${COIN_HAS_MOSEK_TRUE}" && test -z "${COIN_HAS_MOSEK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_MOSEK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"COIN_HAS_MOSEK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${COIN_HAS_MOSEK_TRUE}" && test -z "${COIN_HAS_MOSEK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_MOSEK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"COIN_HAS_MOSEK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${IPOPT_IPM_SOLVER_TRUE}" && test -z "${IPOPT_IPM_SOLVER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"IPOPT_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"IPOPT_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${MOSEK_IPM_SOLVER_TRUE}" && test -z "${MOSEK_IPM_SOLVER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MOSEK_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MOSEK_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${CPLEX_IPM_SOLVER_TRUE}" && test -z "${CPLEX_IPM_SOLVER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"CPLEX_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"CPLEX_IPM_SOLVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${COIN_HAS_DOXYGEN_TRUE}" && test -z "${COIN_HAS_DOXYGEN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -35705,6 +35108,30 @@ s,@OSIIPOPT_CFLAGS_INSTALLED@,$OSIIPOPT_CFLAGS_INSTALLED,;t t s,@OSIIPOPT_DATA_INSTALLED@,$OSIIPOPT_DATA_INSTALLED,;t t s,@COIN_HAS_OSIIPOPT_TRUE@,$COIN_HAS_OSIIPOPT_TRUE,;t t s,@COIN_HAS_OSIIPOPT_FALSE@,$COIN_HAS_OSIIPOPT_FALSE,;t t +s,@CPLEX_LIBS@,$CPLEX_LIBS,;t t +s,@CPLEX_CFLAGS@,$CPLEX_CFLAGS,;t t +s,@CPLEX_DATA@,$CPLEX_DATA,;t t +s,@CPLEX_DEPENDENCIES@,$CPLEX_DEPENDENCIES,;t t +s,@CPLEX_LIBS_INSTALLED@,$CPLEX_LIBS_INSTALLED,;t t +s,@CPLEX_CFLAGS_INSTALLED@,$CPLEX_CFLAGS_INSTALLED,;t t +s,@CPLEX_DATA_INSTALLED@,$CPLEX_DATA_INSTALLED,;t t +s,@COIN_HAS_CPLEX_TRUE@,$COIN_HAS_CPLEX_TRUE,;t t +s,@COIN_HAS_CPLEX_FALSE@,$COIN_HAS_CPLEX_FALSE,;t t +s,@MOSEK_LIBS@,$MOSEK_LIBS,;t t +s,@MOSEK_CFLAGS@,$MOSEK_CFLAGS,;t t +s,@MOSEK_DATA@,$MOSEK_DATA,;t t +s,@MOSEK_DEPENDENCIES@,$MOSEK_DEPENDENCIES,;t t +s,@MOSEK_LIBS_INSTALLED@,$MOSEK_LIBS_INSTALLED,;t t +s,@MOSEK_CFLAGS_INSTALLED@,$MOSEK_CFLAGS_INSTALLED,;t t +s,@MOSEK_DATA_INSTALLED@,$MOSEK_DATA_INSTALLED,;t t +s,@COIN_HAS_MOSEK_TRUE@,$COIN_HAS_MOSEK_TRUE,;t t +s,@COIN_HAS_MOSEK_FALSE@,$COIN_HAS_MOSEK_FALSE,;t t +s,@IPOPT_IPM_SOLVER_TRUE@,$IPOPT_IPM_SOLVER_TRUE,;t t +s,@IPOPT_IPM_SOLVER_FALSE@,$IPOPT_IPM_SOLVER_FALSE,;t t +s,@MOSEK_IPM_SOLVER_TRUE@,$MOSEK_IPM_SOLVER_TRUE,;t t +s,@MOSEK_IPM_SOLVER_FALSE@,$MOSEK_IPM_SOLVER_FALSE,;t t +s,@CPLEX_IPM_SOLVER_TRUE@,$CPLEX_IPM_SOLVER_TRUE,;t t +s,@CPLEX_IPM_SOLVER_FALSE@,$CPLEX_IPM_SOLVER_FALSE,;t t s,@SAMPLE_LIBS@,$SAMPLE_LIBS,;t t s,@SAMPLE_CFLAGS@,$SAMPLE_CFLAGS,;t t s,@SAMPLE_DATA@,$SAMPLE_DATA,;t t @@ -35733,30 +35160,6 @@ s,@LAPACK_CFLAGS_INSTALLED@,$LAPACK_CFLAGS_INSTALLED,;t t s,@LAPACK_DATA_INSTALLED@,$LAPACK_DATA_INSTALLED,;t t s,@COIN_HAS_LAPACK_TRUE@,$COIN_HAS_LAPACK_TRUE,;t t s,@COIN_HAS_LAPACK_FALSE@,$COIN_HAS_LAPACK_FALSE,;t t -s,@CPLEX_LIBS@,$CPLEX_LIBS,;t t -s,@CPLEX_CFLAGS@,$CPLEX_CFLAGS,;t t -s,@CPLEX_DATA@,$CPLEX_DATA,;t t -s,@CPLEX_DEPENDENCIES@,$CPLEX_DEPENDENCIES,;t t -s,@CPLEX_LIBS_INSTALLED@,$CPLEX_LIBS_INSTALLED,;t t -s,@CPLEX_CFLAGS_INSTALLED@,$CPLEX_CFLAGS_INSTALLED,;t t -s,@CPLEX_DATA_INSTALLED@,$CPLEX_DATA_INSTALLED,;t t -s,@COIN_HAS_CPLEX_TRUE@,$COIN_HAS_CPLEX_TRUE,;t t -s,@COIN_HAS_CPLEX_FALSE@,$COIN_HAS_CPLEX_FALSE,;t t -s,@MOSEK_LIBS@,$MOSEK_LIBS,;t t -s,@MOSEK_CFLAGS@,$MOSEK_CFLAGS,;t t -s,@MOSEK_DATA@,$MOSEK_DATA,;t t -s,@MOSEK_DEPENDENCIES@,$MOSEK_DEPENDENCIES,;t t -s,@MOSEK_LIBS_INSTALLED@,$MOSEK_LIBS_INSTALLED,;t t -s,@MOSEK_CFLAGS_INSTALLED@,$MOSEK_CFLAGS_INSTALLED,;t t -s,@MOSEK_DATA_INSTALLED@,$MOSEK_DATA_INSTALLED,;t t -s,@COIN_HAS_MOSEK_TRUE@,$COIN_HAS_MOSEK_TRUE,;t t -s,@COIN_HAS_MOSEK_FALSE@,$COIN_HAS_MOSEK_FALSE,;t t -s,@IPOPT_IPM_SOLVER_TRUE@,$IPOPT_IPM_SOLVER_TRUE,;t t -s,@IPOPT_IPM_SOLVER_FALSE@,$IPOPT_IPM_SOLVER_FALSE,;t t -s,@MOSEK_IPM_SOLVER_TRUE@,$MOSEK_IPM_SOLVER_TRUE,;t t -s,@MOSEK_IPM_SOLVER_FALSE@,$MOSEK_IPM_SOLVER_FALSE,;t t -s,@CPLEX_IPM_SOLVER_TRUE@,$CPLEX_IPM_SOLVER_TRUE,;t t -s,@CPLEX_IPM_SOLVER_FALSE@,$CPLEX_IPM_SOLVER_FALSE,;t t s,@CGLCONIC_SUBDIRS@,$CGLCONIC_SUBDIRS,;t t s,@CGLCONIC_SUBLIBS@,$CGLCONIC_SUBLIBS,;t t s,@coin_have_doxygen@,$coin_have_doxygen,;t t diff --git a/configure.ac b/configure.ac index 4bfc43a..f059955 100644 --- a/configure.ac +++ b/configure.ac @@ -53,10 +53,14 @@ AC_COIN_DEBUG_COMPILE(CglConic) # Get the name of the C++ compiler and appropriate compiler options AC_COIN_PROG_CXX +AC_LANG_PUSH(C++) # Initialize automake and libtool AC_COIN_INIT_AUTO_TOOLS +# Get the EXEXT variable for CYGWIN +AC_EXEEXT + ############################################################################# # COIN-OR components # ############################################################################# @@ -95,11 +99,6 @@ if test $coin_has_osiipopt != yes ; then AC_MSG_ERROR([Required package OsiIpopt is not available.]) fi -AC_COIN_CHECK_PACKAGE(Sample, [coindatasample]) - -AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib) -AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib) - ############################################################################# # Third party solvers # ############################################################################# @@ -108,16 +107,15 @@ AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib) AC_COIN_CHECK_PACKAGE(Cplex, [osicplex], [CglConicLib]) AC_COIN_CHECK_PACKAGE(Mosek, [osimosek], [CglConicLib]) - ############################################################################# # Check for IPM solver # ############################################################################# AC_MSG_CHECKING([for CglConic default IPM solver]) AC_ARG_WITH([ipm-solver], [AC_HELP_STRING([--with-ipm-solver@<:@=ipmsolver@:>@], - [specify the IPM solver in small - letters(default ipmsolver=ipopt)])], - [cglconic_ipm_solver=$withval],[cglconic_ipm_solver=ipopt]) + [specify the IPM solver in small + letters(default ipmsolver=ipopt)])], + [cglconic_ipm_solver=$withval],[cglconic_ipm_solver=ipopt]) found_package=true case $cglconic_ipm_solver in @@ -125,21 +123,21 @@ case $cglconic_ipm_solver in AC_MSG_RESULT(Ipopt) if [test $coin_has_osiipopt = unavailable || test $coin_has_osiipopt = skipping]; \ then - found_package=false + found_package=false fi ;; mosek) AC_MSG_RESULT(Mosek) if test $coin_has_mosek = false; \ then - found_package=false + found_package=false fi ;; cplex) AC_MSG_RESULT(Cplex) if test $coin_has_cplex = false; \ then - found_package=false + found_package=false fi ;; *) @@ -158,6 +156,11 @@ test $coin_has_mosek = yes]) AM_CONDITIONAL(CPLEX_IPM_SOLVER,[test $cglconic_ipm_solver = cplex && test $coin_has_cplex = yes]) +# Check thirdparty libraries +AC_COIN_CHECK_PACKAGE(Sample, [coindatasample]) +AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib) +AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib) + ############################################################################# # Solvers for unittesting # ############################################################################# @@ -217,7 +220,7 @@ AC_COIN_VPATH_LINK(examples/ex1.mps) # Check for doxygen # ############################################################################# -AC_COIN_DOXYGEN(CoinUtils Osi OsiConic Cgl) +AC_COIN_DOXYGEN(CoinUtils Osi OsiConic Cgl OsiIpopt) ############################################################################## # Finishing up by writing all the output # @@ -229,16 +232,16 @@ dnl AC_COIN_VPATH_LINK([test/CglTestData/capPlan1.mps test/CglTestData/l152lav.m # Here list all the files that configure should create (except for the # configuration header file) AC_CONFIG_FILES([Makefile - examples/Makefile - src/Makefile - src/CglConicGD1/Makefile - src/CglConicGD2/Makefile - src/CglConicMIR/Makefile - src/CglConicOA/Makefile - src/CglConicIPM/Makefile - src/CglConicIPMint/Makefile - cglconic.pc - cglconic-uninstalled.pc]) + examples/Makefile + src/Makefile + src/CglConicGD1/Makefile + src/CglConicGD2/Makefile + src/CglConicMIR/Makefile + src/CglConicOA/Makefile + src/CglConicIPM/Makefile + src/CglConicIPMint/Makefile + cglconic.pc + cglconic-uninstalled.pc]) AC_CONFIG_FILES([doxydoc/doxygen.conf]) # Here put the location and name of the configuration header file diff --git a/src/CglConicIPM/CglConicIPM.cpp b/src/CglConicIPM/CglConicIPM.cpp index e5d6e0d..1be8117 100644 --- a/src/CglConicIPM/CglConicIPM.cpp +++ b/src/CglConicIPM/CglConicIPM.cpp @@ -22,7 +22,7 @@ // use cplex as IPM solver #include typedef OsiCplexSolverInterface IPM_SOLVER; -#else +#elif defined(__OSI_IPOPT__) // use ipopt #include typedef OsiIpoptSolverInterface IPM_SOLVER; @@ -87,25 +87,25 @@ void CglConicIPM::setParam(CglConicIPMParam const & param) { // generate outer approximating hyperplanes for conic constraints // todo(aykut): approximates Lorentz cones only for now. void CglConicIPM::generateCuts(OsiConicSolverInterface const & si, - OsiCuts & cuts, - const CglTreeInfo info) { + OsiCuts & cuts, + const CglTreeInfo info) { // this function does nothing. } // generate cuts for a linear solver interface void CglConicIPM::generateCuts(OsiSolverInterface const & si, OsiCuts & cuts, - int num_cones, OsiLorentzConeType const * cone_type, - int const * cone_size, int const * const * members, - int num_points) { + int num_cones, OsiLorentzConeType const * cone_type, + int const * cone_size, int const * const * members, + int num_points) { method3(si, cuts, num_cones, cone_type, cone_size, members, num_points); } // optimize given SOCO. Find points around optimal solution and add cuts // on these points. void CglConicIPM::method1(OsiSolverInterface const & si, OsiCuts & cuts, - int num_cones, OsiLorentzConeType const * cone_type, - int const * cone_size, int const * const * members, - int num_points) { + int num_cones, OsiLorentzConeType const * cone_type, + int const * cone_size, int const * const * members, + int num_points) { // si solution double const * sol = si.getColSolution(); // unboundedness direction, if si is unbounded. @@ -116,7 +116,7 @@ void CglConicIPM::method1(OsiSolverInterface const & si, OsiCuts & cuts, if (si.isProvenPrimalInfeasible()) { // Both LP primal and dual is infeasible, conic problem is infeasible std::cerr << "CglConic: Conic problem is infeasible." - << std::endl; + << std::endl; } // get one ray // todo(aykut) for now we get only one ray @@ -127,10 +127,10 @@ void CglConicIPM::method1(OsiSolverInterface const & si, OsiCuts & cuts, } else { std::cerr << "CglConic: Warning! " - << "LP relaxation is unbounded but solver did not return a " - "direction of unboundedness." << std::endl - << "CglConic: Trying to generate supports using objective " - "function coefficients..." << std::endl; + << "LP relaxation is unbounded but solver did not return a " + "direction of unboundedness." << std::endl + << "CglConic: Trying to generate supports using objective " + "function coefficients..." << std::endl; vec = si.getObjCoefficients(); } int num_cols = si.getNumCols(); @@ -139,7 +139,7 @@ void CglConicIPM::method1(OsiSolverInterface const & si, OsiCuts & cuts, // delete all rays not just first one. if (!rays.empty()) { for(int i=0; i