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

SCM Repository

[diderot] Diff of /branches/pure-cfg/configure.ac
ViewVC logotype

Diff of /branches/pure-cfg/configure.ac

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

revision 122, Mon Jun 28 17:58:00 2010 UTC revision 123, Mon Jun 28 18:05:04 2010 UTC
# Line 10  Line 10 
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2010 The Diderot Project]])  AC_COPYRIGHT([[COPYRIGHT (c) 2010 The Diderot Project]])
13  AC_CONFIG_SRCDIR(??)  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)
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 include additional macros  dnl include additional macros
19  dnl  dnl
 dnl sinclude(config/ax_check_gl.m4)  
 dnl sinclude(config/ax_check_glu.m4)  
 dnl sinclude(config/ax_check_glut.m4)  
20  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
21  sinclude(config/ax_lang_compiler_ms.m4)  sinclude(config/check_smlnj.m4)
22  sinclude(config/ax_check_framework.m4)  sinclude(config/check_smlnj_heap_suffix.m4)
23  sinclude(config/ax_check_macports.m4)  
 sinclude(config/ax_check_lib_stdcall.m4)  
24    
25  dnl  dnl
26  dnl get host and target information  dnl get host information
27  dnl  dnl
28  AC_CANONICAL_HOST  AC_CANONICAL_HOST
29    
# Line 38  Line 34 
34  AC_PROG_INSTALL  AC_PROG_INSTALL
35  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
36    
37    dnl
38    dnl If we are on Mac OS X, check for the presence of macports and/or fink
39    dnl
40    NEEDS_MACPORTS=no
41    NEEDS_FINK=no
42    case "$host_os" in
43      darwin*) # On Mac OS X we check for installed frameworks
44        if test -x /opt/local/bin/port ; then
45          HAS_MACPORTS=yes
46        else
47          HAS_MACPORTS=no
48        fi
49        if test -x /sw/bin/fink ; then
50          HAS_FINK=yes
51        else
52          HAS_FINK=no
53        fi
54      ;;
55    esac
56    
57    if test x"$HAS_MACPORTS" = xyes ; then
58      LDPATHS="-L/opt/local/lib"
59    elif test x"$HAS_FINK" = xyes ; then
60      LDPATHS="-L/sw/lib"
61    else
62      LDPATHS=""
63    fi
64    AC_SUBST(LDPATHS)
65    
66    dnl
67    dnl get the path to the TEEM installation
68    dnl
69    AC_ARG_WITH(teem,
70      AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
71      [ac_cv_use_teem=$withval], [ac_cv_use_teem=no])
72    if test x"$ac_cv_use_teem" = xno ; then
73      TEEM_DIR=none
74    else
75      AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)])
76      case $ac_cv_use_teem in
77        /*) ;;
78        *) AC_MSG_ERROR([path to teem must be absolute]) ;;
79      esac
80      if test -x $ac_cv_use_teem ; then
81        TEEM_DIR=$ac_cv_use_teem
82        AC_MSG_RESULT([ okay])
83      else
84        TEEM_DIR=none
85        AC_MSG_RESULT([ invalid])
86      fi
87    fi
88    if test x"$TEEM_DIR" = xnone ; then
89      AC_MSG_ERROR([unable to find teem])
90    fi
91    AC_SUBST(TEEM_DIR)
92    
93    dnl ******************** SML/NJ configuration ********************
94    dnl
95    
96    dnl check that we have a compatible version of SML/NJ
97    dnl
98    CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])])
99    if test $SMLNJ_MAJOR_VERSION -lt 110 \
100      -o $SMLNJ_MINOR_VERSION -lt 72
101    then
102      AC_MSG_ERROR([installation requires SML/NJ version 110.72+])
103    fi
104    AC_SUBST(SMLNJ_VERSION)
105    
106    dnl determine the heap-image suffix
107    dnl
108    CHECK_SMLNJ_HEAP_SUFFIX([
109      AC_MSG_ERROR([unsupported configuration ${host_cpu}-${host_os}])])
110    
111    dnl look for ml-makedepend
112    dnl
113    AC_MSG_CHECKING([for ml-makedepend])
114    tmpPATH="$SMLNJ_PATH:$PATH"
115    AC_PATH_PROG(ML_MAKEDEPEND, ml-makedepend, ":", $tmpPATH)
116    if test $ML_MAKEDEPEND = none ; then
117      AC_MSG_ERROR([ml-makedepend not found])
118    else
119      AC_MSG_RESULT([$ML_MAKEDEPEND])
120    fi
121    AC_SUBST(ML_MAKEDEPEND)
122    
123    dnl
124    dnl look for ml-build
125    dnl
126    tmpPATH="$SMLNJ_PATH:$PATH"
127    AC_PATH_PROG(ML_BUILD, ml-build, none, $tmpPATH)
128    if test $ML_BUILD = none ; then
129      AC_MSG_ERROR([ml-build not found])
130    fi
131    AC_SUBST(ML_BUILD)
132    
133    dnl ******************** Paths ********************
134    
135    DIDEROT_ROOT=`pwd`
136    DIDEROT_DOCDIR=$DIDEROT_ROOT/doc
137    DIDEROT_SRCDIR=$DIDEROT_ROOT/src
138    DIDEROT_LIBDIR=$DIDEROT_ROOT/lib
139    DIDEROT_BINDIR=$DIDEROT_ROOT/bin
140    DIDEROT_MKDIR=$DIDEROT_ROOT/mk
141    
142    HEAP_IMAGE_DIR=$DIDEROT_BINDIR/.heap
143    INSTALL_SMLNJ_WRAPPER=$DIDEROT_BINDIR/install-sml-wrapper.sh
144    
145    AC_SUBST(DIDEROT_ROOT)
146    AC_SUBST(DIDEROT_DOCDIR)
147    AC_SUBST(DIDEROT_SRCDIR)
148    AC_SUBST(DIDEROT_LIBDIR)
149    AC_SUBST(DIDEROT_BINDIR)
150    AC_SUBST(DIDEROT_MKDIR)
151    AC_SUBST(HEAP_IMAGE_DIR)
152    AC_SUBST(INSTALL_SMLNJ_WRAPPER)
153    
154    dnl
155    dnl ******************** write output ********************
156    dnl
157    
158    dnl ***** Makefiles *****
159    AC_CONFIG_FILES(
160      src/dnorm/Makefile
161      src/compiler/Makefile
162    )
163    
164    dnl
165    dnl shell scripts
166    dnl
167    AC_CONFIG_FILES([
168      bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
169    ], [chmod +x bin/install-sml-wrapper.sh])
170    
171  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.122  
changed lines
  Added in v.123

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