diff configure.in @ 7683:8136cb19fb7a

implement BLAS-F77 call compatibility check
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 02 Apr 2008 14:30:49 -0400
parents 2df457529cfa
children 82be108cc558
line wrap: on
line diff
--- a/configure.in	Tue Apr 01 00:29:51 2008 -0400
+++ b/configure.in	Wed Apr 02 14:30:49 2008 -0400
@@ -723,14 +723,19 @@
 
 ### Checks for BLAS and LAPACK libraries:
 # (Build subdirectories of libcruft if they aren't found on the system.)
-
 sinclude(acx_blas.m4)
+sinclude(acx_blas_f77_func.m4)
 sinclude(acx_lapack.m4)
-ACX_BLAS([], [BLAS_DIR="blas"])
+ACX_BLAS_WITH_F77_FUNC([], [BLAS_DIR="blas"])
 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"])
 AC_SUBST(BLAS_DIR)
 AC_SUBST(LAPACK_DIR)
 
+if test "x$acx_blas_f77_func_ok" = "xno"; then
+  warn_blas_f77_incompatible="A BLAS library was detected but found incompatible with your Fortran 77 compiler.  The reference BLAS implementation will be used. To improve performance, consider using a different Fortran compiler or a switch like -ff2c to make your Fortran compiler use a calling convention compatible with the way your BLAS library was compiled, or use a different BLAS library."
+  AC_MSG_WARN($warn_blas_f77_incompatible)
+fi
+
 # Check for AMD library
 AMD_LIBS=
 AC_SUBST(AMD_LIBS)
@@ -1963,6 +1968,11 @@
   warn_msg_printed=true
 fi
 
+if test -n "$warn_blas_f77_incompatible"; then
+  AC_MSG_WARN($warn_blas_f77_incompatible)
+  warn_msg_printed=true
+fi
+
 if test -n "$warn_umfpack"; then
   AC_MSG_WARN($warn_umfpack)
   warn_msg_printed=true