diff options
| author | notin | 2006-07-28 18:05:39 +0000 |
|---|---|---|
| committer | notin | 2006-07-28 18:05:39 +0000 |
| commit | 7e13b8a0627c09a49487dc64210fa4616cffc66c (patch) | |
| tree | b44dee28523fd5f63edde51c15571d69251ab221 /configure | |
| parent | 5ce1ece6393b33a213dfba2e3b63a130e398d84f (diff) | |
Modifications dans les scripts de configuration (coqtop et coqide affichent maintenant le numéro de révision svn) + correction problème OCaml 3.07 et caml_;odify
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9063 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 89 |
1 files changed, 54 insertions, 35 deletions
@@ -6,8 +6,8 @@ # ################################## -VERSION=8.1beta -DATE="Jun 2006" +VERSION=trunk +DATE="Aug 2006" # a local which command for sh which () { @@ -37,6 +37,7 @@ libdir_spec=no mandir_spec=no emacslib_spec=no emacs_spec=no +camldir_spec=no coqdocdir_spec=no fsets_opt=no fsets=all @@ -81,6 +82,9 @@ while : ; do -coqdocdir|--coqdocdir) coqdocdir_spec=yes coqdocdir="$2" shift;; + -camldir|--camldir) camldir_spec=yes + camldir="$2" + shift;; -arch|--arch) arch_spec=yes arch=$2 shift;; @@ -171,50 +175,63 @@ case $ARCH in fi esac +# Is the source tree checked out from svn ? +if test -e .svn/entries ; then + checkedout=1 +else + checkedout=0 +fi + ######################################### # Objective Caml programs -CAMLC=`which $bytecamlc` -case "$CAMLC" in - "") echo "$bytecamlc is not present in your path !" - echo "Give me manually the path to the $bytecamlc executable [/usr/local/bin by default]: " - read CAMLC - +case $camldir_spec in + no) CAMLC=`which $bytecamlc` case "$CAMLC" in - "") CAMLC=/usr/local/bin/$bytecamlc;; - */ocamlc|*/ocamlc.opt) true;; - */) CAMLC="${CAMLC}"$bytecamlc;; - *) CAMLC="${CAMLC}"/$bytecamlc;; - esac + "") echo "$bytecamlc is not present in your path !" + echo "Give me manually the path to the $bytecamlc executable [/usr/local/bin by default]: " + read CAMLC + + case "$CAMLC" in + "") CAMLC=/usr/local/bin/$bytecamlc;; + */ocamlc|*/ocamlc.opt) true;; + */) CAMLC="${CAMLC}"$bytecamlc;; + *) CAMLC="${CAMLC}"/$bytecamlc;; + esac + esac;; + yes) CAMLC=$camldir/$bytecamlc bytecamlc="$CAMLC" - nativecamlc=`dirname "$CAMLC"`/$nativecamlc;; + nativecamlc=`dirname "$bytecamlc"`/$nativecamlc;; esac if test ! -f "$CAMLC" ; then - echo "I can not find the executable '$CAMLC'! (Have you installed it?)" - echo "Configuration script failed!" - exit 1 + echo "I can not find the executable '$CAMLC'! (Have you installed it?)" + echo "Configuration script failed!" + exit 1 fi CAMLBIN=`dirname "$CAMLC"` -CAMLVERSION=`"$CAMLC" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` +bytecamlc="$CAMLC" +nativecamlc=$CAMLBIN/$nativecamlc + +CAMLVERSION=`"$bytecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` case $CAMLVERSION in - 1.*|2.*|3.00|3.01|3.02|3.03|3.03alpha|3.04|3.05beta|3.05|3.08.0) + 1.*|2.*|3.00|3.01|3.02|3.03|3.03alpha|3.04|3.05beta|3.05|3.08.0) echo "Your version of Objective-Caml is $CAMLVERSION." if [ "$CAMLVERSION" = "3.08.0" ] ; then - echo "You need Objective-Caml 3.06 or later (to the exception of 3.08.0)!" + echo "You need Objective-Caml 3.06 or later (to the exception of 3.08.0)!" else - echo "You need Objective-Caml 3.06 or later!"; + echo "You need Objective-Caml 3.06 or later!" fi echo "Configuration script failed!" exit 1;; - 3.06|3.07*|3.08*) + 3.06|3.07*|3.08*) echo "You have Objective-Caml $CAMLVERSION. Good!";; - ?*) + ?*) CAMLP4COMPAT="-loc loc" echo "You have Objective-Caml $CAMLVERSION. Good!";; - *) + *) echo "I found the Objective-Caml compiler but cannot find its version number!" echo "Is it installed properly ?" echo "Configuration script failed!" @@ -226,17 +243,18 @@ CAMLTAG=OCAML`echo $CAMLVERSION | sed -e "s/\([1-9]\)\.\([0-9]*\).*/\1\2/g"` # do we have a native compiler: test of ocamlopt and its version if [ "$best_compiler" = "opt" ] ; then - CAMLOPT=`which $nativecamlc` - case "$CAMLOPT" in - "") best_compiler=byte - echo "You have only bytecode compilation.";; - *) CAMLOPTVERSION=`"$CAMLOPT" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` - if [ "$CAMLOPTVERSION" != "$CAMLVERSION" ] ; then \ - echo "native and bytecode compilers do not have the same version!"; fi - echo "You have native-code compilation. Good!" - esac + if test -e $nativecamlc ; then + CAMLOPTVERSION=`"$nativecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` + if [ "$CAMLOPTVERSION" != "$CAMLVERSION" ] ; then + echo "native and bytecode compilers do not have the same version!"; fi + echo "You have native-code compilation. Good!" + else + best_compiler=byte ; + echo "You have only bytecode compilation." + fi fi + # For coqmktop & bytecode compiler CAMLLIB=`"$CAMLC" -where` @@ -485,7 +503,7 @@ echo "" # An escaped version of a variable escape_var () { -ocaml 2>&1 1>/dev/null <<EOF +$CAMLBIN/ocaml 2>&1 1>/dev/null <<EOF prerr_endline(String.escaped(Sys.getenv"$VAR"));; EOF } @@ -595,6 +613,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|FSETSOPT|$fsets|" \ -e "s|REALSOPT|$reals|" \ -e "s|COQIDEOPT|$COQIDE|" \ + -e "s|CHECKEDOUTSOURCETREE|$checkedout|" \ $COQTOP/config/Makefile.template > $COQTOP/config/Makefile chmod a-w $COQTOP/config/Makefile @@ -625,7 +644,7 @@ fi #################################################### if [ "$LABLGTKGE26" = "yes" ] ; then - cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli; + cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli else cp -f ide/undo_lablgtk_lt26.mli ide/undo.mli fi |
