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 4884, Mon Jan 2 18:46:26 2017 UTC revision 5513, Mon Nov 20 16:31:01 2017 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 254  Line 249 
249  AC_CHECK_FUNCS([sched_getcpu])  AC_CHECK_FUNCS([sched_getcpu])
250  fi  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 ####################  #################### Logging configuration ####################
308    
# Line 301  Line 316 
316    
317  #################### end Logging configuration ####################  #################### 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    
333  AC_ARG_ENABLE([cuda],  AC_ARG_ENABLE([cuda],
# Line 658  Line 685 
685  fi  fi
686  AC_SUBST(DOXYGEN)  AC_SUBST(DOXYGEN)
687    
688  dnl check for asciidoc and related tools  dnl check for asciidoctor
689  dnl  dnl
690  AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])  AC_PATH_PROGS([ASCIIDOCTOR], [asciidoctor], [none])
691  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)  
692    
693  #################### end Documentation tools configuration ####################  #################### end Documentation tools configuration ####################
694    
695    #################### Diderot Debugger configuration ####################
696    
697    dnl The debugger is under development
698    dnl
699    
700    dnl if the debugger is enabled, then include its makefile and
701    dnl look for wxwidgets
702    dnl
703    if test x"$DEBUGGER_ENABLED" = xtrue ; then
704      DEBUGGER_MAKEFILE=src/debugger/build/Makefile
705      search_path="$PATH$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR/opt/local/bin"
706      AC_PATH_PROG([WX_CONFIG], [wx-config], [none], [$search_path])
707      if test x"$WX_CONFIG" = xnone ; then
708        AC_MSG_ERROR([unable to find wx-config, which is required by the Diderot debugger])
709      fi
710    else
711      DEBUGGER_MAKEFILE=
712    fi
713    
714    #################### end Diderot Debugger configuration ####################
715    
716  #################### config.h ####################  #################### config.h ####################
717    
718  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 705  Line 737 
737    
738  #################### write output ####################  #################### write output ####################
739    
740  dnl The compiler Makefile depends on which SML system we are  dnl The Makefile for the compiler depends on which SML system we are
741  dnl using.  dnl using.
742  if test x"$SML" = xmlton ; then  if test x"$SML" = xmlton ; then
743    COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"    COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"
744      FRAG_GEN_MAKEFILE="src/compiler/gen/fragments/Makefile"
745  else  else
746    COMPILER_MAKEFILE_IN=""    COMPILER_MAKEFILE_IN=""
747      FRAG_GEN_MAKEFILE=
748  fi  fi
749    
750  AC_CONFIG_FILES(  AC_CONFIG_FILES(
# Line 718  Line 752 
752  dnl ***** Makefiles *****  dnl ***** Makefiles *****
753    Makefile    Makefile
754  dnl  doc/Makefile  dnl  doc/Makefile
755  dnl  doc/man/Makefile    doc/src/man/Makefile
756  dnl  src/clinfo/Makefile  dnl  src/clinfo/Makefile
757    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
758      $FRAG_GEN_MAKEFILE
759      $DEBUGGER_MAKEFILE
760    src/lib/build/Makefile    src/lib/build/Makefile
761    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
762  dnl  dnl
# Line 750  Line 786 
786  dnl additional files for logging tools  dnl additional files for logging tools
787  dnl  dnl
788  if test x"$LOGGING_ENABLED" = xtrue ; then  if test x"$LOGGING_ENABLED" = xtrue ; then
789    AC_CONFIG_FILES(    AC_CONFIG_FILES([
790      src/logging/gen/Makefile      src/logging/gen/Makefile
791      src/logging/log-analyze/Makefile      src/logging/log-analyze/Makefile
792      src/logging/log-dump/Makefile      src/logging/log-dump/Makefile
793        src/logging/gen/log-gen.sh:src/logging/gen/log-gen_sh.in
794      src/logging/gen/main.sml:src/logging/gen/main_sml.in      src/logging/gen/main.sml:src/logging/gen/main_sml.in
795      src/logging/lib/default-log-paths.hxx:src/logging/lib/default-log-paths_hxx.in      src/logging/lib/default-log-paths.hxx:src/logging/lib/default-log-paths_hxx.in
796    )    ], [chmod +x src/logging/gen/log-gen.sh])
797  fi  fi
798    
799  dnl  dnl

Legend:
Removed from v.4884  
changed lines
  Added in v.5513

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