changeset 6719:30e1320bb0ee

[project @ 2007-06-13 22:22:51 by dbateman]
author dbateman
date Wed, 13 Jun 2007 22:22:52 +0000
parents 509469a21cde
children fa2f5d4e55db
files ChangeLog configure.in liboctave/ChangeLog liboctave/SparseCmplxQR.cc
diffstat 4 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 13 21:17:39 2007 +0000
+++ b/ChangeLog	Wed Jun 13 22:22:52 2007 +0000
@@ -1,5 +1,6 @@
 2007-06-13  Michael Goffioul  <michael.goffioul@swing.be>
 
+	* configure.in: Check for CXSparse with C++.
 	* Makeconf.in (do-subst-config-vals): Also substitute ${libdir} as
 	OCTAVE_CONF_LIBDIR.
 	* mkoctfile.in: Set DEFAULT_LIBDIR and substitute OCTAVE_HOME.
--- a/configure.in	Wed Jun 13 21:17:39 2007 +0000
+++ b/configure.in	Wed Jun 13 22:22:52 2007 +0000
@@ -29,7 +29,7 @@
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
 AC_INIT
-AC_REVISION($Revision: 1.566 $)
+AC_REVISION($Revision: 1.567 $)
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
@@ -995,6 +995,7 @@
 warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices."
 if test "$with_cxsparse" = yes; then
   with_cxsparse=no
+  AC_LANG_PUSH(C++)
   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" = yes; then
@@ -1002,6 +1003,7 @@
       warn_cxsparse=
     fi
     break])
+  AC_LANG_POP(C++)
 fi
 if test -n "$warn_cxsparse"; then
   AC_MSG_WARN($warn_cxsparse)
--- a/liboctave/ChangeLog	Wed Jun 13 21:17:39 2007 +0000
+++ b/liboctave/ChangeLog	Wed Jun 13 22:22:52 2007 +0000
@@ -1,5 +1,8 @@
 2007-06-13  Michael Goffioul  <michael.goffioul@swing.be>
 
+	* SparseCmplxQR.cc (OCTAVE_C99_ZERO): For CXSparse 2.2 and greater
+	use cs_complex_t(0,0) for the complex zero.
+
 	* MArray-ch.cc, MArray-d.cc, MArray-i.cc, MArray-s.cc:
 	Sprinkle class instantiations with OCTAVE_API as needed.
 
--- a/liboctave/SparseCmplxQR.cc	Wed Jun 13 21:17:39 2007 +0000
+++ b/liboctave/SparseCmplxQR.cc	Wed Jun 13 22:22:52 2007 +0000
@@ -37,13 +37,13 @@
   OCTAVE_LOCAL_BUFFER (double, buf ## tmp, (2 * (n))); \
   cs_complex_t *buf = reinterpret_cast<cs_complex_t *> (buf ## tmp);
 
+#define OCTAVE_C99_ZERO (0. + 0.iF)
 #else
 #define OCTAVE_C99_COMPLEX(buf, n) \
   OCTAVE_LOCAL_BUFFER (cs_complex_t, buf, (n));
+#define OCTAVE_C99_ZERO cs_complex_t(0., 0.);
 #endif
 
-#define OCTAVE_C99_ZERO (0. + 0.iF)
-
 SparseComplexQR::SparseComplexQR_rep::SparseComplexQR_rep 
 (GCC_ATTR_UNUSED const SparseComplexMatrix& a, GCC_ATTR_UNUSED int order)
 {