forked from danmey/typerex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
76 lines (63 loc) · 1.84 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
72
73
74
75
76
AC_INIT(typerex,1.99.7-beta)
CONFIGURE_ARGS=$*
AC_COPYRIGHT(Copyright 2012 OcamlPro SAS)
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_OCAML
AC_PROG_CAMLP4
if test "$OCAMLC" = "no"; then
AC_MSG_ERROR([You must install the OCaml compiler])
fi
AC_PROG_CC
AC_ARG_ENABLE(version-check,
[ --disable-version-check do not check OCaml version],
[VERSION_CHECK="$enableval"],
[VERSION_CHECK="yes"])
AX_SPLIT_VERSION(OCAMLVERSION)
OCAML_MAJOR_VERSION=$AX_MAJOR_VERSION
OCAML_MINOR_VERSION=$AX_MINOR_VERSION
OCAML_POINT_VERSION=$AX_POINT_VERSION
# Check that OCaml version is greater or equal to 4.00.0
if test "$VERSION_CHECK" = "yes" ; then
AX_COMPARE_VERSION( [$OCAMLVERSION], [lt], [3.12.1],
AC_MSG_ERROR([Your version of OCaml: $OCAMLVERSION is not supported]))
fi
if test "x$prefix" = "xNONE"; then
# prefix=$ac_default_prefix
prefix="`eval dirname $OCAMLLIB`"
libdir=$OCAMLLIB
base="`eval basename $prefix`"
echo base=$base
if test "x$base" = "xlib"; then
prefix="`eval dirname $prefix`"
fi
else
libdir=${libdir}/ocaml
fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
libdir=${libdir}/typerex
bindir="`eval echo ${bindir}`"
bindir="`eval echo ${bindir}`"
mandir="`eval echo ${mandir}`"
mandir="`eval echo ${mandir}`"
libdir="`eval echo ${libdir}`"
libdir="`eval echo ${libdir}`"
datarootdir="`eval echo ${datarootdir}`"
datarootdir="`eval echo ${datarootdir}`"
datadir=${datarootdir}/typerex
AC_SUBST(OCAML_MAJOR_VERSION)
AC_SUBST(OCAML_MINOR_VERSION)
AC_SUBST(OCAML_POINT_VERSION)
AC_SUBST(CONFIGURE_ARGS)
AC_SUBST(VERSION)
AC_CONFIG_FILES(
Makefile.config \
typerex.ocp \
)
AC_OUTPUT
echo Creating file ocp-build.root
ocp-build init
echo
echo Executables will be installed in ${bindir}
echo Libraries will be installed in ${libdir}
echo Data files will be installed in ${datadir}
echo Manual pages will be installed in ${mandir}