diff options
| author | glondu | 2008-10-21 19:02:36 +0000 |
|---|---|---|
| committer | glondu | 2008-10-21 19:02:36 +0000 |
| commit | e6b509aa8c8f74d52e1bc69c3a4bf2a6fe8e3d01 (patch) | |
| tree | 381dcc11c6eda1b2a3d7990ab3b00898fc52460d | |
| parent | e82a571c3b5fd79a79b67cf30714f2e54c4c8371 (diff) | |
More OCaml-3.11-friendly configure script
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11487 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rwxr-xr-x | configure | 57 |
1 files changed, 33 insertions, 24 deletions
@@ -405,7 +405,7 @@ esac # ("native-code program cannot do a dynamic load") if [ `uname -s` = "FreeBSD" ]; then camlp4oexec=$camlp4oexec.byte; fi -CAMLVERSION=`"$bytecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` +CAMLVERSION=`"$bytecamlc" -version` case $CAMLVERSION in 1.*|2.*|3.00|3.01|3.02|3.03|3.03alpha|3.04|3.05beta|3.05|3.06|3.08.0) @@ -446,9 +446,13 @@ case $CAMLVERSION in cflags="$cflags -DOCAML_307";; esac -if [ "$CAMLTAG" = "OCAML310" ] && [ "$coq_debug_flag" = "-g" ]; then - # Compilation debug flag - coq_debug_flag_opt="-g" +if [ "$coq_debug_flag" = "-g" ]; then + case $CAMLTAG in + OCAML31*) + # Compilation debug flag + coq_debug_flag_opt="-g" + ;; + esac fi # Camlp4 / Camlp5 configuration @@ -467,26 +471,31 @@ if [ "$camlp5dir" != "" ]; then echo "Please compile Camlp5 in transitional mode." exit 1 fi -elif [ "$CAMLTAG" = "OCAML310" ]; then - if [ -x "${CAMLLIB}/camlp5" ]; then - CAMLP4LIB=+camlp5 - elif [ -x "${CAMLLIB}/site-lib/camlp5" ]; then - CAMLP4LIB=+site-lib/camlp5 - else - echo "Objective Caml 3.10 found but no Camlp5 installed." - echo "Configuration script failed!" - exit 1 - fi - CAMLP4=camlp5 - camlp4oexec=`echo $camlp4oexec | sed -e 's/4/5/'` - if [ `$camlp4oexec -pmode 2>&1` = "strict" ]; then - echo "Error: Camlp5 found, but in strict mode!" - echo "Please compile Camlp5 in transitional mode." - exit 1 - fi -else - CAMLP4=camlp4 - CAMLP4LIB=+camlp4 +else + case $CAMLTAG in + OCAML31*) + if [ -x "${CAMLLIB}/camlp5" ]; then + CAMLP4LIB=+camlp5 + elif [ -x "${CAMLLIB}/site-lib/camlp5" ]; then + CAMLP4LIB=+site-lib/camlp5 + else + echo "Objective Caml 3.10 found but no Camlp5 installed." + echo "Configuration script failed!" + exit 1 + fi + CAMLP4=camlp5 + camlp4oexec=`echo $camlp4oexec | sed -e 's/4/5/'` + if [ `$camlp4oexec -pmode 2>&1` = "strict" ]; then + echo "Error: Camlp5 found, but in strict mode!" + echo "Please compile Camlp5 in transitional mode." + exit 1 + fi + ;; + *) + CAMLP4=camlp4 + CAMLP4LIB=+camlp4 + ;; + esac fi if [ "$CAMLP4" = "camlp5" ] && `$camlp4oexec -v 2>&1 | grep -q 5.00`; then |
