-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·71 lines (56 loc) · 2.01 KB
/
configure.ac
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
AC_PREREQ(2.59)
AC_INIT(iProverModulo, 0.7-0.3, [email protected])
AC_PROG_CC
DATADIR="${prefix}/share/iprovermodulo/"
AC_SUBST(DATADIR, $DATADIR)
AC_ARG_WITH([externdir],
[AS_HELP_STRING([--with-externdir=DIR], [installation directory of external programs])],
[externdir=$withval],
[externdir="\${DATADIR}"])
AC_SUBST([externdir], [$externdir])
echo "External programs installed in ${externdir}/bin"
AC_ARG_WITH([runningpath],
[AS_HELP_STRING([--with-runningpath=DIR], [execution path])],
[runningpath=$withval],
[runningpath="\${externdir}/bin"])
AC_SUBST([runningpath], [$runningpath])
DYNSHAREDIR=${DATADIR}
if test "${runningpath}" != "\${DATADIR}/bin"
then
DYNSHAREDIR="${runningpath}/../share/iprovermodulo"
fi
AC_SUBST([DYNSHAREDIR], [$DYNSHAREDIR])
echo "Recursively configuring ocaml sources"
OCAMLDIR=$PWD/ocaml-4.02.1
cd $OCAMLDIR
if ./configure -prefix $externdir
then echo "ocaml sources configured."
else exit 1
fi
cd -
AC_SUBST(OCAMLDIR, $OCAMLDIR)
echo "Recursively configuring E sources"
EDIR=E
cd $EDIR
if ./configure --prefix=$externdir
then echo "E sources configured."
else exit 1
fi
cd -
AC_SUBST(EDIR, $EDIR)
OCAMLOPT_LOCAL="$OCAMLDIR/ocamlopt.opt -I $OCAMLDIR/stdlib -I $OCAMLDIR/otherlibs/unix -I $OCAMLDIR/otherlibs/str -I $OCAMLDIR/otherlibs/dynlink"
AC_SUBST(OCAMLOPT_LOCAL, $OCAMLOPT_LOCAL)
OCAMLOPT="${runningpath}/ocamlopt.opt -I ${runningpath}/../lib/ocaml/"
AC_SUBST(OCAMLOPT, $OCAMLOPT)
OCAMLC="${OCAMLDIR}/ocamlc -I $OCAMLDIR/stdlib -I $OCAMLDIR/otherlibs/unix -I $OCAMLDIR/otherlibs/str -I $OCAMLDIR/otherlibs/dynlink"
AC_SUBST(OCAMLC, $OCAMLC)
OCAMLLEX=${OCAMLDIR}/lex/ocamllex.opt
AC_SUBST(OCAMLLEX, $OCAMLLEX)
OCAMLYACC=${OCAMLDIR}/yacc/ocamlyacc
AC_SUBST(OCAMLYACC, $OCAMLYACC)
ocamllib=$externdir/lib/ocaml
AC_SUBST(OCAMLLIB, $ocamllib)
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_CONFIG_FILES([Makefile iprover_v0.7_patched/Makefile iprover_v0.7_patched/src/config.ml autotheo/Makefile autotheo/globals.ml launcher/Makefile launcher/iprover_modulo_launcher.sh launcher/main.ml])
AC_OUTPUT