Dear library experts,
I'm using libtool for my PDFlib package for quite some time now,
and am very happy with what it's able to achieve. However, I am
unable to solve the following two problems (which may be combined
configure/libtool problems):
- How to distinguish shared and static libraries in configure?
AC_SEARCH_LIBS and related macros work just fine, but I need
to know whether the searched-for library is available as a
shared object (since I cannot link in a static one to my
own final shared library).
- How to deal with library dependencies which exist on some
platforms, but not on others?
For example, when searching for TIFFlib one has to supply
the jpeg and zlib libraries sometimes. Since some platforms insist
on finding all libs supplied to the ld command, it's not safe to
supply all dependent libraries always. On the other hand, if I
first check for the "raw" library in configure (without additional
libraries supplied) and this test fails, and then _with_ additional
libraries, configure seems to take the previously cached result
(failure) for the library in question, even if it would be available
with the dependent libs supplied.
Since I like to prepare the libtool command lines as precise as
possible (with exactly the required libs) I'd be happy to hear
any advice on the above issues.
To give you some background, the current stacking of libraries is
as follows (PDFlib can be used from Perl and other languages):
Perl extension library ==> libpdf ==> libtiff ==> libjpeg (possibly, but not
always)
==> libz (possibly, but not
always)
==> libz
==> libpng ==> libz
==> libm
The availability of the TIFF, libz, and libpng libraries is determined
by configure, and both the Perl extension and the actual libpdf are
built by libtool. If libtiff is only available as static lib I run
into trouble since the Perl extension is always shared here.
Thomas
_______________________________________________________________
Thomas Merz [EMAIL PROTECTED] http://www.pdflib.com
Visit the PDF 2000 conference: http://www.pdfconference.com
_______PDFlib - a library for generating PDF on the fly________