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 1531, Fri Oct 14 18:45:50 2011 UTC revision 1838, Fri Apr 13 23:08:07 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) 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 52  Line 52 
52  dnl  dnl
53  ACX_PTHREAD()  ACX_PTHREAD()
54    
55    dnl check for doxygen
56    dnl
57    AC_ARG_WITH([doxygen],
58      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
59      [DOXYGEN=$with_doxygen],
60      [DOXYGEN=none])
61    if test x$DOXYGEN = xnone ; then
62      # see if we can find doxygen in the user's path
63      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
64    fi
65    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
66      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
67    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
68      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
69    elif test x$DOXYGEN != xnone ; then
70    dnl
71    dnl verify that $DOXYGEN is an absolute path
72    dnl
73      case $DOXYGEN in
74        /*) ;;
75        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
76      esac
77    fi
78    if test $DOXYGEN = xnone ; then
79      DOXYGEN=:
80    fi
81    AC_SUBST(DOXYGEN)
82    
83  dnl  dnl
84  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
85  dnl  dnl
# Line 71  Line 99 
99  dnl  dnl
100  dnl check for OpenCL support  dnl check for OpenCL support
101  dnl  dnl
102  CL_LIBS="none"  LIBS_CL="none"
103  case "$host_os" in  case "$host_os" in
104    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
105      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
106    ;;    ;;
107    *)    *)
108      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
109    ;;    ;;
110  esac  esac
111  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
112    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
113    CL_ENABLED=false    CL_ENABLED=false
114    CL_VERSION=0    CL_VERSION=0
115  else  else
116    CL_ENABLED=true    CL_ENABLED=true
117    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
118      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"], [HAVE_CL_H="no"])
119      if test x"$HAVE_CL_H" = xno ; then
120        # check for AMD's SDK
121        if test -d /opt/AMDAPP/include/CL ; then
122          HAVE_CL_H="yes"
123          AC_DEFINE([HAVE_CL_CL_H])
124          CPPFLAGS_CL="-I/opt/AMDAPP/include"
125        fi
126      fi
127      if test x"$HAVE_CL_H" = xno ; then
128        AC_MSG_WARN([no cl.h found])
129        CL_ENABLED=false
130        CL_VERSION=0
131      else
132    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
133    AC_LANG([C])    AC_LANG([C])
134        save_CPPFLAGS=$CPPFLAGS
135        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
136    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
137  #include <stdio.h>  #include <stdio.h>
138  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 107  Line 151 
151  #endif  #endif
152      ]])],      ]])],
153      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
154    dnl
155    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
156    dnl the specification specifies the behavior, but it was unspecified in 1.0.
157    dnl
158        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
159    # ifdef HAVE_CL_CL_H
160    #   include <CL/cl.h>
161    # elif defined(HAVE_OPENCL_CL_H)
162    #   include <OpenCL/cl.h>
163    # else
164    #   error no cl.h
165    # endif]],
166          [[cl_float4 x; x[0] = 0.0;]])],
167          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
168    dnl
169    dnl not arrays, so try the OpenCL 1.1 structure representation
170    dnl
171          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
172    # ifdef HAVE_CL_CL_H
173    #   include <CL/cl.h>
174    # elif defined(HAVE_OPENCL_CL_H)
175    #   include <OpenCL/cl.h>
176    # else
177    #   error no cl.h
178    # endif]],
179          [[cl_float4 x; x.s[0] = 0.0;]])],
180          [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
181          [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
182      # restore saved CPPFLAGS
183        CPPFLAGS=$save_CPPFLAGS
184    # substitutions    # substitutions
185    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
186        AC_SUBST(CPPFLAGS_CL)
187      fi
188  fi  fi
189  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
190  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
# Line 372  Line 448 
448  dnl  dnl
449  dnl ***** Makefiles *****  dnl ***** Makefiles *****
450    Makefile    Makefile
451      doc/Makefile
452      src/clinfo/Makefile
453    src/dnorm/Makefile    src/dnorm/Makefile
454    src/compiler/Makefile    src/compiler/Makefile
455    src/lib/build/Makefile    src/lib/build/Makefile
456    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
457    test/MIP/Makefile    test/MIP/Makefile
458    test/probe/Makefile    test/probe/Makefile
   test/teem/Makefile  
 dnl  
 dnl ***** CM files *****  
   src/compiler/codegen/sources.cm:src/compiler/codegen/sources_cm.in  
459  dnl  dnl
460  dnl ***** SML source files *****  dnl ***** SML source files *****
461    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 397  Line 471 
471    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
472  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
473  AC_CONFIG_FILES([  AC_CONFIG_FILES([
474    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
475  ], [chmod +x rtest/scripts/run-one.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
476  AC_CONFIG_FILES([  AC_CONFIG_FILES([
477    rtest/scripts/run.sh:rtest/scripts/run_sh.in    rtest/scripts/run.sh:rtest/scripts/run_sh.in
478  ], [chmod +x rtest/scripts/run.sh])  ], [chmod +x rtest/scripts/run.sh])
479    AC_CONFIG_FILES([
480      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
481    ], [chmod +x rtest/scripts/run-one.sh])
482    
483  dnl  dnl
484  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 421  Line 498 
498    ])    ])
499    
500  MK_BUILD_DIR(rt-c-f, c, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
501    MK_BUILD_DIR(rt-c-d, c, [double])
502  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
503    MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
504  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
505    MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
506  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
507    MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
508    
509    if test x"$CL_ENABLED" = xtrue ; then
510      MK_BUILD_DIR(rt-cl-f, cl, [float])
511      MK_BUILD_DIR(rt-cl-d, cl, [double])
512      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
513      MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
514    fi
515    
516  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1531  
changed lines
  Added in v.1838

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