lablgtkmathview-0.7.8/0000755000175000017500000000000011156467124013752 5ustar tassitassilablgtkmathview-0.7.8/Makefile.in0000644000175000017500000000772510501241053016012 0ustar tassitassiPACKAGE = @PACKAGE@ VERSION = @VERSION@ INCLUDEDIR = @OCAML_INCLUDE_DIR@ PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc NATIVE = @HAVE_OCAMLOPT@ PREFIX = OBJECTS_C = ml_gtk_mathview.o OBJECTS = gtkMathViewProps.cmo ogtkMathViewProps.cmo gtk_mathview.cmo gtkMathView.cmo gMathView.cmo gMathViewAux.cmo OBJECTS_OPT = gtkMathViewProps.cmx ogtkMathViewProps.cmx gtkMathView.cmx gtk_mathview.cmx gMathView.cmx gMathViewAux.cmx GENERATED_FILES = gtkMathViewProps.ml ogtkMathViewProps.ml NULL = INST = \ META \ gMathView.mli \ gMathView.cmi \ gtkMathView.cmi \ gtk_mathview.cmi \ gtkMathViewProps.cmi \ ogtkMathViewProps.cmi \ gMathViewAux.cmi \ gMathViewAux.mli \ $(NULL) DIST_FILES = \ Makefile.in configure.in gMathView.ml gMathView.mli \ gMathViewAux.ml gMathViewAux.mli gtkMathView.ml \ gtk_mathview.ml ml_gtk_mathview.c META.in .depend debian/ test/ \ configure gtkMathView.props DIST_DIR = $(PACKAGE)-$(VERSION) DOC_FILES = AUTHORS COPYING ChangeLog NEWS README LICENSE REQUIRES = gdome2 lablgtk2 PREDICATES = SHARED_LIBS = @GDOME_LIBS@ @GTKMATHVIEW_LIBS@ OCAMLFIND = ocamlfind OCAMLC = $(OCAMLFIND) ocamlc OCAMLOPT = $(OCAMLFIND) ocamlopt OCAMLDEP = ocamldep OCAMLMKLIB = ocamlmklib OCAML_STUB_DIR = @OCAML_STUB_DIR@ ARCHIVE = $(PACKAGE) DLL = dll$(ARCHIVE).so TESTDIR = ./test TMPDIR = .test TMPPKGDIR = $(TMPDIR)/$(PACKAGE) ifeq ($(NATIVE),yes) world: all opt else world: all endif all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL) opt: $(ARCHIVE).cmxa $(ARCHIVE).a test: $(TESTDIR)/test test.opt: $(TESTDIR)/test.opt dist: rm -rf $(DIST_DIR)/ mkdir $(DIST_DIR)/ cp -a $(DIST_FILES) $(DOC_FILES) $(DIST_DIR)/ -find $(DIST_DIR) -name .svn -type d -exec rm -rf {} \; tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/ rm -rf $(DIST_DIR)/ deb: dist if [ -d $(DIST_DIR)/ ]; then rm -rf $(DIST_DIR); else true; fi tar xvzf $(DIST_DIR).tar.gz (cd $(DIST_DIR)/ && debuild) rm -rf $(DIST_DIR) $(GENERATED_FILES): gtkMathView.props ml_gtk_mathview.o: ml_gtk_mathview.c gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk2` @GTKMATHVIEW_CFLAGS@ @GDOME_CFLAGS@ `ocamlfind query -i-format gdome2` $< .SUFFIXES: .cmo .cmi .cmx .ml .mli .ml.cmo: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< .mli.cmi: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< .ml.cmx: $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< %Props.ml o%Props.ml: %.props $(PROPCC) $(PROPCC) $< depend: *.ml *.mli $(GENERATED_FILES) $(OCAMLDEP) *.ml *.mli >.depend include .depend $(ARCHIVE).cma: $(OBJECTS) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) $(ARCHIVE).cmxa: $(OBJECTS_OPT) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) lib$(ARCHIVE).a $(DLL): $(OBJECTS_C) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) $(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE).cma $(TESTDIR)/test.ml mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(DLL) $(ARCHIVE).cma $(INST) $(TMPPKGDIR) cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make rm -r $(TMPDIR) $(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(TESTDIR)/test.ml mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(INST) $(TMPPKGDIR) cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make opt rm -r $(TMPDIR) install: test ! -f $(ARCHIVE).cmxa || extra="$(ARCHIVE).a $(ARCHIVE).cmxa" ; \ if [ "$(PREFIX)" = "" ]; then \ $(OCAMLFIND) install \ $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a \ $(DLL) $(INST) $$extra; \ else \ mkdir -p $(PREFIX); \ $(OCAMLFIND) install -ldconf /def/null -destdir $(PREFIX) \ $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a \ $(DLL) $(INST) $$extra; \ fi uninstall: if [ "$(PREFIX)" = "" ]; then \ ocamlfind remove $(PACKAGE); \ else \ ocamlfind remove -destdir $(PREFIX) $(PACKAGE); \ fi clean: rm -f *.[ao] *.cm[iaxo] *.cmxa *.so $(GENERATED_FILES) cd $(TESTDIR) ; make clean rm -rf $(TMPDIR) distclean: clean rm -f config.log config.cache config.status Makefile META cd $(TESTDIR) ; make distclean lablgtkmathview-0.7.8/AUTHORS0000644000175000017500000000020210501243704015001 0ustar tassitassiLuca Padovani Claudio Sacerdoti Coen Stefano Zacchiroli lablgtkmathview-0.7.8/ml_gtk_mathview.c0000644000175000017500000002037410370501535017275 0ustar tassitassi/* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Init all */ CAMLprim value ml_gtk_mathview_init(value unit) { /* Since these are declared const, must force gcc to call them! */ GType t = gtk_math_view_get_type(); return Val_GType(t); } #define GtkMathView_val(val) check_cast(GTK_MATH_VIEW,val) //##################################### // //#define FontManagerId_val(val) Int_val(val) //#define Val_FontManagerId(val) Val_int(val) // ///* As ML_1, but the result is optional */ //#define OML_1(cname, conv1, conv) \ //value ml_##cname (value arg1) { return Val_option_ptr((cname (conv1 (arg1))),conv); } ///* As ML_3, but the result is optional */ #define OML_3(cname, conv1, conv2, conv3, conv) \ value ml_##cname (value arg1, value arg2, value arg3) { return Val_option_ptr((cname (conv1 (arg1), conv2 (arg2), conv3 (arg3))),conv); } ///* As ML_2, but the second argument is optional */ //#define ML_2O(cname, conv1, conv2, conv) \ //value ml_##cname (value arg1, value arg2) \ //{ return conv (cname (conv1(arg1), ptr_val_option(arg2,conv2))); } value Val_Element_ref(GdomeElement* elem) { if (elem != NULL) { GdomeException exc = 0; gdome_el_ref(elem, &exc); g_assert(exc == 0); } return Val_Element(elem); } ML_2 (gtk_math_view_structure_changed, GtkMathView_val, Element_val, Unit) ML_3 (gtk_math_view_attribute_changed, GtkMathView_val, Element_val, DOMString_val, Unit) /* OML_3 (gtk_math_view_get_element_at, GtkMathView_val, Int_val, Int_val, Val_Element) */ ML_1 (gtk_math_view_freeze, GtkMathView_val, Unit) ML_1 (gtk_math_view_thaw, GtkMathView_val, Unit) ML_2 (gtk_math_view_load_uri, GtkMathView_val, String_val, Val_bool) ML_2 (gtk_math_view_load_root, GtkMathView_val, Element_val, Val_bool) ML_1 (gtk_math_view_unload, GtkMathView_val, Unit) ML_2 (gtk_math_view_select, GtkMathView_val, Element_val, Unit) ML_2 (gtk_math_view_unselect, GtkMathView_val, Element_val, Unit) ML_2 (gtk_math_view_is_selected, GtkMathView_val, Element_val, Val_bool) /* ML_2 (gtk_math_view_new,GtkAdjustment_val, GtkAdjustment_val, Val_GtkWidget_sink) ML_1 (gtk_math_view_get_width, GtkMathView_val, Val_int) ML_1 (gtk_math_view_get_height, GtkMathView_val, Val_int) */ ML_3 (gtk_math_view_set_top, GtkMathView_val, Int_val, Int_val, Unit) ML_3 (gtk_math_view_set_adjustments, GtkMathView_val, GtkAdjustment_val, GtkAdjustment_val, Unit) /* ML_1 (gtk_math_view_get_hadjustment, GtkMathView_val, Val_GtkWidget) ML_1 (gtk_math_view_get_vadjustment, GtkMathView_val, Val_GtkWidget) */ ML_1 (gtk_math_view_get_buffer, GtkMathView_val, Val_GdkPixmap) ML_2 (gtk_math_view_set_font_size, GtkMathView_val, Int_val, Unit) ML_1 (gtk_math_view_get_font_size, GtkMathView_val, Val_int) ML_2 (gtk_math_view_set_log_verbosity, GtkMathView_val, Int_val, Unit) ML_1 (gtk_math_view_get_log_verbosity, GtkMathView_val, Val_int) ML_2 (gtk_math_view_set_t1_opaque_mode, GtkMathView_val, Bool_val, Unit) ML_1 (gtk_math_view_get_t1_opaque_mode, GtkMathView_val, Val_bool) ML_2 (gtk_math_view_set_t1_anti_aliased_mode, GtkMathView_val, Bool_val, Unit) ML_1 (gtk_math_view_get_t1_anti_aliased_mode, GtkMathView_val, Val_bool) ML_1 (gtk_math_view_add_configuration_path, String_val, Unit) value ml_gtk_math_view_get_element_at (value arg1, value arg2, value arg3) { CAMLparam3(arg1, arg2, arg3); CAMLlocal1 (result); GdomeElement* el; if (gtk_math_view_get_element_at(GtkMathView_val (arg1), Int_val(arg2), Int_val(arg3), &el, NULL, NULL)) result = Val_option_ptr(el, Val_Element); else result = Val_unit; CAMLreturn (result); } value ml_gtk_math_view_get_document (value arg1) { CAMLparam1(arg1); CAMLlocal1(result); GdomeDocument* doc = gtk_math_view_get_document(GtkMathView_val (arg1)); if (doc == NULL) result = Val_unit; else result = Val_option_ptr(doc, Val_Document); CAMLreturn (result); } value ml_gtk_math_view_get_adjustments(value arg1) { CAMLparam1(arg1); CAMLlocal1(result); GtkAdjustment* hadj; GtkAdjustment* vadj; gtk_math_view_get_adjustments(GtkMathView_val (arg1), &hadj, &vadj); result = alloc(2, 0); Store_field(result, 0, Val_GtkWidget(hadj)); Store_field(result, 1, Val_GtkWidget(vadj)); CAMLreturn(result); } value ml_gtk_math_view_get_size (value arg1) { CAMLparam1(arg1); CAMLlocal1(result); int width, height; gtk_math_view_get_size(GtkMathView_val (arg1), &width, &height); result = alloc(1, 0); Store_field(result, 0, Val_int(width)); Store_field(result, 1, Val_int(height)); CAMLreturn (result); } value ml_gtk_math_view_get_bounding_box (value arg1) { CAMLparam1(arg1); CAMLlocal1(result); int width, height, depth; GtkMathViewBoundingBox gbox; gtk_math_view_get_bounding_box(GtkMathView_val (arg1), &gbox); result = alloc(3, 0); Store_field(result, 0, Val_int(gbox.width)); Store_field(result, 1, Val_int(gbox.height)); Store_field(result, 2, Val_int(gbox.depth)); CAMLreturn (result); } value ml_gtk_math_view_get_top (value arg1) { CAMLparam1(arg1); CAMLlocal1(result); int x, y; gtk_math_view_get_top(GtkMathView_val (arg1), &x, &y); result = alloc(2, 0); Store_field(result, 0, Val_int(x)); Store_field(result, 1, Val_int(y)); CAMLreturn (result); } /* value ml_gtk_math_view_get_element_coords (value arg1, value arg2) { CAMLparam2(arg1, arg2); CAMLlocal1 (result); int x, y; gtk_math_view_get_element_coords(GtkMathView_val (arg1), Element_val(arg2), &x, &y); result = alloc(2, 0); Store_field(result, 0, Val_int(x)); Store_field(result, 1, Val_int(y)); CAMLreturn (result); } */ value ml_gtk_math_view_gdome_element_of_boxed_option (value arg1) { CAMLparam1(arg1); GdomeException exc = 0; GdomeElement* nr = NULL; CAMLlocal1 (res); if (arg1==Val_int(0)) { assert(0); } else { nr = (GdomeElement*) Field(Field(arg1,0),1); } res = Val_Element_ref(nr); if (res==Val_int(0)) { assert(0); } CAMLreturn(res); } value ml_gtk_math_view_gdome_element_option_of_boxed_option (value arg1) { CAMLparam1(arg1); GdomeElement* nr; CAMLlocal1 (valnr); CAMLlocal1 (res); if (arg1==Val_int(0)) { res=Val_unit; } else { GdomeException exc = 0; GdomeElement* elem = (GdomeElement*) Field(Field(arg1,0),1); assert(elem != NULL); res = Val_option_ptr(elem, Val_Element_ref); } CAMLreturn(res); } value ml_gtk_math_view_model_event_of_boxed_option (value arg1) { CAMLparam1(arg1); GdomeElement* nr; CAMLlocal1 (valnr); CAMLlocal1 (res); assert(arg1 != Val_int(0)); GtkMathViewModelEvent* event = (GtkMathViewModelEvent*) Field(Field(arg1,0),1); res = alloc(4, 0); Store_field(res, 0, Val_option_ptr(event->id, Val_Element_ref)); Store_field(res, 1, Val_int(event->x)); Store_field(res, 2, Val_int(event->y)); Store_field(res, 3, Val_int(event->state)); CAMLreturn(res); } lablgtkmathview-0.7.8/gtkMathView.props0000644000175000017500000000573210370501536017271 0ustar tassitassi(* $Id: gtkMathView.props 3418 2004-07-30 08:56:16Z lpadovan $ *) prefix "Gtk" header { open Gtk open Gtk_mathview external gdome_element_of_boxed_option : Gpointer.boxed option -> TElement.t = "ml_gtk_math_view_gdome_element_of_boxed_option" ;; external gdome_element_option_of_boxed_option : Gpointer.boxed option -> TElement.t option = "ml_gtk_math_view_gdome_element_option_of_boxed_option" ;; external model_event_of_boxed_option : Gpointer.boxed option -> TElement.t option * int * int * int = "ml_gtk_math_view_model_event_of_boxed_option" let option_element_of_option = function None -> None | Some v -> Some (new Gdome.element v) ;; let option_element_of_boxed_option x = option_element_of_option (gdome_element_option_of_boxed_option x) ;; let model_event_of_boxed model_event = let id,x,y,state = model_event_of_boxed_option model_event in option_element_of_option id,x,y,state ;; let gdome_element_option_conv = {Gobject.kind = `POINTER ; Gobject.proj = (function `POINTER element -> option_element_of_boxed_option element | _ -> failwith "gdome_element_option_conv") ; Gobject.inj = (function element -> assert false) } let gtk_math_view_model_event_conv = {Gobject.kind = `POINTER ; Gobject.proj = (function `POINTER model_event -> model_event_of_boxed model_event | _ -> failwith "gtk_math_view_model_event_conv") ; Gobject.inj = (function element -> assert false) } } oheader { let set_params self ~font_size ~log_verbosity = begin match font_size with Some s -> self#set_font_size s | None -> () end ; begin match log_verbosity with Some v -> self#set_log_verbosity v | None -> () end ; self ;; let pack_return create p ?packing ?show () = GObj.pack_return (create p) ~packing ~show ;; } conversions { GdomeElement_option "gdome_element_option_conv" GtkMathViewModelEvent "gtk_math_view_model_event_conv" } classes { GtkAdjustment "Gtk.adjustment obj" } class MathView_GMetaDOM type "math_view obj" set wrapsig : Widget { (* "width" gint : Read "height" gint : Read "top-x" gint : Read / Write / NoSet "top-y" gint : Read / Write / NoSet "hadjustment" GtkAdjustment : Read / Write / Construct "vadjustment" GtkAdjustment : Read / Write / Construct "buffer" GdkPixmap : Read "drawing-area" GtkDrawingArea : Read "font-size" guint : Read / Write / Construct "log-verbosity" gint : Read / Write / Construct "root-element" GdomeElement_option : Read *) signal click: GtkMathViewModelEvent signal select_begin: GtkMathViewModelEvent signal select_over: GtkMathViewModelEvent signal select_end: GtkMathViewModelEvent signal select_abort signal element_over: GtkMathViewModelEvent } lablgtkmathview-0.7.8/gMathViewAux.ml0000644000175000017500000002052710370501536016654 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) (* finds the common node ancestor of two nodes *) let common_ancestor (first : Gdome.node) (last : Gdome.node) = let rec path n = match n#get_parentNode with None -> [n] | Some p -> n::(path p) in let rec last_common = function _, hd1::tl1, hd2::tl2 when hd1#isSameNode hd2 -> (last_common ((Some hd1),tl1,tl2)) | Some e, _, _ -> e | _,_,_ -> assert false in (last_common (None,(List.rev (path first)),(List.rev (path last)))) let same_element (e1 : Gdome.element option) (e2 : Gdome.element option) = match e1, e2 with None, None -> true | Some e1, Some e2 when (e1 :> Gdome.node)#isSameNode (e2 :> Gdome.node) -> true | _ -> false (* true if n1 is n2 or one of n2's descendants *) let rec descendant_of (n1 : Gdome.node) (n2 : Gdome.node) = if n1#isSameNode n2 then true else match n1#get_parentNode with None -> false | Some n1' -> descendant_of n1' n2 let remove_descendants_of (el : Gdome.element) = let rec aux = function [] -> [] | hd::tl when descendant_of (hd :> Gdome.node) (el :> Gdome.node) -> aux tl | hd::tl -> hd::(aux tl) in aux (* mem el l = true if the node n is stored in the list l *) let mem (el : Gdome.element) = let rec mem_aux = function hd::_ when (hd :> Gdome.node)#isSameNode (el :> Gdome.node) -> true | _::tl -> mem_aux tl | _ -> false in mem_aux (* remove el l = l' where l' has the same nodes as l except that all * the occurrences of n have been removed *) let remove (el : Gdome.element) = let rec remove_aux = function hd::tl when (hd :> Gdome.node)#isSameNode (el :> Gdome.node) -> remove_aux tl | hd::tl -> hd::(remove_aux tl) | [] -> [] in remove_aux class single_selection_math_view_signals obj (set_selection_changed : (Gdome.element option -> unit) -> unit) = object inherit GMathView.math_view_signals obj method selection_changed = set_selection_changed end ;; class single_selection_math_view obj = object(self) inherit GMathView.math_view_skel obj val mutable first_selected = None val mutable root_selected = None val mutable selection_changed = (fun _ -> ()) method set_selection elem = self#freeze ; begin match root_selected with None -> () | Some e -> self#unselect e end; root_selected <- elem ; begin match elem with None -> () | Some e -> self#select e end ; self#thaw method get_selection = root_selected method connect = new single_selection_math_view_signals obj (function f -> selection_changed <- f) method action_toggle (elem : Gdome.element) = match elem#get_namespaceURI, elem#get_localName with Some ns, Some ln when (ns#to_string = "http://www.w3.org/1998/Math/MathML" && ln#to_string = "maction") || (ns#to_string = "http://helm.cs.unibo.it/2003/BoxML" && ln#to_string = "action") -> begin let selection_attr = Gdome.domString "selection" in let selection = if elem#hasAttribute ~name:selection_attr then int_of_string (elem#getAttribute ~name:selection_attr)#to_string else 1 in self#freeze ; (* the widget will cast the index back into a valid range *) elem#setAttribute ~name:selection_attr ~value:(Gdome.domString (string_of_int (selection + 1))) ; self#thaw ; true end | _ -> begin match elem#get_parentNode with Some p -> begin try self#action_toggle (new Gdome.element_of_node p) with GdomeInit.DOMCastException _ -> false end | None -> assert false (* every element has a parent *) end initializer selection_changed <- self#set_selection ; ignore (self#connect#select_begin (fun ((elem : Gdome.element option), _, _, _) -> if not (same_element root_selected elem) then selection_changed elem ; first_selected <- elem)) ; ignore (self#connect#select_over (fun ((elem : Gdome.element option), _, _, _) -> let new_selected = match first_selected, elem with Some first', Some last' -> (Some (new Gdome.element_of_node (common_ancestor (first' :> Gdome.node) (last' :> Gdome.node)))) | _ -> None in if not (same_element root_selected new_selected) then selection_changed new_selected)) ; ignore (self#connect#select_end (fun ((elem : Gdome.element option), _, _, _) -> first_selected <- None)) ; ignore (self#connect#select_abort (fun () -> first_selected <- None ; selection_changed None)) ; ignore (self#connect#click (fun _ -> self#set_selection None)) end ;; let single_selection_math_view ?hadjustment ?vadjustment ?font_size ?log_verbosity = GtkBase.Widget.size_params ~cont:( OgtkMathViewProps.pack_return (fun p -> OgtkMathViewProps.set_params (new single_selection_math_view (GtkMathViewProps.MathView_GMetaDOM.create p)) ~font_size ~log_verbosity)) [] ;; class multi_selection_math_view_signals obj (set_selection_changed : (Gdome.element option -> unit) -> unit) = object inherit GMathView.math_view_signals obj method selection_changed = set_selection_changed end ;; class multi_selection_math_view obj = object(self) inherit single_selection_math_view obj val mutable selected : Gdome.element list = [] method remove_selection (elem : Gdome.element) = if mem elem selected then selected <- remove elem selected ; self#unselect elem method remove_selections = self#freeze ; List.iter (fun e -> self#unselect e) selected ; selected <- [] ; begin match self#get_selection with None -> () | Some e -> self#select e end ; self#thaw method add_selection (elem : Gdome.element) = List.iter self#unselect selected ; selected <- elem::(remove_descendants_of elem selected) ; List.iter self#select selected method get_selections = selected method set_selection elem = self#freeze ; begin match root_selected with None -> () | Some e -> self#unselect e ; List.iter (fun e -> self#select e) selected end; root_selected <- elem; begin match elem with None -> () | Some e -> self#select e end ; self#thaw initializer ignore (self#connect#select_begin (fun (_,_,_,state) -> if not (List.mem `CONTROL (Gdk.Convert.modifier state)) then self#remove_selections)) ; ignore (self#connect#select_end (fun (_,_,_,state) -> if not (List.mem `CONTROL (Gdk.Convert.modifier state)) then self#remove_selections ; match root_selected with None -> () | Some e -> self#set_selection None ; self#add_selection e)) ; ignore (self#connect#click (fun _ -> self#remove_selections)) end ;; let multi_selection_math_view ?hadjustment ?vadjustment ?font_size ?log_verbosity = GtkBase.Widget.size_params ~cont:( OgtkMathViewProps.pack_return (fun p -> OgtkMathViewProps.set_params (new multi_selection_math_view (GtkMathViewProps.MathView_GMetaDOM.create p)) ~font_size ~log_verbosity)) [] ;; lablgtkmathview-0.7.8/configure.in0000644000175000017500000000322210670473211016254 0ustar tassitassiAC_INIT(gMathView.ml) PACKAGE=lablgtkmathview LABLGTKMATHVIEW_MAJOR_VERSION=0 LABLGTKMATHVIEW_MINOR_VERSION=7 LABLGTKMATHVIEW_MICRO_VERSION=8 LABLGTKMATHVIEW_VERSION=$LABLGTKMATHVIEW_MAJOR_VERSION.$LABLGTKMATHVIEW_MINOR_VERSION.$LABLGTKMATHVIEW_MICRO_VERSION VERSION=$LABLGTKMATHVIEW_VERSION PKG_CHECK_MODULES(GDOME, gdome2 >= 0.7.0,, AC_MSG_ERROR(could not find Gdome2)) AC_SUBST(GDOME_CFLAGS) AC_SUBST(GDOME_LIBS) PKG_CHECK_MODULES(GTKMATHVIEW, gtkmathview-gmetadom >= 0.6.2,, AC_MSG_ERROR(could not find gtkmathview-gmetadom)) AC_SUBST(GTKMATHVIEW_CFLAGS) AC_SUBST(GTKMATHVIEW_LIBS) AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no) if test $HAVE_OCAMLC = "no"; then AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed) fi AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no) AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) if test $HAVE_OCAMLFIND = "no"; then AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed) fi AC_MSG_CHECKING("for gdome2") ocamlfind query gdome2 || AC_MSG_ERROR(gdome2 not installed (according to findlib)) AC_MSG_CHECKING("for lablgtk2") ocamlfind query lablgtk2 || AC_MSG_ERROR(lablgtk2 not installed (according to findlib)) AC_MSG_CHECKING("for the ocaml library dir") OCAML_LIB_DIR=`ocamlc -where` OCAML_STUB_DIR="$OCAML_LIB_DIR/stublibs" AC_MSG_RESULT($OCAML_LIB_DIR) AC_CHECK_FILE(/usr/include/caml/mlvalues.h, OCAML_INCLUDE_DIR=/usr/include/caml, OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml ) AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(HAVE_OCAMLOPT) AC_SUBST(OCAML_INCLUDE_DIR) AC_SUBST(OCAML_LIB_DIR) AC_SUBST(OCAML_STUB_DIR) AC_OUTPUT([ test/Makefile Makefile META ]) lablgtkmathview-0.7.8/.depend0000644000175000017500000000111710370501536015203 0ustar tassitassigMathViewAux.cmo: gMathView.cmi gMathViewAux.cmi gMathViewAux.cmx: gMathView.cmx gMathViewAux.cmi gMathView.cmo: gtkMathView.cmo gtk_mathview.cmo gMathView.cmi gMathView.cmx: gtkMathView.cmx gtk_mathview.cmx gMathView.cmi gtkMathView.cmo: gtkMathViewProps.cmo gtk_mathview.cmo gtkMathView.cmx: gtkMathViewProps.cmx gtk_mathview.cmx gtkMathViewProps.cmo: gtk_mathview.cmo gtkMathViewProps.cmx: gtk_mathview.cmx ogtkMathViewProps.cmo: gtkMathViewProps.cmo ogtkMathViewProps.cmx: gtkMathViewProps.cmx gMathViewAux.cmi: gMathView.cmi gtk_mathview.cmo gMathView.cmi: gtk_mathview.cmo lablgtkmathview-0.7.8/gtk_mathview.ml0000644000175000017500000000212410370501535016764 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) type math_view = [Gtk.widget|`mathview_gmetadom] lablgtkmathview-0.7.8/gtkMathView.ml0000644000175000017500000001064710370501536016537 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) open Gtk_mathview open Gaux open Gobject open Gtk open Tags open GtkMathViewProps open GtkBase external _gtkmathview_init : unit -> unit = "ml_gtk_mathview_init" let () = _gtkmathview_init () external add_configuration_path : string -> unit = "ml_gtk_math_view_add_configuration_path" module MathView = struct include MathView_GMetaDOM external freeze : [>`mathview_gmetadom] obj -> unit = "ml_gtk_math_view_freeze" external thaw : [>`mathview_gmetadom] obj -> unit = "ml_gtk_math_view_thaw" external load_uri : [>`mathview_gmetadom] obj -> filename:string -> bool = "ml_gtk_math_view_load_uri" external load_root : [>`mathview_gmetadom] obj -> root:[> `Element] GdomeT.t -> bool = "ml_gtk_math_view_load_root" external unload : [>`mathview_gmetadom] obj -> unit = "ml_gtk_math_view_unload" external select : [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit = "ml_gtk_math_view_select" external unselect : [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit = "ml_gtk_math_view_unselect" external is_selected : [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> bool = "ml_gtk_math_view_is_selected" external structure_changed : [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit = "ml_gtk_math_view_structure_changed" external attribute_changed : [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> name:TDOMString.t -> unit = "ml_gtk_math_view_attribute_changed" external get_bounding_box : [>`mathview_gmetadom] obj -> (int * int * int) = "ml_gtk_math_view_get_bounding_box" external get_element_at : [> `mathview_gmetadom] obj -> int -> int -> TElement.t option = "ml_gtk_math_view_get_element_at" external get_document : [> `mathview_gmetadom] obj -> TDocument.t option = "ml_gtk_math_view_get_document" (* beginning of prop-like methods *) external get_size : [>`mathview_gmetadom] obj -> int * int = "ml_gtk_math_view_get_size" external get_top : [>`mathview_gmetadom] obj -> (int * int) = "ml_gtk_math_view_get_top" external set_top : [>`mathview_gmetadom] obj -> int -> int -> unit = "ml_gtk_math_view_set_top" external set_adjustments : [>`mathview_gmetadom] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit = "ml_gtk_math_view_set_adjustments" external get_adjustments : [>`mathview_gmetadom] obj -> Gtk.adjustment obj * Gtk.adjustment obj = "ml_gtk_math_view_get_adjustments" external get_buffer : [>`mathview_gmetadom] obj -> Gdk.pixmap = "ml_gtk_math_view_get_buffer" external set_font_size : [>`mathview_gmetadom] obj -> int -> unit = "ml_gtk_math_view_set_font_size" external get_font_size : [>`mathview_gmetadom] obj -> int = "ml_gtk_math_view_get_font_size" external set_log_verbosity : [>`mathview_gmetadom] obj -> int -> unit = "ml_gtk_math_view_set_log_verbosity" external get_log_verbosity : [>`mathview_gmetadom] obj -> int = "ml_gtk_math_view_get_log_verbosity" external set_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool -> unit = "ml_gtk_math_view_set_t1_opaque_mode" external get_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool = "ml_gtk_math_view_get_t1_opaque_mode" external set_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool -> unit = "ml_gtk_math_view_set_t1_anti_aliased_mode" external get_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool = "ml_gtk_math_view_get_t1_anti_aliased_mode" end lablgtkmathview-0.7.8/gMathView.ml0000644000175000017500000001014410370501536016170 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) open Gaux open Gtk_mathview open Gobject open Gtk open GtkBase open GtkMathView open OgtkMathViewProps open GObj exception ErrorLoadingFile of string;; exception ErrorWritingFile of string;; exception ErrorLoadingDOM;; let option_element_of_option = function None -> None | Some v -> Some (new Gdome.element v) let option_document_of_option = function None -> None | Some v -> Some (new Gdome.document v) class math_view_skel obj = object inherit GObj.widget (obj : Gtk_mathview.math_view obj) method event = new GObj.event_ops obj method freeze = MathView.freeze obj method thaw = MathView.thaw obj method load_uri ~filename = if not (MathView.load_uri obj ~filename) then raise (ErrorLoadingFile filename) method load_root ~root = if not (MathView.load_root obj ~root:((root : Gdome.element)#as_Element)) then raise ErrorLoadingDOM method unload = MathView.unload obj method select element = MathView.select obj ((element : Gdome.element)#as_Element) method unselect element = MathView.unselect obj ((element : Gdome.element)#as_Element) method is_selected element = MathView.is_selected obj ((element : Gdome.element)#as_Element) method get_element_at x y = option_element_of_option (MathView.get_element_at obj x y) method get_document = option_document_of_option (MathView.get_document obj) method structure_changed element = MathView.structure_changed obj ((element : Gdome.element)#as_Element) method attribute_changed element ~name = MathView.attribute_changed obj ((element : Gdome.element)#as_Element) ((name : Gdome.domString)#as_DOMString) method get_bounding_box = MathView.get_bounding_box obj method get_size = MathView.get_size obj method get_top = MathView.get_top obj method set_top x y = MathView.set_top obj x y method set_adjustments adj1 adj2 = MathView.set_adjustments obj (GData.as_adjustment adj1) (GData.as_adjustment adj2) method get_adjustments = let hadj, vadj = MathView.get_adjustments obj in new GData.adjustment hadj, new GData.adjustment vadj method get_buffer = MathView.get_buffer obj method set_font_size = MathView.set_font_size obj method get_font_size = MathView.get_font_size obj method set_log_verbosity = MathView.set_log_verbosity obj method get_log_verbosity = MathView.get_log_verbosity obj method set_t1_opaque_mode = MathView.set_t1_opaque_mode obj method get_t1_opaque_mode = MathView.get_t1_opaque_mode obj method set_t1_anti_aliased_mode = MathView.set_t1_anti_aliased_mode obj method get_t1_anti_aliased_mode = MathView.get_t1_anti_aliased_mode obj end class math_view_signals obj = object inherit GObj.widget_signals_impl obj inherit math_view__g_meta_dom_sigs end class math_view obj = object inherit math_view_skel (obj : Gtk_mathview.math_view obj) method connect = new math_view_signals obj end let math_view ?hadjustment ?vadjustment ?font_size ?log_verbosity = GtkBase.Widget.size_params ~cont:( OgtkMathViewProps.pack_return (fun p -> OgtkMathViewProps.set_params (new math_view (MathView.create p)) ~font_size ~log_verbosity)) [] let add_configuration_path = GtkMathView.add_configuration_path lablgtkmathview-0.7.8/gMathViewAux.mli0000644000175000017500000000540310670472415017027 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) (** {1 Selection-enabled GtkMathView classes} *) (** {2 Single-selection} *) (** signals *) class single_selection_math_view_signals : ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj -> ((Gdome.element option -> unit) -> unit) -> object inherit GMathView.math_view_signals method selection_changed : (Gdome.element_of_node option -> unit) -> unit end (** main class *) class single_selection_math_view : Gtk_mathview.math_view Gtk.obj -> object inherit GMathView.math_view_skel method connect : single_selection_math_view_signals method get_selection : Gdome.element option method set_selection : Gdome.element option -> unit method action_toggle : Gdome.element -> bool end (** single_selection_math_view constructor *) val single_selection_math_view : ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?font_size:int -> ?log_verbosity:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> single_selection_math_view (** {2 Multiple-selection} *) (** main class, extends single_selection_math_view *) class multi_selection_math_view : Gtk_mathview.math_view Gtk.obj -> object inherit single_selection_math_view method remove_selection : Gdome.element -> unit method remove_selections : unit method add_selection : Gdome.element -> unit method get_selections : Gdome.element list end (** multi_selection_math_view constructor *) val multi_selection_math_view : ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?font_size:int -> ?log_verbosity:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> multi_selection_math_view lablgtkmathview-0.7.8/ChangeLog0000644000175000017500000000023510370501536015515 0ustar tassitassi* 0.4.1 - Upgraded to GtkMathView 0.4.[0,1] * 0.3.0 - Upgraded to GtkMathView 0.3.0 - Now based on the gmetadom (alias gdome2) binding to GDOMe Level 2 lablgtkmathview-0.7.8/configure0000755000175000017500000025403510670471013015662 0ustar tassitassi#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="gMathView.ml" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias PKG_CONFIG GDOME_CFLAGS GDOME_LIBS GTKMATHVIEW_CFLAGS GTKMATHVIEW_LIBS HAVE_OCAMLC HAVE_OCAMLOPT HAVE_OCAMLFIND PACKAGE VERSION OCAML_INCLUDE_DIR OCAML_LIB_DIR OCAML_STUB_DIR LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG GDOME_CFLAGS GDOME_LIBS GTKMATHVIEW_CFLAGS GTKMATHVIEW_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: PKG_CONFIG path to pkg-config utility GDOME_CFLAGS C compiler flags for GDOME, overriding pkg-config GDOME_LIBS linker flags for GDOME, overriding pkg-config GTKMATHVIEW_CFLAGS C compiler flags for GTKMATHVIEW, overriding pkg-config GTKMATHVIEW_LIBS linker flags for GTKMATHVIEW, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu PACKAGE=lablgtkmathview LABLGTKMATHVIEW_MAJOR_VERSION=0 LABLGTKMATHVIEW_MINOR_VERSION=7 LABLGTKMATHVIEW_MICRO_VERSION=3 LABLGTKMATHVIEW_VERSION=$LABLGTKMATHVIEW_MAJOR_VERSION.$LABLGTKMATHVIEW_MINOR_VERSION.$LABLGTKMATHVIEW_MICRO_VERSION VERSION=$LABLGTKMATHVIEW_VERSION if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for GDOME" >&5 echo $ECHO_N "checking for GDOME... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GDOME_CFLAGS"; then pkg_cv_GDOME_CFLAGS="$GDOME_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdome2 >= 0.7.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdome2 >= 0.7.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDOME_CFLAGS=`$PKG_CONFIG --cflags "gdome2 >= 0.7.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GDOME_LIBS"; then pkg_cv_GDOME_LIBS="$GDOME_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gdome2 >= 0.7.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gdome2 >= 0.7.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GDOME_LIBS=`$PKG_CONFIG --libs "gdome2 >= 0.7.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GDOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdome2 >= 0.7.0"` else GDOME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdome2 >= 0.7.0"` fi # Put the nasty error message in config.log where it belongs echo "$GDOME_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: could not find Gdome2" >&5 echo "$as_me: error: could not find Gdome2" >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: could not find Gdome2" >&5 echo "$as_me: error: could not find Gdome2" >&2;} { (exit 1); exit 1; }; } else GDOME_CFLAGS=$pkg_cv_GDOME_CFLAGS GDOME_LIBS=$pkg_cv_GDOME_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi pkg_failed=no { echo "$as_me:$LINENO: checking for GTKMATHVIEW" >&5 echo $ECHO_N "checking for GTKMATHVIEW... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTKMATHVIEW_CFLAGS"; then pkg_cv_GTKMATHVIEW_CFLAGS="$GTKMATHVIEW_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmathview-gmetadom >= 0.6.2\"") >&5 ($PKG_CONFIG --exists --print-errors "gtkmathview-gmetadom >= 0.6.2") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTKMATHVIEW_CFLAGS=`$PKG_CONFIG --cflags "gtkmathview-gmetadom >= 0.6.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTKMATHVIEW_LIBS"; then pkg_cv_GTKMATHVIEW_LIBS="$GTKMATHVIEW_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmathview-gmetadom >= 0.6.2\"") >&5 ($PKG_CONFIG --exists --print-errors "gtkmathview-gmetadom >= 0.6.2") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTKMATHVIEW_LIBS=`$PKG_CONFIG --libs "gtkmathview-gmetadom >= 0.6.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKMATHVIEW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkmathview-gmetadom >= 0.6.2"` else GTKMATHVIEW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkmathview-gmetadom >= 0.6.2"` fi # Put the nasty error message in config.log where it belongs echo "$GTKMATHVIEW_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: could not find gtkmathview-gmetadom" >&5 echo "$as_me: error: could not find gtkmathview-gmetadom" >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: could not find gtkmathview-gmetadom" >&5 echo "$as_me: error: could not find gtkmathview-gmetadom" >&2;} { (exit 1); exit 1; }; } else GTKMATHVIEW_CFLAGS=$pkg_cv_GTKMATHVIEW_CFLAGS GTKMATHVIEW_LIBS=$pkg_cv_GTKMATHVIEW_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi # Extract the first word of "ocamlc", so it can be a program name with args. set dummy ocamlc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_HAVE_OCAMLC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$HAVE_OCAMLC"; then ac_cv_prog_HAVE_OCAMLC="$HAVE_OCAMLC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_OCAMLC="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_OCAMLC" && ac_cv_prog_HAVE_OCAMLC="no" fi fi HAVE_OCAMLC=$ac_cv_prog_HAVE_OCAMLC if test -n "$HAVE_OCAMLC"; then { echo "$as_me:$LINENO: result: $HAVE_OCAMLC" >&5 echo "${ECHO_T}$HAVE_OCAMLC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test $HAVE_OCAMLC = "no"; then { { echo "$as_me:$LINENO: error: could not find ocamlc in PATH" >&5 echo "$as_me: error: could not find ocamlc in PATH" >&2;} { (exit please make sure ocaml is installed); exit please make sure ocaml is installed; }; } fi # Extract the first word of "ocamlopt", so it can be a program name with args. set dummy ocamlopt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_HAVE_OCAMLOPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$HAVE_OCAMLOPT"; then ac_cv_prog_HAVE_OCAMLOPT="$HAVE_OCAMLOPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_OCAMLOPT="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_OCAMLOPT" && ac_cv_prog_HAVE_OCAMLOPT="no" fi fi HAVE_OCAMLOPT=$ac_cv_prog_HAVE_OCAMLOPT if test -n "$HAVE_OCAMLOPT"; then { echo "$as_me:$LINENO: result: $HAVE_OCAMLOPT" >&5 echo "${ECHO_T}$HAVE_OCAMLOPT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ocamlfind", so it can be a program name with args. set dummy ocamlfind; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_HAVE_OCAMLFIND+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$HAVE_OCAMLFIND"; then ac_cv_prog_HAVE_OCAMLFIND="$HAVE_OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_OCAMLFIND="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_OCAMLFIND" && ac_cv_prog_HAVE_OCAMLFIND="no" fi fi HAVE_OCAMLFIND=$ac_cv_prog_HAVE_OCAMLFIND if test -n "$HAVE_OCAMLFIND"; then { echo "$as_me:$LINENO: result: $HAVE_OCAMLFIND" >&5 echo "${ECHO_T}$HAVE_OCAMLFIND" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test $HAVE_OCAMLFIND = "no"; then { { echo "$as_me:$LINENO: error: could not find ocamlfind in PATH" >&5 echo "$as_me: error: could not find ocamlfind in PATH" >&2;} { (exit please make sure findlib is installed); exit please make sure findlib is installed; }; } fi { echo "$as_me:$LINENO: checking \"for gdome2\"" >&5 echo $ECHO_N "checking \"for gdome2\"... $ECHO_C" >&6; } ocamlfind query gdome2 || { { echo "$as_me:$LINENO: error: gdome2 not installed (according to findlib)" >&5 echo "$as_me: error: gdome2 not installed (according to findlib)" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking \"for lablgtk2\"" >&5 echo $ECHO_N "checking \"for lablgtk2\"... $ECHO_C" >&6; } ocamlfind query lablgtk2 || { { echo "$as_me:$LINENO: error: lablgtk2 not installed (according to findlib)" >&5 echo "$as_me: error: lablgtk2 not installed (according to findlib)" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking \"for the ocaml library dir\"" >&5 echo $ECHO_N "checking \"for the ocaml library dir\"... $ECHO_C" >&6; } OCAML_LIB_DIR=`ocamlc -where` OCAML_STUB_DIR="$OCAML_LIB_DIR/stublibs" { echo "$as_me:$LINENO: result: $OCAML_LIB_DIR" >&5 echo "${ECHO_T}$OCAML_LIB_DIR" >&6; } { echo "$as_me:$LINENO: checking for /usr/include/caml/mlvalues.h" >&5 echo $ECHO_N "checking for /usr/include/caml/mlvalues.h... $ECHO_C" >&6; } if test "${ac_cv_file__usr_include_caml_mlvalues_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/caml/mlvalues.h"; then ac_cv_file__usr_include_caml_mlvalues_h=yes else ac_cv_file__usr_include_caml_mlvalues_h=no fi fi { echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_caml_mlvalues_h" >&5 echo "${ECHO_T}$ac_cv_file__usr_include_caml_mlvalues_h" >&6; } if test $ac_cv_file__usr_include_caml_mlvalues_h = yes; then OCAML_INCLUDE_DIR=/usr/include/caml else OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml fi ac_config_files="$ac_config_files test/Makefile Makefile META" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "META") CONFIG_FILES="$CONFIG_FILES META" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GDOME_CFLAGS!$GDOME_CFLAGS$ac_delim GDOME_LIBS!$GDOME_LIBS$ac_delim GTKMATHVIEW_CFLAGS!$GTKMATHVIEW_CFLAGS$ac_delim GTKMATHVIEW_LIBS!$GTKMATHVIEW_LIBS$ac_delim HAVE_OCAMLC!$HAVE_OCAMLC$ac_delim HAVE_OCAMLOPT!$HAVE_OCAMLOPT$ac_delim HAVE_OCAMLFIND!$HAVE_OCAMLFIND$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim OCAML_INCLUDE_DIR!$OCAML_INCLUDE_DIR$ac_delim OCAML_LIB_DIR!$OCAML_LIB_DIR$ac_delim OCAML_STUB_DIR!$OCAML_STUB_DIR$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi lablgtkmathview-0.7.8/COPYING0000644000175000017500000004311010370501536014775 0ustar tassitassi GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. lablgtkmathview-0.7.8/gMathView.mli0000644000175000017500000001011010670472167016344 0ustar tassitassi(* Copyright (C) 2000-2005, * Luca Padovani * Claudio Sacerdoti Coen * Stefano Zacchiroli * * This file is part of lablgtkmathview, the Ocaml binding for the * GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * For details, send a mail to the authors. *) (** {1 Main interface to LablGtkMathView} *) exception ErrorLoadingFile of string exception ErrorWritingFile of string exception ErrorLoadingDOM (** {2 Standard classes} *) (** Signals emitted by GtkMathView widgets *) class math_view_signals : ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj -> object ('a) inherit GObj.widget_signals val after: bool val obj: 'b Gtk.obj method click : callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id method element_over : callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id method select_begin : callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id method select_over : callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id method select_end : callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id method select_abort : callback:(unit -> unit) -> GtkSignal.id end (** GtkMathView core methods *) class math_view_skel : (Gtk_mathview.math_view Gtk.obj as 'a)-> object inherit GObj.widget val obj : 'a method attribute_changed : Gdome.element -> name:Gdome.domString -> unit method event : GObj.event_ops method freeze : unit method get_adjustments : GData.adjustment * GData.adjustment method get_bounding_box : int * int * int method get_buffer : Gdk.pixmap method get_document : Gdome.document option method get_element_at : int -> int -> Gdome.element option (* x, y *) method get_font_size : int method get_log_verbosity : int method get_size : int * int method get_t1_anti_aliased_mode : bool method get_t1_opaque_mode : bool method get_top : int * int method is_selected : Gdome.element -> bool method load_root : root:Gdome.element -> unit method load_uri : filename:string -> unit method select : Gdome.element -> unit method set_adjustments : GData.adjustment -> GData.adjustment -> unit method set_font_size : int -> unit method set_log_verbosity : int -> unit method set_top : int -> int -> unit method set_t1_anti_aliased_mode : bool -> unit method set_t1_opaque_mode : bool -> unit method structure_changed : Gdome.element -> unit method thaw : unit method unload : unit method unselect : Gdome.element -> unit end (** GtkMathView standard class *) class math_view : Gtk_mathview.math_view Gtk.obj -> object inherit math_view_skel method connect : math_view_signals end (** {2 Constructors} *) (** math_view constructor *) val math_view : ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?font_size:int -> ?log_verbosity:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view (** {2 Global configuration for all math_view instances} *) (** @param fname file name to be added to the list of configuration files read * at initialization time. * To be invoked before GTK initialization. *) val add_configuration_path: string -> unit lablgtkmathview-0.7.8/NEWS0000644000175000017500000000000010370501537014431 0ustar tassitassilablgtkmathview-0.7.8/test/0000755000175000017500000000000010721552152014722 5ustar tassitassilablgtkmathview-0.7.8/test/Makefile.in0000644000175000017500000000065210370501541016766 0ustar tassitassiPACKAGE = @PACKAGE@ lablgtk2.init MLFLAGS = OCAMLC = ocamlfind ocamlc $(MLFLAGS) OCAMLOPT = ocamlfind ocamlopt $(MLFLAGS) TMPDIR = .test all: test opt: test.opt test: test.ml $(OCAMLC) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml test.opt: test.ml $(OCAMLOPT) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml clean: rm -f *.cm[iox] *.o test test.opt t1lib.log test.ps distclean: rm Makefile lablgtkmathview-0.7.8/test/.cvsignore0000644000175000017500000000010210370501541016707 0ustar tassitassi*.cmo *.cmi *.cmx t1lib.log test test.opt test.ps test.o Makefile lablgtkmathview-0.7.8/test/test.ml0000644000175000017500000003372310370501541016237 0ustar tassitassi(* Copyright (C) 2000-2003, Luca Padovani , * Claudio Sacerdoti Coen . * * This file is part of lablgtkmathview, the Ocaml binding * for the GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * For details, send a mail to the author. *) (******************************************************************************) (* Claudio Sacerdoti Coen *) (* 25/09/2000 *) (* *) (* This is a simple test for the OCaml (LablGtk indeed) binding of the *) (* MathView widget *) (******************************************************************************) let helmns = Gdome.domString "http://www.cs.unibo.it/helm";; (* let choose_selection mmlwidget (element : Gdome.element option) = let module G = Gdome in let rec aux element = if element#hasAttributeNS ~namespaceURI:Misc.helmns ~localName:(G.domString "xref") then mmlwidget#set_selection (Some element) else try match element#get_parentNode with None -> assert false (*CSC: OCAML DIVERGES! | Some p -> aux (new G.element_of_node p) *) | Some p -> aux (new Gdome.element_of_node p) with GdomeInit.DOMCastException _ -> prerr_endline "******* trying to select above the document root ********" in match element with Some x -> aux x | None -> mmlwidget#set_selection None ;; *) (* Callbacks *) let selection_changed mathview (element : Gdome.element option) = let rec aux element = if element#hasAttributeNS ~namespaceURI:helmns ~localName:(Gdome.domString "xref") then mathview#set_selection (Some element) else try match element#get_parentNode with None -> mathview#set_selection None | Some p -> aux (new Gdome.element_of_node p) with GdomeInit.DOMCastException _ -> prerr_endline "******* trying to select above the document root ********" in print_endline ("selection_changed: " ^ (match element with None -> "selection_changed on nothing" | Some element -> element#get_tagName#to_string ) ) ; match element with None -> () | Some el -> aux el; flush stdout ;; let element_over mathview ((element : Gdome.element option), _, _, _) = print_endline ("element_over: " ^ (match element with None -> "element_over on nothing" | Some element -> element#get_tagName#to_string ) ) ; flush stdout ;; let rec jump (element : Gdome.element) = let module G = Gdome in let attr = (element#getAttribute ~name:(G.domString "href"))#to_string in if attr = "" then match element#get_parentNode with Some p -> begin try jump (new Gdome.element_of_node p) with GdomeInit.DOMCastException _ -> print_string "jump: NO HREF FOR THIS NODE\n" ; flush stdout ; false end | None -> assert false (* every element has a parent *) else begin print_endline ("jump: " ^ attr) ; flush stdout ; true end ;; let rec action mathview (element : Gdome.element) = let module G = Gdome in if element#get_tagName#to_string = "m:maction" then let selection = if element#hasAttribute ~name:(G.domString "selection") then int_of_string (element#getAttribute ~name:(G.domString "selection"))#to_string else 1 in mathview#freeze ; (* the widget will cast the index back into a reasonable range *) element#setAttribute ~name:(G.domString "selection") ~value:(G.domString (string_of_int (selection + 1))) ; mathview#thaw ; true else match element#get_parentNode with Some p -> begin try action mathview (new Gdome.element_of_node p) with GdomeInit.DOMCastException _ -> print_string "action: NO MACTION FOUND\n" ; flush stdout ; false end | None -> assert false (* every element has a parent *) let click mathview ((element : Gdome.element option), _, _, _) = let module G = Gdome in match element with None -> print_string "CLICKED ON NOTHING\n" ; flush stdout | Some element -> if not (jump element) then if not (mathview#action_toggle element) then () ;; let load_uri mathview () = mathview#load_uri ~filename:"test.xml" ; print_string "load: SEEMS TO WORK\n" ; flush stdout ;; let get_document mathview () = (match mathview#get_document with | None -> print_string "no document loaded\n" | Some doc -> let name = "out.xml" in ignore ((Gdome.domImplementation ())#saveDocumentToFile ~doc ~name ()); print_string ("document loaded and saved to " ^ name ^ "\n")); flush stdout ;; let load_doc mathview () = mathview#load_root ~root:(((Gdome.domImplementation ())#createDocumentFromURI ~uri:"test.xml" ())#get_documentElement) ; print_string "load from DOM: SEEMS TO WORK\n" ; flush stdout ;; let test_get_selection mathview () = let selection = match mathview#get_selection with Some element -> element#get_tagName#to_string | None -> "no selection! but there are " ^ (string_of_int (List.length mathview#get_selections)) ^ " multiple selections!" in print_string ("selection: " ^ selection ^ "\n") ; flush stdout ;; let test_set_selection mathview () = begin match mathview#get_selection with Some element -> begin match element#get_parentNode with Some p -> begin try mathview#set_selection (Some (new Gdome.element_of_node p)); print_string "set selection: SEEMS TO WORK\n" with GdomeInit.DOMCastException _ -> print_string "EXCEPTION: no parent\n" end | None -> assert false (* every element has a parent *) end | None -> mathview#set_selection None; print_string "no selection\n" end ; flush stdout ;; let test_add_selection (mathview : GMathViewAux.multi_selection_math_view) () = match mathview#get_selection with Some e -> mathview#add_selection e | None -> begin print_string "no selection to add\n" ; flush stdout end ;; let test_reset_selections (mathview : GMathViewAux.multi_selection_math_view) () = mathview#set_selection None ; mathview#remove_selections let select_over (mathview : GMathViewAux.multi_selection_math_view) = (fun (_,_,_,state) -> let c = function | `SHIFT -> "shift" | `LOCK -> "lock" | `CONTROL -> "control" | `MOD1 -> "mod1" | _ -> "" in let msg = String.concat "," (List.filter (fun s -> s <> "") (List.map c (Gdk.Convert.modifier state))) in if msg <> "" then begin print_endline ("modifiers: " ^ msg); flush stdout end) let unload mathview () = mathview#unload ; print_string "unload: SEEMS TO WORK\n" ; flush stdout ;; let get_size mathview () = let width, height = mathview#get_size in print_string ("width: " ^ string_of_int width ^ ", height: " ^ string_of_int height ^ "\n") ; flush stdout ;; let get_top mathview () = let (x,y) = mathview#get_top in print_string ("top: ("^ string_of_int x ^ "," ^ string_of_int y ^ ")\n") ; flush stdout ;; let set_top mathview () = mathview#set_top 0 0; print_string "set_top: SEEM TO WORK\n" ; flush stdout ;; let set_adjustments mathview () = let adj1 = GData.adjustment () in let adj2 = GData.adjustment () in mathview#set_adjustments adj1 adj2 ; adj1#set_value ((adj1#lower +. adj1#upper) /. 2.0) ; adj2#set_value ((adj2#lower +. adj2#upper) /. 2.0) ; print_string "set_adjustments: SEEM TO WORK\n" ; flush stdout ;; let get_adjustments mathview () = let hadj, vadj = mathview#get_adjustments in hadj#set_value ((hadj#lower +. hadj#upper) /. 2.0) ; vadj#set_value ((vadj#lower +. vadj#upper) /. 2.0) ; print_string "hadjustment: SEEM TO WORK\n" ; flush stdout ;; let get_buffer mathview () = let buffer = mathview#get_buffer in Gdk.Draw.rectangle buffer (Gdk.GC.create buffer) ~x:0 ~y:0 ~width:50 ~height:50 ~filled:true () ; print_string "buffer: SEEMS TO WORK (hint: force the widget redrawing)\n"; flush stdout ;; let set_font_size mathview () = mathview#set_font_size 24 ; print_string "set_font_size: FONT IS NOW 24\n" ; flush stdout ;; let get_font_size mathview () = print_string ("font_size: " ^ string_of_int (mathview#get_font_size) ^ "\n") ; flush stdout ;; let set_log_verbosity mathview () = mathview#set_log_verbosity 3 ; print_string "set_log_verbosity: NOW IS 3\n" ; flush stdout ;; let get_log_verbosity mathview () = print_string ("log_verbosity: " ^ string_of_int mathview#get_log_verbosity ^ "\n") ; flush stdout ;; let x_coord = ref 0 ;; (* let get_element_at mathview () = begin match mathview#get_element_at !x_coord 10 with None -> print_string ("there is no element at " ^ (string_of_int !x_coord) ^ " 10\n") | Some e -> print_string ("at " ^ (string_of_int !x_coord) ^ " 10 found element " ^ (e#get_nodeName#to_string) ^ "\n") end ; x_coord := !x_coord + 10 ; flush stdout ;; *) let _ = (GtkMain.Main.init ()) ;; (* Widget creation *) let main_window = GWindow.window ~title:"GtkMathView test" () in let vbox = GPack.vbox ~packing:main_window#add () in let sw = GBin.scrolled_window ~width:50 ~height:50 ~packing:vbox#pack () in let mathview= GMathViewAux.multi_selection_math_view ~packing:sw#add ~width:50 ~height:50 () in let table = GPack.table ~rows:6 ~columns:5 ~packing:vbox#pack () in let button_load = GButton.button ~label:"load" ~packing:(table#attach ~left:1 ~top:0) () in let button_unload = GButton.button ~label:"unload" ~packing:(table#attach ~left:2 ~top:0) () in let button_get_document = GButton.button ~label:"get_document" ~packing:(table#attach ~left:1 ~top:1) () in let button_selection = GButton.button ~label:"get_selection" ~packing:(table#attach ~left:3 ~top:0) () in let button_set_selection = GButton.button ~label:"set_selection" ~packing:(table#attach ~left:4 ~top:0) () in let button_add_selection = GButton.button ~label:"add_selection" ~packing:(table#attach ~left:3 ~top:3) () in let button_reset_selections = GButton.button ~label:"reset_selections" ~packing:(table#attach ~left:4 ~top:3) () in let button_get_size = GButton.button ~label:"get_size" ~packing:(table#attach ~left:0 ~top:1) () in let button_get_top = GButton.button ~label:"get_top" ~packing:(table#attach ~left:2 ~top:1) () in let button_set_top = GButton.button ~label:"set_top" ~packing:(table#attach ~left:3 ~top:1) () in let button_set_adjustments = GButton.button ~label:"set_adjustments" ~packing:(table#attach ~left:4 ~top:1) () in let button_get_adjustments = GButton.button ~label:"get_adjustments" ~packing:(table#attach ~left:0 ~top:2) () in let button_get_buffer = GButton.button ~label:"get_buffer" ~packing:(table#attach ~left:2 ~top:2) () in let button_set_font_size = GButton.button ~label:"set_font_size" ~packing:(table#attach ~left:4 ~top:2) () in let button_get_font_size = GButton.button ~label:"get_font_size" ~packing:(table#attach ~left:0 ~top:3) () in let button_set_log_verbosity = GButton.button ~label:"set_log_verbosity" ~packing:(table#attach ~left:0 ~top:4) () in let button_get_log_verbosity = GButton.button ~label:"get_log_verbosity" ~packing:(table#attach ~left:1 ~top:4) () in let button_load_dom = GButton.button ~label:"load from DOM" ~packing:(table#attach ~left:2 ~top:5) () in (* let button_get_element_at = GButton.button ~label:"get_element_at" ~packing:(table#attach ~left:3 ~top:5) () in *) (* Signals connection *) ignore(button_load#connect#clicked (load_uri mathview)) ; ignore(button_unload#connect#clicked (unload mathview)) ; ignore(button_get_document#connect#clicked (get_document mathview)) ; ignore(button_selection#connect#clicked (test_get_selection mathview)) ; ignore(button_set_selection#connect#clicked (test_set_selection mathview)) ; ignore(button_add_selection#connect#clicked (test_add_selection mathview)) ; ignore(button_reset_selections#connect#clicked (test_reset_selections mathview)) ; ignore(button_get_size#connect#clicked (get_size mathview)) ; ignore(button_get_top#connect#clicked (get_top mathview)) ; ignore(button_set_top#connect#clicked (set_top mathview)) ; ignore(button_set_adjustments#connect#clicked (set_adjustments mathview)) ; ignore(button_get_adjustments#connect#clicked (get_adjustments mathview)) ; ignore(button_get_buffer#connect#clicked (get_buffer mathview)) ; ignore(button_set_font_size#connect#clicked (set_font_size mathview)) ; ignore(button_get_font_size#connect#clicked (get_font_size mathview)) ; ignore(button_set_log_verbosity#connect#clicked (set_log_verbosity mathview)) ; ignore(button_get_log_verbosity#connect#clicked (get_log_verbosity mathview)) ; ignore(mathview#connect#click (click mathview)) ; ignore(mathview#connect#selection_changed (selection_changed mathview)); ignore(mathview#connect#element_over (element_over mathview)) ; ignore(mathview#connect#select_over (select_over mathview)); ignore(button_load_dom#connect#clicked (load_doc mathview)) ; ignore(main_window#connect#destroy (fun _ -> GMain.quit ())); (* ignore(button_get_element_at#connect#clicked (get_element_at mathview)) ; *) (* Main Loop *) main_window#show () ; GMain.Main.main () ;; lablgtkmathview-0.7.8/test/Makefile0000644000175000017500000000066010721552147016370 0ustar tassitassiPACKAGE = lablgtkmathview lablgtk2.init MLFLAGS = OCAMLC = ocamlfind ocamlc $(MLFLAGS) OCAMLOPT = ocamlfind ocamlopt $(MLFLAGS) TMPDIR = .test all: test opt: test.opt test: test.ml $(OCAMLC) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml test.opt: test.ml $(OCAMLOPT) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml clean: rm -f *.cm[iox] *.o test test.opt t1lib.log test.ps distclean: rm Makefile lablgtkmathview-0.7.8/test/t1.config0000644000175000017500000000017410370501541016433 0ustar tassitassiENCODING=. AFM=/usr/share/texmf/fonts/afm/ TYPE1=/usr/share/texmf/fonts/type1/bluesky/cm/:/usr/X11R6/lib/X11/fonts/Type1/:. lablgtkmathview-0.7.8/test/test.xml0000644000175000017500000000530310370501541016420 0ustar tassitassi ]> It's a secret! a x + b x 2 + p x + q d x = a2 ln ( x2 + p x + q ) + 2 b - a p 4 q - p 2 arctg 2 x + p 4 q - p 2 + c lablgtkmathview-0.7.8/README0000644000175000017500000000017410370501536014625 0ustar tassitassiThis is the Ocaml binding for the GtkMathView widget. To compile and install: ./configure make make opt make install lablgtkmathview-0.7.8/LICENSE0000644000175000017500000000177210370501536014757 0ustar tassitassi(* Copyright (C) 2000-2003, Luca Padovani , * Claudio Sacerdoti Coen . * * This file is part of lablgtkmathview, the Ocaml binding * for the GtkMathView widget. * * lablgtkmathview is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * lablgtkmathview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with lablgtkmathview; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * For details, send a mail to the author. *) lablgtkmathview-0.7.8/META.in0000644000175000017500000000015610370501536015023 0ustar tassitassirequires="gdome2 lablgtk2" version="@VERSION@" archive(byte)="@PACKAGE@.cma" archive(native)="@PACKAGE@.cmxa"