[mercury-users] Using not installed libraries
Peter Moulder
pmoulder at csse.monash.edu.au
Fri Apr 4 17:34:34 AEST 2003
The following is in the instructions for the mercury_tcltk library.
What it achieves is that I can compile and run a program using
libmercury_tcltk without having libmercury_tcltk installed in the usual
library directories. Not sure if that's what you're after.
TCLTK_MLLIBS = <libraries that libmercury_tcltk links against>
# 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 $(TCLTK_MLLIBS) $(EXTRA_MLLIBS)
C2INITFLAGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init
I believe it also needs the following:
MGNUCFLAGS += -I$(MERCURY_TCLTK_DIR)
[In the specific case of libmercury_tcltk, which uses pragma c_header_code,
I also need `-I/usr/include/tcl8.3' in MGNUCFLAGS.]
Incidentally, comments in libtool documentation (from memory) suggest
that you shouldn't distribute binaries compiled with such custom -R
switches, on the grounds that it's a security problem if an attacker can
write to a directory with the same name.
pjm.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list