-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·76 lines (57 loc) · 1.02 KB
/
configure
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
#!/bin/sh
if test $# -ne 1
then
echo "usage: `basename $0` <compcert_dir>"
exit 1
fi
# create link to compcert directory
if test ! -d $1
then
echo "warning: $1 does not exist or is not a directory!"
exit 1
fi
echo create link to $1
echo ln -f -n -s $1 compcert
ln -f -n -s $1 compcert
# create coqrc
echo create coqrc
sed -e "s|/path/to/simsoc-cert|`pwd`|" coqrc.in > coqrc
# check prog
check_prog() {
echo -n "$prog: "
which $prog
if test $? -ne 0
then
echo 'cannot find $prog in path!'
exit 1
fi
}
# check version
check_version() {
if test "$ver" != "$ref"
then
echo "warning: you use $prog $ver instead of $prog $ref!"
exit 1
fi
}
# check coq
prog=coqc
check_prog
ref=8.3pl2
ver=`coqc -v | head -1 | awk '{print$6}'`
check_version
# check ocaml
prog=ocamlopt
check_prog
ref=3.12.1
ver=`ocamlopt -version`
check_version
# check compcert
f=compcert/driver/Configuration.ml
if test ! -f $f
then
echo "cannot find $f: configure compcert first!"
exit 1
fi
prog=ccomp
check_prog