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

branches/vis12/configure.ac revision 1941, Tue Jul 3 15:22:31 2012 UTC branches/vis15/configure.ac revision 3340, Wed Oct 21 22:04:01 2015 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) 2012 The Diderot Project  dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4    dnl
5    dnl COPYRIGHT (c) 2015 The University of Chicago
6  dnl All rights reserved.  dnl All rights reserved.
7  dnl  dnl
8    
9  AC_INIT(diderot,0.1,)  AC_INIT(diderot,0.1,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2015 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
16    
# Line 47  Line 49 
49    AC_MSG_ERROR([Diderot requires c99 support])    AC_MSG_ERROR([Diderot requires c99 support])
50  fi  fi
51    
52    AC_ARG_ENABLE([32-bit],
53      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
54      [CFLAG_MXX="-m32"],
55      [CFLAG_MXX="-m64"])
56    
57  dnl extra C compiler options  dnl extra C compiler options
58  dnl  dnl
59  CFLAGS=""  CFLAGS=""
 CFLAG_M64="-m64"  
60  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
61  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_MXX)
62  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
63    
64  dnl  dnl
# Line 65  Line 71 
71  dnl  dnl
72  ACX_PTHREAD  ACX_PTHREAD
73    
 dnl check for doxygen  
 dnl  
 AC_ARG_WITH([doxygen],  
   [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],  
   [DOXYGEN=$with_doxygen],  
   [DOXYGEN=none])  
 if test x$DOXYGEN = xnone ; then  
   # see if we can find doxygen in the user's path  
   AC_PATH_PROG(DOXYGEN, [doxygen], [none])  
 fi  
 if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then  
   AC_MSG_ERROR([--with-doxygen option must specify directory argument])  
 elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then  
   AC_MSG_ERROR([doxygen not found at $DOXYGEN])  
 elif test x$DOXYGEN != xnone ; then  
 dnl  
 dnl verify that $DOXYGEN is an absolute path  
 dnl  
   case $DOXYGEN in  
     /*) ;;  
     *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;  
   esac  
 fi  
 if test $DOXYGEN = xnone ; then  
   DOXYGEN=:  
 fi  
 AC_SUBST(DOXYGEN)  
   
74  dnl  dnl
75  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
76  dnl  dnl
# Line 128  Line 106 
106  else  else
107    CL_ENABLED=true    CL_ENABLED=true
108    CPPFLAGS_CL=""    CPPFLAGS_CL=""
109    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])    CL_HEADER=""
110      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
111    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
112      # check for AMD's SDK      # check for AMD's SDK
113      AC_MSG_CHECKING([for cl.h in AMD's SDK])      AC_MSG_CHECKING([for cl.h in AMD's SDK])
114      if test -d /opt/AMDAPP/include/CL ; then      if test -d /opt/AMDAPP/include/CL ; then
115        HAVE_CL_H="yes"        HAVE_CL_H="yes"
116          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
117        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
118        CPPFLAGS_CL="-I/opt/AMDAPP/include"        CPPFLAGS_CL="-I/opt/AMDAPP/include"
119      fi      fi
120      AC_MSG_RESULT([$HAVE_CL_H])      AC_MSG_RESULT([$HAVE_CL_H])
121    fi    fi
122    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
123        # check for NVIDIA's SDK
124        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
125        CUDA_HOME=none
126        for CUDA in cuda cuda-7.0 cuda-6.5 cuda-6.0 ; do
127          if test -d /usr/local/$CUDA/include/CL ; then
128            CUDA_HOME=/usr/local/$CUDA
129            break
130          fi
131        done
132        if test x"$CUDA" != xnone ; then
133          HAVE_CL_H="yes"
134          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
135          AC_DEFINE([HAVE_CL_CL_H])
136          CPPFLAGS_CL="-I$CUDA_HOME/include"
137        fi
138        AC_MSG_RESULT([$HAVE_CL_H])
139      fi
140      if test x"$HAVE_CL_H" = xno ; then
141      AC_MSG_WARN([no cl.h found])      AC_MSG_WARN([no cl.h found])
142      CL_ENABLED=false      CL_ENABLED=false
143      CL_VERSION=0      CL_VERSION=0
144        SIZEOF_CL_INT=0
145        SIZEOF_CL_LONG=0
146        SIZEOF_CL_FLOAT=0
147        SIZEOF_CL_DOUBLE=0
148    else    else
149      # check the cl.h header for which version of OpenCL is supported      # check the cl.h header for which version of OpenCL is supported
150      AC_LANG([C])      AC_LANG([C])
# Line 157  Line 159 
159  # else  # else
160  #   error no cl.h  #   error no cl.h
161  # endif]],  # endif]],
162  [[#if defined(CL_VERSION_1_1)  [[#if defined(CL_VERSION_1_2)
163    printf("11000\n");    printf("120\n");
164    #elif defined(CL_VERSION_1_1)
165      printf("110\n");
166  #elif defined(CL_VERSION_1_0)  #elif defined(CL_VERSION_1_0)
167    printf("10000\n");    printf("100\n");
168  #else  #else
169    printf("0\n");    printf("0\n");
170  #endif  #endif
# Line 171  Line 175 
175  dnl the specification specifies the behavior, but it was unspecified in 1.0.  dnl the specification specifies the behavior, but it was unspecified in 1.0.
176  dnl  dnl
177      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
178  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
179  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
180        [[cl_float4 x; x[0] = 0.0;]])],        [[cl_float4 x; x[0] = 0.0;]])],
181        [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],        [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
182  dnl  dnl
183  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
184  dnl  dnl
185        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
186  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
187  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
188        [[cl_float4 x; x.s[0] = 0.0;]])],        [[cl_float4 x; x.s[0] = 0.0;]])],
189        [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])],
190        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
# Line 199  Line 193 
193    # substitutions    # substitutions
194      AC_SUBST(LIBS_CL)      AC_SUBST(LIBS_CL)
195      AC_SUBST(CPPFLAGS_CL)      AC_SUBST(CPPFLAGS_CL)
196      #
197      # determine the sizes of the host-side OpenCL types
198      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
199      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
200      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
201      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
202      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
203      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
204      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
205      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
206    fi    fi
207  fi  fi
208  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
209  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
210    AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])
211    
212    AC_SUBST(SIZEOF_CL_INT)
213    AC_SUBST(SIZEOF_CL_LONG)
214    AC_SUBST(SIZEOF_CL_FLOAT)
215    AC_SUBST(SIZEOF_CL_DOUBLE)
216    
217  dnl  dnl
218  dnl check for various library routines etc.  dnl check for various library routines etc.
# Line 312  Line 322 
322  AC_SUBST(LIBM)  AC_SUBST(LIBM)
323    
324  dnl  dnl
325  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation.  We need this to build the Diderot
326    dnl runtime code and we use the path when searching for teem in the Diderot
327    dnl compiler.
328  dnl  dnl
329  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
330    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
# Line 329  Line 341 
341      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
342      # check that TEEM_DIR actually points to something that looks like teem      # check that TEEM_DIR actually points to something that looks like teem
343      if test -f $TEEM_DIR/include/teem/nrrd.h ; then      if test -f $TEEM_DIR/include/teem/nrrd.h ; then
344        AC_MSG_RESULT([ okay])        AC_MSG_RESULT([yes])
345      else      else
346        TEEM_DIR=none        TEEM_DIR=none
347        AC_MSG_RESULT([ invalid])        AC_MSG_RESULT([no])
348      fi      fi
349    else    else
350      TEEM_DIR=none      TEEM_DIR=none
351      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
352    fi    fi
353  fi  fi
354  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
355    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
356    fi
357    dnl
358    dnl check that unu supports the dnorm command
359    dnl
360    if test x"$TEEM_DIR" != xnone ; then
361      AC_MSG_CHECKING([that \"unu dnorm\" works])
362      if test -x $TEEM_DIR/bin/unu ; then
363        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
364        if test $? -eq 0 ; then
365          AC_MSG_RESULT([yes])
366        else
367          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
368        fi
369      else
370        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
371      fi
372  fi  fi
373  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
374    
# Line 351  Line 379 
379  dnl  dnl
380  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])])
381  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
382    -o $SMLNJ_MINOR_VERSION -lt 73    -o $SMLNJ_MINOR_VERSION -lt 79
383  then  then
384    AC_MSG_ERROR([installation requires SML/NJ version 110.73+])    AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)])
385  fi  fi
386  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
387    
# Line 384  Line 412 
412  fi  fi
413  AC_SUBST(ML_BUILD)  AC_SUBST(ML_BUILD)
414    
415    dnl ******************** Documentation tools ********************
416    
417    dnl check for doxygen
418    dnl
419    AC_ARG_WITH([doxygen],
420      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
421      [DOXYGEN=$with_doxygen],
422      [DOXYGEN=none])
423    if test x$DOXYGEN = xnone ; then
424      # see if we can find doxygen in the user's path
425      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
426    fi
427    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
428      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
429    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
430      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
431    elif test x$DOXYGEN != xnone ; then
432    dnl
433    dnl verify that $DOXYGEN is an absolute path
434    dnl
435      case $DOXYGEN in
436        /*) ;;
437        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
438      esac
439    fi
440    if test $DOXYGEN = xnone ; then
441      DOXYGEN=:
442    fi
443    AC_SUBST(DOXYGEN)
444    
445    dnl check for asciidoc and related tools
446    dnl
447    AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
448    AC_PATH_PROGS([A2X], [a2x], [none])
449    AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
450    AC_PATH_PROGS([DBLATEX], [dblatex], [none])
451    
452    dnl
453    dnl get the path to the asciidoc cofiguration files
454    dnl
455    if test x"$ASCIIDOC" != xnone ; then
456      AC_MSG_CHECKING([path to asciidoc configuration files])
457      ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`
458      AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
459    fi
460    AC_SUBST(ASCIIDOC)
461    AC_SUBST(A2X)
462    AC_SUBST(ASCIIDOC_CONF_DIR)
463    AC_SUBST(HIGHLIGHTER)
464    AC_SUBST(DBLATEX)
465    
466    
467  dnl ******************** Paths ********************  dnl ******************** Paths ********************
468    
469  DIDEROT_ROOT=`pwd`  DIDEROT_ROOT=`pwd`
# Line 413  Line 493 
493  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
494  dnl  dnl
495  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
496  CFLAGS="$CFLAGS $CFLAG_M64"  CFLAGS="$CFLAGS $CFLAG_MXX"
497    
498  dnl  dnl
499  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 429  Line 509 
509    
510  AC_C_BIGENDIAN  AC_C_BIGENDIAN
511    
512    #
513    # determine the sizes of the standard C types
514    AC_CHECK_SIZEOF([int])
515    SIZEOF_C_INT=$ac_cv_sizeof_int
516    AC_CHECK_SIZEOF([long])
517    SIZEOF_C_LONG=$ac_cv_sizeof_long
518    AC_CHECK_SIZEOF([float])
519    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
520    AC_CHECK_SIZEOF([double])
521    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
522    
523    AC_SUBST(SIZEOF_C_INT)
524    AC_SUBST(SIZEOF_C_LONG)
525    AC_SUBST(SIZEOF_C_FLOAT)
526    AC_SUBST(SIZEOF_C_DOUBLE)
527    
528  dnl  dnl
529  dnl restore CFLAGS  dnl restore CFLAGS
530  dnl  dnl
# Line 442  Line 538 
538    
539  AH_TOP([  AH_TOP([
540  /*  /*
541   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2014 Diderot project. (http://diderot-language.cs.uchicago.edu)
542   * All rights reserved.   * All rights reserved.
543   */   */
544    
# Line 452  Line 548 
548  ])  ])
549  AH_BOTTOM([  AH_BOTTOM([
550    
551    #ifdef NDEBUG
552    #define STATIC_INLINE   static inline
553    #else
554    #define STATIC_INLINE   static
555    #endif
556    
557  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
558  ])  ])
559    
# Line 464  Line 566 
566  dnl ***** Makefiles *****  dnl ***** Makefiles *****
567    Makefile    Makefile
568    doc/Makefile    doc/Makefile
569      doc/man/Makefile
570    src/clinfo/Makefile    src/clinfo/Makefile
   src/dnorm/Makefile  
571    src/compiler/Makefile    src/compiler/Makefile
572    src/lib/build/Makefile    src/lib/build/Makefile
573    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
# Line 476  Line 578 
578    test/hlic/Makefile    test/hlic/Makefile
579  dnl  dnl
580  dnl ***** SML source files *****  dnl ***** SML source files *****
581    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
582    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
583      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
584  )  )
585    
586  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 497  Line 600 
600  AC_CONFIG_FILES([  AC_CONFIG_FILES([
601    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
602  ], [chmod +x rtest/scripts/run-one.sh])  ], [chmod +x rtest/scripts/run-one.sh])
603    #
604    # more regression tests; should merge with rtest at some point
605    #
606    AC_CONFIG_FILES([
607      rtest2/scripts/run.sh:rtest2/scripts/run_sh.in
608    ], [chmod +x rtest2/scripts/run.sh])
609    AC_CONFIG_FILES([
610      rtest2/scripts/run-one.sh:rtest2/scripts/run-one_sh.in
611    ], [chmod +x rtest2/scripts/run-one.sh])
612    
613  dnl  dnl
614  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds

Legend:
Removed from v.1941  
changed lines
  Added in v.3340

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