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

SCM Repository

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

Diff of /branches/vis15/configure.ac

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

revision 1718, Sat Mar 10 23:03:02 2012 UTC revision 2111, Mon Dec 17 16:55:33 2012 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) 2010 The Diderot Project  dnl COPYRIGHT (c) 2012 The Diderot Project
4  dnl All rights reserved.  dnl All rights reserved.
5  dnl  dnl
6    
7  AC_INIT(diderot,0.1,)  AC_INIT(diderot,0.1,)
8    
9  AC_PREREQ(2.60)  AC_PREREQ(2.60)
10  AC_COPYRIGHT([[COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])
11  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)
12  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
13  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
# Line 56  Line 56 
56  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
57    
58  dnl  dnl
59    dnl standard headers
60    dnl
61    AC_HEADER_STDBOOL
62    
63    dnl
64  dnl check for pthreads support  dnl check for pthreads support
65  dnl  dnl
66  ACX_PTHREAD()  ACX_PTHREAD
67    
68  dnl check for doxygen  dnl check for doxygen
69  dnl  dnl
# Line 107  Line 112 
112  dnl  dnl
113  dnl check for OpenCL support  dnl check for OpenCL support
114  dnl  dnl
115  CL_LIBS="none"  LIBS_CL="none"
116  case "$host_os" in  case "$host_os" in
117    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
118      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
119    ;;    ;;
120    *)    *)
121      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
122    ;;    ;;
123  esac  esac
124  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
125    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
126    CL_ENABLED=false    CL_ENABLED=false
127    CL_VERSION=0    CL_VERSION=0
128  else  else
129    CL_ENABLED=true    CL_ENABLED=true
130    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
131      CL_HEADER=""
132      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
133      if test x"$HAVE_CL_H" = xno ; then
134        # check for AMD's SDK
135        AC_MSG_CHECKING([for cl.h in AMD's SDK])
136        if test -d /opt/AMDAPP/include/CL ; then
137          HAVE_CL_H="yes"
138          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
139          AC_DEFINE([HAVE_CL_CL_H])
140          CPPFLAGS_CL="-I/opt/AMDAPP/include"
141        fi
142        AC_MSG_RESULT([$HAVE_CL_H])
143      fi
144      if test x"$HAVE_CL_H" = xno ; then
145        AC_MSG_WARN([no cl.h found])
146        CL_ENABLED=false
147        CL_VERSION=0
148        SIZEOF_CL_INT=0
149        SIZEOF_CL_LONG=0
150        SIZEOF_CL_FLOAT=0
151        SIZEOF_CL_DOUBLE=0
152      else
153    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
154    AC_LANG([C])    AC_LANG([C])
155        save_CPPFLAGS=$CPPFLAGS
156        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
157    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
158  #include <stdio.h>  #include <stdio.h>
159  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 148  Line 177 
177  dnl the specification specifies the behavior, but it was unspecified in 1.0.  dnl the specification specifies the behavior, but it was unspecified in 1.0.
178  dnl  dnl
179    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
180  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
181  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
182      [[cl_float4 x; x[0] = 0.0;]])],      [[cl_float4 x; x[0] = 0.0;]])],
183      [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],      [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
184  dnl  dnl
185  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
186  dnl  dnl
187      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
188  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
189  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
190      [[cl_float4 x; x.s[0] = 0.0;]])],      [[cl_float4 x; x.s[0] = 0.0;]])],
191      [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],      [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
192      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
193      # restore saved CPPFLAGS
194        CPPFLAGS=$save_CPPFLAGS
195    # substitutions    # substitutions
196    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
197        AC_SUBST(CPPFLAGS_CL)
198      #
199      # determine the sizes of the host-side OpenCL types
200      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
201      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
202      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
203      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
204      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
205      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
206      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
207      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
208      fi
209  fi  fi
210  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
211  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
212    
213    AC_SUBST(SIZEOF_CL_INT)
214    AC_SUBST(SIZEOF_CL_LONG)
215    AC_SUBST(SIZEOF_CL_FLOAT)
216    AC_SUBST(SIZEOF_CL_DOUBLE)
217    
218  dnl  dnl
219  dnl check for various library routines etc.  dnl check for various library routines etc.
220  dnl  dnl
# Line 313  Line 351 
351    fi    fi
352  fi  fi
353  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
354    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
355  fi  fi
356  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
357    
# Line 402  Line 440 
440    
441  AC_C_BIGENDIAN  AC_C_BIGENDIAN
442    
443    #
444    # determine the sizes of the standard C types
445    AC_CHECK_SIZEOF([int])
446    SIZEOF_C_INT=$ac_cv_sizeof_int
447    AC_CHECK_SIZEOF([long])
448    SIZEOF_C_LONG=$ac_cv_sizeof_long
449    AC_CHECK_SIZEOF([float])
450    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
451    AC_CHECK_SIZEOF([double])
452    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
453    
454    AC_SUBST(SIZEOF_C_INT)
455    AC_SUBST(SIZEOF_C_LONG)
456    AC_SUBST(SIZEOF_C_FLOAT)
457    AC_SUBST(SIZEOF_C_DOUBLE)
458    
459  dnl  dnl
460  dnl restore CFLAGS  dnl restore CFLAGS
461  dnl  dnl
# Line 425  Line 479 
479  ])  ])
480  AH_BOTTOM([  AH_BOTTOM([
481    
482    #ifdef NDEBUG
483    #define STATIC_INLINE   static inline
484    #else
485    #define STATIC_INLINE   static
486    #endif
487    
488  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
489  ])  ])
490    
# Line 444  Line 504 
504    src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in    src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
505    test/MIP/Makefile    test/MIP/Makefile
506    test/probe/Makefile    test/probe/Makefile
507      test/iso2d-polyline/Makefile
508    test/vr-lite-cam/Makefile    test/vr-lite-cam/Makefile
509      test/hlic/Makefile
510  dnl  dnl
511  dnl ***** SML source files *****  dnl ***** SML source files *****
512    src/compiler/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in    src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in
513    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
514      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
515  )  )
516    
517  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)
# Line 462  Line 525 
525  AC_CONFIG_FILES([  AC_CONFIG_FILES([
526    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
527  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
528    AC_CONFIG_FILES([
529      rtest/scripts/run.sh:rtest/scripts/run_sh.in
530    ], [chmod +x rtest/scripts/run.sh])
531    AC_CONFIG_FILES([
532      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
533    ], [chmod +x rtest/scripts/run-one.sh])
534    
535  dnl  dnl
536  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds

Legend:
Removed from v.1718  
changed lines
  Added in v.2111

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