From: Raymond T. <rt...@us...> - 2012-03-10 17:24:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "matlisp". The branch, master has been updated via 6695b66525322e6817de899b467fb3505ec22775 (commit) via b4da181a45007d71d24371851089844b257e2fa8 (commit) from b4755e861709360bf208f0b9b479c388003274de (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6695b66525322e6817de899b467fb3505ec22775 Author: Raymond Toy <toy...@gm...> Date: Sat Mar 10 09:19:04 2012 -0800 Regenerated. diff --git a/configure b/configure index 0ea9407..0f6e275 100755 --- a/configure +++ b/configure @@ -15332,6 +15332,76 @@ else fi +# Check to see if the ATLAS libraries are compatible with matlisp's +# ffi. Basically the same test as above that checks to see if -ff2c +# is needed. + +if test x"$atlas" = xtrue; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ATLAS is compatible with matlisp's FFI" >&5 +$as_echo_n "checking if ATLAS is compatible with matlisp's FFI... " >&6; } + # From the value of f77_name, figure out the actual name for + # Fortran's zdotu. + case $f77_name in + F77*) case $f77_name in + F77_NAME) ZDOTU="ZDOTU" ;; + F77_NAME_) ZDOTU="ZDOTU_" ;; + F77_NAME__) ZDOTU="ZDOTU__" ;; + esac + ;; + f77*) case $f77_name in + f77_name) ZDOTU="zdotu" ;; + f77_name_) ZDOTU="zdotu_" ;; + f77_name__) ZDOTU="zdotu__" ;; + esac + ;; + esac + + cat > conftest.c <<EOF + +#include <stdio.h> +#include <math.h> + +extern void ${ZDOTU}(double *, int *, double *, int *, double *, int *); + +int main() +{ + int rc; + + int n = 2; + int incx = 1; + double x[4]; + double out[2]; + x[0] = 1; + x[1] = 0; + x[2] = 2; + x[3] = 0; + out[0] = 0; + out[1] = 0; + + ${ZDOTU}(out, &n, x, &incx, x, &incx); + + if (fabs(out[0] - 5) < 1e-10) { + rc = 0; + } else { + rc = 1; + } + + return rc; +} + +EOF + $CC $CFLAGS -c conftest.c + $F77 $FFLAGS -o a.out conftest.o -L${ATLAS_DIR} -latlas -lcblas -lf77blas -llapack + if a.out; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "ATLAS libraries are not compatible with matlisp." "$LINENO" 5 + fi +fi + echo FLIBS = $FLIBS echo HAVE_QL = $HAVE_QL cat >confcache <<\_ACEOF commit b4da181a45007d71d24371851089844b257e2fa8 Author: Raymond Toy <toy...@gm...> Date: Sat Mar 10 09:18:27 2012 -0800 Add check to see if ATLAS libraries are compatible with matlisp. diff --git a/configure.ac b/configure.ac index d501cb2..a5e5e1e 100644 --- a/configure.ac +++ b/configure.ac @@ -353,6 +353,73 @@ AC_HELP_STRING([--with-atlas=libpath], [Location of the ATLAS libraries]), ]) AM_CONDITIONAL([ATLAS], [test x$atlas = xtrue]) +# Check to see if the ATLAS libraries are compatible with matlisp's +# ffi. Basically the same test as above that checks to see if -ff2c +# is needed. + +if test x"$atlas" = xtrue; then + AC_MSG_CHECKING([if ATLAS is compatible with matlisp's FFI]) + # From the value of f77_name, figure out the actual name for + # Fortran's zdotu. + case $f77_name in + F77*) case $f77_name in + F77_NAME) ZDOTU="ZDOTU" ;; + F77_NAME_) ZDOTU="ZDOTU_" ;; + F77_NAME__) ZDOTU="ZDOTU__" ;; + esac + ;; + f77*) case $f77_name in + f77_name) ZDOTU="zdotu" ;; + f77_name_) ZDOTU="zdotu_" ;; + f77_name__) ZDOTU="zdotu__" ;; + esac + ;; + esac + + cat > conftest.c <<EOF +[ +#include <stdio.h> +#include <math.h> + +extern void ${ZDOTU}(double *, int *, double *, int *, double *, int *); + +int main() +{ + int rc; + + int n = 2; + int incx = 1; + double x[4]; + double out[2]; + x[0] = 1; + x[1] = 0; + x[2] = 2; + x[3] = 0; + out[0] = 0; + out[1] = 0; + + ${ZDOTU}(out, &n, x, &incx, x, &incx); + + if (fabs(out[0] - 5) < 1e-10) { + rc = 0; + } else { + rc = 1; + } + + return rc; +} +] +EOF + $CC $CFLAGS -c conftest.c + $F77 $FFLAGS -o a.out conftest.o -L${ATLAS_DIR} -latlas -lcblas -lf77blas -llapack + if a.out; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([ATLAS libraries are not compatible with matlisp.]) + fi +fi + echo FLIBS = $FLIBS echo HAVE_QL = $HAVE_QL AC_OUTPUT ----------------------------------------------------------------------- Summary of changes: configure | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 0 deletions(-) hooks/post-receive -- matlisp |