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

SCM Repository

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

Diff of /branches/vis12/configure.ac

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

trunk/configure.ac revision 126, Tue Jun 29 16:16:27 2010 UTC branches/vis12/configure.ac revision 2772, Sat Oct 11 23:47:33 2014 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) 2014 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]])  AC_COPYRIGHT([[COPYRIGHT (c) 2014 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])
11  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)
12  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
13  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
14    
# Line 20  Line 18 
18  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
19  sinclude(config/check_smlnj.m4)  sinclude(config/check_smlnj.m4)
20  sinclude(config/check_smlnj_heap_suffix.m4)  sinclude(config/check_smlnj_heap_suffix.m4)
21    sinclude(config/ax_check_framework.m4)
22    
23  dnl  dnl
24  dnl get host information  dnl get host information
# Line 29  Line 27 
27    
28  dnl check for standard programs  dnl check for standard programs
29  dnl  dnl
30  AC_PROG_CC_C99  AC_PROG_CC([clang gcc cc])
31  AC_PROG_CPP  AC_PROG_CPP
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
44    dnl
45    AC_PROG_CC_C99
46    if test x"$ac_cv_prog_cc_c99" = xno ; then
47      AC_MSG_ERROR([Diderot requires c99 support])
48    fi
49    
50    AC_ARG_ENABLE([32-bit],
51      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
52      [CFLAG_MXX="-m32"],
53      [CFLAG_MXX="-m64"])
54    
55    dnl extra C compiler options
56    dnl
57    CFLAGS=""
58    CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
59    AC_SUBST(CFLAG_MXX)
60    AC_SUBST(CFLAGS_BASE)
61    
62    dnl
63    dnl standard headers
64    dnl
65    AC_HEADER_STDBOOL
66    
67  dnl  dnl
68  dnl If we are on Mac OS X, check for the presence of macports and/or fink  dnl check for pthreads support
69  dnl  dnl
70    ACX_PTHREAD
71    
72    dnl
73    dnl Look for NVIDIA's nvcc compiler
74    dnl
75    AC_MSG_NOTICE([checking for CUDA and nvcc])
76    AC_PATH_PROG(NVCC, nvcc, no, $PATH)
77    if test x"$NVCC" = xno ; then
78      AC_MSG_WARN([nvcc not found])
79      CUDA_ENABLED=false
80      NVCC=":"
81    else
82      AC_MSG_RESULT([$NVCC])
83      CUDA_ENABLED=true
84    fi
85    AC_SUBST(NVCC)
86    AC_SUBST(CUDA_ENABLED)
87    
88    dnl
89    dnl check for OpenCL support
90    dnl
91    LIBS_CL="none"
92  case "$host_os" in  case "$host_os" in
93    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
94        AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
95      ;;
96      *)
97        AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
98      ;;
99    esac
100    if test x"$LIBS_CL" = xnone ; then
101      AC_MSG_WARN([no OpenCL library found])
102      CL_ENABLED=false
103      CL_VERSION=0
104    else
105      CL_ENABLED=true
106      CPPFLAGS_CL=""
107      CL_HEADER=""
108      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
109      if test x"$HAVE_CL_H" = xno ; then
110        # check for AMD's SDK
111        AC_MSG_CHECKING([for cl.h in AMD's SDK])
112        if test -d /opt/AMDAPP/include/CL ; then
113          HAVE_CL_H="yes"
114          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
115          AC_DEFINE([HAVE_CL_CL_H])
116          CPPFLAGS_CL="-I/opt/AMDAPP/include"
117        fi
118        AC_MSG_RESULT([$HAVE_CL_H])
119      fi
120      if test x"$HAVE_CL_H" = xno ; then
121        # check for NVIDIA's SDK
122        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
123        if test -d /usr/local/cuda/include/CL ; then
124          HAVE_CL_H="yes"
125          CL_HEADER="/usr/local/cuda/include/CL/cl.h"
126          AC_DEFINE([HAVE_CL_CL_H])
127          CPPFLAGS_CL="-I/usr/local/cuda/include"
128        fi
129        AC_MSG_RESULT([$HAVE_CL_H])
130      fi
131      if test x"$HAVE_CL_H" = xno ; then
132        AC_MSG_WARN([no cl.h found])
133        CL_ENABLED=false
134        CL_VERSION=0
135        SIZEOF_CL_INT=0
136        SIZEOF_CL_LONG=0
137        SIZEOF_CL_FLOAT=0
138        SIZEOF_CL_DOUBLE=0
139      else
140        # check the cl.h header for which version of OpenCL is supported
141        AC_LANG([C])
142        save_CPPFLAGS=$CPPFLAGS
143        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
144        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
145    #include <stdio.h>
146    # ifdef HAVE_CL_CL_H
147    #   include <CL/cl.h>
148    # elif defined(HAVE_OPENCL_CL_H)
149    #   include <OpenCL/cl.h>
150    # else
151    #   error no cl.h
152    # endif]],
153    [[#if defined(CL_VERSION_1_2)
154      printf("12000\n");
155    #elif defined(CL_VERSION_1_1)
156      printf("11000\n");
157    #elif defined(CL_VERSION_1_0)
158      printf("10000\n");
159    #else
160      printf("0\n");
161    #endif
162          ]])],
163          [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
164    dnl
165    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
166    dnl the specification specifies the behavior, but it was unspecified in 1.0.
167    dnl
168        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
169    #include "$CL_HEADER"
170    ]],
171          [[cl_float4 x; x[0] = 0.0;]])],
172          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
173    dnl
174    dnl not arrays, so try the OpenCL 1.1 structure representation
175    dnl
176          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
177    #include "$CL_HEADER"
178    ]],
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
185        AC_SUBST(LIBS_CL)
186        AC_SUBST(CPPFLAGS_CL)
187      #
188      # determine the sizes of the host-side OpenCL types
189      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
190      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
191      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
192      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
193      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
194      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
195      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
196      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
197      fi
198    fi
199    AC_SUBST(CL_ENABLED)
200    AC_SUBST(CL_VERSION)
201    
202    AC_SUBST(SIZEOF_CL_INT)
203    AC_SUBST(SIZEOF_CL_LONG)
204    AC_SUBST(SIZEOF_CL_FLOAT)
205    AC_SUBST(SIZEOF_CL_DOUBLE)
206    
207    dnl
208    dnl check for various library routines etc.
209    dnl
210    AC_CHECK_FUNCS(posix_memalign)
211    if test x"$ac_cv_func_posix_memalign" != xyes ; then
212      AC_CHECK_FUNCS(memalign)
213      if test x"$ac_cv_func_posix_memalign" != xyes ; then
214        AC_CHECK_FUNCS(valloc)
215      fi
216    fi
217    
218    AC_CHECK_FUNCS(mach_absolute_time)
219    AC_CHECK_TYPES([struct timespec])
220    AC_CHECK_FUNCS(pthread_barrier_init)
221    
222    dnl
223    dnl check for clock_gettime.  On Linux, this requires librt.
224    dnl
225    save_LIBS=$LIBS
226    LIBS="-lrt $LIBS"
227    AC_MSG_CHECKING([for clock_gettime])
228    AC_LINK_IFELSE(
229      [AC_LANG_PROGRAM(
230        [[#include <time.h>]],
231        [[struct timespec t; clock_gettime(CLOCK_REALTIME, &t); ]])],
232      [ ac_cv_func_clock_gettime=yes;
233        AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [is clock_gettime available?])],
234      [ac_cv_func_clock_gettime=no])
235    AC_MSG_RESULT($ac_cv_func_clock_gettime)
236    if test "$ac_cv_func_clock_gettime" = "no" ; then
237      LIBS=$save_LIBS
238    fi
239    
240    AC_CHECK_FUNCS(pthread_getcpuclockid)
241    AC_CHECK_FUNCS(sigtimedwait nanosleep)
242    
243    dnl
244    dnl check for sched_setaffinity
245    dnl
246    AC_CHECK_FUNCS(sched_setaffinity)
247    
248    dnl
249    dnl check for pthread_setaffinity_np
250    dnl
251    save_LIBS=$LIBS
252    save_CFLAGS=$CFLAGS
253    LIBS="$PTHREAD_LIBS $LIBS"
254    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
255    AC_MSG_CHECKING([for pthread_setaffinity_np])
256    AC_LINK_IFELSE(
257      [AC_LANG_PROGRAM(
258        [[#include <pthread.h>]],
259        [[cpu_set_t s; pthread_setaffinity_np(pthread_self(), sizeof(s), &s); ]])],
260      [ ac_cv_func_pthread_setaffinity_np=yes;
261        AC_DEFINE(HAVE_PTHREAD_SETAFFINITY_NP, [1], [is pthread_setaffinity_np available?])],
262      [ac_cv_func_pthread_setaffinity_np=no])
263    AC_MSG_RESULT($ac_cv_func_pthread_setaffinity_np)
264    LIBS=$save_LIBS
265    CFLAGS=$save_CFLAGS
266    
267    dnl
268    dnl check for Linux NUMA support (libnuma)
269    dnl
270    AC_CHECK_LIB(numa,numa_available)
271    if test "$ac_cv_lib_numa_numa_available" = "yes" ; then
272      PTHREAD_LIBS="$PTHREAD_LIBS -lnuma"
273    fi
274    
275    dnl check for /proc/cpuinfo
276    dnl
277    AC_CHECK_FILES(/proc/cpuinfo)
278    
279    dnl
280    dnl OS-specific linking issues
281    dnl
282    LD_NEEDS_RPATH=false;
283    LIBM=""
284    case "$host_os" in
285      darwin*) # On Mac OS X we check for the presence of macports and/or fink
286      if test -x /opt/local/bin/port ; then      if test -x /opt/local/bin/port ; then
287        HAS_MACPORTS=yes        HAS_MACPORTS=yes
288      else      else
# Line 50  Line 294 
294        HAS_FINK=no        HAS_FINK=no
295      fi      fi
296    ;;    ;;
297      linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries
298        LD_NEEDS_RPATH=true
299        LIBM="-lm"
300      ;;
301  esac  esac
302    
303  if test x"$HAS_MACPORTS" = xyes ; then  if test x"$HAS_MACPORTS" = xyes ; then
# Line 60  Line 308 
308    LDPATHS=""    LDPATHS=""
309  fi  fi
310  AC_SUBST(LDPATHS)  AC_SUBST(LDPATHS)
311    AC_SUBST(LD_NEEDS_RPATH)
312    AC_SUBST(LIBM)
313    
314  dnl  dnl
315  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation.  We need this to build the Diderot
316    dnl runtime code and we use the path when searching for teem in the Diderot
317    dnl compiler.
318  dnl  dnl
319  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
320    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
# Line 77  Line 329 
329    esac    esac
330    if test -x $ac_cv_use_teem ; then    if test -x $ac_cv_use_teem ; then
331      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
332      AC_MSG_RESULT([ okay])      # check that TEEM_DIR actually points to something that looks like teem
333        if test -f $TEEM_DIR/include/teem/nrrd.h ; then
334          AC_MSG_RESULT([yes])
335        else
336          TEEM_DIR=none
337          AC_MSG_RESULT([no])
338        fi
339    else    else
340      TEEM_DIR=none      TEEM_DIR=none
341      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
342    fi    fi
343  fi  fi
344  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
345    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
346    fi
347    dnl
348    dnl check that unu supports the dnorm command
349    dnl
350    if test x"$TEEM_DIR" != xnone ; then
351      AC_MSG_CHECKING([that \"unu dnorm\" works])
352      if test -x $TEEM_DIR/bin/unu ; then
353        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
354        if test $? -eq 0 ; then
355          AC_MSG_RESULT([yes])
356        else
357          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
358        fi
359      else
360        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
361      fi
362  fi  fi
363  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
364    
# Line 95  Line 369 
369  dnl  dnl
370  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])])
371  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
372    -o $SMLNJ_MINOR_VERSION -lt 72    -o $SMLNJ_MINOR_VERSION -lt 77
373  then  then
374    AC_MSG_ERROR([installation requires SML/NJ version 110.72+])    AC_MSG_ERROR([installation requires SML/NJ version 110.77+ (available from smlnj.org)])
375  fi  fi
376  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
377    
# Line 128  Line 402 
402  fi  fi
403  AC_SUBST(ML_BUILD)  AC_SUBST(ML_BUILD)
404    
405    dnl ******************** Documentation tools ********************
406    
407    dnl check for doxygen
408    dnl
409    AC_ARG_WITH([doxygen],
410      [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],
411      [DOXYGEN=$with_doxygen],
412      [DOXYGEN=none])
413    if test x$DOXYGEN = xnone ; then
414      # see if we can find doxygen in the user's path
415      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
416    fi
417    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
418      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
419    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
420      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
421    elif test x$DOXYGEN != xnone ; then
422    dnl
423    dnl verify that $DOXYGEN is an absolute path
424    dnl
425      case $DOXYGEN in
426        /*) ;;
427        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
428      esac
429    fi
430    if test $DOXYGEN = xnone ; then
431      DOXYGEN=:
432    fi
433    AC_SUBST(DOXYGEN)
434    
435    dnl check for asciidoc and related tools
436    dnl
437    AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
438    AC_PATH_PROGS([A2X], [a2x], [none])
439    AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
440    AC_PATH_PROGS([DBLATEX], [dblatex], [none])
441    
442    dnl
443    dnl get the path to the asciidoc cofiguration files
444    dnl
445    if test x"$ASCIIDOC" != xnone ; then
446      AC_MSG_CHECKING([path to asciidoc configuration files])
447      ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`
448      AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
449    fi
450    AC_SUBST(ASCIIDOC)
451    AC_SUBST(A2X)
452    AC_SUBST(ASCIIDOC_CONF_DIR)
453    AC_SUBST(HIGHLIGHTER)
454    AC_SUBST(DBLATEX)
455    
456    
457  dnl ******************** Paths ********************  dnl ******************** Paths ********************
458    
459  DIDEROT_ROOT=`pwd`  DIDEROT_ROOT=`pwd`
# Line 150  Line 476 
476  AC_SUBST(INSTALL_SMLNJ_WRAPPER)  AC_SUBST(INSTALL_SMLNJ_WRAPPER)
477    
478  dnl  dnl
479    dnl ******************** C compiler properties ********************
480    dnl
481    
482    dnl
483    dnl run the compiler tests in 64-bit mode
484    dnl
485    save_CFLAGS=$CFLAGS
486    CFLAGS="$CFLAGS $CFLAG_MXX"
487    
488    dnl
489    dnl check for gcc builtin atomic operations
490    dnl
491    AC_MSG_CHECKING([for builtin atomic operations])
492    AC_LINK_IFELSE(
493       [AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);])],
494       AC_MSG_RESULT(yes)
495       AC_DEFINE(
496        [HAVE_BUILTIN_ATOMIC_OPS], 1,
497        [Define to 1 if gcc compiler provides atomic operations.]),
498       AC_MSG_RESULT(no))
499    
500    AC_C_BIGENDIAN
501    
502    #
503    # determine the sizes of the standard C types
504    AC_CHECK_SIZEOF([int])
505    SIZEOF_C_INT=$ac_cv_sizeof_int
506    AC_CHECK_SIZEOF([long])
507    SIZEOF_C_LONG=$ac_cv_sizeof_long
508    AC_CHECK_SIZEOF([float])
509    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
510    AC_CHECK_SIZEOF([double])
511    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
512    
513    AC_SUBST(SIZEOF_C_INT)
514    AC_SUBST(SIZEOF_C_LONG)
515    AC_SUBST(SIZEOF_C_FLOAT)
516    AC_SUBST(SIZEOF_C_DOUBLE)
517    
518    dnl
519    dnl restore CFLAGS
520    dnl
521    CFLAGS=$save_CFLAGS
522    
523    dnl
524    dnl ******************** config.h stuff ********************
525    dnl
526    
527    AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files])
528    
529    AH_TOP([
530    /*
531     * COPYRIGHT (c) 2014 Diderot project. (http://diderot-language.cs.uchicago.edu)
532     * All rights reserved.
533     */
534    
535    #ifndef _DIDEROT_CONFIG_H_
536    #define _DIDEROT_CONFIG_H_
537    
538    ])
539    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_ */
548    ])
549    
550    dnl
551  dnl ******************** write output ********************  dnl ******************** write output ********************
552  dnl  dnl
553    
 dnl ***** Makefiles *****  
