aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-06-14 20:45:13 +0000
committerGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-06-14 20:45:13 +0000
commita8cbf010b648340f1fe716f181bf06b0726554cc (patch)
treebc27c463847709eb934fcc89a13f425211d2f460
parent9dd748a92f23362dbb0ba47930dfa08f730a536d (diff)
Revert "Coqide now need lablgtk2.14.0" + Ide build system debugging
We can be easily substitute Gdk.Windowing by a glance of configure work... This reverts commit 8b6f6b1c4b60e74dccd5d8c49bdd433e19d53bf4. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14208 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--Makefile.build2
-rw-r--r--config/coq_config.mli1
-rwxr-xr-xconfigure15
-rw-r--r--ide/coqide.ml2
-rw-r--r--ide/coqide_main.ml48
-rw-r--r--ide/coqide_ui.ml2
-rw-r--r--ide/preferences.ml5
7 files changed, 20 insertions, 15 deletions
diff --git a/Makefile.build b/Makefile.build
index 852ce0042..ff6dafdda 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -346,7 +346,7 @@ install-ide-opt:
install-ide-files:
$(MKDIR) $(FULLIDELIB)
$(INSTALLLIB) $(IDEFILES) $(FULLIDELIB)
- if [ $(IDEOPTINT) = "MacInt" ] ; then $(INSTALLLIB) ide/mac_default_accel_map $(INSTALLLIB)/ide/default_accel_map ; fi
+ if [ $(IDEOPTINT) = "MacInt" ] ; then $(INSTALLLIB) ide/mac_default_accel_map ide/default_accel_map ; fi
install-ide-info:
$(MKDIR) $(FULLIDELIB)
diff --git a/config/coq_config.mli b/config/coq_config.mli
index 950b0092f..5e393e320 100644
--- a/config/coq_config.mli
+++ b/config/coq_config.mli
@@ -59,6 +59,7 @@ val browser : string
variable COQREMOTEBROWSER *)
val has_coqide : string
+val gtk_platform : [`QUARTZ | `WIN32 | `X11]
val has_natdynlink : bool
val natdynlinkflag : string (* special cases of natdynlink (e.g. MacOS 10.5) *)
diff --git a/configure b/configure
index d7a86d04d..611c222ab 100755
--- a/configure
+++ b/configure
@@ -599,7 +599,7 @@ esac
IDEARCHFLAGS=
IDEARCHFILE=
-IDEARCHDEF=No
+IDEARCHDEF=X11
# -byte-only should imply -coqide byte, unless the user decides otherwise
@@ -630,7 +630,7 @@ else
if [ "$lablgtkdir" = "" ]; then
echo "LablGtk2 not found: CoqIde will not be available."
COQIDE=no
- elif [ -z "`grep -w Windowing "$lablgtkdir/gdk.mli"`" ]; then
+ elif [ -z "`grep -w convert_with_fallback "$lablgtkdir/glib.mli"`" ]; then
echo "LablGtk2 found but too old: CoqIde will not be available."
COQIDE=no;
elif [ "$coqide_spec" = "yes" -a "$COQIDE" = "byte" ]; then
@@ -647,12 +647,12 @@ else
cflags=$cflags" `pkg-config --cflags ige-mac-integration`"
IDEARCHFLAGS='-ccopt "`pkg-config --libs ige-mac-integration`"'
IDEARCHFILE=ide/ide_mac_stubs.o
- IDEARCHDEF=MacInt
+ IDEARCHDEF=QUARTZ
elif [ "$ARCH" = "win32" ];
then
IDEARCHFLAGS=
IDEARCHFILE=ide/ide_win32_stubs.o
- IDEARCHDEF=Win32
+ IDEARCHDEF=WIN32
fi
fi
fi
@@ -662,8 +662,8 @@ case $COQIDE in
case $lablgtkdir_spec in
no) LABLGTKLIB=+lablgtk2 # Pour le message
LABLGTKINCLUDES="-I $LABLGTKLIB";; # Pour le makefile
- yes) LABLGTKLIB="$lablgtkdir" # Pour le message
- LABLGTKINCLUDES="-I \"$LABLGTKLIB\"";; # Pour le makefile
+ yes) LABLGTKLIB=$lablgtkdir # Pour le message
+ LABLGTKINCLUDES="-I $LABLGTKLIB";; # Pour le makefile
esac;;
no) LABLGTKINCLUDES="";;
esac
@@ -881,7 +881,7 @@ fi
if test "$COQIDE" != "no"; then
echo " Lablgtk2 library in : $LABLGTKLIB"
fi
-if test "$IDEARCHDEF" = "MacInt"; then
+if test "$IDEARCHDEF" = "QUARTZ"; then
echo " Mac OS integration is on"
fi
if test "$with_doc" = "all"; then
@@ -1023,6 +1023,7 @@ let cflags = "$cflags"
let best = "$best_compiler"
let arch = "$ARCH"
let has_coqide = "$COQIDE"
+let gtk_platform = \`$IDEARCHDEF
let has_natdynlink = $HASNATDYNLINK
let natdynlinkflag = "$NATDYNLINKFLAG"
let osdeplibs = "$OSDEPLIBS"
diff --git a/ide/coqide.ml b/ide/coqide.ml
index a57551b80..adce4f9f4 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -2537,7 +2537,7 @@ let main files =
Coqide_ui.ui_m#insert_action_group windows_actions 0;
Coqide_ui.ui_m#insert_action_group help_actions 0;
w#add_accel_group Coqide_ui.ui_m#get_accel_group ;
- if Gdk.Windowing.platform <> `QUARTZ
+ if Coq_config.gtk_platform <> `QUARTZ
then vbox#pack (Coqide_ui.ui_m#get_widget "/CoqIde MenuBar");
let tbar = GtkButton.Toolbar.cast ((Coqide_ui.ui_m#get_widget "/CoqIde ToolBar")#as_widget)
in let () = GtkButton.Toolbar.set ~orientation:`HORIZONTAL ~style:`ICONS
diff --git a/ide/coqide_main.ml4 b/ide/coqide_main.ml4
index 0f9964814..28301ff1d 100644
--- a/ide/coqide_main.ml4
+++ b/ide/coqide_main.ml4
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-IFDEF MacInt THEN
+IFDEF QUARTZ THEN
external gtk_mac_init : (string -> unit) -> (unit -> bool) -> unit
= "caml_gtk_mac_init"
@@ -15,9 +15,9 @@ external gtk_mac_ready : ([> Gtk.widget ] as 'a) Gtk.obj -> ([> Gtk.widget ] as
= "caml_gtk_mac_ready"
END
-let initmac () = IFDEF MacInt THEN gtk_mac_init Coqide.do_load Coqide.forbid_quit_to_save ELSE () END
+let initmac () = IFDEF QUARTZ THEN gtk_mac_init Coqide.do_load Coqide.forbid_quit_to_save ELSE () END
-let macready x y z = IFDEF MacInt THEN gtk_mac_ready x#as_widget y#as_widget z#as_widget ELSE () END
+let macready x y z = IFDEF QUARTZ THEN gtk_mac_ready x#as_widget y#as_widget z#as_widget ELSE () END
(* On win32, we add the directory of coqide to the PATH at launch-time
(this used to be done in a .bat script). *)
@@ -54,7 +54,7 @@ let ctrl_c_protect f i =
if not (Mutex.try_lock ctrl_c_mtx) then ()
else try f i; Mutex.unlock ctrl_c_mtx with _ -> Mutex.unlock ctrl_c_mtx
-IFDEF Win32 THEN
+IFDEF WIN32 THEN
external win32_kill : int -> unit = "win32_kill"
external win32_interrupt : int -> unit = "win32_interrupt"
let () =
diff --git a/ide/coqide_ui.ml b/ide/coqide_ui.ml
index d3543cf2c..0d7c67acf 100644
--- a/ide/coqide_ui.ml
+++ b/ide/coqide_ui.ml
@@ -144,7 +144,7 @@ let init () =
<toolitem action='Wizard' />
</toolbar>
</ui>"
- (if Gdk.Windowing.platform <> `QUARTZ then "<menuitem action='Quit' />" else "")
+ (if Coq_config.gtk_platform <> `QUARTZ then "<menuitem action='Quit' />" else "")
(Buffer.contents (list_items "Tactic" Coq_commands.tactics))
(Buffer.contents (list_items "Template" Coq_commands.commands))
in
diff --git a/ide/preferences.ml b/ide/preferences.ml
index f10f3e503..c0d46aca5 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -1,3 +1,4 @@
+
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
@@ -115,7 +116,9 @@ let (current:pref ref) =
cmd_editor = if Sys.os_type = "Win32" then "NOTEPAD %s" else "emacs %s";
(* text_font = Pango.Font.from_string "sans 12";*)
- text_font = Pango.Font.from_string "Monospace 10";
+ text_font = Pango.Font.from_string (match Coq_config.gtk_platform with
+ |`QUARTZ -> "Arial Unicode MS 11"
+ |_ -> "Monospace 10");
doc_url = Coq_config.wwwrefman;
library_url = Coq_config.wwwstdlib;