summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 29 insertions, 6 deletions
diff --git a/configure b/configure
index 2747ee2f..79a772ed 100755
--- a/configure
+++ b/configure
@@ -6,10 +6,13 @@
#
##################################
-VERSION=8.2beta4
+VERSION=8.2
VOMAGIC=08193
STATEMAGIC=19764
-DATE="Aug. 2008"
+DATE="Jun. 2008"
+
+# Create the bin/ directory if non-existent
+test -d bin || mkdir bin
# a local which command for sh
which () {
@@ -32,6 +35,8 @@ usage () {
printf "\tSet installation directory to <dir>\n"
echo "-local"
printf "\tSet installation directory to the current source tree\n"
+ echo "-coqrunbyteflags"
+ printf "\tSet link flags for VM-dependent bytecode\n"
echo "-src"
printf "\tSpecifies the source directory\n"
echo "-bindir"
@@ -83,6 +88,7 @@ usage () {
# Default OCaml binaries
bytecamlc=ocamlc
nativecamlc=ocamlopt
+ocamlmklib=ocamlmklib
ocamlexec=ocaml
ocamldepexec=ocamldep
ocamldocexec=ocamldoc
@@ -104,6 +110,7 @@ ar_exec=ar
ranlib_exec=ranlib
local=false
+coqrunbyteflags_spec=no
src_spec=no
prefix_spec=no
bindir_spec=no
@@ -137,6 +144,9 @@ while : ; do
prefix="$2"
shift;;
-local|--local) local=true;;
+ -coqrunbyteflags|--coqrunbyteflags) coqrunbyteflags_spec=yes
+ coqrunbyteflags="$2"
+ shift;;
-src|--src) src_spec=yes
COQSRC="$2"
shift;;
@@ -754,6 +764,14 @@ case $coqdocdir_spec/$prefix_spec/$local in
esac;;
esac
+BUILDLDPATH="# you might want to set CAML_LD_LIBRARY_PATH by hand!"
+case $coqrunbyteflags_spec/$local in
+ yes/*) COQRUNBYTEFLAGS="$coqrunbyteflags";;
+ */true) COQRUNBYTEFLAGS="-dllib -lcoqrun -dllpath $COQTOP/kernel/byterun";;
+ *) COQRUNBYTEFLAGS="-dllib -lcoqrun -dllpath $LIBDIR"
+ BUILDLDPATH="export CAML_LD_LIBRARY_PATH=$COQTOP/kernel/byterun";;
+esac
+
# case $emacs_spec in
# no) echo "Which Emacs command should I use to compile coq.el [$emacs_def] ?"
# read EMACS
@@ -774,6 +792,7 @@ echo " Architecture : $ARCH"
if test ! -z "$OS" ; then
echo " Operating system : $OS"
fi
+echo " Coq VM bytecode link flags : $COQRUNBYTEFLAGS"
echo " OS dependent libraries : $OSDEPLIBS"
echo " Objective-Caml/Camlp4 version : $CAMLVERSION"
echo " Objective-Caml/Camlp4 binaries in : $CAMLBIN"
@@ -862,9 +881,10 @@ cat << END_OF_COQ_CONFIG > $mlconfig_file
(* DO NOT EDIT THIS FILE: automatically generated by ../configure *)
let local = $local
-let bindir = "$ESCBINDIR"
-let coqlib = "$ESCLIBDIR"
-let coqtop = "$ESCCOQTOP"
+let coqrunbyteflags = "$COQRUNBYTEFLAGS"
+let bindir = try Sys.getenv "COQBIN" with Not_found -> "$ESCBINDIR"
+let coqlib = try Sys.getenv "COQLIB" with Not_found -> "$ESCLIBDIR"
+let coqtop = try Sys.getenv "COQTOP" with Not_found -> "$ESCCOQTOP"
let camldir = "$ESCCAMLDIR"
let camllib = "$ESCCAMLLIB"
let camlp4 = "$CAMLP4"
@@ -909,10 +929,12 @@ chmod a-w "$mlconfig_file"
rm -f "$COQSRC/config/Makefile"
sed -e "s|LOCALINSTALLATION|$local|" \
+ -e "s|XCOQRUNBYTEFLAGS|$COQRUNBYTEFLAGS|" \
-e "s|COQSRCDIRECTORY|$COQSRC|" \
-e "s|COQVERSION|$VERSION|" \
-e "s|BINDIRDIRECTORY|$ESCBINDIR|" \
-e "s|COQLIBDIRECTORY|$ESCLIBDIR|" \
+ -e "s|BUILDLDPATH=|$BUILDLDPATH|" \
-e "s|MANDIRDIRECTORY|$ESCMANDIR|" \
-e "s|DOCDIRDIRECTORY|$ESCDOCDIR|" \
-e "s|EMACSLIBDIRECTORY|$ESCEMACSLIB|" \
@@ -937,6 +959,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \
-e "s|BESTCOMPILER|$best_compiler|" \
-e "s|EXECUTEEXTENSION|$EXE|" \
-e "s|BYTECAMLC|$bytecamlc|" \
+ -e "s|OCAMLMKLIBEXEC|$ocamlmklib|" \
-e "s|NATIVECAMLC|$nativecamlc|" \
-e "s|OCAMLEXEC|$ocamlexec|" \
-e "s|OCAMLDEPEXEC|$ocamldepexec|" \
@@ -994,4 +1017,4 @@ echo
echo "*Warning* To compile the system for a new architecture"
echo " don't forget to do a 'make archclean' before './configure'."
-# $Id: configure 11320 2008-08-07 19:40:59Z notin $
+# $Id: configure 11380 2008-09-07 12:27:27Z glondu $