aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/configure.ac3
-rw-r--r--src/mtx_bessel.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac
index e78e9b2..0861866 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -74,6 +74,9 @@ AC_CHECK_LIB([gslcblas], [cblas_dgemm])
AC_CHECK_LIB([gsl], [gsl_blas_dgemm])
AC_CHECK_LIB([gsl], [gsl_eigen_nonsymm],AC_DEFINE(HAVE_GSL_EIGEN_NONSYMM,1,[can gsl compute complex eigenvalues?]))
+dnl for math.h Bessel/Neumann functions
+AC_CHECK_LIB([math], [jnf],AC_DEFINE(HAVE_MATH_BESSEL,1,[can math compute Bessel functions?]))
+
if test "x$with_pd" != "x"; then
if test -d "${with_pd}/src"; then
diff --git a/src/mtx_bessel.c b/src/mtx_bessel.c
index 77ac9ea..f17342f 100644
--- a/src/mtx_bessel.c
+++ b/src/mtx_bessel.c
@@ -121,6 +121,8 @@ static void mTXBesselMatrix (MTXBessel *x, t_symbol *s,
int n,m,ofs;
+#ifdef HAVE_MATH_BESSEL
+
/* size check */
if (!size)
post("mtx_bessel: invalid dimensions");
@@ -165,6 +167,10 @@ static void mTXBesselMatrix (MTXBessel *x, t_symbol *s,
mTXBesselBang(x);
}
+
+#else
+ post("mtx_bessel: implementation requires math.h that implements jnf and ynf Bessel functions");
+#endif
}
void mtx_bessel_setup (void)