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

SCM Repository

[diderot] Annotation of /branches/vis12-cl/config/check_smlnj_heap_suffix.m4
ViewVC logotype

Annotation of /branches/vis12-cl/config/check_smlnj_heap_suffix.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2579 - (view) (download)

1 : jhr 123 dnl check_smlnj_heap_suffix.m4
2 :     dnl
3 :     dnl COPYRIGHT (c) 2006 The SML/NJ Fellowship.
4 :     dnl
5 :     dnl @synopsis CHECK_SMLNJ_HEAP_SUFFIX(ACTION-IF-UNKNOWN)
6 :     dnl
7 :     dnl This macro figures out the suffix of heap-image files used by SML/NJ
8 :     dnl run-time on the host architecture and operating system. If the architecture
9 :     dnl and/or operating system is not one supported by SML/NJ, then it executes
10 :     dnl the ACTION-IF-UNKNOWN. Upon successful execution, this macro defines the
11 :     dnl shell variables SMLNJ_ARCH, SMLNJ_OPSYS, and SMLNJ_HEAP_SUFFIX, and it
12 :     dnl does an AC_SUBST on these variables.
13 :     dnl
14 :     dnl @version $Id: check_smlnj_heap_suffix.m4,v 1.2 2007/05/09 17:48:52 jhr Exp $
15 :     dnl @author John Reppy <http://www.cs.uchicago.edu/~jhr>
16 :     dnl
17 : jhr 2579 AC_DEFUN([CHECK_SMLNJ_HEAP_SUFFIX], [
18 : jhr 123 AC_REQUIRE([AC_CANONICAL_HOST])
19 :     case ${host_cpu}:${host_os} in
20 :     alpha*:osf3*) SMLNJ_ARCH=alpha32x; SMLNJ_OPSYS=osf1;;
21 :     alpha*:osf4*) SMLNJ_ARCH=alpha32; SMLNJ_OPSYS=dunix;;
22 :     hppa*:hpux9*) SMLNJ_ARCH=hppa; SMLNJ_OPSYS=hpux9;;
23 :     hppa*:hpux10*) SMLNJ_ARCH=hppa; SMLNJ_OPSYS=hpux;;
24 :     i386:darwin*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=darwin;;
25 :     i386:freebsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=freebsd;;
26 :     i486:freebsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=freebsd;;
27 :     i586:freebsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=freebsd;;
28 :     i686:freebsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=freebsd;;
29 :     i386:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
30 :     i486:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
31 :     i586:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
32 :     i686:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
33 :     i386:netbsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=netbsd;;
34 :     i486:netbsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=netbsd;;
35 :     i586:netbsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=netbsd;;
36 :     i686:netbsd*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=netbsd;;
37 :     i386:solaris3) SMLNJ_ARCH=x86; SMLNJ_OPSYS=solaris;;
38 :     i686:cygwin*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=cygwin;;
39 :     mips:irix4*) SMLNJ_ARCH=mipseb; SMLNJ_OPSYS=irix4; HEAP_OPSYS=irix;;
40 :     mips:irix5*) SMLNJ_ARCH=mipseb; SMLNJ_OPSYS=irix5; HEAP_OPSYS=irix;;
41 :     mips:irix6*) SMLNJ_ARCH=mipseb; SMLNJ_OPSYS=irix6; HEAP_OPSYS=irix;;
42 :     powerpc:aix*) SMLNJ_ARCH=ppc; SMLNJ_OPSYS=aix;;
43 :     powerpc:darwin*) SMLNJ_ARCH=ppc; SMLNJ_OPSYS=darwin;;
44 :     rs6000:aix*) SMLNJ_ARCH=rs6000; SMLNJ_OPSYS=aix;;
45 :     sparc:solaris2*) SMLNJ_ARCH=sparc; SMLNJ_OPSYS=sunos;;
46 :     sparc:solaris3*) SMLNJ_ARCH=sparc; SMLNJ_OPSYS=solaris;;
47 :     x86_64:linux*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=linux;;
48 :     x86_64:darwin*) SMLNJ_ARCH=x86; SMLNJ_OPSYS=darwin;;
49 :     *) $1 ;;
50 :     esac
51 :     if test z$SMLNJ_ARCH != z -a z$SMLNJ_OPSYS != z ; then
52 :     if test z$HEAP_OPSYS = z ; then
53 :     SMLNJ_HEAP_SUFFIX=${SMLNJ_ARCH}-${SMLNJ_OPSYS}
54 :     else
55 :     SMLNJ_HEAP_SUFFIX=${SMLNJ_ARCH}-${HEAP_OPSYS}
56 :     fi
57 :     AC_SUBST(SMLNJ_ARCH)
58 :     AC_SUBST(SMLNJ_OPSYS)
59 :     AC_SUBST(SMLNJ_HEAP_SUFFIX)
60 :     fi
61 :     ])dnl

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