[PPL-devel] Re: [SWIPL] plld and libtool

Jan Wielemaker jan at swi.psy.uva.nl
Mon Jun 10 21:55:07 CEST 2002


Roberto,

> has anyone any experience of using libtool with plld?
> To be more specific, I am using libtool to build a library for which I wrote
> a SWI-Prolog interface.  I am now using an automake rule like
> 
> ppl_pl$(EXEEXT): ppl_swiprolog.o ppl_pl.o
> 	plld -pl-options,-g,main., -o $@ $+ -L$(top_builddir)/src/.libs -lppl
> 
> but this has the drawback implied by directly referring to the contents of the
> .libs directory.  What I would like to say is something like
> 
> ppl_pl$(EXEEXT): ppl_swiprolog.o ppl_pl.o
> 	libtool --mode=link plld -pl-options,-g,main., -o $@ $+ $(top_builddir)/src/libppl.la
> 
> so that the right thing happens before and after `make install', but this fails horribly.
> Any idea how I could achieve that effect, yet retaining the hope that things will continue to
> work also in future releases of SWI-Prolog?
> Thanks a lot

Actually, libtool and plld for a large part are doing the same thing:
provide cross-platform support for linking, notably involving
shared-objects/DLLs.  In addition, plld provides support for
generation mixed Prolog/C executables.  I think the correct way is
to add libtool compatibility options to plld so it can provide the
mixed Prolog/C linking, while using the normal libtool facilities
for creating the executable without the Prolog part.

My knowledge of libtool is very limited.  I'm more than happy to include
this type of support on your directions though.

	Regards --- Jan



More information about the PPL-devel mailing list