aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/coq_config.mli1
-rwxr-xr-xconfigure8
-rw-r--r--scripts/coqmktop.ml4
3 files changed, 8 insertions, 5 deletions
diff --git a/config/coq_config.mli b/config/coq_config.mli
index f127c3034..6882baa6f 100644
--- a/config/coq_config.mli
+++ b/config/coq_config.mli
@@ -15,6 +15,7 @@ val coqlib : string (* where the std library is installed *)
val coqtop : string (* where are the sources *)
+val camldir : string (* base directory of OCaml binaries *)
val camllib : string (* for Dynlink *)
val camlp4lib : string (* where is the library of Camlp4 *)
diff --git a/configure b/configure
index d1a79c0b1..5010a2efe 100755
--- a/configure
+++ b/configure
@@ -272,8 +272,7 @@ case $camldir_spec in
esac
esac;;
yes) CAMLC=$camldir/$bytecamlc
- bytecamlc="$CAMLC"
- nativecamlc=`dirname "$bytecamlc"`/$nativecamlc;;
+ bytecamlc="$CAMLC";;
esac
if test ! -f "$CAMLC" ; then
@@ -290,6 +289,7 @@ ocamldocexec=$CAMLBIN/ocamldoc
ocamllexexec=$CAMLBIN/ocamllex
ocamlyaccexec=$CAMLBIN/ocamlyacc
camlmktopexec=$CAMLBIN/ocamlmktop
+camlp4o=$CAMLBIN/camlp4o
CAMLVERSION=`"$bytecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
@@ -585,10 +585,11 @@ escape_var () {
EOF
}
-export COQTOP BINDIR LIBDIR CAMLLIB
+export COQTOP BINDIR LIBDIR CAMLBIN CAMLLIB
ESCCOQTOP="`VAR=COQTOP escape_var`"
ESCBINDIR="`VAR=BINDIR escape_var`"
ESCLIBDIR="`VAR=LIBDIR escape_var`"
+ESCCAMLDIR="`VAR=CAMLBIN escape_var`"
ESCCAMLLIB="`VAR=CAMLLIB escape_var`"
ESCCAMLP4LIB="$ESCCAMLLIB"/camlp4
@@ -601,6 +602,7 @@ let local = $local
let bindir = "$ESCBINDIR"
let coqlib = "$ESCLIBDIR"
let coqtop = "$ESCCOQTOP"
+let camldir = "$ESCCAMLDIR"
let camllib = "$ESCCAMLLIB"
let camlp4lib = "$ESCCAMLP4LIB"
let best = "$best_compiler"
diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml
index 0e465a9f7..d63cec1f6 100644
--- a/scripts/coqmktop.ml
+++ b/scripts/coqmktop.ml
@@ -279,11 +279,11 @@ let main () =
if !opt then begin
(* native code *)
if !top then failwith "no custom toplevel in native code !";
- "ocamlopt -linkall"
+ Coq_config.camldir^"/ocamlopt -linkall"
end else
(* bytecode (we shunt ocamlmktop script which fails on win32) *)
let ocamlmktoplib = " toplevellib.cma" in
- let ocamlccustom = "ocamlc -custom -linkall" in
+ let ocamlccustom = Coq_config.camldir^"/ocamlc -custom -linkall" in
(if !top then ocamlccustom^ocamlmktoplib else ocamlccustom)
in
(* files to link *)