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

SCM Repository

[diderot] Diff of /branches/charisee/configure.ac
ViewVC logotype

Diff of /branches/charisee/configure.ac

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

revision 2604, Fri Apr 25 18:23:44 2014 UTC revision 3296, Thu Oct 15 23:18:50 2015 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
2  dnl  dnl
3  dnl COPYRIGHT (c) 2012 The Diderot Project  dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4    dnl
5    dnl COPYRIGHT (c) 2015 The University of Chicago
6  dnl All rights reserved.  dnl All rights reserved.
7  dnl  dnl
8    
9  AC_INIT(diderot,0.1,)  AC_INIT(diderot,0.1,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2013 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2015 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
# Line 88  Line 90 
90  dnl  dnl
91  dnl check for OpenCL support  dnl check for OpenCL support
92  dnl  dnl
93  CL_LIBS="none"  LIBS_CL="none"
94  case "$host_os" in  case "$host_os" in
95    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
96      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
97    ;;    ;;
98    *)    *)
99      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
100    ;;    ;;
101  esac  esac
102  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
103    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
104    CL_ENABLED=false    CL_ENABLED=false
105    CL_VERSION=0    CL_VERSION=0
# Line 120  Line 122 
122    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
123      # check for NVIDIA's SDK      # check for NVIDIA's SDK
124      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
125      if test -d /usr/local/cuda/include/CL ; then      CUDA_HOME=none
126        for CUDA in cuda cuda-7.0 cuda-6.5 cuda-6.0 ; do
127          if test -d /usr/local/$CUDA/include/CL ; then
128            CUDA_HOME=/usr/local/$CUDA
129            break
130          fi
131        done
132        if test x"$CUDA" != xnone ; then
133        HAVE_CL_H="yes"        HAVE_CL_H="yes"
134          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
135        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
136        CPPFLAGS_CL="-I/usr/local/cuda/include"        CPPFLAGS_CL="-I$CUDA_HOME/include"
137      fi      fi
138      AC_MSG_RESULT([$HAVE_CL_H])      AC_MSG_RESULT([$HAVE_CL_H])
139    fi    fi
# Line 149  Line 159 
159  # else  # else
160  #   error no cl.h  #   error no cl.h
161  # endif]],  # endif]],
162  [[#if defined(CL_VERSION_1_1)  [[#if defined(CL_VERSION_1_2)
163    printf("11000\n");    printf("120\n");
164    #elif defined(CL_VERSION_1_1)
165      printf("110\n");
166  #elif defined(CL_VERSION_1_0)  #elif defined(CL_VERSION_1_0)
167    printf("10000\n");    printf("100\n");
168  #else  #else
169    printf("0\n");    printf("0\n");
170  #endif  #endif
# Line 179  Line 191 
191    # restore saved CPPFLAGS    # restore saved CPPFLAGS
192      CPPFLAGS=$save_CPPFLAGS      CPPFLAGS=$save_CPPFLAGS
193    # substitutions    # substitutions
194      AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
195      AC_SUBST(CPPFLAGS_CL)      AC_SUBST(CPPFLAGS_CL)
196    #    #
197    # determine the sizes of the host-side OpenCL types    # determine the sizes of the host-side OpenCL types
# Line 195  Line 207 
207  fi  fi
208  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
209  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
210    AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])
211    
212  AC_SUBST(SIZEOF_CL_INT)  AC_SUBST(SIZEOF_CL_INT)
213  AC_SUBST(SIZEOF_CL_LONG)  AC_SUBST(SIZEOF_CL_LONG)
# Line 328  Line 341 
341      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
342      # check that TEEM_DIR actually points to something that looks like teem      # check that TEEM_DIR actually points to something that looks like teem
343      if test -f $TEEM_DIR/include/teem/nrrd.h ; then      if test -f $TEEM_DIR/include/teem/nrrd.h ; then
344        AC_MSG_RESULT([ okay])        AC_MSG_RESULT([yes])
345      else      else
346        TEEM_DIR=none        TEEM_DIR=none
347        AC_MSG_RESULT([ invalid])        AC_MSG_RESULT([no])
348      fi      fi
349    else    else
350      TEEM_DIR=none      TEEM_DIR=none
351      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
352    fi    fi
353  fi  fi
354  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
355    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
356  fi  fi
357    dnl
358    dnl check that unu supports the dnorm command
359    dnl
360    if test x"$TEEM_DIR" != xnone ; then
361      AC_MSG_CHECKING([that \"unu dnorm\" works])
362      if test -x $TEEM_DIR/bin/unu ; then
363        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
364        if test $? -eq 0 ; then
365          AC_MSG_RESULT([yes])
366        else
367          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
368        fi
369      else
370        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
371      fi
372    fi
373  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
374    
375  dnl ******************** SML/NJ configuration ********************  dnl ******************** SML/NJ configuration ********************
# Line 350  Line 379 
379  dnl  dnl
380  CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])])  CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])])
381  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
382    -o $SMLNJ_MINOR_VERSION -lt 74    -o $SMLNJ_MINOR_VERSION -lt 77
383  then  then
384    AC_MSG_ERROR([installation requires SML/NJ version 110.74+])    AC_MSG_ERROR([installation requires SML/NJ version 110.77+ (available from smlnj.org)])
385  fi  fi
386  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
387    

Legend:
Removed from v.2604  
changed lines
  Added in v.3296

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