diff options
-rw-r--r-- | contrib/addtiffo/CMakeLists.txt | 4 | ||||
-rw-r--r-- | contrib/dbs/CMakeLists.txt | 4 | ||||
-rw-r--r-- | contrib/iptcutil/CMakeLists.txt | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | libtiff/CMakeLists.txt | 1 | ||||
-rw-r--r-- | libtiff/Makefile.am | 1 | ||||
-rw-r--r-- | libtiff/mkg3states.c | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | port/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/CMakeLists.txt | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/CMakeLists.txt | 34 | ||||
-rw-r--r-- | tools/Makefile.am | 2 | ||||
-rw-r--r-- | tools/fax2ps.c | 5 | ||||
-rw-r--r-- | tools/fax2tiff.c | 9 | ||||
-rw-r--r-- | tools/pal2rgb.c | 9 | ||||
-rw-r--r-- | tools/ppm2tiff.c | 9 | ||||
-rw-r--r-- | tools/raw2tiff.c | 9 | ||||
-rw-r--r-- | tools/rgb2ycbcr.c | 9 | ||||
-rw-r--r-- | tools/thumbnail.c | 9 | ||||
-rw-r--r-- | tools/tiff2bw.c | 9 | ||||
-rw-r--r-- | tools/tiff2pdf.c | 9 | ||||
-rw-r--r-- | tools/tiff2ps.c | 5 | ||||
-rw-r--r-- | tools/tiff2rgba.c | 9 | ||||
-rw-r--r-- | tools/tiffcmp.c | 9 | ||||
-rw-r--r-- | tools/tiffcp.c | 5 | ||||
-rw-r--r-- | tools/tiffcrop.c | 9 | ||||
-rw-r--r-- | tools/tiffdither.c | 9 | ||||
-rw-r--r-- | tools/tiffdump.c | 9 | ||||
-rw-r--r-- | tools/tiffgt.c | 6 | ||||
-rw-r--r-- | tools/tiffinfo.c | 5 | ||||
-rw-r--r-- | tools/tiffmedian.c | 9 | ||||
-rw-r--r-- | tools/tiffsplit.c | 5 |
30 files changed, 52 insertions, 170 deletions
diff --git a/contrib/addtiffo/CMakeLists.txt b/contrib/addtiffo/CMakeLists.txt index 45e733cd..71349194 100644 --- a/contrib/addtiffo/CMakeLists.txt +++ b/contrib/addtiffo/CMakeLists.txt @@ -26,10 +26,6 @@ extra_dist( README Makefile.vc) -include_directories(${PROJECT_SOURCE_DIR}/libtiff - ${PROJECT_BINARY_DIR}/libtiff - ${CMAKE_CURRENT_BINARY_DIR}) - add_executable(addtiffo addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h) target_link_libraries(addtiffo tiff port) diff --git a/contrib/dbs/CMakeLists.txt b/contrib/dbs/CMakeLists.txt index ff3ce20c..77c58b7f 100644 --- a/contrib/dbs/CMakeLists.txt +++ b/contrib/dbs/CMakeLists.txt @@ -22,10 +22,6 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. -include_directories(${PROJECT_SOURCE_DIR}/libtiff - ${PROJECT_BINARY_DIR}/libtiff - ${CMAKE_CURRENT_BINARY_DIR}) - add_executable(tiff-bi tiff-bi.c) target_link_libraries(tiff-bi tiff port) diff --git a/contrib/iptcutil/CMakeLists.txt b/contrib/iptcutil/CMakeLists.txt index 35cc2612..27d6b249 100644 --- a/contrib/iptcutil/CMakeLists.txt +++ b/contrib/iptcutil/CMakeLists.txt @@ -27,9 +27,5 @@ extra_dist( test.iptc test.txt) -include_directories(${PROJECT_SOURCE_DIR}/libtiff - ${PROJECT_BINARY_DIR}/libtiff - ${CMAKE_CURRENT_BINARY_DIR}) - add_executable(iptcutil iptcutil.c) target_link_libraries(iptcutil tiff port) diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt index a186f5dd..5f0b38d3 100644..100755 --- a/libtiff/CMakeLists.txt +++ b/libtiff/CMakeLists.txt @@ -115,6 +115,7 @@ target_include_directories(tiff PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> + PRIVATE ${TIFF_INCLUDES} ) target_link_libraries(tiff ${TIFF_LIBRARY_DEPS}) diff --git a/libtiff/Makefile.am b/libtiff/Makefile.am index 9f4a821c..5d658acf 100644 --- a/libtiff/Makefile.am +++ b/libtiff/Makefile.am @@ -151,3 +151,4 @@ mkg3states_LDADD = $(LIBPORT) faxtable: mkg3states (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c) +AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port diff --git a/libtiff/mkg3states.c b/libtiff/mkg3states.c index 5612a56c..f3421d67 100644 --- a/libtiff/mkg3states.c +++ b/libtiff/mkg3states.c @@ -28,6 +28,7 @@ * Copyright (C) 1990, 1995 Frank D. Cringle. */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -39,10 +40,6 @@ #include "tif_fax3.h" -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) /* NB: can't use names in tif_fax3.h 'cuz they are declared const */ diff --git a/port/CMakeLists.txt b/port/CMakeLists.txt index b7eb3a29..517238a8 100644..100755 --- a/port/CMakeLists.txt +++ b/port/CMakeLists.txt @@ -66,3 +66,7 @@ foreach(file ${port_USED_FILES}) list(APPEND tiff_port_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${file}") endforeach() set(tiff_port_SOURCES ${tiff_port_SOURCES} PARENT_SCOPE) + +target_include_directories(port + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bffb8bf7..d5c31f24 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -22,11 +22,6 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. -include_directories(${PROJECT_SOURCE_DIR}/libtiff - ${PROJECT_BINARY_DIR}/libtiff - ${CMAKE_CURRENT_BINARY_DIR} - ${TIFF_INCLUDES}) - # Test scripts (not used by CMake) set(TESTSCRIPTS bmp2tiff_palette.sh @@ -192,6 +187,7 @@ target_link_libraries(rewrite tiff port) if(JPEG_SUPPORT) add_executable(raw_decode raw_decode.c) + target_include_directories(raw_decode PRIVATE ${JPEG_INCLUDE_DIR}) target_link_libraries(raw_decode tiff port) endif() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index c6c54a7a..0c1d0667 100644..100755 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -24,70 +24,85 @@ extra_dist(Makefile.vc) -include_directories(${PROJECT_SOURCE_DIR}/libtiff - ${PROJECT_BINARY_DIR}/libtiff - ${PROJECT_SOURCE_DIR}/port - ${CMAKE_CURRENT_BINARY_DIR}) - add_executable(fax2ps fax2ps.c) target_link_libraries(fax2ps tiff port) +target_include_directories(fax2ps PRIVATE) add_executable(fax2tiff fax2tiff.c) target_link_libraries(fax2tiff tiff port) +target_include_directories(fax2tiff PRIVATE) add_executable(pal2rgb pal2rgb.c) target_link_libraries(pal2rgb tiff port) +target_include_directories(pal2rgb PRIVATE) add_executable(ppm2tiff ppm2tiff.c) target_link_libraries(ppm2tiff tiff port) +target_include_directories(ppm2tiff PRIVATE) add_executable(raw2tiff raw2tiff.c) target_link_libraries(raw2tiff tiff port) +target_include_directories(raw2tiff PRIVATE) add_executable(rgb2ycbcr rgb2ycbcr.c) target_link_libraries(rgb2ycbcr tiff port) +target_include_directories(rgb2ycbcr PRIVATE) add_executable(thumbnail thumbnail.c) target_link_libraries(thumbnail tiff port) +target_include_directories(thumbnail PRIVATE) add_executable(tiff2bw tiff2bw.c) target_link_libraries(tiff2bw tiff port) +target_include_directories(tiff2bw PRIVATE) add_executable(tiff2pdf tiff2pdf.c) target_link_libraries(tiff2pdf tiff port) +target_include_directories(tiff2pdf PRIVATE) add_executable(tiff2ps tiff2ps.c) target_link_libraries(tiff2ps tiff port) +target_include_directories(tiff2ps PRIVATE) add_executable(tiff2rgba tiff2rgba.c) target_link_libraries(tiff2rgba tiff port) +target_include_directories(tiff2rgba PRIVATE) add_executable(tiffcmp tiffcmp.c) target_link_libraries(tiffcmp tiff port) +target_include_directories(tiffcmp PRIVATE) add_executable(tiffcp tiffcp.c) target_link_libraries(tiffcp tiff port) +target_include_directories(tiffcp PRIVATE) add_executable(tiffcrop tiffcrop.c) target_link_libraries(tiffcrop tiff port) +target_include_directories(tiffcrop PRIVATE) add_executable(tiffdither tiffdither.c) target_link_libraries(tiffdither tiff port) +target_include_directories(tiffdither PRIVATE) add_executable(tiffdump tiffdump.c) target_link_libraries(tiffdump tiff port) +target_include_directories(tiffdump PRIVATE) add_executable(tiffinfo tiffinfo.c) target_link_libraries(tiffinfo tiff port) +target_include_directories(tiffinfo PRIVATE) add_executable(tiffmedian tiffmedian.c) target_link_libraries(tiffmedian tiff port) +target_include_directories(tiffmedian PRIVATE) add_executable(tiffset tiffset.c) target_link_libraries(tiffset tiff port) +target_include_directories(tiffset PRIVATE) add_executable(tiffsplit tiffsplit.c) target_link_libraries(tiffsplit tiff port) +target_include_directories(tiffsplit PRIVATE) # rgb2ycbcr and thumbnail are intended to *NOT* be installed. They are for # testing purposes only. @@ -112,14 +127,9 @@ install(TARGETS fax2ps RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") if(HAVE_OPENGL) - if(OPENGL_INCLUDE_DIR) - include_directories(${OPENGL_INCLUDE_DIR}) - endif() - if(GLUT_INCLUDE_DIR) - include_directories(${GLUT_INCLUDE_DIR}) - endif() - add_executable(tiffgt tiffgt.c) + target_include_directories(tiffgt PRIVATE + ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR}) target_link_libraries(tiffgt tiff port ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) install(TARGETS tiffgt diff --git a/tools/Makefile.am b/tools/Makefile.am index 3054bee3..d930f697 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -128,7 +128,7 @@ tiffgt_SOURCES = tiffgt.c tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS) tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff +AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port echo: (echo $(CFLAGS)) diff --git a/tools/fax2ps.c b/tools/fax2ps.c index 613b1016..18f70a22 100644 --- a/tools/fax2ps.c +++ b/tools/fax2ps.c @@ -22,6 +22,7 @@ * OF THIS SOFTWARE. */ #include "tif_config.h" +#include "libport.h" #include <stdlib.h> #include <stdio.h> @@ -41,10 +42,6 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #include "tiffio.h" diff --git a/tools/fax2tiff.c b/tools/fax2tiff.c index 005bc02a..67acc593 100644 --- a/tools/fax2tiff.c +++ b/tools/fax2tiff.c @@ -26,6 +26,7 @@ * Convert a CCITT Group 3 or 4 FAX file to TIFF Group 3 or 4 format. */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> /* should have atof & getopt */ @@ -42,10 +43,6 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #ifndef EXIT_SUCCESS @@ -57,10 +54,6 @@ #define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - TIFF *faxTIFF; char *rowbuf; char *refbuf; diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c index f73d2470..9a551d9f 100644 --- a/tools/pal2rgb.c +++ b/tools/pal2rgb.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <string.h> @@ -33,10 +34,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) diff --git a/tools/ppm2tiff.c b/tools/ppm2tiff.c index 9d27c671..b467516f 100644 --- a/tools/ppm2tiff.c +++ b/tools/ppm2tiff.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -41,16 +42,8 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #endif diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c index 77ac070d..de731b13 100644 --- a/tools/raw2tiff.c +++ b/tools/raw2tiff.c @@ -27,6 +27,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -52,10 +53,6 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #include "tiffio.h" @@ -66,10 +63,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #ifndef O_BINARY # define O_BINARY 0 #endif diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c index 0bf761af..98496daa 100644 --- a/tools/rgb2ycbcr.c +++ b/tools/rgb2ycbcr.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <string.h> @@ -32,10 +33,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #include "tiffio.h" @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #define CopyField(tag, v) \ if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v) diff --git a/tools/thumbnail.c b/tools/thumbnail.c index 94b78a81..3b97ede6 100644 --- a/tools/thumbnail.c +++ b/tools/thumbnail.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -33,10 +34,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #ifndef TIFFhowmany8 diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c index f9491f6d..ca560ea7 100644 --- a/tools/tiff2bw.c +++ b/tools/tiff2bw.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -33,10 +34,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #include "tiffiop.h" @@ -47,10 +44,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - /* x% weighting -> fraction of full color */ #define PCT(x) (((x)*256+50)/100) int RED = PCT(30); /* 30% */ diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index 785d318a..800af01d 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -25,6 +25,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -46,17 +47,9 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #include "tiffio.h" -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c index 32c0f702..10b34bcf 100644 --- a/tools/tiff2ps.c +++ b/tools/tiff2ps.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> /* for atof */ @@ -34,10 +35,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS diff --git a/tools/tiff2rgba.c b/tools/tiff2rgba.c index f179c0a7..a4bcd5e7 100644 --- a/tools/tiff2rgba.c +++ b/tools/tiff2rgba.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <string.h> @@ -32,10 +33,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #include "tiffio.h" @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #define CopyField(tag, v) \ if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v) diff --git a/tools/tiffcmp.c b/tools/tiffcmp.c index 7bfef503..93b535a2 100644 --- a/tools/tiffcmp.c +++ b/tools/tiffcmp.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -33,10 +34,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - static int stopondiff = 1; static int stoponfirsttag = 1; static uint16 bitspersample = 1; diff --git a/tools/tiffcp.c b/tools/tiffcp.c index 6a98eeaf..b8b9b64a 100644 --- a/tools/tiffcp.c +++ b/tools/tiffcp.c @@ -37,6 +37,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -58,10 +59,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 62c4ea18..56716aab 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -109,6 +109,7 @@ static char tiffcrop_version_id[] = "2.4"; static char tiffcrop_rev_date[] = "12-13-2010"; #include "tif_config.h" +#include "libport.h" #include "tiffiop.h" #include <stdio.h> @@ -135,14 +136,6 @@ static char tiffcrop_rev_date[] = "12-13-2010"; #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef PATH_MAX diff --git a/tools/tiffdither.c b/tools/tiffdither.c index 599c7dfa..bc488a6a 100644 --- a/tools/tiffdither.c +++ b/tools/tiffdither.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -32,10 +33,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #include "tiffiop.h" @@ -46,10 +43,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) diff --git a/tools/tiffdump.c b/tools/tiffdump.c index b0020593..81f7b98a 100644 --- a/tools/tiffdump.c +++ b/tools/tiffdump.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -46,14 +47,6 @@ # include <io.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS diff --git a/tools/tiffgt.c b/tools/tiffgt.c index f3cca8c9..561df5c9 100644 --- a/tools/tiffgt.c +++ b/tools/tiffgt.c @@ -24,6 +24,8 @@ */ #include "tif_config.h" +#include "libport.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -55,10 +57,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - static uint32 width = 0, height = 0; /* window width & height */ static uint32* raster = NULL; /* displayable image */ static TIFFRGBAImage img; diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c index 438911ae..a7c5f767 100644 --- a/tools/tiffinfo.c +++ b/tools/tiffinfo.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -36,10 +37,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffiop.h" #ifndef EXIT_SUCCESS diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c index 4f55b2e1..a7f9a923 100644 --- a/tools/tiffmedian.c +++ b/tools/tiffmedian.c @@ -39,6 +39,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -48,10 +49,6 @@ # include <unistd.h> #endif -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - #include "tiffio.h" #ifndef EXIT_SUCCESS @@ -61,10 +58,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define MAX_CMAP_SIZE 256 #define streq(a,b) (strcmp(a,b) == 0) diff --git a/tools/tiffsplit.c b/tools/tiffsplit.c index 43b6fdc1..491a6f7c 100644 --- a/tools/tiffsplit.c +++ b/tools/tiffsplit.c @@ -23,6 +23,7 @@ */ #include "tif_config.h" +#include "libport.h" #include <stdio.h> #include <stdlib.h> @@ -37,10 +38,6 @@ #define EXIT_FAILURE 1 #endif -#ifndef HAVE_GETOPT -extern int getopt(int argc, char * const argv[], const char *optstring); -#endif - #define CopyField(tag, v) \ if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v) #define CopyField2(tag, v1, v2) \ |