-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.in
56 lines (46 loc) · 1.32 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
AC_PREREQ(2.57)
AC_INIT([lambdachine], [0.1])
AC_CONFIG_HEADER(vm/autoconfig.h)
AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_LANG([C++])
AC_ARG_WITH([ghc],
[AC_HELP_STRING([--with-ghc=ARG],
[Use ARG as the path to GHC [default=autodetect]])],
[HC="$withval"]
[])
AC_ARG_WITH([ghc-pkg],
[AC_HELP_STRING([--with-ghc-pkg=ARG],
[Use ARG as the path to ghc-pkg [default=autodetect]])],
[HC_PKG="$withval"]
[])
AC_MSG_CHECKING([for ghc])
# TODO: If the user specifies --with-ghc, we should check that it has
# a compatible version, by parsing the output of "ghc
# --numeric-version"
if test "$HC" = ""; then
AC_CHECK_PROGS([HC], [ghc-7.8.3 ghc-7.8.2 ghc-7.8.1], no)
if test x"${HC}" == x"no" ; then
AC_MSG_ERROR([Lambdachine requires ghc-7.8])
fi
fi
AC_MSG_RESULT([$HC])
AC_MSG_CHECKING([for ghc-pkg])
if test "$HC_PKG" = ""; then
AC_CHECK_PROGS([HC_PKG], [ghc-pkg-7.8.3 ghc-pkg-7.8.2 ghc-pkg-7.8.1], no)
if test x"${HC_PKG}" == x"no" ; then
AC_MSG_ERROR([Lambdachine requires ghc-pkg-7.8])
fi
fi
AC_MSG_RESULT([$HC_PKG])
# Figure out where hash_map lives and also hash_fun.h (or stl_hash_fun.h).
# This also tells us what namespace hash code lives in.
AC_CXX_STL_HASH
# AC_CXX_STL_HASH_FUN
AC_SUBST(HC)
AC_SUBST(HC_PKG)
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_FUNCS(clock_gettime)
AC_OUTPUT