for review: add mercury_tcltk library

Tyson Dowd trd at stimpy.cs.mu.oz.au
Tue Feb 17 17:31:35 AEDT 1998


On 17-Feb-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> Tyson Dowd, you write:
> 
> > 	EXTRA_MLLIBS  = -ltk8.0 -ltcl8.0 -L/usr/X11R6/lib -lX11 -lXmu \
> > 				-lXext -lm -ldl
> > 
> > 	# Specify the location of the `mercury_tcltk' package.
> > 	MERCURY_TCLTK_DIR  = some/directory/mercury_tcltk
> > 
> > 	# Tell mmake to use the `mercury_tcltk' library.
> > 	VPATH           = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
> > 	MCFLAGS         = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
> > 	MLFLAGS         = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
> > 			  -L$(MERCURY_TCLTK_DIR) 
> > 	MLLIBS          = -lmercury_tcltk $(EXTRA_MLLIBS)
> > 	C2INITFLAGS     = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init 
> 
> Any particular reason that you include -lmercury_tcltk in the MLLIBS
> but the rest of the *necessary* libraries in the EXTRA_MLLIBS?

Well mercury_tcltk is the only Mercury library, the rest are just
C libraries.   Also, the EXTRA_MLLIBS is very system specific, so you
are likely to have to modify it according to your system setup.
So in a way, the lower part is about "using a Mercury package", and the
upper part is about "linking with some libraries".  I didn't want to
mix them up too much.

> > 
> > You can then use EXTRA_MCFLAGS, EXTRA_MLFLAGS, etc to set any other
> > options you need.
> > 
> 
> This comment suggests that the other libs (eg -ltk8.0, etc) belong
> in the MLLIBS flags.

Well, maybe. I can make EXTRA_MLLIBS become TCLTK_MLLIBS, which achieves
the same effect.  Only problem is there is no place to reliably put
$(EXTRA_MLLIBS) -- you can put it before -ltk8.0 etc, you had just
better hope that none of the libs in TCLTK_MLLIBS need to link with
symbols in them. 

> > % file: mtk.
> > % main author: conway.
> 
> probably should add
> % stability: very low
> 
> I've got most of typeclasses based version which is nicer.
> It won't be ready for release until DJ has made a couple of
> minor enhancements to typeclasses.
> 

Well, I'll add it but I don't think it's all that important. The
libraries in extras are not supported by default. 




More information about the developers mailing list