aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2009-01-15 11:44:21 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2009-01-15 11:44:21 +0000
commit091c300de876434ade340f1079f7bfb377539d75 (patch)
tree29a44a2995b4ec303f4e7470daa318a14488f882 /src
parent5af5a54db6b83c77a521d7602f454efb9d723bdc (diff)
considered dependency of [mtx_eig] for complex eigenvalues on recent gsl versions
svn path=/trunk/externals/iem/iemmatrix/; revision=10558
Diffstat (limited to 'src')
-rw-r--r--src/config.h.in4
-rw-r--r--src/configure.ac2
-rw-r--r--src/mtx_eig.c10
3 files changed, 10 insertions, 6 deletions
diff --git a/src/config.h.in b/src/config.h.in
index ce9d7bf..116d8ce 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -10,5 +10,9 @@
/* do we have libgsl installed? */
#undef HAVE_LIBGSL
+/* can libgsl compute complex eigenvalues? */
+#undef HAVE_GSL_EIGEN_NONSYMM
+
+
#endif /* CONFIG_H_ */
diff --git a/src/configure.ac b/src/configure.ac
index 9382701..4849757 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -76,7 +76,7 @@ dnl for gnu scientific library -lgsl:
dnl AC_CHECK_LIB([m], [cos])
AC_CHECK_LIB([gslcblas], [cblas_dgemm])
AC_CHECK_LIB([gsl], [gsl_blas_dgemm])
-AC_CHECK_FUNCS([gsl], [gsl_eigen_nonsymm], )
+AC_CHECK_LIB([gsl], [gsl_eigen_nonsymm],AC_DEFINE(HAVE_GSL_EIGEN_NONSYMM,1,[can gsl compute complex eigenvalues?]))
if test "x$with_pd" != "x"; then
diff --git a/src/mtx_eig.c b/src/mtx_eig.c
index 5878078..1ab90c9 100644
--- a/src/mtx_eig.c
+++ b/src/mtx_eig.c
@@ -26,7 +26,7 @@ typedef struct _MTXEig_ MTXEig;
struct _MTXEig_
{
t_object x_obj;
-#ifdef HAVE_LIBGSL_EIGEN_NONSYMM
+#ifdef HAVE_GSL_EIGEN_NONSYMM
gsl_matrix *a;
gsl_matrix_complex *q;
gsl_vector_complex *l;
@@ -45,7 +45,7 @@ struct _MTXEig_
enum WithEigenVectors withevs;
};
-#ifdef HAVE_LIBGSL_EIGEN_NONSYMM
+#ifdef HAVE_GSL_EIGEN_NONSYMM
static void allocMTXqlw (MTXEig *x)
{
x->a=(gsl_matrix*)gsl_matrix_alloc(x->size,x->size);
@@ -103,7 +103,7 @@ static void deleteMTXqlw (MTXEig *x)
static void deleteMTXEig (MTXEig *x)
{
-#ifdef HAVE_LIBGSL_EIGEN_NONSYMM
+#ifdef HAVE_GSL_EIGEN_NONSYMM
deleteMTXqlw(x);
#endif
}
@@ -124,7 +124,7 @@ static void *newMTXEig (t_symbol *s, int argc, t_atom *argv)
x->list_l_im = 0;
x->list_q_re = 0;
x->list_q_im = 0;
-#ifdef HAVE_LIBGSL_EIGEN_NONSYMM
+#ifdef HAVE_GSL_EIGEN_NONSYMM
x->a=0;
x->q=0;
x->l=0;
@@ -159,7 +159,7 @@ static void mTXEigMatrix (MTXEig *x, t_symbol *s,
int n,m;
float f;
-#ifdef HAVE_LIBGSL_EIGEN_NONSYMM
+#ifdef HAVE_GSL_EIGEN_NONSYMM
gsl_complex c;
/* size check */
if (!size)