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 1217, Sat May 14 06:14:31 2011 UTC revision 1356, Tue Jun 21 03:52:02 2011 UTC
# Line 43  Line 43 
43    
44  dnl extra C compiler options  dnl extra C compiler options
45  dnl  dnl
46    CFLAGS=""
47  CFLAG_M64="-m64"  CFLAG_M64="-m64"
48  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
49  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_M64)
50  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
51    
52  dnl  dnl
53    dnl check for pthreads support
54    dnl
55    ACX_PTHREAD()
56    
57    dnl
58  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
59  dnl  dnl
60  AC_MSG_NOTICE([checking for CUDA and nvcc])  AC_MSG_NOTICE([checking for CUDA and nvcc])
# Line 67  Line 73 
73  dnl  dnl
74  dnl check for OpenCL support  dnl check for OpenCL support
75  dnl  dnl
76  OPENCL_LIBS="none"  CL_LIBS="none"
77  case "$host_os" in  case "$host_os" in
78    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
79      AX_CHECK_FRAMEWORK([OpenCL], [OPENCL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])
80    ;;    ;;
81    *)    *)
82      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[OPENCL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])
83    ;;    ;;
84  esac  esac
85  if test x"$OPENCL_LIBS" = xnone ; then  if test x"$CL_LIBS" = xnone ; then
86    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
87    OPENCL_ENABLED=false    CL_ENABLED=false
88      CL_VERSION=0
89  else  else
90    OPENCL_ENABLED=true    CL_ENABLED=true
91    AC_SUBST(OPENCL_LIBS)    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
92      # check the cl.h header for which version of OpenCL is supported
93      AC_LANG([C])
94      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
95    #include <stdio.h>
96    # ifdef HAVE_CL_CL_H
97    #   include <CL/cl.h>
98    # elif defined(HAVE_OPENCL_CL_H)
99    #   include <OpenCL/cl.h>
100    # else
101    #   error no cl.h
102    # endif]],
103    [[#if defined(CL_VERSION_1_1)
104      printf("11000\n");
105    #elif defined(CL_VERSION_1_0)
106      printf("10000\n");
107    #else
108      printf("0\n");
109    #endif
110        ]])],
111        [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
112      # substitutions
113      AC_SUBST(CL_LIBS)
114  fi  fi
115  AC_SUBST(OPENCL_ENABLED)  AC_SUBST(CL_ENABLED)
116    AC_SUBST(CL_VERSION)
 dnl  
 dnl check for pthreads support  
 dnl  
 ACX_PTHREAD()  
117    
118  dnl  dnl
119  dnl check for various library routines etc.  dnl check for various library routines etc.
# Line 103  Line 128 
128    
129  AC_CHECK_FUNCS(mach_absolute_time)  AC_CHECK_FUNCS(mach_absolute_time)
130  AC_CHECK_TYPES([struct timespec])  AC_CHECK_TYPES([struct timespec])
131    AC_CHECK_FUNCS(pthread_barrier_init)
132    
133  dnl  dnl
134  dnl check for clock_gettime.  On Linux, this requires librt.  dnl check for clock_gettime.  On Linux, this requires librt.
# Line 316  Line 342 
342  dnl  dnl
343  dnl ******************** config.h stuff ********************  dnl ******************** config.h stuff ********************
344  dnl  dnl
345    
346    AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files])
347    
348  AH_TOP([  AH_TOP([
349  /*  /*
350   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)
# Line 339  Line 368 
368  dnl  dnl
369  dnl ***** Makefiles *****  dnl ***** Makefiles *****
370    Makefile    Makefile
371      src/clinfo/Makefile
372    src/dnorm/Makefile    src/dnorm/Makefile
373    src/compiler/Makefile    src/compiler/Makefile
374    src/lib/build/Makefile    src/lib/build/Makefile
# Line 380  Line 410 
410      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
411    ])    ])
412    
413  MK_BUILD_DIR(rt-c-f, c-target, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
414  MK_BUILD_DIR(rt-c-f-debug, c-target, [float debug])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
415  MK_BUILD_DIR(rt-c-f-par, parallel-target, [parallel float])  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
416  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])
417    
418    if test x"$CL_ENABLED" = xtrue ; then
419      MK_BUILD_DIR(rt-cl-f, cl, [float])
420      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
421    fi
422    
423  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1217  
changed lines
  Added in v.1356

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