Debian Codegraph @

easel/m4/esl_cuda.m4

raw
1 # ESL_CUDA([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2 #
3 # Attempts to locate a CUDA installation on the system and configure HMMER to build its CUDA accelerators.
4 # This function should be called after the base C compiler and its CFLAGS have been configured
5 #
6 # A typical ACTION-IF-FOUND might be:
7 # AC_DEFINE(HAVE_CUDA)
8 # NVCC = $esl_nvcc
9 # AC_SUBST(NVCC)
10 # CUDA_CFLAGS=$esl_CUDA_cflags
11 # AC_SUBST(CUDA_CFLAGS)
12 # A typical ACTION-IF-NOT-FOUND might be:
13 # NVCC = $CC
14 # AC_SUBST(NVCC)
15 # CUDA_CFLAGS = $CFLAGS
16 # AC_SUBST(CUDA_CFLAGS)
17 # This ACTION-IF-NOT-FOUND will tell the build system to build stubs for the functions that detect and
18 # configure the CUDA hardware at runtime such that HMMER will always think there is no CUDA hardware present
19
20 AC_DEFUN([ESL_CUDA],[
21 AC_MSG_CHECKING([whether we can compile CUDA acceleration])
22 esl_have_cuda=no
23
24 AC_PATH_PROG(esl_nvcc, "nvcc", "no", $PATH$PATH_SEPARATOR$cuda_path)
25
26 if test "$esl_nvcc" = "no"; then
27 esl_have_cuda=no
28 else
29 esl_have_cuda=yes
30 fi
31
32 AS_VAR_IF([esl_have_cuda],[yes],[$1],[$2])
33 ])