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

revision 4665, Thu Sep 29 17:57:02 2016 UTC revision 5571, Wed May 30 22:11:07 2018 UTC
# Line 2  Line 2 
2  dnl  dnl
3  dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)  dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4  dnl  dnl
5  dnl COPYRIGHT (c) 2016 The University of Chicago  dnl COPYRIGHT (c) 2017 The University of Chicago
6  dnl All rights reserved.  dnl All rights reserved.
7  dnl  dnl
8    
9  AC_INIT(diderot,2.0,)  AC_INIT(diderot,2.0,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2016 The University of Chicago]])  AC_COPYRIGHT([[COPYRIGHT (c) 2017 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/compiler/options/ctl.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)
# Line 24  Line 24 
24  dnl include additional macros  dnl include additional macros
25  dnl  dnl
26  sinclude(config/ax_check_compile_flag.m4)  sinclude(config/ax_check_compile_flag.m4)
27    sinclude(config/ax_gcc_func_attribute.m4)
28  sinclude(config/ax_gcc_x86_cpuid.m4)  sinclude(config/ax_gcc_x86_cpuid.m4)
29  sinclude(config/ax_gcc_x86_avx_xgetbv.m4)  sinclude(config/ax_gcc_x86_avx_xgetbv.m4)
30  sinclude(config/ax_ext.m4)  sinclude(config/ax_ext.m4)
# Line 65  Line 66 
66  AC_PROG_INSTALL  AC_PROG_INSTALL
67  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
68    
 dnl FIXME: this works for now, but we should probably switch to libtool  
 dnl  
 AC_PATH_PROG(LD, [ld], [none])  
 if test x$LD = xnone ; then  
   AC_MSG_ERROR([cannot find ld command])  
 fi  
 AC_SUBST(LD)  
   
69  dnl extra compiler options  dnl extra compiler options
70  dnl  dnl
71  CXXFLAGS_BASE="-Wreturn-type -Wuninitialized"  CXXFLAGS_BASE="-Wreturn-type -Wuninitialized"
72    
73    AC_LANG_PUSH([C++])
74    AX_GCC_FUNC_ATTRIBUTE(noreturn)
75    AC_LANG_POP([C++])
76    
77  dnl check for SIMD support  dnl check for SIMD support
78  dnl  dnl
79  AX_EXT  AX_EXT
# Line 94  Line 91 
91  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
92  dnl  dnl
93  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
94  CFLAGS="$CFLAGS $CFLAG_MXX"  CFLAGS="$CFLAGS $CXXFLAG_Mxx"
95    
96  dnl  dnl
97  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 108  Line 105 
105      [Define to 1 if gcc compiler provides atomic operations.]),      [Define to 1 if gcc compiler provides atomic operations.]),
106     AC_MSG_RESULT(no))     AC_MSG_RESULT(no))
107    
108    dnl
109    dnl check endianess
110    dnl
111  AC_C_BIGENDIAN  AC_C_BIGENDIAN
112    
113  #  #
# Line 190  Line 190 
190  AC_CHECK_FUNCS(sigtimedwait nanosleep)  AC_CHECK_FUNCS(sigtimedwait nanosleep)
191    
192  dnl  dnl
 dnl check for sched_setaffinity  
 dnl  
 AC_CHECK_FUNCS(sched_setaffinity)  
   
 dnl  
