2007.06.29 11:04 "[Tiff] Suggested Source Changes for Building libtiff Under Windows", by Kevin Myers

2007.06.29 13:12 "Re: [Tiff] Suggested Source Changes for Building libtiff Under Windows", by Andrey Kiselev

Kevin,

On Fri, Jun 29, 2007 at 06:04:05AM -0500, Kevin Myers wrote:

I've just spent most of the past two days struggling with getting libtiff to build successfully under Windows. During the process, I came across what I believe to be a number of deficiencies in the present source code that could be addressed in order to simplify builds under Windows. Following below are a number of specific suggestions that I believe would be helpful in this regard. Note that I have successfully built libtiff under Windows using the MSVC compiler with all of the changes in place that are suggested below.

Thanks for your suggestions, but I should note that we have nothing with gnuwin32 build of libtiff. We are only distributing sources of the library, not binary builds. The official place to get libtiff is

 ftp://ftp.remotesensing.org/libtiff

So I am skipping you notes related to gnuwin32, please, send them to maintainers of that build.

1. Expand handling for HAVE_GETOPT to additional modules.

2. Expand handling for HAVE_IO to additional modules.

3. Expand handling for HAVE_STRCASECMP to additional modules.

Warnings related to this problem are boring a bit, but actually harmless. I will fix it, however.

4. Expand handling for additional configuration settings under Windows.

Replace the following module in the libtiff directory (currently this file only exists in the GnuWin32 port):

tif_config.h.vc

I do not fully underatand a problem here. tif_config.h should be built from tif_config.h.vc by copying in MSVC environment and tif_config.h.vc is manually adopted for MSVC. Sometimes this file is not being properly built. It happens if your are building using MSVC and autotools from the same source tree. I should improve makefile.vc rule for tif_config.h to fix this problem. But I really do not see any problem with current tif_config.h.vc.

> 7. Improve cross-package handling for HAVE_STD_LIB_H.

>

> The jpeg library developers should be asked to replace their current > handling in jconfig.h for HAVE_STDLIB_H with the following:

>
> #ifndef HAVE_STDLIB_H
> #define HAVE_STDLIB_H
> #endif
>
> Until this change can be implemented, GnuWin32 documentation for

> building libtiff using MSVC should advise that it may be necessary for > the developer to replace the existing line in jconfig.h that defines

> HAVE_STDLIB_H with the above block of code in order to avoid problems > building libtiff due to a difference in the definition of this item.

Hmm, libjpeg needs few tricks to be successfully built, but I never needed above change. By the way, what libjpeg version do you use? If libjpeg is being built using corrsponding instructions for MSVC it should be perfectly compatible with libtiff. Another story with mingw, but MSVC works well.

> 8. Add a port.h header file for modules located in the port > subdirectory.

That could be a good idea, thanks!

Best regards,

Andrey

--
Andrey V. Kiselev
ICQ# 26871517