dnl -*- Autoconf -*- dnl Tag Image File Format (TIFF) Software dnl dnl Copyright (C) 2004, Andrey Kiselev dnl dnl Permission to use, copy, modify, distribute, and sell this software and dnl its documentation for any purpose is hereby granted without fee, provided dnl that (i) the above copyright notices and this permission notice appear in dnl all copies of the software and related documentation, and (ii) the names of dnl Sam Leffler and Silicon Graphics may not be used in any advertising or dnl publicity relating to the software without the specific, prior written dnl permission of Sam Leffler and Silicon Graphics. dnl dnl THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, dnl EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY dnl WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. dnl dnl IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR dnl ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, dnl OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, dnl WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF dnl LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE dnl OF THIS SOFTWARE. dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64) AC_INIT([LibTIFF Software],[4.5.0],[tiff@lists.maptools.org],[tiff]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(m4) AC_LANG(C) dnl Compute the canonical host (run-time) system type variable AC_CANONICAL_HOST AM_INIT_AUTOMAKE([dist-xz tar-ustar]) dnl Do not rebuild generated files every time AM_MAINTAINER_MODE dnl Versioning. dnl Don't fill the ALPHA_VERSION field, if not applicable. LIBTIFF_MAJOR_VERSION=4 LIBTIFF_MINOR_VERSION=5 LIBTIFF_MICRO_VERSION=0 LIBTIFF_ALPHA_VERSION= LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION dnl This will be used with the 'make release' target LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"` dnl Libtool library revision control info dnl See the libtool documentation under the heading "Libtool's versioning dnl system" in order to understand the meaning of these fields dnl dnl current dnl The most recent interface number that this library implements. dnl revision dnl The implementation number of the current interface. dnl age dnl The difference between the newest and oldest interfaces that dnl this library implements. In other words, the library implements dnl all the interface numbers in the range from number current - dnl age to current. dnl dnl Here are a set of rules to help you update your library version dnl information: dnl dnl 1. Start with version information of `0:0:0' for each libtool library. dnl 2. Update the version information only immediately before a public dnl release of your software. More frequent updates are unnecessary, and dnl only guarantee that the current interface number gets larger faster. dnl 3. If the library source code has changed at all since the last update, dnl then increment revision (`c:r:a' becomes `c:r+1:a'). dnl 4. If any interfaces have been added, removed, or changed since the last dnl update, increment current, and set revision to 0. dnl 5. If any interfaces have been added since the last public release, then dnl increment age. dnl 6. If any interfaces have been removed since the last public release, dnl then set age to 0. LIBTIFF_CURRENT=6 LIBTIFF_REVISION=0 LIBTIFF_AGE=0 LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE # This is a special hack for OpenBSD and MirOS systems. The dynamic linker # in OpenBSD uses some special semantics for shared libraries. Their soname # contains only two numbers, major and minor. # See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details. #case "$host_os" in # openbsd* | mirbsd*) # LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION:0 # ;; # *) # LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION # ;; #esac AC_SUBST(LIBTIFF_MAJOR_VERSION) AC_SUBST(LIBTIFF_MINOR_VERSION) AC_SUBST(LIBTIFF_MICRO_VERSION) AC_SUBST(LIBTIFF_ALPHA_VERSION) AC_SUBST(LIBTIFF_VERSION) AC_SUBST(LIBTIFF_VERSION_INFO) AC_SUBST(LIBTIFF_RELEASE_DATE) dnl Checks for programs. AC_PROG_CC_C99 AM_PROG_CC_C_O dnl We want warnings. As many warnings as possible. VL_PROG_CC_WARNINGS() dnl Checks for programs AC_PROG_INSTALL AC_PROG_LN_S # Used only for validating the source distribution during distcheck AC_PATH_PROG(CMAKE, cmake) # Check if LD supports linker scripts, and define automake conditional # HAVE_LD_VERSION_SCRIPT if so. This functionality is currently # constrained to compilers using GNU ld on ELF systems or systems # which provide an adequate emulation thereof. AC_ARG_ENABLE([ld-version-script], AS_HELP_STRING([--disable-ld-version-script], [disable linker version script (default is enabled if supported)]), [have_ld_version_script=$enableval], [have_ld_version_script=yes]) if test "$have_ld_version_script" != no; then AC_MSG_CHECKING([if LD -Wl,--version-script works]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" cat > conftest.map <= 2.2 dual mode enabled]) fi fi AM_CONDITIONAL(HAVE_JPEG, test "$HAVE_JPEG" = 'yes') AM_CONDITIONAL(HAVE_JPEGTURBO_DUAL_MODE_8_12, test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = 'yes') dnl --------------------------------------------------------------------------- dnl Check for Old JPEG. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(old-jpeg, AS_HELP_STRING([--disable-old-jpeg], [disable support for Old JPEG compresson (read-only, enabled by default)]), [HAVE_OJPEG=${enableval}], [HAVE_OJPEG=yes]) if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then AC_DEFINE(OJPEG_SUPPORT, 1, [Support Old JPEG compresson (read-only)]) else HAVE_OJPEG=no fi dnl --------------------------------------------------------------------------- dnl Check for JBIG-KIT. dnl --------------------------------------------------------------------------- HAVE_JBIG=no AC_ARG_ENABLE(jbig, AS_HELP_STRING([--disable-jbig], [disable JBIG-KIT usage (required for ISO JBIG compression, enabled by default)]),,) AC_ARG_WITH(jbig-include-dir, AS_HELP_STRING([--with-jbig-include-dir=DIR], [location of JBIG-KIT headers]),,) AC_ARG_WITH(jbig-lib-dir, AS_HELP_STRING([--with-jbig-lib-dir=DIR], [location of JBIG-KIT library binary]),,) if test "x$enable_jbig" != "xno" ; then if test "x$with_jbig_lib_dir" != "x" ; then LDFLAGS="-L$with_jbig_lib_dir $LDFLAGS" fi AC_CHECK_LIB(jbig, jbg_dec_init, [jbig_lib=yes], [jbig_lib=no],) if test "$jbig_lib" = "no" -a "x$with_jbig_lib_dir" != "x" ; then AC_MSG_ERROR([JBIG-KIT library not found at $with_jbig_lib_dir]) fi if test "x$with_jbig_include_dir" != "x" ; then CPPFLAGS="-I$with_jbig_include_dir $CPPFLAGS" fi AC_CHECK_HEADER(jbig.h, [jbig_h=yes], [jbig_h=no]) if test "$jbig_h" = "no" -a "x$with_jbig_include_dir" != "x" ; then AC_MSG_ERROR([JBIG-KIT library headers not found at $with_jbig_include_dir]) fi if test "$jbig_lib" = "yes" -a "$jbig_h" = "yes" ; then HAVE_JBIG=yes fi fi if test "$HAVE_JBIG" = "yes" ; then AC_DEFINE(JBIG_SUPPORT,1,[Support ISO JBIG compression (requires JBIG-KIT library)]) LIBS="-ljbig $LIBS" tiff_libs_private="-ljbig ${tiff_libs_private}" if test "$HAVE_RPATH" = "yes" -a "x$with_jbig_lib_dir" != "x" ; then LIBDIR="-R $with_jbig_lib_dir $LIBDIR" fi # Older versions of jbigkit lack jbg_newlen AC_CHECK_FUNCS([jbg_newlen]) fi AM_CONDITIONAL(HAVE_JBIG, test "$HAVE_JBIG" = 'yes') dnl --------------------------------------------------------------------------- dnl Check for liblerc. dnl --------------------------------------------------------------------------- HAVE_LERC=no STATIC_LERC=no if test "$enable_static" = "no"; then static_lerc=no else static_lerc=yes fi AM_CONDITIONAL([STATIC_LERC], [ test "$static_lerc" = yes ]) AC_ARG_ENABLE(lerc, AS_HELP_STRING([--disable-lerc], [disable liblerc usage (required for lerc compression, enabled by default)]),,) AC_ARG_WITH(lerc-include-dir, AS_HELP_STRING([--with-lerc-include-dir=DIR], [location of liblerc headers]),,) AC_ARG_WITH(lerc-lib-dir, AS_HELP_STRING([--with-lerc-lib-dir=DIR], [location of liblerc library binary]),,) if test "x$enable_lerc" != "xno" ; then if test "x$with_lerc_lib_dir" != "x" ; then LDFLAGS="-L$with_lerc_lib_dir $LDFLAGS" fi lerc_lib_name="LercLib" AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) if test "$lerc_lib" = "no" ; then lerc_lib_name="Lerc" AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) fi if test "$lerc_lib" = "no" -a "x$with_lerc_lib_dir" != "x"; then AC_MSG_ERROR([lerc library not found at $with_lerc_lib_dir]) fi if test "x$with_lerc_include_dir" != "x" ; then CPPFLAGS="-I$with_lerc_include_dir $CPPFLAGS" fi AC_CHECK_HEADER(Lerc_c_api.h, [lerc_c_api_h=yes], [lerc_c_api_h=no]) if test "$lerc_c_api_h" = "no" -a "x$with_lerc_include_dir" != "x" ; then AC_MSG_ERROR([Liblerc headers not found at $with_lerc_include_dir]) fi if test "$lerc_lib" = "yes" -a "$lerc_c_api_h" = "yes" ; then HAVE_LERC=yes fi fi if test "$HAVE_LERC" = "yes" ; then AC_DEFINE(LERC_SUPPORT,1,[Support lerc compression]) LIBS="-l${lerc_lib_name} $LIBS" tiff_libs_private="-l${lerc_lib_name} ${tiff_libs_private}" if test "$HAVE_RPATH" = "yes" -a "x$with_lerc_lib_dir" != "x" ; then LIBDIR="-R $with_lerc_lib_dir $LIBDIR" fi fi AM_CONDITIONAL(HAVE_LERC, test "$HAVE_LERC" = 'yes') dnl --------------------------------------------------------------------------- dnl Check for liblzma2. dnl --------------------------------------------------------------------------- HAVE_LZMA=no AC_ARG_ENABLE(lzma, AS_HELP_STRING([--disable-lzma], [disable liblzma usage (required for LZMA2 compression, enabled by default)]),,) AC_ARG_WITH(lzma-include-dir, AS_HELP_STRING([--with-lzma-include-dir=DIR], [location of liblzma headers]),,) AC_ARG_WITH(lzma-lib-dir, AS_HELP_STRING([--with-lzma-lib-dir=DIR], [location of liblzma library binary]),,) if test "x$enable_lzma" != "xno" ; then if test "x$with_lzma_lib_dir" != "x" ; then LDFLAGS="-L$with_lzma_lib_dir $LDFLAGS" fi AC_CHECK_LIB(lzma, lzma_code, [lzma_lib=yes], [lzma_lib=no],) if test "$lzma_lib" = "no" -a "x$with_lzma_lib_dir" != "x"; then AC_MSG_ERROR([lzma library not found at $with_lzma_lib_dir]) fi if test "x$with_lzma_include_dir" != "x" ; then CPPFLAGS="-I$with_lzma_include_dir $CPPFLAGS" fi AC_CHECK_HEADER(lzma.h, [lzma_h=yes], [lzma_h=no]) if test "$lzma_h" = "no" -a "x$with_lzma_include_dir" != "x" ; then AC_MSG_ERROR([Liblzma headers not found at $with_lzma_include_dir]) fi if test "$lzma_lib" = "yes" -a "$lzma_h" = "yes" ; then HAVE_LZMA=yes fi fi if test "$HAVE_LZMA" = "yes" ; then AC_DEFINE(LZMA_SUPPORT,1,[Support LZMA2 compression]) LIBS="-llzma $LIBS" tiff_libs_private="-llzma ${tiff_libs_private}" tiff_requires_private="liblzma ${tiff_requires_private}" if test "$HAVE_RPATH" = "yes" -a "x$with_lzma_lib_dir" != "x" ; then LIBDIR="-R $with_lzma_lib_dir $LIBDIR" fi fi AM_CONDITIONAL(HAVE_LZMA, test "$HAVE_LZMA" = 'yes') dnl --------------------------------------------------------------------------- dnl Check for libzstd. dnl --------------------------------------------------------------------------- HAVE_ZSTD=no AC_ARG_ENABLE(zstd, AS_HELP_STRING([--disable-zstd], [disable libzstd usage (required for zstd compression, enabled by default)]),,) AC_ARG_WITH(zstd-include-dir, AS_HELP_STRING([--with-zstd-include-dir=DIR], [location of libzstd headers]),,) AC_ARG_WITH(zstd-lib-dir, AS_HELP_STRING([--with-zstd-lib-dir=DIR], [location of libzstd library binary]),,) if test "x$enable_zstd" != "xno" ; then if test "x$with_zstd_lib_dir" != "x" ; then LDFLAGS="-L$with_zstd_lib_dir $LDFLAGS" fi AC_CHECK_LIB(zstd, ZSTD_decompressStream, [zstd_lib=yes], [zstd_lib=no],) if test "$zstd_lib" = "no" -a "x$with_zstd_lib_dir" != "x"; then AC_MSG_ERROR([zstd library not found at $with_zstd_lib_dir]) fi if test "x$with_zstd_include_dir" != "x" ; then CPPFLAGS="-I$with_zstd_include_dir $CPPFLAGS" fi AC_CHECK_HEADER(zstd.h, [zstd_h=yes], [zstd_h=no]) if test "$zstd_h" = "no" -a "x$with_zstd_include_dir" != "x" ; then AC_MSG_ERROR([Libzstd headers not found at $with_zstd_include_dir]) fi if test "$zstd_lib" = "yes" -a "$zstd_h" = "yes" ; then HAVE_ZSTD=yes fi fi if test "$HAVE_ZSTD" = "yes" ; then AC_DEFINE(ZSTD_SUPPORT,1,[Support zstd compression]) LIBS="-lzstd $LIBS" tiff_libs_private="-lzstd ${tiff_libs_private}" tiff_requires_private="libzstd ${tiff_requires_private}" if test "$HAVE_RPATH" = "yes" -a "x$with_zstd_lib_dir" != "x" ; then LIBDIR="-R $with_zstd_lib_dir $LIBDIR" fi fi AM_CONDITIONAL(HAVE_ZSTD, test "$HAVE_ZSTD" = 'yes') dnl --------------------------------------------------------------------------- dnl Check for libwebp. dnl --------------------------------------------------------------------------- HAVE_WEBP=no AC_ARG_ENABLE(webp, AS_HELP_STRING([--disable-webp], [disable libwebp usage (required for webp compression, enabled by default)]),,) AC_ARG_WITH(webp-include-dir, AS_HELP_STRING([--with-webp-include-dir=DIR], [location of libwebp headers]),,) AC_ARG_WITH(webp-lib-dir, AS_HELP_STRING([--with-webp-lib-dir=DIR], [location of libwebp library binary]),,) if test "x$enable_webp" != "xno" ; then if test "x$with_webp_lib_dir" != "x" ; then LDFLAGS="-L$with_webp_lib_dir $LDFLAGS" fi AC_CHECK_LIB(webp, WebPDecode, [webp_lib=yes], [webp_lib=no],) if test "$webp_lib" = "no" -a "x$with_webp_lib_dir" != "x"; then AC_MSG_ERROR([webp library not found at $with_webp_lib_dir]) fi if test "x$with_webp_include_dir" != "x" ; then CPPFLAGS="-I$with_webp_include_dir $CPPFLAGS" fi AC_CHECK_HEADER(webp/decode.h, [webp_h=yes], [webp_h=no]) if test "$webp_h" = "no" -a "x$with_webp_include_dir" != "x" ; then AC_MSG_ERROR([Libwebp headers not found at $with_webp_include_dir]) fi if test "$webp_lib" = "yes" -a "$webp_h" = "yes" ; then HAVE_WEBP=yes fi fi if test "$HAVE_WEBP" = "yes" ; then AC_DEFINE(WEBP_SUPPORT,1,[Support webp compression]) LIBS="-lwebp $LIBS" tiff_libs_private="-lwebp ${tiff_libs_private}" tiff_requires_private="libwebp ${tiff_requires_private}" if test "$HAVE_RPATH" = "yes" -a "x$with_webp_lib_dir" != "x" ; then LIBDIR="-R $with_webp_lib_dir $LIBDIR" fi fi AM_CONDITIONAL(HAVE_WEBP, test "$HAVE_WEBP" = 'yes') dnl --------------------------------------------------------------------------- dnl Should 8/12 bit jpeg mode be enabled? dnl This should not be used starting with libjpeg-turbo >= 2.2 that has dnl built-in support for dual mode. dnl --------------------------------------------------------------------------- if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "no"; then HAVE_JPEG12=no AC_ARG_ENABLE(jpeg12, AS_HELP_STRING([--enable-jpeg12], [enable libjpeg 8/12bit dual mode (not to be used with libjpeg-turbo >= 2.2)]),,) AC_ARG_WITH(jpeg12-include-dir, AS_HELP_STRING([--with-jpeg12-include-dir=DIR], [location of libjpeg 12bit headers]),,) AC_ARG_WITH(jpeg12-lib, AS_HELP_STRING([--with-jpeg12-lib=LIBRARY], [path to libjpeg 12bit library]),,) if test "x$enable_jpeg12" = "xyes" ; then if test "x$with_jpeg12_lib" != "x" ; then LIBS="$with_jpeg12_lib $LIBS" fi HAVE_JPEG12=yes AC_DEFINE(JPEG_DUAL_MODE_8_12,1,[8/12 bit libjpeg dual mode enabled]) if test "x$with_jpeg12_include_dir" != "x" ; then AC_DEFINE_UNQUOTED(LIBJPEG_12_PATH,"$with_jpeg12_include_dir/jpeglib.h",[12bit libjpeg primary include file with path]) fi fi fi dnl --------------------------------------------------------------------------- dnl Check for C++. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(cxx, AS_HELP_STRING([--enable-cxx], [enable C++ stream API building (requires C++ compiler)]), [HAVE_CXX=$enableval], [HAVE_CXX=yes]) if test "$HAVE_CXX" = "yes" ; then AC_DEFINE(CXX_SUPPORT, 1, [Support C++ stream API (requires C++ compiler)]) else HAVE_CXX=no fi AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes") dnl --------------------------------------------------------------------------- dnl Check for OpenGL and GLUT. dnl --------------------------------------------------------------------------- HAVE_OPENGL=no AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [disable OpenGL usage (required by tiffgt, enabled by default)]),,) if test "x$enable_opengl" != "xno" ; then AC_PATH_XTRA dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS, dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect AX_CHECK_GL dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS AX_CHECK_GLU dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS AX_CHECK_GLUT if test "$no_x" != "yes" -a "$no_gl" != "yes" \ -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then HAVE_OPENGL=yes fi fi AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes") dnl --------------------------------------------------------------------------- dnl Check for Win32 IO: make sure we have windows.h but not cygwin dnl this must be after the ogl test, since that looks for windows.h and we dnl test it dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(win32-io, AS_HELP_STRING([--disable-win32-io], [disable Win32 I/O (Windows only, enabled by default except for Cygwin)]),,) win32_io_ok=no case "${host_os}" in cygwin*) if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then win32_io_ok=yes fi ;; *) if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then win32_io_ok=yes fi ;; esac if test "$win32_io_ok" = "yes" ; then AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system]) fi AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes]) dnl --------------------------------------------------------------------------- dnl Check for X Athena Widgets dnl --------------------------------------------------------------------------- dnl HAVE_XAW=no dnl ICE_FIND_ATHENA dnl if test "$no_xaw" != "yes" ; then dnl HAVE_XAW=yes dnl fi dnl AM_CONDITIONAL(HAVE_XAW, test "$HAVE_XAW" = "yes") dnl =========================================================================== dnl ``Orthogonal Features'' dnl =========================================================================== dnl --------------------------------------------------------------------------- dnl Default handling of strip chopping support. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(strip-chopping, AS_HELP_STRING([--disable-strip-chopping], [disable support for strip chopping (whether or not to convert single-strip uncompressed images to multiple strips of specified size to reduce memory usage)]), [HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes]) AC_ARG_WITH(default-strip-size, AS_HELP_STRING([--with-default-strip-size=SIZE], [default size of the strip in bytes (when strip chopping enabled) [[default=8192]]]),,) if test "$HAVE_STRIPCHOP" = "yes" \ -a "x$with_default_strip_size" != "xno"; then AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to multiple strips of specified size to reduce memory usage)]) if test "x$with_default_strip_size" = "x" \ -o "x$with_default_strip_size" = "xyes"; then with_default_strip_size="8192" fi AC_DEFINE_UNQUOTED(STRIP_SIZE_DEFAULT,$with_default_strip_size,[Default size of the strip in bytes (when strip chopping enabled)]) fi dnl --------------------------------------------------------------------------- dnl Maximum number of TIFF directories that libtiff can browse through dnl --------------------------------------------------------------------------- AC_ARG_WITH(max-dir-count, AS_HELP_STRING([--with-max-dir-count=SIZE], [Maximum number of TIFF directories that libtiff can browse through [[default=1048576]]]),,) if test "x$with_max_dir_count" = "x" -o "x$with_max_dir_count" = "xyes"; then with_max_dir_count="1048576" fi AC_DEFINE_UNQUOTED(TIFF_MAX_DIR_COUNT,$with_max_dir_count,[Maximum number of TIFF directories that libtiff can browse through]) dnl --------------------------------------------------------------------------- dnl Should we try to defer loading of strip/tile offsets and sizes to dnl optimize directory scanning? dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(defer-strile-load, AS_HELP_STRING([--enable-defer-strile-load], [enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen()]), [HAVE_DEFER_STRILE_LOAD=$enableval], [HAVE_DEFER_STRILE_LOAD=no]) if test "$HAVE_DEFER_STRILE_LOAD" = "yes" ; then AC_DEFINE(DEFER_STRILE_LOAD,1,[enable deferred strip/tile offset/size loading]) fi dnl --------------------------------------------------------------------------- dnl Check for support of CHUNKY_STRIP_READ_SUPPORT, a mechanism to allowing dnl reading large strips (usually one strip files) in chunks when using dnl TIFFReadScanline(). This is an experimental feature in libtiff 4.0. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(chunky-strip-read, AS_HELP_STRING([--enable-chunky-strip-read], [enable reading large strips in chunks for TIFFReadScanline() (experimental)]), [HAVE_CHUNKY_STRIP_READ=$enableval], [HAVE_CHUNKY_STRIP_READ=no]) if test "$HAVE_CHUNKY_STRIP_READ" = "yes" ; then AC_DEFINE(CHUNKY_STRIP_READ_SUPPORT,1,[enable partial strip reading for large strips (experimental)]) fi dnl --------------------------------------------------------------------------- dnl Default subifd support. dnl --------------------------------------------------------------------------- AC_DEFINE(SUBIFD_SUPPORT,1,[Enable SubIFD tag (330) support]) dnl --------------------------------------------------------------------------- dnl Default handling of ASSOCALPHA support. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(extrasample-as-alpha, AS_HELP_STRING([--disable-extrasample-as-alpha], [the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly]), [HAVE_EXTRASAMPLE_AS_ALPHA=$enableval], [HAVE_EXTRASAMPLE_AS_ALPHA=yes]) if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then AC_DEFINE(DEFAULT_EXTRASAMPLE_AS_ALPHA, 1, [Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly.]) fi dnl --------------------------------------------------------------------------- dnl Default handling of YCbCr subsampling support. dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(check-ycbcr-subsampling, AS_HELP_STRING([--disable-check-ycbcr-subsampling], [disable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag]), [CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval], [CHECK_JPEG_YCBCR_SUBSAMPLING=yes]) if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then AC_DEFINE(CHECK_JPEG_YCBCR_SUBSAMPLING, 1, [Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled).]) fi for python in python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python; do AC_CHECK_PROGS(PYTHON_BIN, [$python]) if test "x$PYTHON_BIN" != "x"; then break fi done AC_ARG_ENABLE(sphinx, AS_HELP_STRING([--disable-sphinx], [disable building of the sphinx documentation]), [BUILD_SPHINX=$enableval], [BUILD_SPHINX=yes]) AC_PATH_PROG(SPHINX_BUILD, [sphinx-build], [no]) AM_CONDITIONAL([SPHINX], [test "$BUILD_SPHINX" = yes -a "$SPHINX_BUILD" != no -a "x$PYTHON_BIN" != "x"]) if test "x$PYTHON_BIN" != "x"; then AC_MSG_CHECKING([generated manual pages]) TIFF_MAN1_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.1$")) TIFF_MAN3_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.3tiff$")) TIFF_MAN_RULES=$("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | sed -e 's;$;: all-local;') AC_SUBST([TIFF_MAN1_GEN]) AC_SUBST([TIFF_MAN3_GEN]) AC_SUBST([TIFF_MAN_RULES]) AM_SUBST_NOTMAKE([TIFF_MAN_RULES]) AC_MSG_RESULT([done]) fi if test -d "${srcdir}/doc/man-prebuilt"; then AC_MSG_CHECKING([prebuilt manual pages]) TIFF_MAN1_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.1)) TIFF_MAN3_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.3tiff)) AC_SUBST([TIFF_MAN1_PREBUILT]) AC_SUBST([TIFF_MAN3_PREBUILT]) AC_MSG_RESULT([done]) fi dnl --------------------------------------------------------------------------- AC_SUBST(LIBDIR) AC_CONFIG_HEADERS([config/config.h libtiff/tif_config.h libtiff/tiffconf.h port/libport_config.h]) AC_CONFIG_FILES([Makefile \ build/Makefile \ contrib/Makefile \ contrib/addtiffo/Makefile \ contrib/dbs/Makefile \ contrib/dbs/xtiff/Makefile \ contrib/iptcutil/Makefile \ contrib/mfs/Makefile \ contrib/pds/Makefile \ contrib/ras/Makefile \ contrib/stream/Makefile \ contrib/tags/Makefile \ contrib/win_dib/Makefile \ doc/Makefile \ libtiff-4.pc \ libtiff/Makefile \ port/Makefile \ test/Makefile \ tools/Makefile]) AC_OUTPUT dnl --------------------------------------------------------------------------- dnl Display configuration status dnl --------------------------------------------------------------------------- LOC_MSG() LOC_MSG([Libtiff is now configured for ${host}]) LOC_MSG() LOC_MSG([ Installation directory: ${prefix}]) LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}]) LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) LOC_MSG([ Build tools: ${TIFF_TOOLS}]) LOC_MSG([ Build tests: ${TIFF_TESTS}]) LOC_MSG([ Build contrib: ${TIFF_CONTRIB}]) LOC_MSG([ Build docs: ${TIFF_DOCS}]) LOC_MSG([ Build deprecated features: ${enable_deprecated}]) LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}]) LOC_MSG([ Enable linker symbol versioning: ${have_ld_version_script}]) LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}]) LOC_MSG([ Use Win32 IO: ${win32_io_ok}]) LOC_MSG() LOC_MSG([ Support for internal codecs:]) LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}]) LOC_MSG([ Macintosh PackBits algorithm: ${HAVE_PACKBITS}]) LOC_MSG([ LZW algorithm: ${HAVE_LZW}]) LOC_MSG([ ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}]) LOC_MSG([ NeXT 2-bit RLE algorithm: ${HAVE_NEXT}]) LOC_MSG([ LogLuv high dynamic range encoding: ${HAVE_LOGLUV}]) LOC_MSG() LOC_MSG([ Support for external codecs:]) LOC_MSG([ ZLIB support: ${HAVE_ZLIB}]) LOC_MSG([ libdeflate support: ${HAVE_LIBDEFLATE}]) LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}]) LOC_MSG([ JPEG support: ${HAVE_JPEG}]) LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}]) if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "yes"; then LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEGTURBO_DUAL_MODE_8_12} (libjpeg turbo >= 2.2 dual mode)]) else LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEG12}]) fi LOC_MSG([ ISO JBIG support: ${HAVE_JBIG}]) LOC_MSG([ LERC support: ${HAVE_LERC}]) LOC_MSG([ LZMA2 support: ${HAVE_LZMA}]) LOC_MSG([ ZSTD support: ${HAVE_ZSTD}]) LOC_MSG([ WEBP support: ${HAVE_WEBP}]) LOC_MSG() LOC_MSG([ C++ support: ${HAVE_CXX}]) LOC_MSG() dnl LOC_MSG([ X Athena Widgets support: ${HAVE_XAW}]) LOC_MSG([ OpenGL support: ${HAVE_OPENGL}]) LOC_MSG()