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 1930, Tue Jun 26 13:13:39 2012 UTC revision 3349, Tue Oct 27 15:16:36 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
65  dnl check for pthreads support  dnl standard headers
66  dnl  dnl
67  ACX_PTHREAD()  AC_HEADER_STDBOOL
68    
 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  
69  dnl  dnl
70  dnl verify that $DOXYGEN is an absolute path  dnl check for pthreads support
71  dnl  dnl
72    case $DOXYGEN in  ACX_PTHREAD
     /*) ;;  
     *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;  
   esac  
 fi  
 if test $DOXYGEN = xnone ; then  
   DOXYGEN=:  
 fi  
 AC_SUBST(DOXYGEN)  
73    
74  dnl  dnl
75  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
# Line 123  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        if test -d /usr/local/cuda/include/CL ; then
126          HAVE_CL_H="yes"
127          AC_DEFINE([HAVE_CL_CL_H])
128          CPPFLAGS_CL="-I/usr/local/cuda/include"
129        fi
130        AC_MSG_RESULT([$HAVE_CL_H])
131      fi
132      if test x"$HAVE_CL_H" = xno ; then
133      AC_MSG_WARN([no cl.h found])      AC_MSG_WARN([no cl.h found])
134      CL_ENABLED=false      CL_ENABLED=false
135      CL_VERSION=0      CL_VERSION=0
136        SIZEOF_CL_INT=0
137        SIZEOF_CL_LONG=0
138        SIZEOF_CL_FLOAT=0
139        SIZEOF_CL_DOUBLE=0
140    else    else
141      # check the cl.h header for which version of OpenCL is supported      # check the cl.h header for which version of OpenCL is supported
142      AC_LANG([C])      AC_LANG([C])
# Line 166  Line 165 
165  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.
166  dnl  dnl
167      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
168  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
169  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
170        [[cl_float4 x; x[0] = 0.0;]])],        [[cl_float4 x; x[0] = 0.0;]])],
171        [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])],
172  dnl  dnl
173  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
174  dnl  dnl
175        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
176  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
177  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
178        [[cl_float4 x; x.s[0] = 0.0;]])],        [[cl_float4 x; x.s[0] = 0.0;]])],
179        [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])],
180        [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 194  Line 183 
183    # substitutions    # substitutions
184      AC_SUBST(LIBS_CL)      AC_SUBST(LIBS_CL)
185      AC_SUBST(CPPFLAGS_CL)      AC_SUBST(CPPFLAGS_CL)
186      #
187      # determine the sizes of the host-side OpenCL types
188      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
189      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
190      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
191      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
192      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
193      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
194      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
195      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
196    fi    fi
197  fi  fi
198  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
199  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
200    
201    AC_SUBST(SIZEOF_CL_INT)
202    AC_SUBST(SIZEOF_CL_LONG)
203    AC_SUBST(SIZEOF_CL_FLOAT)
204    AC_SUBST(SIZEOF_CL_DOUBLE)
205    
206  dnl  dnl
207  dnl check for various library routines etc.  dnl check for various library routines etc.
208  dnl  dnl
# Line 307  Line 311 
311  AC_SUBST(LIBM)  AC_SUBST(LIBM)
312    
313  dnl  dnl
314  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation.  We need this to build the Diderot
315    dnl runtime code and we use the path when searching for teem in the Diderot
316    dnl compiler.
317  dnl  dnl
318  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
319    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
# Line 324  Line 330 
330      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
331      # check that TEEM_DIR actually points to something that looks like teem      # check that TEEM_DIR actually points to something that looks like teem
332      if test -f $TEEM_DIR/include/teem/nrrd.h ; then      if test -f $TEEM_DIR/include/teem/nrrd.h ; then
333        AC_MSG_RESULT([ okay])        AC_MSG_RESULT([yes])
334      else      else
335        TEEM_DIR=none        TEEM_DIR=none
336        AC_MSG_RESULT([ invalid])        AC_MSG_RESULT([no])
337      fi      fi
338    else    else
339      TEEM_DIR=none      TEEM_DIR=none
340      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
341    fi    fi
342  fi  fi
343  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
344    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
345    fi
346    dnl
347    dnl check that unu supports the dnorm command
348    dnl
349    if test x"$TEEM_DIR" != xnone ; then
350      AC_MSG_CHECKING([that \"unu dnorm\" works])
351      if test -x $TEEM_DIR/bin/unu ; then
352        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
353        if test $? -eq 0 ; then
354          AC_MSG_RESULT([yes])
355        else
356          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
357        fi
358      else
359        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
360      fi
361  fi  fi
362  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
363    
# Line 346  Line 368 
368  dnl  dnl
369  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])])
370  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
371    -o $SMLNJ_MINOR_VERSION -lt 73    -o $SMLNJ_MINOR_VERSION -lt 77
372  then  then
373    AC_MSG_ERROR([installation requires SML/NJ version 110.73+])    AC_MSG_ERROR([installation requires SML/NJ version 110.77+ (available from smlnj.org)])
374  fi  fi
375  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
376    
# Line 379  Line 401 
401  fi  fi
402  AC_SUBST(ML_BUILD)  AC_SUBST(ML_BUILD)
403    
404    dnl ******************** Documentation tools ********************
405    
406    dnl check for doxygen
407    dnl
408    AC_ARG_WITH([doxygen],
409      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
410      [DOXYGEN=$with_doxygen],
411      [DOXYGEN=none])
412    if test x$DOXYGEN = xnone ; then
413      # see if we can find doxygen in the user's path
414      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
415    fi
416    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
417      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
418    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
419      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
420    elif test x$DOXYGEN != xnone ; then
421    dnl
422    dnl verify that $DOXYGEN is an absolute path
423    dnl
424      case $DOXYGEN in
425        /*) ;;
426        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
427      esac
428    fi
429    if test $DOXYGEN = xnone ; then
430      DOXYGEN=:
431    fi
432    AC_SUBST(DOXYGEN)
433    
434    dnl check for asciidoc and related tools
435    dnl
436    AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
437    AC_PATH_PROGS([A2X], [a2x], [none])
438    AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
439    AC_PATH_PROGS([DBLATEX], [dblatex], [none])
440    
441    dnl
442    dnl get the path to the asciidoc cofiguration files
443    dnl
444    if test x"$ASCIIDOC" != xnone ; then
445      AC_MSG_CHECKING([path to asciidoc configuration files])
446      ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`
447      AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
448    fi
449    AC_SUBST(ASCIIDOC)
450    AC_SUBST(A2X)
451    AC_SUBST(ASCIIDOC_CONF_DIR)
452    AC_SUBST(HIGHLIGHTER)
453    AC_SUBST(DBLATEX)
454    
455    
456  dnl ******************** Paths ********************  dnl ******************** Paths ********************
457    
458  DIDEROT_ROOT=`pwd`  DIDEROT_ROOT=`pwd`
# Line 408  Line 482 
482  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
483  dnl  dnl
484  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
485  CFLAGS="$CFLAGS $CFLAG_M64"  CFLAGS="$CFLAGS $CFLAG_MXX"
486    
487  dnl  dnl
488  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 424  Line 498 
498    
499  AC_C_BIGENDIAN  AC_C_BIGENDIAN
500    
501    #
502    # determine the sizes of the standard C types
503    AC_CHECK_SIZEOF([int])
504    SIZEOF_C_INT=$ac_cv_sizeof_int
505    AC_CHECK_SIZEOF([long])
506    SIZEOF_C_LONG=$ac_cv_sizeof_long
507    AC_CHECK_SIZEOF([float])
508    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
509    AC_CHECK_SIZEOF([double])
510    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
511    
512    AC_SUBST(SIZEOF_C_INT)
513    AC_SUBST(SIZEOF_C_LONG)
514    AC_SUBST(SIZEOF_C_FLOAT)
515    AC_SUBST(SIZEOF_C_DOUBLE)
516    
517  dnl  dnl
518  dnl restore CFLAGS  dnl restore CFLAGS
519  dnl  dnl
# Line 437  Line 527 
527    
528  AH_TOP([  AH_TOP([
529  /*  /*
530   * COPYRIGHT (c) 2011 Diderot project. (http://diderot-language.cs.uchicago.edu)   * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
531   * All rights reserved.   *
532     * COPYRIGHT (c) 2015 The University of Chicago * All rights reserved.
533   */   */
534    
535  #ifndef _DIDEROT_CONFIG_H_  #ifndef _DIDEROT_CONFIG_H_
# Line 447  Line 538 
538  ])  ])
539  AH_BOTTOM([  AH_BOTTOM([
540    
541    #ifdef NDEBUG
542    #define STATIC_INLINE   static inline
543    #else
544    #define STATIC_INLINE   static
545    #endif
546    
547  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
548  ])  ])
549    
# Line 459  Line 556 
556  dnl ***** Makefiles *****  dnl ***** Makefiles *****
557    Makefile    Makefile
558    doc/Makefile    doc/Makefile
559      doc/man/Makefile
560    src/clinfo/Makefile    src/clinfo/Makefile
   src/dnorm/Makefile  
561    src/compiler/Makefile    src/compiler/Makefile
562    src/lib/build/Makefile    src/lib/build/Makefile
563    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
564    test/MIP/Makefile    test/MIP/Makefile
565    test/probe/Makefile    test/probe/Makefile
566      test/iso2d-polyline/Makefile
567      test/vr-lite-cam/Makefile
568      test/hlic/Makefile
569  dnl  dnl
570  dnl ***** SML source files *****  dnl ***** SML source files *****
571    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
572    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
573      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
574  )  )
575    
576  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)

Legend:
Removed from v.1930  
changed lines
  Added in v.3349

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