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

SCM Repository

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

Diff of /branches/lamont/configure.ac

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

branches/vis12/configure.ac revision 1685, Sun Jan 22 15:23:36 2012 UTC branches/lamont/configure.ac revision 3349, Tue Oct 27 15:16:36 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) 2010 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) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2015 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
# Line 32  Line 34 
34  AC_PROG_INSTALL  AC_PROG_INSTALL
35  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
36    
37    dnl FIXME: this works for now, but we should probably switch to libtool
38    dnl
39    AC_PATH_PROG(LD, [ld], [none])
40    if test x$LD = xnone ; then
41      AC_MSG_ERROR([cannot find ld command])
42    fi
43    AC_SUBST(LD)
44    
45  dnl check for c99 support  dnl check for c99 support
46  dnl  dnl
47  AC_PROG_CC_C99  AC_PROG_CC_C99
# Line 39  Line 49 
49    AC_MSG_ERROR([Diderot requires c99 support])    AC_MSG_ERROR([Diderot requires c99 support])
50  fi  fi
51    
52    AC_ARG_ENABLE([32-bit],
53      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
54      [CFLAG_MXX="-m32"],
55      [CFLAG_MXX="-m64"])
56    
57  dnl extra C compiler options  dnl extra C compiler options
58  dnl  dnl
59  CFLAGS=""  CFLAGS=""
 CFLAG_M64="-m64"  
