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

SCM Repository

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

Diff of /branches/vis12/configure.ac

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

trunk/configure.ac revision 1310, Sat Jun 11 14:28:32 2011 UTC branches/vis12/configure.ac revision 2430, Thu Sep 19 21:41:27 2013 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    
 dnl NOTE: MANTICORE_DIST_VERSION is an M4 variable defined in config/aclocal.m4  
 dnl  
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) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2013 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])
11  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)
12  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
13  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
14    
# Line 34  Line 32 
32  AC_PROG_INSTALL  AC_PROG_INSTALL
33  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
34    
35    dnl FIXME: this works for now, but we should probably switch to libtool
36    dnl
37    AC_PATH_PROG(LD, [ld], [none])
38    if test x$LD = xnone ; then
39      AC_MSG_ERROR([cannot find ld command])
40    fi
41    AC_SUBST(LD)
42    
43  dnl check for c99 support  dnl check for c99 support
44  dnl  dnl
45  AC_PROG_CC_C99  AC_PROG_CC_C99
# Line 41  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  CFLAG_M64="-m64"  CFLAGS=""
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
73    dnl
74    AC_ARG_WITH([doxygen],
75      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
76      [DOXYGEN=$with_doxygen],
77      [DOXYGEN=none])
78    if test x$DOXYGEN = xnone ; then
79      # see if we can find doxygen in the user's path
80      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
81    fi
82    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
83      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
84    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
85      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
86    elif test x$DOXYGEN != xnone ; then
87    dnl
88    dnl verify that $DOXYGEN is an absolute path
89    dnl
90      case $DOXYGEN in
91        /*) ;;
92        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
93      esac
94    fi
95    if test $DOXYGEN = xnone ; then
96      DOXYGEN=:
97    fi
98    AC_SUBST(DOXYGEN)
99    
100  dnl  dnl
101  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
# Line 72  Line 116 
116  dnl  dnl
117  dnl check for OpenCL support  dnl check for OpenCL support
118  dnl  dnl
119  CL_LIBS="none"  LIBS_CL="none"
120  case "$host_os" in  case "$host_os" in
121    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
122      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
123    ;;    ;;
124    *)    *)
125      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
126    ;;    ;;
127  esac  esac
128  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
129    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
130    CL_ENABLED=false    CL_ENABLED=false
131    CL_VERSION=0    CL_VERSION=0
132  else  else
133    CL_ENABLED=true    CL_ENABLED=true
134    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
135      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
138        # check for AMD's SDK
139        AC_MSG_CHECKING([for cl.h in AMD's SDK])
140        if test -d /opt/AMDAPP/include/CL ; then
141          HAVE_CL_H="yes"
142          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
143          AC_DEFINE([HAVE_CL_CL_H])
144          CPPFLAGS_CL="-I/opt/AMDAPP/include"
145        fi
146        AC_MSG_RESULT([$HAVE_CL_H])
147      fi
148      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])
160        CL_ENABLED=false
161        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
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])
169        save_CPPFLAGS=$CPPFLAGS
170        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
171    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
172  #include <stdio.h>  #include <stdio.h>
173  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 108  Line 186 
186  #endif  #endif
187      ]])],      ]])],
188      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
189    dnl
190    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
191    dnl the specification specifies the behavior, but it was unspecified in 1.0.
192    dnl
193        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
194    #include "$CL_HEADER"
195    ]],
196          [[cl_float4 x; x[0] = 0.0;]])],
197          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
198    dnl
199    dnl not arrays, so try the OpenCL 1.1 structure representation
200    dnl
201          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
202    #include "$CL_HEADER"
203    ]],
204          [[cl_float4 x; x.s[0] = 0.0;]])],
205          [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])])])
207      # restore saved CPPFLAGS
208        CPPFLAGS=$save_CPPFLAGS
209    # substitutions    # substitutions
210    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
211        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
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 222  Line 337 
337  AC_SUBST(LIBM)  AC_SUBST(LIBM)
338    
339  dnl  dnl
340  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation.  We need this to build the Diderot
341    dnl runtime code and we use the path when searching for teem in the Diderot
342    dnl compiler.
343  dnl  dnl
344  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
345    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
# Line 237  Line 354 
354    esac    esac
355    if test -x $ac_cv_use_teem ; then    if test -x $ac_cv_use_teem ; then
356      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
357        # check that TEEM_DIR actually points to something that looks like teem
358        if test -f $TEEM_DIR/include/teem/nrrd.h ; then
359      AC_MSG_RESULT([ okay])      AC_MSG_RESULT([ okay])
360    else    else
361      TEEM_DIR=none      TEEM_DIR=none
362      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([ invalid])
363    fi    fi
364      else
365        TEEM_DIR=none
366        AC_MSG_RESULT([ invalid])
367      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 255  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 317  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 333  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 356  Line 495 
495  ])  ])
496  AH_BOTTOM([  AH_BOTTOM([
497    
498    #ifdef NDEBUG
499    #define STATIC_INLINE   static inline
500    #else
501    #define STATIC_INLINE   static
502    #endif
503    
504  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
505  ])  ])
506    
# Line 367  Line 512 
512  dnl  dnl
513  dnl ***** Makefiles *****  dnl ***** Makefiles *****
514    Makefile    Makefile
515    src/dnorm/Makefile    doc/Makefile
516      src/clinfo/Makefile
517    src/compiler/Makefile    src/compiler/Makefile
518    src/lib/build/Makefile    src/lib/build/Makefile
519    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
520    test/MIP/Makefile    test/MIP/Makefile
521    test/probe/Makefile    test/probe/Makefile
522    test/teem/Makefile    test/iso2d-polyline/Makefile
523  dnl    test/vr-lite-cam/Makefile
524  dnl ***** CM files *****    test/hlic/Makefile
   src/compiler/codegen/sources.cm:src/compiler/codegen/sources_cm.in  
525  dnl  dnl
526  dnl ***** SML source files *****  dnl ***** SML source files *****
527    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
528    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
529      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
530  )  )
531    
532  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 392  Line 538 
538    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
539  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
540  AC_CONFIG_FILES([  AC_CONFIG_FILES([
541    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
542  ], [chmod +x rtest/scripts/run-one.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
543  AC_CONFIG_FILES([  AC_CONFIG_FILES([
544    rtest/scripts/run.sh:rtest/scripts/run_sh.in    rtest/scripts/run.sh:rtest/scripts/run_sh.in
545  ], [chmod +x rtest/scripts/run.sh])  ], [chmod +x rtest/scripts/run.sh])
546    AC_CONFIG_FILES([
547      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
548    ], [chmod +x rtest/scripts/run-one.sh])
549    
550  dnl  dnl
551  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 416  Line 565 
565    ])    ])
566    
567  MK_BUILD_DIR(rt-c-f, c, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
568    MK_BUILD_DIR(rt-c-d, c, [double])
569  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
570    MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
571  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
572    MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
573  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
574    MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
575    
576    if test x"$CL_ENABLED" = xtrue ; then
577      MK_BUILD_DIR(rt-cl-f, cl, [float])
578      MK_BUILD_DIR(rt-cl-d, cl, [double])
579      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
580      MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
581    fi
582    
583  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1310  
changed lines
  Added in v.2430

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