forked from tomas-abrahamsson/py_interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
82 lines (73 loc) · 1.92 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
dnl Process this file with autoconf to produce a configure script.
AC_INIT()
AC_PROG_INSTALL()
AC_CHECK_PROGS(PYTHON, python)
AC_CHECK_PROGS(ERL, erl)
AC_CHECK_PROGS(ERLC, erlc)
silent_erl_flags="+B -noinput -sasl errlog_type error"
AC_MSG_CHECKING([whether Erlang supports maps])
if (ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval '#{a=>1},halt(0).' \
>/dev/null 2>&1)
then
HAVE_MAPS=yes
else
HAVE_MAPS=no
fi
AC_MSG_RESULT($HAVE_MAPS)
AC_SUBST(HAVE_MAPS)
AC_MSG_CHECKING([whether Erlang has erts7 time api])
if (ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval 'try erlang:monotonic_time(), halt(0)
catch error:undef -> halt(1)
end.' \
>/dev/null 2>&1)
then
HAVE_ERTS7_TIME_API=yes
else
HAVE_ERTS7_TIME_API=no
fi
AC_MSG_RESULT($HAVE_ERTS7_TIME_API)
AC_SUBST(HAVE_ERTS7_TIME_API)
AC_MSG_CHECKING([for eqc])
if (ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval \
'case catch code:which(eqc) of
Path when is_list(Path) -> halt(0);
_ -> halt(1)
end.' \
>/dev/null 2>&1)
then
dnl in the io:format below, [[ is translated by m4 into a single [
HAVE_EQC=yes
eqc_loc=`ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval \
'io:format("~s~n",[[code:which(eqc)]]),halt().'`
else
HAVE_EQC=no
eqc_loc=no
fi
AC_MSG_RESULT($eqc_loc)
AC_SUBST(HAVE_EQC)
AC_MSG_CHECKING([for proper])
if (ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval \
'case catch code:which(proper) of
Path when is_list(Path) -> halt(0);
_ -> halt(1)
end.' \
>/dev/null 2>&1)
then
dnl in the io:format below, [[ is translated by m4 into a single [
HAVE_PROPER=yes
proper_loc=`ERL_CRASH_DUMP_SECONDS=0 ${ERL} ${silent_erl_flags} \
-eval \
'io:format("~s~n",[[code:which(proper)]]),halt().'`
else
HAVE_PROPER=no
proper_loc=no
fi
AC_MSG_RESULT($proper_loc)
AC_SUBST(HAVE_PROPER)
AC_OUTPUT(Makefile)
AC_OUTPUT(test/Makefile)