60  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
61  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_MXX)
62  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
63    
64  dnl  dnl
65    dnl standard headers
66    dnl
67    AC_HEADER_STDBOOL
68    
69    dnl
70  dnl check for pthreads support  dnl check for pthreads support
71  dnl  dnl
72  ACX_PTHREAD()  ACX_PTHREAD
73    
74  dnl check for doxygen  dnl check for doxygen
75  dnl  dnl
# Line 99  Line 118 
118  dnl  dnl
119  dnl check for OpenCL support  dnl check for OpenCL support
120  dnl  dnl
121  CL_LIBS="none"  LIBS_CL="none"
122  case "$host_os" in  case "$host_os" in
123    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
124      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
125    ;;    ;;
126    *)    *)
127      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
128    ;;    ;;
129  esac  esac
130  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
131    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
132    CL_ENABLED=false    CL_ENABLED=false
133    CL_VERSION=0    CL_VERSION=0
134  else  else
135    CL_ENABLED=true    CL_ENABLED=true
136    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
137      CL_HEADER=""
138      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
139      if test x"$HAVE_CL_H" = xno ; then
140        # check for AMD's SDK
141        AC_MSG_CHECKING([for cl.h in AMD's SDK])
142        if test -d /opt/AMDAPP/include/CL ; then
143          HAVE_CL_H="yes"
144          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
145          AC_DEFINE([HAVE_CL_CL_H])
146          CPPFLAGS_CL="-I/opt/AMDAPP/include"
147        fi
148        AC_MSG_RESULT([$HAVE_CL_H])
149      fi
150      if test x"$HAVE_CL_H" = xno ; then
151        # check for NVIDIA's SDK
152        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
153        if test -d /usr/local/cuda/include/CL ; then
154          HAVE_CL_H="yes"
155          AC_DEFINE([HAVE_CL_CL_H])
156          CPPFLAGS_CL="-I/usr/local/cuda/include"
157        fi
158        AC_MSG_RESULT([$HAVE_CL_H])
159      fi
160      if test x"$HAVE_CL_H" = xno ; then
161        AC_MSG_WARN([no cl.h found])
162        CL_ENABLED=false
163        CL_VERSION=0
164        SIZEOF_CL_INT=0
165        SIZEOF_CL_LONG=0
166        SIZEOF_CL_FLOAT=0
167        SIZEOF_CL_DOUBLE=0
168      else
169    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
170    AC_LANG([C])    AC_LANG([C])
171        save_CPPFLAGS=$CPPFLAGS
172        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
173    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
174  #include <stdio.h>  #include <stdio.h>
175  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 140  Line 193 
193  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.
194  dnl  dnl
195    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
196  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
197  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
198      [[cl_float4 x; x[0] = 0.0;]])],      [[cl_float4 x; x[0] = 0.0;]])],
199      [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])],
200  dnl  dnl
201  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
202  dnl  dnl
203      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
204  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
205  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
206      [[cl_float4 x; x.s[0] = 0.0;]])],      [[cl_float4 x; x.s[0] = 0.0;]])],
207      [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])],
208      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
209      # restore saved CPPFLAGS
210        CPPFLAGS=$save_CPPFLAGS
211    # substitutions    # substitutions
212    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
213        AC_SUBST(CPPFLAGS_CL)
214      #
215      # determine the sizes of the host-side OpenCL types
216      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
217      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
218      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
219      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
220      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
221      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
222      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
223      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
224      fi
225  fi  fi
226  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
227  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
228    
229    AC_SUBST(SIZEOF_CL_INT)
230    AC_SUBST(SIZEOF_CL_LONG)
231    AC_SUBST(SIZEOF_CL_FLOAT)
232    AC_SUBST(SIZEOF_CL_DOUBLE)
233    
234  dnl  dnl
235  dnl check for various library routines etc.  dnl check for various library routines etc.
236  dnl  dnl
# Line 305  Line 367 
367    fi    fi
368  fi  fi
369  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
370    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
371  fi  fi
372  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
373    
# Line 316  Line 378 
378  dnl  dnl
379  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])])
380  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
381    -o $SMLNJ_MINOR_VERSION -lt 73    -o $SMLNJ_MINOR_VERSION -lt 74
382  then  then
383    AC_MSG_ERROR([installation requires SML/NJ version 110.73+])    AC_MSG_ERROR([installation requires SML/NJ version 110.74+])
384  fi  fi
385  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
386    
# Line 378  Line 440 
440  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
441  dnl  dnl
442  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
443  CFLAGS="$CFLAGS $CFLAG_M64"  CFLAGS="$CFLAGS $CFLAG_MXX"
444    
445  dnl  dnl
446  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 394  Line 456 
456    
457  AC_C_BIGENDIAN  AC_C_BIGENDIAN
458    
459    #
460    # determine the sizes of the standard C types
461    AC_CHECK_SIZEOF([int])
462    SIZEOF_C_INT=$ac_cv_sizeof_int
463    AC_CHECK_SIZEOF([long])
464    SIZEOF_C_LONG=$ac_cv_sizeof_long
465    AC_CHECK_SIZEOF([float])
466    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
467    AC_CHECK_SIZEOF([double])
468    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
469    
470    AC_SUBST(SIZEOF_C_INT)
471    AC_SUBST(SIZEOF_C_LONG)
472    AC_SUBST(SIZEOF_C_FLOAT)
473    AC_SUBST(SIZEOF_C_DOUBLE)
474    
475  dnl  dnl
476  dnl restore CFLAGS  dnl restore CFLAGS
477  dnl  dnl
# Line 407  Line 485 
485    
486  AH_TOP([  AH_TOP([
487  /*  /*
488   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
489   * All rights reserved.   *
490     * COPYRIGHT (c) 2015 The University of Chicago * All rights reserved.
491   */   */
492    
493  #ifndef _DIDEROT_CONFIG_H_  #ifndef _DIDEROT_CONFIG_H_
# Line 417  Line 496 
496  ])  ])
497  AH_BOTTOM([  AH_BOTTOM([
498    
499    #ifdef NDEBUG
500    #define STATIC_INLINE   static inline
501    #else
502    #define STATIC_INLINE   static
503    #endif
504    
505  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
506  ])  ])
507    
# Line 436  Line 521 
521    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
522    test/MIP/Makefile    test/MIP/Makefile
523    test/probe/Makefile    test/probe/Makefile
524      test/halftone/Makefile
525      test/implicit-surface/Makefile
526      test/implicit-surface/gl_version/Makefile
527      test/boids/Makefile
528      test/iso2d-polyline/Makefile
529      test/vr-lite-cam/Makefile
530      test/hlic/Makefile
531  dnl  dnl
532  dnl ***** SML source files *****  dnl ***** SML source files *****
533    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
534    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
535      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
536  )  )
537    
538  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 453  Line 546 
546  AC_CONFIG_FILES([  AC_CONFIG_FILES([
547    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
548  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
549    AC_CONFIG_FILES([
550      rtest/scripts/run.sh:rtest/scripts/run_sh.in
551    ], [chmod +x rtest/scripts/run.sh])
552    AC_CONFIG_FILES([
553      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
554    ], [chmod +x rtest/scripts/run-one.sh])
555    
556  dnl  dnl
557  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds

Legend:
Removed from v.1685  
changed lines
  Added in v.3349

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