Mercurial > octave
comparison liboctave/util/oct-sparse.h @ 21160:b5b531ba93ce
build: Use configure-time test to check CXSparse version.
* configure.ac: Call OCTAVE_CHECK_CXSPARSE_VERSION_OK macro and error out of
configure if version is < 2.2.
* acinclude.m4 (OCTAVE_CHECK_CXSPARSE_VERSION_OK) : New macro.
* oct-sparse.h: Remove compie-time test for CXSparse version.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 30 Jan 2016 20:48:21 -0800 |
parents | 8ad3907b8fad |
children | 791dcb32b657 |
comparison
equal
deleted
inserted
replaced
21159:4aa8e4b868c9 | 21160:b5b531ba93ce |
---|---|
81 #include <cxsparse/cs.h> | 81 #include <cxsparse/cs.h> |
82 #elif defined (HAVE_CS_H) | 82 #elif defined (HAVE_CS_H) |
83 #include <cs.h> | 83 #include <cs.h> |
84 #endif | 84 #endif |
85 | 85 |
86 // Yes, it would be better to use a configure script check for | |
87 // required CXSparse features, but that seems more trouble than it is | |
88 // worth in this case. | |
89 | |
90 #if (defined (HAVE_CXSPARSE) \ | |
91 && (! defined (CS_VER) \ | |
92 || CS_VER < 2 \ | |
93 || (CS_VER == 2 && CS_SUBVER < 2))) | |
94 #error "Octave requires CXSparse version 2.2 or later" | |
95 #error "Upgrade CXSparse (SuiteSparse) or configure Octave with --disable-cxsparse" | |
96 #endif | |
97 | |
98 #if (defined (HAVE_SUITESPARSE_CHOLMOD_H) \ | 86 #if (defined (HAVE_SUITESPARSE_CHOLMOD_H) \ |
99 || defined (HAVE_UFSPARSE_CHOLMOD_H) \ | 87 || defined (HAVE_UFSPARSE_CHOLMOD_H) \ |
100 || defined (HAVE_CHOLMOD_CHOLMOD_H) \ | 88 || defined (HAVE_CHOLMOD_CHOLMOD_H) \ |
101 || defined (HAVE_CHOLMOD_H)) | 89 || defined (HAVE_CHOLMOD_H)) |
102 #if defined (ENABLE_64) | 90 #if defined (ENABLE_64) |
104 #else | 92 #else |
105 #define CHOLMOD_NAME(name) cholmod_ ## name | 93 #define CHOLMOD_NAME(name) cholmod_ ## name |
106 #endif | 94 #endif |
107 #endif | 95 #endif |
108 | 96 |
109 // Cope with new suitesparse versions | 97 // Cope with new SuiteSparse versions |
110 // | 98 |
111 #if defined (SUITESPARSE_VERSION) | 99 #if defined (SUITESPARSE_VERSION) |
112 # if SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3) | 100 # if SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3) |
113 # define SUITESPARSE_NAME(name) SuiteSparse_ ## name | 101 # define SUITESPARSE_NAME(name) SuiteSparse_ ## name |
114 # define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign) | 102 # define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign) |
115 # define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign)) | 103 # define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = SUITESPARSE_NAME (f_assign)) |