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

SCM Repository

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

Diff of /branches/staging/configure.ac

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

revision 1930, Tue Jun 26 13:13:39 2012 UTC revision 2360, Sun Apr 7 16:32:36 2013 UTC
# Line 47  Line 47 
47    AC_MSG_ERROR([Diderot requires c99 support])    AC_MSG_ERROR([Diderot requires c99 support])
48  fi  fi
49    
50    AC_ARG_ENABLE([32-bit],
51      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
52      [CFLAG_MXX="-m32"],
53      [CFLAG_MXX="-m64"])
54    
55  dnl extra C compiler options  dnl extra C compiler options
56  dnl  dnl
57  CFLAGS=""  CFLAGS=""
 CFLAG_M64="-m64"  
58  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
59  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_MXX)
60  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
61    
62  dnl  dnl
63    dnl standard headers
64    dnl
65    AC_HEADER_STDBOOL
66    
67    dnl
68  dnl check for pthreads support  dnl check for pthreads support
69  dnl  dnl
70  ACX_PTHREAD()  ACX_PTHREAD
71    
72  dnl check for doxygen  dnl check for doxygen
73  dnl  dnl
# Line 123  Line 132 
132  else  else
133    CL_ENABLED=true    CL_ENABLED=true
134    CPPFLAGS_CL=""    CPPFLAGS_CL=""
135    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])    CL_HEADER=""
136      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
137    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
138      # check for AMD's SDK      # check for AMD's SDK
139      AC_MSG_CHECKING([for cl.h in AMD's SDK])      AC_MSG_CHECKING([for cl.h in AMD's SDK])
140      if test -d /opt/AMDAPP/include/CL ; then      if test -d /opt/AMDAPP/include/CL ; then
141        HAVE_CL_H="yes"        HAVE_CL_H="yes"
142          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
143        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
144        CPPFLAGS_CL="-I/opt/AMDAPP/include"        CPPFLAGS_CL="-I/opt/AMDAPP/include"
145      fi      fi
146      AC_MSG_RESULT([$HAVE_CL_H])      AC_MSG_RESULT([$HAVE_CL_H])
147    fi    fi
148    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
149        # check for NVIDIA's SDK
150        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
151        if test -d /usr/local/cuda/include/CL ; then
152          HAVE_CL_H="yes"
153          AC_DEFINE([HAVE_CL_CL_H])
154          CPPFLAGS_CL="-I/usr/local/cuda/include"
155        fi
156        AC_MSG_RESULT([$HAVE_CL_H])
157      fi
158      if test x"$HAVE_CL_H" = xno ; then
159      AC_MSG_WARN([no cl.h found])      AC_MSG_WARN([no cl.h found])
160      CL_ENABLED=false      CL_ENABLED=false
161      CL_VERSION=0      CL_VERSION=0
162        SIZEOF_CL_INT=0
163        SIZEOF_CL_LONG=0
164        SIZEOF_CL_FLOAT=0
165        SIZEOF_CL_DOUBLE=0
166    else    else
167      # check the cl.h header for which version of OpenCL is supported      # check the cl.h header for which version of OpenCL is supported
168      AC_LANG([C])      AC_LANG([C])
# Line 166  Line 191 
191  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.
192  dnl  dnl
193      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
194  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
195  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
196        [[cl_float4 x; x[0] = 0.0;]])],        [[cl_float4 x; x[0] = 0.0;]])],
197        [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])],
198  dnl  dnl
199  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
200  dnl  dnl
201        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
202  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
203  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
204        [[cl_float4 x; x.s[0] = 0.0;]])],        [[cl_float4 x; x.s[0] = 0.0;]])],
205        [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])],
206        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
# Line 194  Line 209 
209    # substitutions    # substitutions
210      AC_SUBST(LIBS_CL)      AC_SUBST(LIBS_CL)
211      AC_SUBST(CPPFLAGS_CL)      AC_SUBST(CPPFLAGS_CL)
212      #
213      # determine the sizes of the host-side OpenCL types
214      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
215      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
216      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
217      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
218      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
219      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
220      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
221      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
222    fi    fi
223  fi  fi
224  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
225  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
226    
227    AC_SUBST(SIZEOF_CL_INT)
228    AC_SUBST(SIZEOF_CL_LONG)
229    AC_SUBST(SIZEOF_CL_FLOAT)
230    AC_SUBST(SIZEOF_CL_DOUBLE)
231    
232  dnl  dnl
233  dnl check for various library routines etc.  dnl check for various library routines etc.
234  dnl  dnl
# Line 335  Line 365 
365    fi    fi
366  fi  fi
367  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
368    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
369  fi  fi
370  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
371    
# Line 346  Line 376 
376  dnl  dnl
377  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])])
378  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
379    -o $SMLNJ_MINOR_VERSION -lt 73    -o $SMLNJ_MINOR_VERSION -lt 74
380  then  then
381    AC_MSG_ERROR([installation requires SML/NJ version 110.73+])    AC_MSG_ERROR([installation requires SML/NJ version 110.74+])
382  fi  fi
383  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
384    
# Line 408  Line 438 
438  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
439  dnl  dnl
440  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
441  CFLAGS="$CFLAGS $CFLAG_M64"  CFLAGS="$CFLAGS $CFLAG_MXX"
442    
443  dnl  dnl
444  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 424  Line 454 
454    
455  AC_C_BIGENDIAN  AC_C_BIGENDIAN
456    
457    #
458    # determine the sizes of the standard C types
459    AC_CHECK_SIZEOF([int])
460    SIZEOF_C_INT=$ac_cv_sizeof_int
461    AC_CHECK_SIZEOF([long])
462    SIZEOF_C_LONG=$ac_cv_sizeof_long
463    AC_CHECK_SIZEOF([float])
464    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
465    AC_CHECK_SIZEOF([double])
466    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
467    
468    AC_SUBST(SIZEOF_C_INT)
469    AC_SUBST(SIZEOF_C_LONG)
470    AC_SUBST(SIZEOF_C_FLOAT)
471    AC_SUBST(SIZEOF_C_DOUBLE)
472    
473  dnl  dnl
474  dnl restore CFLAGS  dnl restore CFLAGS
475  dnl  dnl
# Line 447  Line 493 
493  ])  ])
494  AH_BOTTOM([  AH_BOTTOM([
495    
496    #ifdef NDEBUG
497    #define STATIC_INLINE   static inline
498    #else
499    #define STATIC_INLINE   static
500    #endif
501    
502  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
503  ])  ])
504    
# Line 466  Line 518 
518    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
519    test/MIP/Makefile    test/MIP/Makefile
520    test/probe/Makefile    test/probe/Makefile
521      test/iso2d-polyline/Makefile
522      test/vr-lite-cam/Makefile
523      test/hlic/Makefile
524  dnl  dnl
525  dnl ***** SML source files *****  dnl ***** SML source files *****
526    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
527    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
528      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
529  )  )
530    
531  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)

Legend:
Removed from v.1930  
changed lines
  Added in v.2360

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