554  AC_CONFIG_FILES(  AC_CONFIG_FILES(
555    src/dnorm/Makefile  dnl
556    dnl ***** Makefiles *****
557      Makefile
558      doc/Makefile
559      doc/man/Makefile
560      src/clinfo/Makefile
561    src/compiler/Makefile    src/compiler/Makefile
562      src/lib/build/Makefile
563      src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
564      test/MIP/Makefile
565      test/probe/Makefile
566      test/iso2d-polyline/Makefile
567      test/vr-lite-cam/Makefile
568      test/hlic/Makefile
569    dnl
570    dnl ***** SML source files *****
571      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
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)
577    
578  dnl  dnl
579  dnl shell scripts  dnl shell scripts
580  dnl  dnl
581  AC_CONFIG_FILES([  AC_CONFIG_FILES([
582    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
583  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
584    AC_CONFIG_FILES([
585      src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
586    ], [chmod +x src/compiler/gen/file2str/file2str.sh])
587    AC_CONFIG_FILES([
588      rtest/scripts/run.sh:rtest/scripts/run_sh.in
589    ], [chmod +x rtest/scripts/run.sh])
590    AC_CONFIG_FILES([
591      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
592    ], [chmod +x rtest/scripts/run-one.sh])
593    
594    dnl
595    dnl generate makefiles for runtime library builds
596    dnl
597    dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>)
598    dnl
599    AC_DEFUN([MK_BUILD_DIR], [
600        if test ! -d src/lib/build/$1 ; then
601          mkdir src/lib/build/$1
602        fi
603        [sed -e 's,@BUILD_TARGET@,$1,g' \
604          -e 's,@TARGET_PLATFORM@,$2,g' \
605          -e 's,@BUILD_OPTIONS@,$3,g' \
606          src/lib/build/mk/Makefile.in \
607            > src/lib/build/$1/Makefile.in]
608        AC_CONFIG_FILES(src/lib/build/$1/Makefile)
609      ])
610    
611    MK_BUILD_DIR(rt-c-f, c, [float])
612    MK_BUILD_DIR(rt-c-d, c, [double])
613    MK_BUILD_DIR(rt-c-f-debug, c, [float debug])
614    MK_BUILD_DIR(rt-c-d-debug, c, [double debug])
615    MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])
616    MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])
617    MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])
618    MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])
619    
620    if test x"$CL_ENABLED" = xtrue ; then
621      MK_BUILD_DIR(rt-cl-f, cl, [float])
622      MK_BUILD_DIR(rt-cl-d, cl, [double])
623      MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
624      MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
625    fi
626    
627  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.126  
changed lines
  Added in v.2772

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