amersons / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

configure script doesn't properly find libtiff #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
* What steps will reproduce the problem?

configure leptonica 1.68 on OS X with libjpeg and libtiff installed in a 
non-standard location, in my case, in /local.

* What is the expected output? What do you see instead?

I see "checking for TIFFOpen in -ltiff...  no"

My LDFLAGS and CPPFLAGS are set appropriately.

* What version of the product are you using? On what operating system?

1.68, on OS X.

Please provide any additional information below.

The problem is that the check for libtiff won't succeed unless you specify 
-lfoo for the libraries libtiff is built against, on the test line.  It should 
read (in autoconf.ac):

AS_IF([test "x$with_libtiff" != xno],
  AC_CHECK_LIB([tiff], [TIFFOpen],
    AC_DEFINE([HAVE_LIBTIFF], 1, [Define to 1 if you have libtiff.]) AC_SUBST([LIBTIFF_LIBS], [-ltiff]),
    AS_IF([test "x$with_libtiff" = xyes], AC_MSG_ERROR([libtiff support requested but library not found])),
    $GIFLIB_LIBS $JPEG_LIBS $LIBPNG_LIBS $ZLIB_LIBS
    )
)

This will allow the link to succeed, and libtiff will be "found".

Original issue reported on code.google.com by Bill.Jan...@gmail.com on 3 May 2011 at 7:34

GoogleCodeExporter commented 9 years ago
Sounds like your libtiff is built deficiently (failure for *it* to link against 
its own dependent libs) or maybe static-only. libjpeg and libz are 
runtime-linked (but png and giflib do not appear to be), but the others do not 
appear to be, and none are part of the public interface to libtiff. On my OS X 
with libtiff.dylib that is fully linked, -ltiff is sufficient to get the 
detection to succeed.

Original comment by dma...@gmail.com on 9 Jul 2011 at 6:56

GoogleCodeExporter commented 9 years ago
I had the same issue on my debian 6.0, but then installing:
libtiffxx0c2 - Tag Image File Format (TIFF) library -- C++ interface
and
libtiff4-dev - Tag Image File Format library (TIFF), development files

solved the problem, libtiff is now detected during ./configure, and I don't get 
any error anymore.

Original comment by mathieu....@gmail.com on 13 Aug 2011 at 7:30

GoogleCodeExporter commented 9 years ago
This is a duplicate of issue 48, which has been fixed.

Original comment by dan.bloo...@gmail.com on 22 Aug 2011 at 5:35