-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
92 lines (79 loc) · 2.51 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
AC_INIT([ocaml-efl], [1.24.0])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_MACRO_DIR([m4])
dnl Checking for OCaml
AC_PROG_OCAML
AS_IF([test $OCAMLC = "no"], [
AC_MSG_ERROR([OCaml was not found on this system])
])
AX_COMPARE_VERSION([$OCAMLVERSION], [ge], [4.11], [], [
AC_MSG_ERROR([OCaml 3.12 or newer is required])
])
dnl Check for OCamlbuild flag
AC_ARG_VAR([OCAMLBUILD_FLAGS], [Options passed to OCamlbuild])
dnl Checking for OCamlfind
AC_PROG_FINDLIB
AS_IF([test $OCAMLFIND = "no"],
AC_MSG_ERROR([OCamlfind/Findlib was not found on this system])
])
AC_ARG_VAR([OCAMLFIND_DESTDIR], [(Default: $libdir/ocaml/$OCAMLVERSION)])
AS_IF([test -z $OCAMLFIND_DESTDIR], [
OCAMLFIND_DESTDIR=$libdir/ocaml/$OCAMLVERSION
])
AC_ARG_VAR([OCAMLFIND_LDCONF], [(Default: $OCAMLLIB/ldconf.so)])
AS_IF([test -z $OCAMLFIND_LDCONF], [
OCAMLFIND_LDCONF=$OCAMLLIB/ld.conf
])
dnl Checking for CFLAGS
AC_ARG_VAR([CFLAGS], [
Other options to pass to the C compiler
])
dnl Checking for Elementary
PKG_CHECK_MODULES([ELEMENTARY], [elementary >= 1.21])
AC_ARG_VAR([ELEMENTARY_VERSION],[
version for ELEMENTARY, overriding pkg-config
])
AS_IF([test -z $ELEMENTARY_VERSION], [
AS_IF([test -z PKG_CONFIG], [
AC_MSG_ERROR(
[Without pkg-config, you must set the variable ELEMENTARY_VERSION]
)
])
ELEMENTARY_VERSION=$($PKG_CONFIG --modversion elementary)
])
AC_SUBST([ELM_EO_CLASS_OBJ], "elm_obj")
AC_SUBST([EO_ISA], "eo_isa")
AC_SUBST([ELM_IMAGE_PROGRESS], "no")
AC_SUBST([EFL_UI_EVERYWHERE], ["false"])
AC_SUBST([EFL_21], ["false"])
AC_SUBST([EFL_22], ["false"])
EO_ISA="efl_isa"
ELM_EO_CLASS_OBJ="elm_get"
ELM_IMAGE_PROGRESS="yes"
EFL_UI_EVERYWHERE="true"
EFL_21="true"
AX_COMPARE_VERSION([$ELEMENTARY_VERSION], [ge], ["1.22"], [
EFL_22="true"
], [])
dnl Checking for Lablgl (used to compile an example, optional)
AC_CHECK_OCAML_PKG([lablgl])
AS_IF([test $OCAML_PKG_lablgl = "no"], [
AC_MSG_WARN([Lablgl example will not be compiled])
], [
AC_SUBST([LABGL_DIR], [$($OCAMLFIND query lablgl)])
])
dnl Checking for Lwt (used to compile an example, optional
AC_CHECK_OCAML_PKG([lwt.extra])
AS_IF([test $OCAML_PKG_lwt_extra = "no"], [
AC_MSG_WARN([Lwt example will not be compiled])
], [
AC_SUBST([LWT_DIR], [$($OCAMLFIND query lwt.extra)])
])
dnl Get the list of the examples
AS_ECHO(["configure: creating ./examples/list.txt"])
rm -f examples/list.txt
AS_FOR([FILE], [file], [examples/*.ml], [
echo FILE | sed 's|examples/\(.*\)[.]ml|\1|' >> examples/list.txt
])
AC_CONFIG_FILES([Makefile myocamlbuild.ml META src/write_connect/main.ml])
AC_OUTPUT