Adjust how cuda.h is found. It can be found in the with-cuda dir now.
This commit was SVN r28555.
Этот коммит содержится в:
родитель
a9aae9c538
Коммит
7771857991
@ -484,14 +484,14 @@ AC_DEFINE_UNQUOTED([OPAL_ENABLE_CRDEBUG], [0],
|
|||||||
[Whether we want checkpoint/restart enabled debugging functionality or not])
|
[Whether we want checkpoint/restart enabled debugging functionality or not])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check to see if user wants CUDA support in datatype and convertor code.
|
# Check to see if user wants CUDA support
|
||||||
#
|
#
|
||||||
AC_ARG_WITH([cuda],
|
AC_ARG_WITH([cuda],
|
||||||
[AC_HELP_STRING([--with-cuda(=DIR)],
|
[AC_HELP_STRING([--with-cuda(=DIR)],
|
||||||
[Build cuda support, optionally adding DIR/include])])
|
[Build cuda support, optionally adding DIR/include])])
|
||||||
AC_MSG_CHECKING([if --with-cuda is set])
|
AC_MSG_CHECKING([if --with-cuda is set])
|
||||||
|
|
||||||
# CUDA support is off by default. User has to request it.
|
# CUDA support is off by default. User has to request it. Look for cuda.h file.
|
||||||
AS_IF([test "$with_cuda" = "no" -o "x$with_cuda" = "x"],
|
AS_IF([test "$with_cuda" = "no" -o "x$with_cuda" = "x"],
|
||||||
[opal_check_cuda_happy="no"
|
[opal_check_cuda_happy="no"
|
||||||
AC_MSG_RESULT([not set (--with-cuda=$with_cuda)])],
|
AC_MSG_RESULT([not set (--with-cuda=$with_cuda)])],
|
||||||
@ -502,29 +502,34 @@ AS_IF([test "$with_cuda" = "no" -o "x$with_cuda" = "x"],
|
|||||||
AC_MSG_ERROR([Cannot continue])],
|
AC_MSG_ERROR([Cannot continue])],
|
||||||
[AC_MSG_RESULT([found])
|
[AC_MSG_RESULT([found])
|
||||||
opal_check_cuda_happy="yes"
|
opal_check_cuda_happy="yes"
|
||||||
with_cuda="/usr/local/cuda"])],
|
with_cuda="/usr/local/cuda/include"])],
|
||||||
[AS_IF([test ! -d "$with_cuda"],
|
[AS_IF([test ! -d "$with_cuda"],
|
||||||
[AC_MSG_RESULT([not found])
|
[AC_MSG_RESULT([not found])
|
||||||
AC_MSG_WARN([Directory $with_cuda not found])
|
AC_MSG_WARN([Directory $with_cuda not found])
|
||||||
AC_MSG_ERROR([Cannot continue])],
|
AC_MSG_ERROR([Cannot continue])],
|
||||||
[AS_IF([test "x`ls $with_cuda/include/cuda.h 2> /dev/null`" = "x"],
|
[AS_IF([test "x`ls $with_cuda/include/cuda.h 2> /dev/null`" = "x"],
|
||||||
[AC_MSG_RESULT([not found])
|
[AS_IF([test "x`ls $with_cuda/cuda.h 2> /dev/null`" = "x"],
|
||||||
AC_MSG_WARN([Expected file $with_cuda/include/cuda.h not found])
|
[AC_MSG_RESULT([not found])
|
||||||
AC_MSG_ERROR([Cannot continue])],
|
AC_MSG_WARN([Could not find cuda.h in $with_cuda/include or $with_cuda])
|
||||||
|
AC_MSG_ERROR([Cannot continue])],
|
||||||
|
[opal_check_cuda_happy="yes"
|
||||||
|
with_cuda="$with_cuda"
|
||||||
|
AC_MSG_RESULT([found ($with_cuda/cuda.h)])])],
|
||||||
[opal_check_cuda_happy="yes"
|
[opal_check_cuda_happy="yes"
|
||||||
AC_MSG_RESULT([found ($with_cuda/include/cuda.h)])])])])])
|
with_cuda="$with_cuda/include"
|
||||||
|
AC_MSG_RESULT([found ($with_cuda/cuda.h)])])])])])
|
||||||
|
|
||||||
# If we have CUDA support, check to see if we have CUDA 4.1 support
|
# If we have CUDA support, check to see if we have CUDA 4.1 support
|
||||||
AS_IF([test "$opal_check_cuda_happy"="yes"],
|
AS_IF([test "$opal_check_cuda_happy"="yes"],
|
||||||
AC_CHECK_MEMBER([struct CUipcMemHandle_st.reserved], [CUDA_SUPPORT_41=1], [CUDA_SUPPORT_41=0],
|
AC_CHECK_MEMBER([struct CUipcMemHandle_st.reserved], [CUDA_SUPPORT_41=1], [CUDA_SUPPORT_41=0],
|
||||||
[#include <$with_cuda/include/cuda.h>]),
|
[#include <$with_cuda/cuda.h>]),
|
||||||
[])
|
[])
|
||||||
|
|
||||||
AC_MSG_CHECKING([if have cuda support])
|
AC_MSG_CHECKING([if have cuda support])
|
||||||
if test "$opal_check_cuda_happy" = "yes"; then
|
if test "$opal_check_cuda_happy" = "yes"; then
|
||||||
AC_MSG_RESULT([yes (-I$with_cuda/include)])
|
AC_MSG_RESULT([yes (-I$with_cuda)])
|
||||||
CUDA_SUPPORT=1
|
CUDA_SUPPORT=1
|
||||||
opal_datatype_cuda_CPPFLAGS="-I$with_cuda/include"
|
opal_datatype_cuda_CPPFLAGS="-I$with_cuda"
|
||||||
AC_SUBST([opal_datatype_cuda_CPPFLAGS])
|
AC_SUBST([opal_datatype_cuda_CPPFLAGS])
|
||||||
AC_SUBST([opal_datatype_cuda_LIBS])
|
AC_SUBST([opal_datatype_cuda_LIBS])
|
||||||
else
|
else
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user