]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/configure.mk
xsl:import to cope with new xalan version
[helm.git] / helm / DEVEL / lablgtkmathview / configure.mk
1 # makefile for configuring lablGTK_mathview
2
3 # Default compilers
4 CAMLC = ocamlc
5 CAMLOPT = ocamlopt
6
7 # Default installation directories
8 BINDIR = `$(GETBINDIR)`
9 INSTALLDIR = $(LIBDIR)/lablgtkmathview
10
11 # Autoconf
12 GETLIBDIR = ocamlc -v | grep "^Standard" | sed 's/^.*: *//'
13 LIBDIR = `$(GETLIBDIR)`
14 GETBINDIR = $(GETLIBDIR) | sed -e 's|/lib/[^/]*$$|/bin|' -e 's|/lib$$|/bin|'
15 GETRANLIB = which ranlib 2>/dev/null | sed -e 's|.*/ranlib$$|!|' -e 's/^[^!]*$$/:/' -e 's/!/ranlib/'
16
17 ifdef USE_GNOME
18 GTKGETCFLAGS = gtk-config --cflags`" -I"`gnome-config --includedir
19 GNOMELIBS = `gnome-config --libs gtkxmhtml`
20 else
21 GTKGETCFLAGS = gtk-config --cflags
22 endif
23
24 GTKGETLIBS = gtk-config --libs
25
26 configure: .depend config.make
27
28 .depend:
29         ocamldep *.ml *.mli > .depend
30
31 config.make:
32         @echo CAMLC=$(CAMLC) > config.make
33         @echo CAMLOPT=$(CAMLOPT) >> config.make
34         @echo USE_GL=$(USE_GL) >> config.make
35         @echo USE_GNOME=$(USE_GNOME) >> config.make
36         @echo USE_CC=$(USE_CC) >> config.make
37         @echo DEBUG=$(DEBUG) >> config.make
38         @echo CC=$(CC) >> config.make
39         @echo RANLIB=`$(GETRANLIB)` >> config.make
40         @echo LIBDIR=$(LIBDIR) >> config.make
41         @echo BINDIR=`$(GETBINDIR)` >> config.make
42         @echo INSTALLDIR=$(INSTALLDIR) >> config.make
43 # Luca: was
44 #       @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I/usr/lib/ocaml/lablgtk >> config.make
45 # Luca: now
46         @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I$(LIBDIR)/lablgtk >> config.make
47         @echo GTKLIBS=`$(GTKGETLIBS)` | \
48           sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \
49           >> config.make
50 # Luca: GtkMathView configuration
51         @echo GTKMATHVIEWCFLAGS=`gtkmathview-config --cflags` >> config.make
52         @echo MINIDOMCFLAGS=`minidom-config --cflags` >> config.make
53         @echo GTKMATHVIEWLIBS=`gtkmathview-config --libs` >> config.make
54         @echo MINIDOMLIBS=`minidom-config --libs` >> config.make
55 # Luca: end of GtkMathView configuration
56         @echo GNOMELIBS=$(GNOMELIBS) | \
57           sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \
58           >> config.make
59         cat config.make