commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9213 - in gnuradio/branches/developers/nldudok1/gpgpu


From: nldudok1
Subject: [Commit-gnuradio] r9213 - in gnuradio/branches/developers/nldudok1/gpgpu-wip: . config
Date: Fri, 8 Aug 2008 11:06:23 -0600 (MDT)

Author: nldudok1
Date: 2008-08-08 11:06:23 -0600 (Fri, 08 Aug 2008)
New Revision: 9213

Added:
   gnuradio/branches/developers/nldudok1/gpgpu-wip/config/gr_cuda.m4
Modified:
   gnuradio/branches/developers/nldudok1/gpgpu-wip/configure.ac
Log:
add CUDA configure checks

Added: gnuradio/branches/developers/nldudok1/gpgpu-wip/config/gr_cuda.m4
===================================================================
--- gnuradio/branches/developers/nldudok1/gpgpu-wip/config/gr_cuda.m4           
                (rev 0)
+++ gnuradio/branches/developers/nldudok1/gpgpu-wip/config/gr_cuda.m4   
2008-08-08 17:06:23 UTC (rev 9213)
@@ -0,0 +1,71 @@
+# Check for CUDA support.             -*- Autoconf -*-
+
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+AC_DEFUN([GR_CUDA],
+[
+
+########################
+# Check for CUDASDK
+########################
+AC_ARG_WITH([cudasdk],
+    [  --with-cudasdk=PATH        prefix where cudasdk is installed 
[default=auto]])
+if test "x$with_cudasdk" != x; then
+  CUDASDK="$with_cudasdk"
+else
+  CUDASDK="/home/nldudok1/NVIDIA_CUDA_SDK-2.0"
+fi
+
+
+
+########################
+# Check for CUDA
+########################
+AC_ARG_WITH([cuda],
+    [  --with-cuda=PATH        prefix where cuda is installed [default=auto]])
+if test "x$with_cuda" != x; then
+  CUDA_CFLAGS="-I$with_cuda/include -I$CUDASDK/common/inc"
+  CUDA_LIBS=" -L$with_cuda/lib -L$CUDASDK/lib -L$CUDASDK/common/lib/linux 
-lcuda -lcudart -lcutil"
+  NVCC="$with_cuda/bin/nvcc"
+else
+  CUDA_CFLAGS="-I/usr/local/cuda-2.0/include -I$CUDASDK/common/inc"
+  CUDA_LIBS=" -L/usr/local/cuda-2.0/lib -L$CUDASDK/lib 
-L$CUDASDK/common/lib/linux -lcuda -lcudart -lcutil"
+  NVCC="nvcc"
+fi
+#NVCCFLAGS="-O2 -use_fast_math -I. 
-I/home/nldudok1/NVIDIA_CUDA_SDK-2.0/common/inc"
+
+NVCCFLAGS="-D_DEBUG -g -use_fast_math -I. -I$CUDASDK/common/inc"
+
+AC_SUBST(CUDASDK)
+AC_SUBST(CUDA_CFLAGS)
+AC_SUBST(CUDA_LIBS)
+AC_SUBST(NVCC)
+AC_SUBST(NVCCFLAGS)
+
+# Check for CUDA headers usability
+cuda_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $CUDA_CFLAGS"
+AC_CHECK_HEADERS([cuda_runtime.h], [],
+                       [])
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADERS([cutil.h], [],
+                       [],[])
+AC_LANG_POP
+CPPFLAGS="$cuda_save_CPPFLAGS"
+
+])

Modified: gnuradio/branches/developers/nldudok1/gpgpu-wip/configure.ac
===================================================================
--- gnuradio/branches/developers/nldudok1/gpgpu-wip/configure.ac        
2008-08-08 16:05:23 UTC (rev 9212)
+++ gnuradio/branches/developers/nldudok1/gpgpu-wip/configure.ac        
2008-08-08 17:06:23 UTC (rev 9213)
@@ -120,6 +120,9 @@
 dnl FIXME this is no longer mandatory.  Check the macro.
 GR_SYSV_SHM
 
+dnl Check for CUDA (optional)
+GR_CUDA
+
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT





reply via email to

[Prev in Thread] Current Thread [Next in Thread]