[cig-commits] r18418 - short/3D/PyLith/trunk

brad at geodynamics.org brad at geodynamics.org
Sun May 22 07:11:05 PDT 2011


Author: brad
Date: 2011-05-22 07:11:05 -0700 (Sun, 22 May 2011)
New Revision: 18418

Modified:
   short/3D/PyLith/trunk/configure.ac
Log:
Updated cuda checks.

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2011-05-22 14:10:03 UTC (rev 18417)
+++ short/3D/PyLith/trunk/configure.ac	2011-05-22 14:11:05 UTC (rev 18418)
@@ -81,9 +81,11 @@
 AC_ARG_ENABLE([hdf5],
     [AC_HELP_STRING([--enable-hdf5],
         [enable output to HDF5 files via PETSc @<:@default=no@:>@])],
-	[enable_hdf5=yes
-	CPPFLAGS="-DENABLE_HDF5 $CPPFLAGS"; export CPPFLAGS
-	PYLITH_SWIG_CPPFLAGS="-DENABLE_HDF5 $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS],
+	[if test "$enableval" = yes; then
+          enable_hdf5=yes
+	  CPPFLAGS="-DENABLE_HDF5 $CPPFLAGS"; export CPPFLAGS
+	  PYLITH_SWIG_CPPFLAGS="-DENABLE_HDF5 $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS
+          else enable_hdf5=no; fi],
 	[enable_hdf5=no])
 AM_CONDITIONAL([ENABLE_HDF5], [test "$enable_hdf5" = yes])
 
@@ -91,9 +93,11 @@
 AC_ARG_ENABLE([cuda],
     [AC_HELP_STRING([--enable-cuda],
         [enable use of CUDA @<:@default=no@:>@])],
-	[enable_cuda=yes
-	CPPFLAGS="-DENABLE_CUDA $CPPFLAGS"; export CPPFLAGS
-	PYLITH_SWIG_CPPFLAGS="-DENABLE_CUDA $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS],
+	[if test "$enable_cuda" = yes; then
+          enable_cuda=yes
+          CPPFLAGS="-DENABLE_CUDA $CPPFLAGS"; export CPPFLAGS
+	  PYLITH_SWIG_CPPFLAGS="-DENABLE_CUDA $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS
+          else enable_cuda=no; fi],
 	[enable_cuda=no])
 AM_CONDITIONAL([ENABLE_CUDA], [test "$enable_cuda" = yes])
 
@@ -218,22 +222,9 @@
 
 # CUDA
 if test "$enable_cuda" = "yes" ; then
-  AC_REQUIRE_CPP
-  AC_LANG(C++)
-  cuda_save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$PETSC_CC_INCLUDES $PETSC_CXX_INCLUDE $CPPFLAGS"
-  AC_CHECK_HEADER([cuda_runtime.h], [], [
-    AC_MSG_ERROR([CUDA runtime header not found.])
-  ])
-  #AC_MSG_CHECKING([for ?? in -lcuda])
-  #AC_COMPILE_IFELSE(
-  #  [AC_LANG_PROGRAM([[#include <cuda_runtime.h>]],
-  #	             [[H5Fopen("test.h5", H5F_ACC_TRUNC, H5P_DEFAULT);]])],
-  #  [AC_MSG_RESULT(yes)],
-  #  [AC_MSG_RESULT(no)
-  #   AC_MSG_ERROR([cuda library not found.])
-  #])
-  CPPFLAGS=$cuda_save_CPPFLAGS
+  CIT_PYTHON_MODULE([pycuda])
+  CIT_CUDA_INCDIR
+  CIT_CUDA_LIB
 fi
 
 # PROJ4



More information about the CIG-COMMITS mailing list