New configure script options to enable/disable byte/native targets

master
Nicolas Berthier 9 years ago
parent fb6755efb2
commit 65908e7ca3

@ -1,6 +1,6 @@
include config include config
.PHONY: all install .PHONY: all install uninstall clean
all: all:
(cd compiler/; $(MAKE)) (cd compiler/; $(MAKE))
@ -9,12 +9,10 @@ all:
install: install:
(cd compiler; $(MAKE) install) (cd compiler; $(MAKE) install)
(cd lib; $(MAKE) install) (cd lib; $(MAKE) install)
$(INSTALL) tools/$(BZREAX) $(INSTALL_BINDIR)
uninstall: uninstall:
(cd compiler; $(MAKE) uninstall) (cd compiler; $(MAKE) uninstall)
(cd lib; $(MAKE) uninstall) (cd lib; $(MAKE) uninstall)
$(RM) $(INSTALL_BINDIR)/$(BZREAX)
clean: clean:
(cd compiler; $(MAKE) clean) (cd compiler; $(MAKE) clean)

@ -21,6 +21,6 @@ STDLIB_DIR=@stdlib_dir@
OCAMLBUILD=STDLIB=$(STDLIB_DIR) @OCAMLBUILD@ -use-ocamlfind OCAMLBUILD=STDLIB=$(STDLIB_DIR) @OCAMLBUILD@ -use-ocamlfind
TARGET=byte TARGET=@targets@
ENABLE_SIMULATOR=@enable_simulator@ ENABLE_SIMULATOR=@enable_simulator@
ENABLE_CTRL2EPT_TRANSLATOR=@enable_ctrl2ept@ ENABLE_CTRL2EPT_TRANSLATOR=@enable_ctrl2ept@

25
configure vendored

@ -585,6 +585,7 @@ ac_subst_vars='ctrln_pp
package_reatk_ctrlNbac package_reatk_ctrlNbac
LTLIBOBJS LTLIBOBJS
LIBOBJS LIBOBJS
targets
enable_ctrl2ept enable_ctrl2ept
enable_simulator enable_simulator
stdlib_dir stdlib_dir
@ -666,6 +667,8 @@ enable_option_checking
enable_simulator enable_simulator
enable_local_stdlib enable_local_stdlib
enable_ctrl2ept enable_ctrl2ept
enable_native
enable_byte
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
@ -1282,6 +1285,8 @@ Optional Features:
--enable-simulator enable the graphical simulator --enable-simulator enable the graphical simulator
--enable-local-stdlib use the in-sources standard library --enable-local-stdlib use the in-sources standard library
--enable-ctrl2ept enable the Controllable-Nbac entity translator --enable-ctrl2ept enable the Controllable-Nbac entity translator
--enable-native build native executables
--enable-byte build bytecode executables
Report bugs to the package provider. Report bugs to the package provider.
_ACEOF _ACEOF
@ -1891,6 +1896,22 @@ else
fi fi
# Check whether --enable-native was given.
if test "${enable_native+set}" = set; then :
enableval=$enable_native;
else
enable_native=no
fi
# Check whether --enable-byte was given.
if test "${enable_byte+set}" = set; then :
enableval=$enable_byte;
else
enable_byte=no
fi
# checking for ocamlc # checking for ocamlc
if test -n "$ac_tool_prefix"; then if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
@ -4027,6 +4048,10 @@ else
stdlib_dir=$libdir/heptagon stdlib_dir=$libdir/heptagon
fi fi
if test "$enable_byte" = "yes"; then targets="byte"; fi;
if test "$enable_native" = "yes"; then targets="$targets native"; fi;
if test "x$targets" = "x"; then targets="byte"; fi;

@ -16,6 +16,14 @@ AC_ARG_ENABLE(ctrl2ept,
[ --enable-ctrl2ept enable the Controllable-Nbac entity translator],, [ --enable-ctrl2ept enable the Controllable-Nbac entity translator],,
enable_ctrl2ept=yes) enable_ctrl2ept=yes)
AC_ARG_ENABLE(native,
[ --enable-native build native executables],,
enable_native=no)
AC_ARG_ENABLE(byte,
[ --enable-byte build bytecode executables],,
enable_byte=no)
AC_PROG_OCAML AC_PROG_OCAML
if test "$OCAMLC" = "no"; then if test "$OCAMLC" = "no"; then
AC_MSG_ERROR([Please install the OCaml compiler]) AC_MSG_ERROR([Please install the OCaml compiler])
@ -81,6 +89,9 @@ else
stdlib_dir=$libdir/heptagon stdlib_dir=$libdir/heptagon
fi fi
if test "$enable_byte" = "yes"; then targets="byte"; fi;
if test "$enable_native" = "yes"; then targets="$targets native"; fi;
if test "x$targets" = "x"; then targets="byte"; fi;
AC_SUBST(INSTALL) AC_SUBST(INSTALL)
AC_SUBST(RM) AC_SUBST(RM)
@ -88,6 +99,7 @@ AC_SUBST(stdlib_dir)
AC_SUBST(enable_simulator) AC_SUBST(enable_simulator)
AC_SUBST(enable_ctrl2ept) AC_SUBST(enable_ctrl2ept)
AC_SUBST(targets)
AC_OUTPUT(config) AC_OUTPUT(config)

Loading…
Cancel
Save