Commit 31285d48 authored by Andrei Paskevich's avatar Andrei Paskevich

add --enable-native-code to configure.in

Also, do not build the bytecode of the why3 library when compiling
in native code.
parent ccc5698c
......@@ -47,7 +47,6 @@ STRIP = @STRIP@
CC = @CC@
OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLDEP = @OCAMLDEP@
OCAMLLEX = @OCAMLLEX@
OCAMLYACC = @OCAMLYACC@
OCAMLDOC = @OCAMLDOC@
......@@ -58,14 +57,10 @@ COQC = @COQC@
COQDEP = @COQDEP@
CAMLP5O = @CAMLP5O@
ifeq (@enable_menhirlib@,yes)
MENHIR = @MENHIR@ --table
MENHIRINC = -I @MENHIRLIB@
MENHIRLIB = menhirLib
ifeq (@OCAMLBEST@,opt)
OCAMLDEP = @OCAMLDEP@ -native
else
MENHIR = @MENHIR@
MENHIRINC =
MENHIRLIB =
OCAMLDEP = @OCAMLDEP@
endif
RUBBER = @RUBBER@
......@@ -1221,8 +1216,13 @@ clean::
# generic rules
################
ifeq (@OCAMLBEST@,opt)
%.cmi: %.mli
$(if $(QUIET),@echo 'Ocamlopt $<' &&) $(OCAMLOPT) -c $(OFLAGS) $<
else
%.cmi: %.mli
$(if $(QUIET),@echo 'Ocamlc $<' &&) $(OCAMLC) -c $(BFLAGS) $<
endif
%.cmo: %.ml
$(if $(QUIET),@echo 'Ocamlc $<' &&) $(OCAMLC) -c $(BFLAGS) $<
......
......@@ -65,6 +65,12 @@ AC_ARG_ENABLE(local,
[ --enable-local use Why3 in the build directory (no installation)],,
enable_local=no)
# NATIVE
AC_ARG_ENABLE(native-code,
[ --enable-native-code use the native-code compiler if available],,
enable_native_code=yes)
# IDE
AC_ARG_ENABLE(ide,
......@@ -170,6 +176,13 @@ else
fi
fi
# checking for native-code
if test "$enable_native_code" != yes || test "$OCAMLBEST" = byte ; then
enable_native_code=no
OCAMLBEST=byte
OCAMLOPT=no
fi
# checking for ocamlc.opt
AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no)
if test "$OCAMLCDOTOPT" != no ; then
......@@ -526,6 +539,7 @@ echo " Summary"
echo "-----------------------------------------"
echo "OCaml version : $OCAMLVERSION"
echo "OCaml library path : $OCAMLLIB"
echo "Compile in native code : $enable_native_code"
echo "Verbose make : $enable_verbose_make"
echo "Why IDE : $enable_ide $reason_ide"
echo "Why bench tool : $enable_bench"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment