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 2441, Wed Sep 25 17:00:08 2013 UTC branches/vis15/configure.ac revision 3715, Sat Apr 2 17:23:54 2016 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,1.0,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2013 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2015 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)  AC_CONFIG_SRCDIR(src/compiler/options/ctl.sml)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
16    
17  dnl  dnl
18    dnl set the following to the name of the branch
19    dnl
20    BRANCH="master"
21    AC_SUBST(BRANCH)
22    
23    dnl
24  dnl include additional macros  dnl include additional macros
25  dnl  dnl
26  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
# Line 120  Line 128 
128    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
129      # check for NVIDIA's SDK      # check for NVIDIA's SDK
130      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
131      if test -d /usr/local/cuda/include/CL ; then      CUDA_HOME=none
132        for CUDA in cuda cuda-7.0 cuda-6.5 cuda-6.0 ; do
133          if test -d /usr/local/$CUDA/include/CL ; then
134            CUDA_HOME=/usr/local/$CUDA
135            break
136          fi
137        done
138        if test x"$CUDA_HOME" != xnone ; then
139        HAVE_CL_H="yes"        HAVE_CL_H="yes"
140          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
141        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
142        CPPFLAGS_CL="-I/usr/local/cuda/include"        CPPFLAGS_CL="-I$CUDA_HOME/include"
143      fi      fi
144      AC_MSG_RESULT([$HAVE_CL_H])      AC_MSG_RESULT([$HAVE_CL_H])
145    fi    fi
# Line 149  Line 165 
165  # else  # else
166  #   error no cl.h  #   error no cl.h
167  # endif]],  # endif]],
168  [[#if defined(CL_VERSION_1_1)  [[#if defined(CL_VERSION_1_2)
169    printf("11000\n");    printf("120\n");
170    #elif defined(CL_VERSION_1_1)
171      printf("110\n");
172  #elif defined(CL_VERSION_1_0)  #elif defined(CL_VERSION_1_0)
173    printf("10000\n");    printf("100\n");
174  #else  #else
175    printf("0\n");    printf("0\n");
176  #endif  #endif
# Line 195  Line 213 
213  fi  fi
214  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
215  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
216    AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])
217    
218  AC_SUBST(SIZEOF_CL_INT)  AC_SUBST(SIZEOF_CL_INT)
219  AC_SUBST(SIZEOF_CL_LONG)  AC_SUBST(SIZEOF_CL_LONG)
# Line 328  Line 347 
347      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
348      # check that TEEM_DIR actually points to something that looks like teem      # check that TEEM_DIR actually points to something that looks like teem
349      if test -f $TEEM_DIR/include/teem/nrrd.h ; then      if test -f $TEEM_DIR/include/teem/nrrd.h ; then
350        AC_MSG_RESULT([ okay])        AC_MSG_RESULT([yes])
351      else      else
352        TEEM_DIR=none        TEEM_DIR=none
353        AC_MSG_RESULT([ invalid])        AC_MSG_RESULT([no])
354      fi      fi
355    else    else
356      TEEM_DIR=none      TEEM_DIR=none
357      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
358    fi    fi
359  fi  fi
360  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
361    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
362  fi  fi
363    dnl
364    dnl check that unu supports the dnorm command
365    dnl
366    if test x"$TEEM_DIR" != xnone ; then
367      AC_MSG_CHECKING([that \"unu dnorm\" works])
368      if test -x $TEEM_DIR/bin/unu ; then
369        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
370        if test $? -eq 0 ; then
371          AC_MSG_RESULT([yes])
372        else
373          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
374        fi
375      else
376        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
377      fi
378    fi
379  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
380    
381  dnl ******************** SML/NJ configuration ********************  dnl ******************** SML/NJ configuration ********************
382  dnl  dnl
383    dnl We support building with both SML/NJ (the default) or MLton.
384    dnl
385    
386    dnl first check for --with-mlton=path flag
387    dnl
388    AC_ARG_WITH([mlton],
389      [AS_HELP_STRING([--with-mlton=<path-to-mlton>],
390        [use the MLton Standard ML compiler to build Diderot])],
391      [with_mlton=yes],[with_mlton=no])
392    if test x"$with_mlton" = xyes ; then
393      if test x"$ac_cv_path_with_mlton" = x ; then
394        # look for mlton in the PATH
395        AC_PATH_PROGS(with_mlton, mlton, no)
396        if test x"$MLTON" = xno ; then
397          AC_MSG_ERROR([unable to find mlton executable; please specify the path])
398        fi
399      else
400        with_mlton=$ac_cv_path_with_mlton
401        case $with_mlton in
402          /*) ;;
403          *) AC_MSG_ERROR([please specify absolute path for mlton executable]) ;;
404        esac
405        if test ! -x $with_mlton ; then
406          AC_MSG_ERROR([invalid path for mlton; $with_mlton is not executable])
407        fi
408      fi
409    fi
410    
411    if test $with_mlton = xno ; then
412      # we are using SML/NJ
413      #
414    
415  dnl check that we have a compatible version of SML/NJ  dnl check that we have a compatible version of SML/NJ
416  dnl  dnl
417  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])])
418  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
419    -o $SMLNJ_MINOR_VERSION -lt 74      -o $SMLNJ_MINOR_VERSION -lt 79
420  then  then
421    AC_MSG_ERROR([installation requires SML/NJ version 110.74+])      AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)])
422  fi  fi
 AC_SUBST(SMLNJ_VERSION)  
423    
424  dnl determine the heap-image suffix  dnl determine the heap-image suffix
425  dnl  dnl
# Line 382  Line 447 
447    AC_MSG_ERROR([ml-build not found])    AC_MSG_ERROR([ml-build not found])
448  fi  fi
449  AC_SUBST(ML_BUILD)  AC_SUBST(ML_BUILD)
450      SML=smlnj
451    
452    else
453      # we are using MLton
454      MLTON=$with_mlton
455      AC_SUBST(MLTON)
456      SML=mlton
457    fi
458    AC_SUBST(SML)
459    
460  dnl ******************** Documentation tools ********************  dnl ******************** Documentation tools ********************
461    
462  dnl check for doxygen  dnl check for doxygen
463  dnl  dnl
464  AC_ARG_WITH([doxygen],  AC_ARG_WITH([doxygen],
465    [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],    [AS_HELP_STRING([--with-doxygen=<path>], [specify location of doxygen executable])],
466    [DOXYGEN=$with_doxygen],    [DOXYGEN=$with_doxygen],
467    [DOXYGEN=none])    [DOXYGEN=none])
468  if test x$DOXYGEN = xnone ; then  if test x$DOXYGEN = xnone ; then
# Line 416  Line 490 
490  dnl check for asciidoc and related tools  dnl check for asciidoc and related tools
491  dnl  dnl
492  AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])  AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
493    AC_PATH_PROGS([A2X], [a2x], [none])
494  AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])  AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
495  AC_PATH_PROGS([DBLATEX], [dblatex], [none])  AC_PATH_PROGS([DBLATEX], [dblatex], [none])
496    
# Line 428  Line 503 
503    AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])    AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
504  fi  fi
505  AC_SUBST(ASCIIDOC)  AC_SUBST(ASCIIDOC)
506    AC_SUBST(A2X)
507  AC_SUBST(ASCIIDOC_CONF_DIR)  AC_SUBST(ASCIIDOC_CONF_DIR)
508  AC_SUBST(HIGHLIGHTER)  AC_SUBST(HIGHLIGHTER)
509  AC_SUBST(DBLATEX)  AC_SUBST(DBLATEX)
# Line 507  Line 583 
583    
584  AH_TOP([  AH_TOP([
585  /*  /*
586   * 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)
587   * All rights reserved.   *
588     * COPYRIGHT (c) 2015 The University of Chicago * All rights reserved.
589   */   */
590    
591  #ifndef _DIDEROT_CONFIG_H_  #ifndef _DIDEROT_CONFIG_H_
# Line 530  Line 607 
607  dnl ******************** write output ********************  dnl ******************** write output ********************
608  dnl  dnl
609    
610    dnl The compiler Makefile depends on which SML system we are
611    dnl using.
612    AC_MSG_NOTICE([using $SML])
613    if test x"$SML" = xmlton ; then
614      COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"
615    else
616      COMPILER_MAKEFILE_IN=""
617    fi
618    
619  AC_CONFIG_FILES(  AC_CONFIG_FILES(
620  dnl  dnl
621  dnl ***** Makefiles *****  dnl ***** Makefiles *****
622    Makefile    Makefile
623    doc/Makefile  dnl  doc/Makefile
624    doc/man/Makefile  dnl  doc/man/Makefile
625    src/clinfo/Makefile  dnl  src/clinfo/Makefile
626    src/compiler/Makefile    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
627    src/lib/build/Makefile  dnl  src/lib/build/Makefile
628    src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in  dnl  src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
629    test/MIP/Makefile  dnl  test/MIP/Makefile
630    test/probe/Makefile  dnl  test/probe/Makefile
631    test/iso2d-polyline/Makefile  dnl  test/iso2d-polyline/Makefile
632    test/vr-lite-cam/Makefile  dnl  test/vr-lite-cam/Makefile
633    test/hlic/Makefile  dnl  test/hlic/Makefile
634  dnl  dnl
635  dnl ***** SML source files *****  dnl ***** SML source files *****
636    src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in    src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in
637    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
638    src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in    src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
639      src/compiler/options/version.sml:src/compiler/options/version_sml.in
640  )  )
641    
642  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 560  Line 647 
647  AC_CONFIG_FILES([  AC_CONFIG_FILES([
648    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
649  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
650  AC_CONFIG_FILES([  # AC_CONFIG_FILES([
651    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
652  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  # ], [chmod +x src/compiler/gen/file2str/file2str.sh])
653  AC_CONFIG_FILES([  # AC_CONFIG_FILES([
654    rtest/scripts/run.sh:rtest/scripts/run_sh.in  #   rtest/scripts/run.sh:rtest/scripts/run_sh.in
655  ], [chmod +x rtest/scripts/run.sh])  # ], [chmod +x rtest/scripts/run.sh])
656  AC_CONFIG_FILES([  # AC_CONFIG_FILES([
657    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in  #   rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
658  ], [chmod +x rtest/scripts/run-one.sh])  # ], [chmod +x rtest/scripts/run-one.sh])
659    #
660    # more regression tests; should merge with rtest at some point
661    #
662    # AC_CONFIG_FILES([
663    #   rtest2/scripts/run.sh:rtest2/scripts/run_sh.in
664    # ], [chmod +x rtest2/scripts/run.sh])
665    # AC_CONFIG_FILES([
666    #   rtest2/scripts/run-one.sh:rtest2/scripts/run-one_sh.in
667    # ], [chmod +x rtest2/scripts/run-one.sh])
668    
669  dnl  dnl
670  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 587  Line 683 
683      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
684    ])    ])
685    
686  MK_BUILD_DIR(rt-c-f, c, [float])  #MK_BUILD_DIR(rt-c-f, c, [float])
687  MK_BUILD_DIR(rt-c-d, c, [double])  #MK_BUILD_DIR(rt-c-d, c, [double])
688  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])  #MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
689  MK_BUILD_DIR(rt-c-d-debug, c, [double debug])  #MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
690  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])  #MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
691  MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])  #MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
692  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])  #MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
693  MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])  #MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
694    
695  if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
696    MK_BUILD_DIR(rt-cl-f, cl, [float])  #  MK_BUILD_DIR(rt-cl-f, cl, [float])
697    MK_BUILD_DIR(rt-cl-d, cl, [double])  #  MK_BUILD_DIR(rt-cl-d, cl, [double])
698    MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])  #  MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
699    MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])  #  MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
700  fi  #fi
701    
702  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.2441  
changed lines
  Added in v.3715

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