193  dnl check for pthread_setaffinity_np  dnl check for pthread_setaffinity_np
194  dnl  dnl
195  save_LIBS=$LIBS  save_LIBS=$LIBS
# Line 225  Line 220 
220  dnl  dnl
221  AC_CHECK_FILES(/proc/cpuinfo)  AC_CHECK_FILES(/proc/cpuinfo)
222    
223    dnl check for getcpu and/or sched_getcpu
224    dnl
225    hasGetCPU=no;
226    AC_CHECK_HEADERS([linux/getcpu.h])
227    if test "x$ac_cv_header_linux_getcpu_h" = xyes; then
228      AC_CHECK_FUNCS([getcpu])
229      hasGetCPU=yes;
230    else
231      # getcpu is usually called using syscall
232      #
233      AC_MSG_CHECKING([SYS_getcpu])
234      AC_RUN_IFELSE([AC_LANG_SOURCE([[
235        #define _GNU_SOURCE
236        #include <unistd.h>
237        #include <sys/syscall.h>
238        int main () {
239          unsigned cpu, node;
240          return syscall (SYS_getcpu, &cpu, &node, 0);
241        }
242        ]])],[hasGetCPU=yes],[])
243      AC_MSG_RESULT([$hasGetCPU])
244      if test x"$hasGetCPU" = xyes ; then
245        AC_DEFINE([HAVE_SYS_GETCPU],[1],[Define if SYS_getcpu is defined in <sys/syscall.h>])
246      fi
247    fi
248    if test x"$hasGetCPU" != xyes ; then
249    AC_CHECK_FUNCS([sched_getcpu])
250    fi
251    
252    #################### Linking configuration ####################
253    
254    dnl FIXME: this works for now, but we should probably switch to libtool
255    dnl
256    AC_PATH_PROG(LD, [ld], [none])
257    if test x$LD = xnone ; then
258      AC_MSG_ERROR([cannot find ld command])
259    fi
260    AC_SUBST(LD)
261    
262  dnl  dnl
263  dnl OS-specific linking issues  dnl OS-specific linking issues
264  dnl  dnl
265  LD_NEEDS_RPATH=false;  LD_NEEDS_RPATH=false;
266  LIBM=""  CXXFLAG_fPIC=""
267    LDFLAG_LIBM=""
268  case "$host_os" in  case "$host_os" in
269    darwin*) # On Mac OS X we check for the presence of macports and/or fink    darwin*)
270      # On Mac OS X we check for the presence of homebrew, macports, and fink.
271      # we set up the search paths in priority homebrew > macports > fink.
272        if test -x /sw/bin/fink ; then
273          LDPATHS="-L/sw/lib"
274        fi
275      if test -x /opt/local/bin/port ; then      if test -x /opt/local/bin/port ; then
276        HAS_MACPORTS=yes        LDPATHS="-L/opt/local/lib $LDPATHS"
     else  
       HAS_MACPORTS=no  
277      fi      fi
278      if test -x /sw/bin/fink ; then      if test -d /usr/local/Cellar -a /usr/local/bin/brew ; then
279        HAS_FINK=yes        LDPATHS="-L/usr/local/lib $LDPATHS"
     else  
       HAS_FINK=no  
280      fi      fi
281        DSLEXT="dylib"
282        LD_STATIC=$LD
283        LD_DYNAMIC="$CXX -dynamiclib"
284    ;;    ;;
285    linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries    linux*)
286      # On Linux we include the -rpath option to pick up dynamically-loaded libraries
287      # and the -fPIC compiler flag to generate position-indenpendent code
288      LD_NEEDS_RPATH=true      LD_NEEDS_RPATH=true
289      LIBM="-lm"      LDFLAG_LIBM="-lm"
290        CXXFLAG_fPIC="-fPIC"
291        DSLEXT="so"
292        LD_STATIC=$LD
293        LD_DYNAMIC="$CXX -shared"
294    ;;    ;;
295  esac  esac
296    
297  if test x"$HAS_MACPORTS" = xyes ; then  AC_SUBST(LD_STATIC)
298    LDPATHS="-L/opt/local/lib"  AC_SUBST(LD_DYNAMIC)
 elif test x"$HAS_FINK" = xyes ; then  
   LDPATHS="-L/sw/lib"  
 else  
   LDPATHS=""  
 fi  
