aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2007-02-27 16:12:47 +0000
committerletouzey2007-02-27 16:12:47 +0000
commit502ec7f4631d0ae0b6bac62493bfc532fc9c9102 (patch)
treef97a4807eaf6e6e23397f4dc82a17a4fc3b498c1
parent08155e36e163ea69f7929ae268770a7ef0ea89c1 (diff)
Revision of the coqide configuration:
* if -byte-only is used, then -coqide byte is implied except when the user explicitely said otherwise * If the user asks -coqide opt or byte, then LablGtk2 checks are not bypassed anymore. In particular, the check whether ide/undo.mli should be compatible with LablGtk2 < 2.6.0 or >= 2.6.0 is done. * The tests are organized in a linear sequence of "if elif elif else" that the next reader of this code may have a chance to understand git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9681 85f007b7-540e-0410-9357-904b9bb8a0f7
-rwxr-xr-xconfigure62
1 files changed, 34 insertions, 28 deletions
diff --git a/configure b/configure
index e059f4d30e..3486db8257 100755
--- a/configure
+++ b/configure
@@ -387,30 +387,34 @@ esac
# lablgtk2 and CoqIDE
-if [ "$coqide_spec" = "no" ] ; then
-if test -x "${CAMLLIB}/lablgtk2" ; then
- if grep -q -w convert_with_fallback "${CAMLLIB}/lablgtk2/glib.mli" ; then
- if test -f "${CAMLLIB}/threads/threads.cmxa" ; then
- echo "LablGtk2 found, native threads: native CoqIde will be available"
- COQIDE=opt;
- else
- echo "LablGtk2 found, no native threads: bytecode CoqIde will be available"
- COQIDE=byte
- fi
- if grep "class view " "${CAMLLIB}/lablgtk2/gText.mli" | grep -q "\[>" ; then
- LABLGTKGE26=yes;
- else
- LABLGTKGE26=no
- fi;
- else
- echo "LablGtk2 found but too old: CoqIde will not be available"
- COQIDE=no;
- fi
-else
+# -byte-only should imply -coqide byte, unless the user decides otherwise
+
+if [ "$best_compiler" = "byte" -a "$coqide_spec" = "no" ]; then
+ coqide_spec=yes
+ COQIDE=byte
+fi
+
+# Which coqide is asked ? which one is possible ?
+
+if [ "$coqide_spec" = "yes" -a "$COQIDE" = "no" ]; then
+ echo "CoqIde disabled as requested"
+elif [ ! -x "${CAMLLIB}/lablgtk2" ]; then
echo "LablGtk2 not found: CoqIde will not be available"
COQIDE=no
+elif [ -z "`grep -w convert_with_fallback ${CAMLLIB}/lablgtk2/glib.mli`" ]; then
+ echo "LablGtk2 found but too old: CoqIde will not be available"
+ COQIDE=no;
+elif [ "$coqide_spec" = "yes" -a "$COQIDE" = "byte" ]; then
+ echo "LablGtk2 found, bytecode CoqIde will be used as requested"
+ COQIDE=byte
+elif [ ! -f "${CAMLLIB}/threads/threads.cmxa" ]; then
+ echo "LablGtk2 found, no native threads: bytecode CoqIde will be available"
+ COQIDE=byte
+else
+ echo "LablGtk2 found, native threads: native CoqIde will be available"
+ COQIDE=opt
fi
-fi
+
# Tell on windows if ocaml understands cygwin or windows path formats
@@ -748,15 +752,17 @@ if test "$coq_debug_flag" = "-g" ; then
chmod a-w,a+x $OCAMLDEBUGCOQ
fi
-##################################################
-# Fixing lablgtk types
+####################################################
+# Fixing lablgtk types (before/after 2.6.0)
####################################################
-if [ "$LABLGTKGE26" = "yes" ] ; then
- cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli
-else
- cp -f ide/undo_lablgtk_lt26.mli ide/undo.mli
-fi
+if [ ! "$COQIDE" = "no" ]; then
+ if grep "class view " "$CAMLLIB/lablgtk2/gText.mli" | grep -q "\[>" ; then
+ cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli
+ else
+ cp -f ide/undo_lablgtk_lt26.mli ide/undo.mli
+ fi
+fi
##################################################
# The end