Skip to content
Snippets Groups Projects
Commit 6a882e2e authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

removed blas.m4 because conflicting with better blas check ACX_BLAS.

[[Imported from SVN: r4856]]
parent 6f1cbcf2
No related branches found
No related tags found
No related merge requests found
# $Id$
ALLM4S = acx_blas.m4 acx_mpi.m4 acx_pthread.m4 alberta.m4 alugrid.m4 \
ax_check_gl.m4 ax_lang_compiler_ms.m4 blas.m4 dune_all.m4 \
ax_check_gl.m4 ax_lang_compiler_ms.m4 dune_all.m4 \
dune_amira.m4 dune_compiler.m4 dune_deprecated.m4 dune_griddim.m4 \
dune_exprtmpl.m4 dune_linkcxx.m4 dune.m4 dune_mpi.m4 \
dune_psurface.m4 dune_streams.m4 f5.m4 fortran_overwrite.m4 grape.m4 hdf5.m4 \
......
# $Id$
# searches for blas header and libs
AC_DEFUN([DUNE_PATH_BLAS],[
AC_REQUIRE([AC_PROG_CC])
AC_ARG_ENABLE(blas,
AC_HELP_STRING([--enable-blas], [enable use of BLAS Library (default is disabled)]),
[case "$enableval" in
yes)
AC_SUBST(HAVE_BLAS, "1")
m4_bpatsubst([blas],-,_)_ENABLE=yes
;;
no)
AC_SUBST(HAVE_BLAS, "0")
m4_bpatsubst([blas],-,_)_ENABLE=yes
;;
*)
;;
esac])
AC_ARG_WITH(blas,
AC_HELP_STRING([--with-blas-lib=PATH],[directory with BLAS Library inside (default=/usr/lib)]) )
# also ask for elindex
# store old values
ac_save_LDFLAGS="$LDFLAGS"
ac_save_LIBS="$LIBS"
LIBS=""
# skip tests if --without-blas is used
if test x$with_blas != xno ; then
# is --with-blas=bla used?
if test x$with_blas_lib != x ; then
if test -d $with_blas; then
# expand tilde / other stuff
BLASROOT=`cd $with_blas_lib && pwd`
else
AC_MSG_ERROR([directory $with_blas does not exist])
fi
else
# use some default value...
BLASROOT="/usr/lib"
fi
BLAS_LIB_PATH="$BLASROOT"
# set variables so that tests can use them
LDFLAGS="$LDFLAGS -L$BLAS_LIB_PATH"
# no header check for blas, because no headers found
AC_LANG_PUSH([Fortran 77])
if test x$HAVE_BLAS = x1 ; then
AC_CHECK_LIB(blas, [dnrm2],
[BLAS_LIBS="-lblas"
BLAS_LDFLAGS="-L$BLAS_LIB_PATH"
AC_DEFINE(HAVE_LIBBLAS, 1, [Define to 1 if you have libblas])],
[AC_MSG_ERROR([Required BLAS library was not found])])
fi
AC_LANG_POP([Fortran 77])
# if g2c is found add to libs too
if test x$HAVE_BLAS = x1 ; then
AC_CHECK_LIB(g2c, [main],
[BLAS_LIBS="$BLAS_LIBS -lg2c"],
[])
fi
# end of checks (can be skipped with --without-blas)
fi
# survived all tests?
if test x$HAVE_BLAS = x1 ; then
AC_SUBST(BLAS_LIBS, $BLAS_LIBS)
AC_SUBST(BLAS_LDFLAGS, $BLAS_LDFLAGS)
AC_SUBST(BLAS_CPPFLAGS, $BLAS_CPPFLAGS)
AC_DEFINE(HAVE_BLAS, 1, [Define to 1 if blas-library is found])
# add to global list
DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $BLAS_LDFLAGS"
DUNE_PKG_LIBS="$DUNE_PKG_LIBS $BLAS_LIBS"
# set variable for summary
with_blas="yes"
else
AC_SUBST(BLAS_LIBS, "")
AC_SUBST(BLAS_LDFLAGS, "")
# set variable for summary
with_blas="no"
fi
# also tell automake
AM_CONDITIONAL(BLAS, test x$HAVE_BLAS = x1)
# reset old values
LIBS="$ac_save_LIBS"
LDFLAGS="$ac_save_LDFLAGS"
])
......@@ -99,7 +99,6 @@ AC_SUBST(DUNEWEBDIR, $with_duneweb)
AC_REQUIRE([DUNE_GRID_DIMENSION])
AC_REQUIRE([DUNE_PATH_GRAPE])
AC_REQUIRE([DUNE_PATH_ALBERTA])
AC_REQUIRE([DUNE_PATH_BLAS])
AC_REQUIRE([DUNE_PATH_UG])
AC_REQUIRE([DUNE_PATH_AMIRAMESH])
AC_REQUIRE([DUNE_PATH_PSURFACE])
......@@ -150,7 +149,7 @@ AC_DEFUN([DUNE_SUMMARY_ALL],[
echo "ALBERTA..........: $with_alberta"
echo "ALUGrid..........: $with_alugrid"
echo "AmiraMesh........: $with_amiramesh"
echo "BLAS-lib.........: $with_blas"
echo "BLAS.............: $acx_blas_ok"
echo "Grape............: $with_grape"
echo "HDF5.............: $with_hdf5"
# echo "FiberHDF5........: $with_f5"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment