forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
71 lines (56 loc) · 2.29 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.69])
AC_INIT([The Flambda backend for OCaml],
4.14.0+dev0-2022-12-19,
[mshinwell@janestreet.com],
[flambda_backend],
[http://github.com/ocaml-flambda/flambda_backend])
AC_MSG_NOTICE([Configuring Flambda backend version AC_PACKAGE_VERSION])
m4_include([autoconf-aux/ax_subdirs_configure.m4])
AC_CONFIG_AUX_DIR([autoconf-aux])
AC_PATH_PROG([dune], [dune], [])
AC_ARG_WITH([dune],
[AS_HELP_STRING([--with-dune],
[Path to dune executable (otherwise PATH is searched)])],
[dune=$with_dune])
dnl Bug here somewhere -- if dune is on the path and an invalid --with-dune is
dnl specified, then we should stop.
AS_IF([test x"$dune" = "x"],
[AC_MSG_ERROR([dune not found on PATH; install, or use --with-dune])])
AC_MSG_NOTICE([Using dune executable: $dune])
AC_ARG_ENABLE([middle-end],
[AS_HELP_STRING([--enable-middle-end],
[Select which middle end to use: closure, flambda or flambda2])],
[AS_CASE([$enable_middle_end],
[closure], [middle_end=closure middle_end_arg=--disable-flambda],
[flambda], [middle_end=flambda middle_end_arg=--enable-flambda],
[flambda2], [middle_end=flambda2 middle_end_arg=--enable-flambda2],
[*], [AC_MSG_ERROR([Bad middle end (not closure, flambda or flambda2)])])],
[AC_MSG_ERROR([--enable-middle-end=closure|flambda|flambda2 must be provided])])
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[Run compiler tests instrumented to output coverage data using bisect_ppx
(WARNING: Cannot build an installable compiler with this flag enabled.
Mainly intended for use in CI.)])],
[coverage=yes],
[coverage=no])
AC_ARG_ENABLE([legacy-library-layout],
[AS_HELP_STRING([--enable-legacy-library-layout],
[Install libraries unix, str, dynlink and bigarray in the toplevel
ocaml library directory (Same as upstream OCaml < 5.0)])],
[legacy_layout=yes],
[legacy_layout=no])
AC_SUBST([prefix])
AC_SUBST([middle_end])
AC_SUBST([dune])
AC_SUBST([coverage])
AC_SUBST([legacy_layout])
# Don't error on options that this configure script doesn't understand but
# the ocaml/ one does.
AC_DISABLE_OPTION_CHECKING
AX_SUBDIRS_CONFIGURE([ocaml],
[$middle_end_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
[],
[],
[])
AC_CONFIG_FILES([Makefile.config])
AC_OUTPUT