From 634530fd35202c915142d3724d021fa5e4d7aa2c Mon Sep 17 00:00:00 2001 From: kanschat Date: Tue, 4 Sep 2007 04:19:05 +0000 Subject: [PATCH] new test for BLAS git-svn-id: https://svn.dealii.org/trunk@15114 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 104 ++++++++++++++++++++++++++++++++++++++++++- deal.II/configure.in | 7 +++ 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/deal.II/configure b/deal.II/configure index 0a78a1ae2f..77e732dc7f 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 15013 . +# From configure.in Revision: 15082 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for deal.II 6.0.pre. # @@ -12131,6 +12131,108 @@ fi fi; +if test "x$with_ blas" != "x" -a "x$with_blas" != "xno" ; then + echo "$as_me:$LINENO: checking for daxpy_" >&5 +echo $ECHO_N "checking for daxpy_... $ECHO_C" >&6 +if test "${ac_cv_func_daxpy_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define daxpy_ to an innocuous variant, in case declares daxpy_. + For example, HP-UX 11i declares gettimeofday. */ +#define daxpy_ innocuous_daxpy_ + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char daxpy_ (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef daxpy_ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char daxpy_ (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_daxpy_) || defined (__stub___daxpy_) +choke me +#else +char (*f) () = daxpy_; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != daxpy_; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_daxpy_=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_daxpy_=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_daxpy_" >&5 +echo "${ECHO_T}$ac_cv_func_daxpy_" >&6 +if test $ac_cv_func_daxpy_ = yes; then + : +else + { { echo "$as_me:$LINENO: error: BLAS library not installed correctly" >&5 +echo "$as_me: error: BLAS library not installed correctly" >&2;} + { (exit 1); exit 1; }; } +fi + +fi + + diff --git a/deal.II/configure.in b/deal.II/configure.in index e1284349db..18cd1f0af4 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -525,6 +525,13 @@ AC_ARG_WITH(lapack, argument is given, use -llapack. Default is not to use -llapack.], DEAL_II_WITH_LAPACK($withval)) + +dnl Finally check if BLAS is really there. We have to do it this way, since +dnl MAC OSX links BLAS functions in a different way +if test "x$with_ blas" != "x" -a "x$with_blas" != "xno" ; then + AC_CHECK_FUNC(daxpy_,,[AC_MSG_ERROR([BLAS library not installed correctly])]) +fi + AC_CHECK_FUNCS([dgemv_ sgemv_ dgeev_ sgeev_ dgeevx_ sgeevx_ dgesvd_ sgesvd_]) AC_CHECK_FUNCS([dgetrf_ sgetrf_ dgetrs_ sgetrs_ dstev_ sstev_]) -- 2.39.5