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

trunk/configure.ac revision 1640, Wed Nov 16 02:19:51 2011 UTC branches/vis12/configure.ac revision 1843, Sat Apr 14 00:40:58 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 32  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 48  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 99  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"], [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 163  Line 194 
194      [[cl_float4 x; x.s[0] = 0.0;]])],      [[cl_float4 x; x.s[0] = 0.0;]])],
195      [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])],
196      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])      [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 436  Line 471 
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/iso2d-polyline/Makefile
475      test/vr-lite-cam/Makefile
476      test/hlic/Makefile
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/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in
# Line 453  Line 491 
491  AC_CONFIG_FILES([  AC_CONFIG_FILES([
492    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
493  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
494    AC_CONFIG_FILES([
495      rtest/scripts/run.sh:rtest/scripts/run_sh.in
496    ], [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 480  Line 524 
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])  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.1640  
changed lines
  Added in v.1843

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