Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/configure.ac
ViewVC logotype

Diff of /branches/pure-cfg/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1215, Sat May 14 05:54:07 2011 UTC revision 1288, Tue Jun 7 13:50:39 2011 UTC
# Line 49  Line 49 
49  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
50    
51  dnl  dnl
52    dnl check for pthreads support
53    dnl
54    ACX_PTHREAD()
55    
56    dnl
57  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
58  dnl  dnl
59  AC_MSG_NOTICE([checking for CUDA and nvcc])  AC_MSG_NOTICE([checking for CUDA and nvcc])
# Line 67  Line 72 
72  dnl  dnl
73  dnl check for OpenCL support  dnl check for OpenCL support
74  dnl  dnl
75  OPENCL_LIBS="none"  CL_LIBS="none"
76  case "$host_os" in  case "$host_os" in
77    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
78      AX_CHECK_FRAMEWORK([OpenCL], [OPENCL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])
79    ;;    ;;
80    *)    *)
81      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[OPENCL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])
82    ;;    ;;
83  esac  esac
84  if test x"$OPENCL_LIBS" = xnone ; then  if test x"$CL_LIBS" = xnone ; then
85    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
86    OPENCL_ENABLED=false    CL_ENABLED=false
87      CL_VERSION=0
88  else  else
89    OPENCL_ENABLED=true    CL_ENABLED=true
90    AC_SUBST(OPENCL_LIBS)    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
91      # check the cl.h header for which version of OpenCL is supported
92      AC_LANG([C])
93      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
94    #include <stdio.h>
95    # ifdef HAVE_CL_CL_H
96    #   include <CL/cl.h>
97    # elif defined(HAVE_OPENCL_CL_H)
98    #   include <OpenCL/cl.h>
99    # else
100    #   error no cl.h
101    # endif]],
102    [[#if defined(CL_VERSION_1_1)
103      printf("11000\n");
104    #elif defined(CL_VERSION_1_0)
105      printf("10000\n");
106    #else
107      printf("0\n");
108    #endif
109        ]])],
110        [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
111      # substitutions
112      AC_SUBST(CL_LIBS)
113  fi  fi
114  AC_SUBST(OPENCL_ENABLED)  AC_SUBST(CL_ENABLED)
115    AC_SUBST(CL_VERSION)
 dnl  
 dnl check for pthreads support  
 dnl  
 ACX_PTHREAD()  
116    
117  dnl  dnl
118  dnl check for various library routines etc.  dnl check for various library routines etc.
# Line 103  Line 127 
127    
128  AC_CHECK_FUNCS(mach_absolute_time)  AC_CHECK_FUNCS(mach_absolute_time)
129  AC_CHECK_TYPES([struct timespec])  AC_CHECK_TYPES([struct timespec])
130    AC_CHECK_FUNCS(pthread_barrier_init)
131    
132  dnl  dnl
133  dnl check for clock_gettime.  On Linux, this requires librt.  dnl check for clock_gettime.  On Linux, this requires librt.
# Line 153  Line 178 
178  dnl check for Linux NUMA support (libnuma)  dnl check for Linux NUMA support (libnuma)
179  dnl  dnl
180  AC_CHECK_LIB(numa,numa_available)  AC_CHECK_LIB(numa,numa_available)
181    if test "$ac_cv_lib_numa_numa_available" = "yes" ; then
182      PTHREAD_LIBS="$PTHREAD_LIBS -lnuma"
183    fi
184    
185  dnl check for /proc/cpuinfo  dnl check for /proc/cpuinfo
186  dnl  dnl
# Line 313  Line 341 
341  dnl  dnl
342  dnl ******************** config.h stuff ********************  dnl ******************** config.h stuff ********************
343  dnl  dnl
344    
345    AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files])
346    
347  AH_TOP([  AH_TOP([
348  /*  /*
349   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)
# Line 336  Line 367 
367  dnl  dnl
368  dnl ***** Makefiles *****  dnl ***** Makefiles *****
369    Makefile    Makefile
370      src/clinfo/Makefile
371    src/dnorm/Makefile    src/dnorm/Makefile
372    src/compiler/Makefile    src/compiler/Makefile
373    src/lib/build/Makefile    src/lib/build/Makefile
# Line 377  Line 409 
409      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
410    ])    ])
411    
412  MK_BUILD_DIR(rt-c-f, c-target, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
413  MK_BUILD_DIR(rt-c-f-debug, c-target, [float debug])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
414  MK_BUILD_DIR(rt-c-f-par, parallel-target, [parallel float])  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
415  MK_BUILD_DIR(rt-c-f-par-debug, parallel-target, [parallel float debug])  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
416    
417    if test x"$CL_ENABLED" = xtrue ; then
418      MK_BUILD_DIR(rt-cl-f, cl, [float])
419      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
420    fi
421    
422  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1215  
changed lines
  Added in v.1288

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0