octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MSVC patch: CXSparse support for MSVC


From: Michael Goffioul
Subject: Re: MSVC patch: CXSparse support for MSVC
Date: Wed, 6 Jun 2007 09:58:48 +0200

On 6/6/07, John W. Eaton <address@hidden> wrote:
Octave's configure script has always cheated a bit and used C language
checks and then typically calls functions directly from C++.  A nice
small project for someone would be to determine which checks should
really be done with the C++ compiler and fix configure.in.

Actually, I made this patch when CXSparse didn't support C++ mode through
std::complex (with version 2.2.0, it's supported). You should be able to achieve
the same result by dropping the changes on aclocal.m4 and do the following
in configure.in

if test "$with_cxsparse" = yes; then
 with_cxsparse=no
 AC_CHECK_HEADERS([suitesparse/cs.h ufsparse/cs.h cxsparse/cs.h cs.h], [
   AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse";
with_cxsparse=yes])
   if test "$with_cxsparse" = no; then
     AC_LANG_PUSH(C++)
     AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse";
with_cxsparse=yes])
     AC_LANG_POP(C++)
   fi
   if test "$with_cxsparse" = yes; then
     AC_DEFINE(HAVE_CXSPARSE, 1, [Define if the CXSparse library is used.])
     warn_cxsparse=
   fi
   break])
fi

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]