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

trunk/configure.ac revision 1310, Sat Jun 11 14:28:32 2011 UTC branches/vis12/configure.ac revision 1997, Thu Oct 4 11:00:44 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    
 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) 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 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 43  Line 49 
49    
50  dnl extra C compiler options  dnl extra C compiler options
51  dnl  dnl
52    CFLAGS=""
53  CFLAG_M64="-m64"  CFLAG_M64="-m64"
54  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
55  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_M64)
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
69    dnl
70    AC_ARG_WITH([doxygen],
71      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
72      [DOXYGEN=$with_doxygen],
73      [DOXYGEN=none])
74    if test x$DOXYGEN = xnone ; then
75      # see if we can find doxygen in the user's path
76      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
77    fi
78    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
79      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
80    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
81      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
82    elif test x$DOXYGEN != xnone ; then
83    dnl
84    dnl verify that $DOXYGEN is an absolute path
85    dnl
86      case $DOXYGEN in
87        /*) ;;
88        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
89      esac
90    fi
91    if test $DOXYGEN = xnone ; then
92      DOXYGEN=:
93    fi
94    AC_SUBST(DOXYGEN)
95    
96  dnl  dnl
97  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
# Line 72  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      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])
132      if test x"$HAVE_CL_H" = xno ; then
133        # check for AMD's SDK
134        AC_MSG_CHECKING([for cl.h in AMD's SDK])
135        if test -d /opt/AMDAPP/include/CL ; then
136          HAVE_CL_H="yes"
137          AC_DEFINE([HAVE_CL_CL_H])
138          CPPFLAGS_CL="-I/opt/AMDAPP/include"
139        fi
140        AC_MSG_RESULT([$HAVE_CL_H])
141      fi
142      if test x"$HAVE_CL_H" = xno ; then
143        AC_MSG_WARN([no cl.h found])
144        CL_ENABLED=false
145        CL_VERSION=0
146      else
147    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
148    AC_LANG([C])    AC_LANG([C])
149        save_CPPFLAGS=$CPPFLAGS
150        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
151    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
152  #include <stdio.h>  #include <stdio.h>
153  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 108  Line 166 
166  #endif  #endif
167      ]])],      ]])],
168      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
169    dnl
170    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
171    dnl the specification specifies the behavior, but it was unspecified in 1.0.
172    dnl
173        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
174    # ifdef HAVE_CL_CL_H
175    #   include <CL/cl.h>
176    # elif defined(HAVE_OPENCL_CL_H)
177    #   include <OpenCL/cl.h>
178    # else
179    #   error no cl.h
180    # endif]],
181          [[cl_float4 x; x[0] = 0.0;]])],
182          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
183    dnl
184    dnl not arrays, so try the OpenCL 1.1 structure representation
185    dnl
186          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
187    # ifdef HAVE_CL_CL_H
188    #   include <CL/cl.h>
189    # elif defined(HAVE_OPENCL_CL_H)
190    #   include <OpenCL/cl.h>
191    # else
192    #   error no cl.h
193    # endif]],
194          [[cl_float4 x; x.s[0] = 0.0;]])],
195          [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
196          [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
197      # restore saved CPPFLAGS
198        CPPFLAGS=$save_CPPFLAGS
199    # substitutions    # substitutions
200    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
201        AC_SUBST(CPPFLAGS_CL)
202      fi
203  fi  fi
204  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
205  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
# Line 237  Line 327 
327    esac    esac
328    if test -x $ac_cv_use_teem ; then    if test -x $ac_cv_use_teem ; then
329      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
330        # check that TEEM_DIR actually points to something that looks like teem
331        if test -f $TEEM_DIR/include/teem/nrrd.h ; then
332      AC_MSG_RESULT([ okay])      AC_MSG_RESULT([ okay])
333    else    else
334      TEEM_DIR=none      TEEM_DIR=none
335      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([ invalid])
336    fi    fi
337      else
338        TEEM_DIR=none
339        AC_MSG_RESULT([ invalid])
340      fi
341  fi  fi
342  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
343    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem])
# Line 367  Line 463 
463  dnl  dnl
464  dnl ***** Makefiles *****  dnl ***** Makefiles *****
465    Makefile    Makefile
466      doc/Makefile
467      src/clinfo/Makefile
468    src/dnorm/Makefile    src/dnorm/Makefile
469    src/compiler/Makefile    src/compiler/Makefile
470    src/lib/build/Makefile    src/lib/build/Makefile
471    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
472    test/MIP/Makefile    test/MIP/Makefile
473    test/probe/Makefile    test/probe/Makefile
474    test/teem/Makefile    test/iso2d-polyline/Makefile
475  dnl    test/vr-lite-cam/Makefile
476  dnl ***** CM files *****    test/hlic/Makefile
   src/compiler/codegen/sources.cm:src/compiler/codegen/sources_cm.in  
477  dnl  dnl
478  dnl ***** SML source files *****  dnl ***** SML source files *****
479    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
480    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
481  )  )
482    
# Line 392  Line 489 
489    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
490  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
491  AC_CONFIG_FILES([  AC_CONFIG_FILES([
492    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
493  ], [chmod +x rtest/scripts/run-one.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
494  AC_CONFIG_FILES([  AC_CONFIG_FILES([
495    rtest/scripts/run.sh:rtest/scripts/run_sh.in    rtest/scripts/run.sh:rtest/scripts/run_sh.in
496  ], [chmod +x rtest/scripts/run.sh])  ], [chmod +x rtest/scripts/run.sh])
497    AC_CONFIG_FILES([
498      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
499    ], [chmod +x rtest/scripts/run-one.sh])
500    
501  dnl  dnl
502  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 416  Line 516 
516    ])    ])
517    
518  MK_BUILD_DIR(rt-c-f, c, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
519    MK_BUILD_DIR(rt-c-d, c, [double])
520  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
521    MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
522  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
523    MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
524  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
525    MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
526    
527    if test x"$CL_ENABLED" = xtrue ; then
528      MK_BUILD_DIR(rt-cl-f, cl, [float])
529      MK_BUILD_DIR(rt-cl-d, cl, [double])
530      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
531      MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
532    fi
533    
534  AC_OUTPUT  AC_OUTPUT

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

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