299  AC_SUBST(LDPATHS)  AC_SUBST(LDPATHS)
300  AC_SUBST(LD_NEEDS_RPATH)  AC_SUBST(LD_NEEDS_RPATH)
301  AC_SUBST(LIBM)  AC_SUBST(LDFLAG_LIBM)
302    AC_SUBST(CXXFLAG_fPIC)
303    AC_SUBST(DSLEXT)
304    
305    #################### end Linking configuration ####################
306    
307    #################### Logging configuration ####################
308    
309    LOGGING_ENABLED=false
310    AC_ARG_ENABLE([event-logging],
311      AC_HELP_STRING([--enable-event-logging], [include event-logging support for parallel target]),
312      [LOGGING_ENABLED=true],
313      [LOGGING_ENABLED=false])
314    
315    AC_SUBST(LOGGING_ENABLED)
316    
317    #################### end Logging configuration ####################
318    
319    #################### Diderot Debugger configuration ####################
320    
321    DEBUGGER_ENABLED=false
322    AC_ARG_ENABLE([debugger],
323      AC_HELP_STRING([--enable-debugger], [build the Diderot debugger (experimental)]),
324      [DEBUGGER_ENABLED=true],
325      [DEBUGGER_ENABLED=false])
326    
327    AC_SUBST(DEBUGGER_ENABLED)
328    
329    #################### end Diderot Debugger configuration ####################
330    
331  #################### CUDA configuration ####################  #################### CUDA configuration ####################
332    
# Line 285  Line 353 
353  fi  fi
354  AC_SUBST(NVCC)  AC_SUBST(NVCC)
355  AC_SUBST(CUDA_ENABLED)  AC_SUBST(CUDA_ENABLED)
356    AC_SUBST(LIBS_CUDA)     # TODO
357    AC_SUBST(CPPFLAGS_CUDA) # TODO
358    
359  #################### end CUDA configuration ####################  #################### end CUDA configuration ####################
360    
# Line 541  Line 611 
611    
612    dnl check that we have a compatible version of SML/NJ    dnl check that we have a compatible version of SML/NJ
613    dnl    dnl
614    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; please add it to your PATH or set SML_CMD])])
615    if test $SMLNJ_MAJOR_VERSION -lt 110 \    if test $SMLNJ_MAJOR_VERSION -lt 110 \
616      -o $SMLNJ_MINOR_VERSION -lt 80      -o $SMLNJ_MINOR_VERSION -lt 80
617    then    then
# Line 617  Line 687 
687  fi  fi
688  AC_SUBST(DOXYGEN)  AC_SUBST(DOXYGEN)
689    
690  dnl check for asciidoc and related tools  dnl check for asciidoctor
691  dnl  dnl
692  AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])  AC_PATH_PROGS([ASCIIDOCTOR], [asciidoctor], [none])
693  AC_PATH_PROGS([A2X], [a2x], [none])  AC_SUBST(ASCIIDOCTOR)
 AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])  
 AC_PATH_PROGS([DBLATEX], [dblatex], [none])  
   
 dnl  
 dnl get the path to the asciidoc cofiguration files  
 dnl  
 if test x"$ASCIIDOC" != xnone ; then  
   AC_MSG_CHECKING([path to asciidoc configuration files])  
   ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`  
   AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])  
 fi  
 AC_SUBST(ASCIIDOC)  
 AC_SUBST(A2X)  
 AC_SUBST(ASCIIDOC_CONF_DIR)  
 AC_SUBST(HIGHLIGHTER)  
 AC_SUBST(DBLATEX)  
694    
695  #################### end Documentation tools configuration ####################  #################### end Documentation tools configuration ####################
696    
697    #################### Diderot Debugger configuration ####################
698    
699    dnl The debugger is under development
700    dnl
701    
702    dnl if the debugger is enabled, then include its makefile and
703    dnl look for wxwidgets
704    dnl
705    if test x"$DEBUGGER_ENABLED" = xtrue ; then
706      DEBUGGER_MAKEFILE=src/debugger/build/Makefile
707      search_path="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/opt/local/bin"
708      AC_PATH_PROG([WX_CONFIG], [wx-config], [none], [$search_path])
709      if test x"$WX_CONFIG" = xnone ; then
710        AC_MSG_ERROR([unable to find wx-config, which is required by the Diderot debugger])
711      fi
712    else
713      DEBUGGER_MAKEFILE=
714    fi
715    
716    #################### end Diderot Debugger configuration ####################
717    
718  #################### config.h ####################  #################### config.h ####################
719    
720  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])
# Line 664  Line 739 
739    
740  #################### write output ####################  #################### write output ####################
741    
742  dnl The compiler Makefile depends on which SML system we are  dnl The Makefile for the compiler depends on which SML system we are
743  dnl using.  dnl using.
744  if test x"$SML" = xmlton ; then  if test x"$SML" = xmlton ; then
745    COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"    COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"
746      FRAG_GEN_MAKEFILE="src/compiler/gen/fragments/Makefile"
747  else  else
748    COMPILER_MAKEFILE_IN=""    COMPILER_MAKEFILE_IN=""
749      FRAG_GEN_MAKEFILE=
750  fi  fi
751    
752  AC_CONFIG_FILES(  AC_CONFIG_FILES(
# Line 677  Line 754 
754  dnl ***** Makefiles *****  dnl ***** Makefiles *****
755    Makefile    Makefile
756  dnl  doc/Makefile  dnl  doc/Makefile
757  dnl  doc/man/Makefile    doc/src/man/Makefile
758  dnl  src/clinfo/Makefile  dnl  src/clinfo/Makefile
759    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
760      $FRAG_GEN_MAKEFILE
761      $DEBUGGER_MAKEFILE
762    src/lib/build/Makefile    src/lib/build/Makefile
763    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
764  dnl  dnl
# Line 704  Line 783 
783  AC_CONFIG_FILES([  AC_CONFIG_FILES([
784    src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in    src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in
785  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])
786    
787    dnl
788    dnl additional files for logging tools
789    dnl
790    if test x"$LOGGING_ENABLED" = xtrue ; then
791  AC_CONFIG_FILES([  AC_CONFIG_FILES([
792    src/tests/rtest/scripts/run.sh:src/tests/rtest/scripts/run_sh.in      src/logging/gen/Makefile
793  ], [chmod +x src/tests/rtest/scripts/run.sh])      src/logging/log-analyze/Makefile
794  AC_CONFIG_FILES([      src/logging/log-dump/Makefile
795    src/tests/rtest/scripts/run-one.sh:src/tests/rtest/scripts/run-one_sh.in      src/logging/gen/log-gen.sh:src/logging/gen/log-gen_sh.in
796  ], [chmod +x src/tests/rtest/scripts/run-one.sh])      src/logging/gen/main.sml:src/logging/gen/main_sml.in
797        src/logging/lib/default-log-paths.hxx:src/logging/lib/default-log-paths_hxx.in
798      ], [chmod +x src/logging/gen/log-gen.sh])
799    fi
800    
801  dnl  dnl
802  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 731  Line 818 
818    ])    ])
819    
820  MK_BUILD_DIR(rt-seq, sequential, [])  MK_BUILD_DIR(rt-seq, sequential, [])
821  MK_BUILD_DIR(rt-seq-debug, sequential, [debug])  MK_BUILD_DIR(rt-seq-debug, sequentiagetcpul, [debug])
822  MK_BUILD_DIR(rt-par, parallel, [parallel])  MK_BUILD_DIR(rt-par, parallel, [parallel])
823  MK_BUILD_DIR(rt-par-debug, parallel, [parallel debug])  MK_BUILD_DIR(rt-par-debug, parallel, [parallel debug])
824    
825    if test x"$LOGGING_ENABLED" = xtrue ; then
826      MK_BUILD_DIR(rt-par-log, parallel, [parallel logging])
827    fi
828    
829  #if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
830  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])
831  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])

Legend:
Removed from v.4665  
changed lines
  Added in v.5571

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