Changeset 2952 for trunk/m4/yat_cblas.m4


Ignore:
Timestamp:
Jan 11, 2013, 7:01:53 AM (9 years ago)
Author:
Peter
Message:

look for openblas. closes #716

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_cblas.m4

    r2919 r2952  
    11## $Id$
     2
     3#
     4# serial 1 (yat 0.11)
     5#
    26
    37# SYNOPSIS
     
    1620# COPYLEFT
    1721#
    18 #   Copyright (C) 2009, 2012 Peter Johansson
     22#   Copyright (C) 2009, 2012, 2013 Peter Johansson
    1923#
    2024#   This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3842#   written by Steven G. Johnson <stevenj@alum.mit.edu>
    3943
    40 #
    41 # serial 0
    42 #
    4344
    4445
    45 AC_DEFUN([YAT_LIB_CBLAS], [
     46AC_DEFUN([YAT_LIB_CBLAS],
     47[
    4648AC_PREREQ([2.60]) dnl we use AS_CASE
    4749yat_cblas_ok=no;
     
    7375# CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
    7476if test $yat_cblas_ok = no; then
    75   AC_SEARCH_LIBS([ATL_xerbla], [atlas], 
     77  AC_SEARCH_LIBS([ATL_xerbla], [atlas],
    7678                 [AC_SEARCH_LIBS([cblas_sgemm], [cblas],
    77                                  [yat_cblas_ok=yes; 
     79                                 [yat_cblas_ok=yes;
    7880                                  CBLAS_LIB="-lcblas -latlas"])])
    7981  LIBS=$save_LIBS;
     
    8486fi
    8587
     88# Openblas available from http://xianyi.github.com/OpenBLAS/
     89if test $yat_cblas_ok = no; then
     90  AC_CHECK_LIB([opencblas], [cblas_sgemm],
     91               [yat_cblas_ok=yes; CBLAS_LIB="-lopencblas";])
     92fi
     93
    8694# CBLAS in Intel MKL library?
    8795if test $yat_cblas_ok = no; then
    88   AC_CHECK_LIB([mkl_core], [cblas_sgemm], 
     96  AC_CHECK_LIB([mkl_core], [cblas_sgemm],
    8997               [acx_blas_ok=yes; CBLAS_LIBS="-lmkl_core"])
    9098fi
     
    95103fi
    96104
    97 # Eexecute ACTION-IF-FOUND or ACTION-IF-NOT-FOUND
    98 AS_IF([test x"$yat_cblas_ok" = xyes], 
     105# Execute ACTION-IF-FOUND or ACTION-IF-NOT-FOUND
     106AS_IF([test x"$yat_cblas_ok" = xyes],
    99107      [m4_default([$1], [:])],
    100108      [yat_cblas_ok=no; m4_default([$2], [:])])
Note: See TracChangeset for help on using the changeset viewer.