diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2014-12-18 13:52:12 +0100 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2014-12-18 13:52:12 +0100 |
commit | 04292034ef23e8cfdab593b7d248368085631881 (patch) | |
tree | 4e2d24c2ba129f68da014ea13212a25731d74b9e /configure | |
parent | c1daedb244d1f7586c12749642b0d78ae910e60a (diff) | |
parent | 3262e1e2e71b4fad5d5c47603aafb4dcb2539e27 (diff) | |
download | compcert-04292034ef23e8cfdab593b7d248368085631881.tar.gz compcert-04292034ef23e8cfdab593b7d248368085631881.zip |
Merge pull request #3 from AbsInt/pure-makefiles
Merge of the pure-makefiles branch, which uses Makefiles instead of ocamlbuild to build the Caml code.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 47 |
1 files changed, 40 insertions, 7 deletions
@@ -213,7 +213,7 @@ fi missingtools=false echo "Testing Coq... " | tr -d '\n' -coq_ver=`coqc -v | sed -n -e 's/The Coq Proof Assistant, version \([^ ]*\).*$/\1/p'` +coq_ver=`coqc -v 2>/dev/null | sed -n -e 's/The Coq Proof Assistant, version \([^ ]*\).*$/\1/p'` case "$coq_ver" in 8.4pl*) echo "version $coq_ver -- good!";; @@ -223,14 +223,14 @@ case "$coq_ver" in missingtools=true;; *) echo "NOT FOUND" - echo "Error: make sure Coq version 8.4pl4 is installed." + echo "Error: make sure Coq version 8.4 pl5 is installed." missingtools=true;; esac echo "Testing OCaml... " | tr -d '\n' -ocaml_ver=`ocamlc -version` +ocaml_ver=`ocamlopt -version 2>/dev/null` case "$ocaml_ver" in - 4.*) + [4-9].*) echo "version $ocaml_ver -- good!";; ?.*) echo "version $ocaml_ver -- UNSUPPORTED" @@ -242,17 +242,48 @@ case "$ocaml_ver" in missingtools=true;; esac +echo "Testing OCaml .opt compilers... " | tr -d '\n' +ocaml_opt_ver=`ocamlopt.opt -version 2>/dev/null` +if test "$ocaml_opt_ver" = "$ocaml_ver"; then + echo "yes" + ocaml_opt_comp=true +else + echo "no, will do without" + ocaml_opt_comp=false +fi + echo "Testing Menhir... " | tr -d '\n' -menhir_ver=`menhir --version | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p'` +menhir_ver=`menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p'` case "$menhir_ver" in - 20*) + 201[4-9]*|20[2-9]*) echo "version $menhir_ver -- good!";; + ?*) + echo "version $menhir_ver -- UNSUPPORTED" + echo "Error: CompCert requires Menhir version 20140422 or later." + missingtools=true;; *) echo "NOT FOUND" - echo "Error: make sure Menhir is installed." + echo "Error: make sure Menhir version 20140422 or later is installed." missingtools=true;; esac +echo "Testing GNU make... " | tr -d '\n' +make='' +for mk in make gmake gnumake; do + make_ver=`($mk -v 2>/dev/null | head -1 | sed -n -e 's/^GNU Make //p') 2>/dev/null` + case "$make_ver" in + 3.8*|3.9*|[4-9].*) + echo "version $make_ver (command '$mk') -- good!" + make="$mk" + break;; + esac +done +if test -z "$make"; then + echo "NOT FOUND" + echo "Error: make sure GNU Make version 3.80 or later is installed." + missingtools=true +fi + if $missingtools; then echo "One or several required tools are missing or too old. Aborting." exit 2 @@ -282,6 +313,7 @@ PREFIX=$prefix BINDIR=$bindir LIBDIR=$libdir SHAREDIR=$sharedir +OCAML_OPT_COMP=$ocaml_opt_comp EOF if test "$target" != "manual"; then @@ -403,6 +435,7 @@ CompCert configuration: Runtime library provided...... $has_runtime_lib Library files installed in.... $libdirexp cchecklink tool supported..... $cchecklink + Build command to use.......... $make If anything above looks wrong, please edit file ./Makefile.config to correct. |