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

SCM Repository

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

Diff of /branches/charisee_dev/configure.ac

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

revision 1232, Mon May 16 23:37:52 2011 UTC revision 1987, Mon Jul 30 18:32:23 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)
# Line 53  Line 60 
60  dnl  dnl
61  ACX_PTHREAD()  ACX_PTHREAD()
62    
63    dnl check for doxygen
64    dnl
65    AC_ARG_WITH([doxygen],
66      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
67      [DOXYGEN=$with_doxygen],
68      [DOXYGEN=none])
69    if test x$DOXYGEN = xnone ; then
70      # see if we can find doxygen in the user's path
71      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
72    fi
73    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
74      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
75    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
76      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
77    elif test x$DOXYGEN != xnone ; then
78    dnl
79    dnl verify that $DOXYGEN is an absolute path
80    dnl
81      case $DOXYGEN in
82        /*) ;;
83        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
84      esac
85    fi
86    if test $DOXYGEN = xnone ; then
87      DOXYGEN=:
88    fi
89    AC_SUBST(DOXYGEN)
90    
91  dnl  dnl
92  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
93  dnl  dnl
# Line 72  Line 107 
107  dnl  dnl
108  dnl check for OpenCL support  dnl check for OpenCL support
109  dnl  dnl
110  CL_LIBS="none"  LIBS_CL="none"
111  case "$host_os" in  case "$host_os" in
112    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
113      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
114    ;;    ;;
115    *)    *)
116      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
117    ;;    ;;
118  esac  esac
119  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
120    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
121    CL_ENABLED=false    CL_ENABLED=false
122    CL_VERSION=0    CL_VERSION=0
123  else  else
124    CL_ENABLED=true    CL_ENABLED=true
125    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
126      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])
127      if test x"$HAVE_CL_H" = xno ; then
128        # check for AMD's SDK
129        AC_MSG_CHECKING([for AMD's SDK cl.h])
130        if test -d /opt/AMDAPP/include/CL ; then
131          HAVE_CL_H="yes"
132          AC_DEFINE([HAVE_CL_CL_H])
133          CPPFLAGS_CL="-I/opt/AMDAPP/include"
134        fi
135        AC_MSG_RESULT([$HAVE_CL_H])
136      fi
137      if test x"$HAVE_CL_H" = xno ; then
138        # check for NVIDIA's SDK
139        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
140        if test -d /usr/local/cuda/include/CL ; then
141          HAVE_CL_H="yes"
142          AC_DEFINE([HAVE_CL_CL_H])
143          CPPFLAGS_CL="-I/usr/local/cuda/include"
144        fi
145        AC_MSG_RESULT([$HAVE_CL_H])
146      fi
147      if test x"$HAVE_CL_H" = xno ; then
148        AC_MSG_WARN([no cl.h found])
149        CL_ENABLED=false
150        CL_VERSION=0
151      else
152    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
153    AC_LANG([C])    AC_LANG([C])
154        save_CPPFLAGS=$CPPFLAGS
155        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
156    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
157  #include <stdio.h>  #include <stdio.h>
158  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 108  Line 171 
171  #endif  #endif
172      ]])],      ]])],
173      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])      [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
174    dnl
175    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
176    dnl the specification specifies the behavior, but it was unspecified in 1.0.
177    dnl
178        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
179    # ifdef HAVE_CL_CL_H
180    #   include <CL/cl.h>
181    # elif defined(HAVE_OPENCL_CL_H)
182    #   include <OpenCL/cl.h>
183    # else
184    #   error no cl.h
185    # endif]],
186          [[cl_float4 x; x[0] = 0.0;]])],
187          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
188    dnl
189    dnl not arrays, so try the OpenCL 1.1 structure representation
190    dnl
191          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
192    # ifdef HAVE_CL_CL_H
193    #   include <CL/cl.h>
194    # elif defined(HAVE_OPENCL_CL_H)
195    #   include <OpenCL/cl.h>
196    # else
197    #   error no cl.h
198    # endif]],
199          [[cl_float4 x; x.s[0] = 0.0;]])],
200          [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
201          [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
202      # restore saved CPPFLAGS
203        CPPFLAGS=$save_CPPFLAGS
204    # substitutions    # substitutions
205    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
206        AC_SUBST(CPPFLAGS_CL)
207      fi
208  fi  fi
209  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
210  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
# Line 127  Line 222 
222    
223  AC_CHECK_FUNCS(mach_absolute_time)  AC_CHECK_FUNCS(mach_absolute_time)
224  AC_CHECK_TYPES([struct timespec])  AC_CHECK_TYPES([struct timespec])
225    AC_CHECK_FUNCS(pthread_barrier_init)
226    
227  dnl  dnl
228  dnl check for clock_gettime.  On Linux, this requires librt.  dnl check for clock_gettime.  On Linux, this requires librt.
# Line 236  Line 332 
332    esac    esac
333    if test -x $ac_cv_use_teem ; then    if test -x $ac_cv_use_teem ; then
334      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
335        # check that TEEM_DIR actually points to something that looks like teem
336        if test -f $TEEM_DIR/include/teem/nrrd.h ; then
337      AC_MSG_RESULT([ okay])      AC_MSG_RESULT([ okay])
338    else    else
339      TEEM_DIR=none      TEEM_DIR=none
340      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([ invalid])
341    fi    fi
342      else
343        TEEM_DIR=none
344        AC_MSG_RESULT([ invalid])
345      fi
346  fi  fi
347  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
348    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem])
# Line 340  Line 442 
442  dnl  dnl
443  dnl ******************** config.h stuff ********************  dnl ******************** config.h stuff ********************
444  dnl  dnl
445    
446    AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files])
447    
448  AH_TOP([  AH_TOP([
449  /*  /*
450   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)
# Line 363  Line 468 
468  dnl  dnl
469  dnl ***** Makefiles *****  dnl ***** Makefiles *****
470    Makefile    Makefile
471      doc/Makefile
472      src/clinfo/Makefile
473    src/dnorm/Makefile    src/dnorm/Makefile
474    src/compiler/Makefile    src/compiler/Makefile
475    src/lib/build/Makefile    src/lib/build/Makefile
# Line 370  Line 477 
477    test/MIP/Makefile    test/MIP/Makefile
478    test/probe/Makefile    test/probe/Makefile
479  dnl  dnl
 dnl ***** CM files *****  
   src/compiler/codegen/sources.cm:src/compiler/codegen/sources_cm.in  
 dnl  
480  dnl ***** SML source files *****  dnl ***** SML source files *****
481    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
482    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
# Line 386  Line 490 
490  AC_CONFIG_FILES([  AC_CONFIG_FILES([
491    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
492  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
493    AC_CONFIG_FILES([
494      src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
495    ], [chmod +x src/compiler/gen/file2str/file2str.sh])
496    AC_CONFIG_FILES([
497      rtest/scripts/run.sh:rtest/scripts/run_sh.in
498    ], [chmod +x rtest/scripts/run.sh])
499    AC_CONFIG_FILES([
500      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
501    ], [chmod +x rtest/scripts/run-one.sh])
502    
503  dnl  dnl
504  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 404  Line 517 
517      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
518    ])    ])
519    
520  MK_BUILD_DIR(rt-c-f, c-target, [float])  MK_BUILD_DIR(rt-c-f, c, [float])
521  MK_BUILD_DIR(rt-c-f-debug, c-target, [float debug])  MK_BUILD_DIR(rt-c-d, c, [double])
522  MK_BUILD_DIR(rt-c-f-par, parallel-target, [parallel float])  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
523  MK_BUILD_DIR(rt-c-f-par-debug, parallel-target, [parallel float debug])  MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
524    MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
525    MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
526    MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
527    MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
528    
529    if test x"$CL_ENABLED" = xtrue ; then
530      MK_BUILD_DIR(rt-cl-f, cl, [float])
531      MK_BUILD_DIR(rt-cl-d, cl, [double])
532      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
533      MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
534    fi
535    
536  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1232  
changed lines
  Added in v.1987

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