2004-03-19 12:26:21 -05:00
dnl -*- Autoconf -*-
dnl Tag Image File Format (TIFF) Software
dnl
2006-03-23 09:54:00 -05:00
dnl Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
2004-03-19 12:26:21 -05:00
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.
2009-08-20 18:57:38 -04:00
AC_PREREQ(2.64)
2012-06-15 20:19:35 -04:00
AC_INIT([LibTIFF Software],[4.0.2],[tiff@lists.maptools.org],[tiff])
2005-09-12 09:33:26 -04:00
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(m4)
2004-06-07 05:04:19 -04:00
AC_LANG(C)
2004-04-16 04:12:54 -04:00
2011-04-09 11:43:03 -04:00
dnl Compute the canonical host (run-time) system type variable
AC_CANONICAL_HOST
2004-04-16 04:12:54 -04:00
2004-03-19 12:26:21 -05:00
AM_INIT_AUTOMAKE
2004-06-04 18:02:02 -04:00
dnl Do not rebuild generated files every time
AM_MAINTAINER_MODE
2004-03-19 12:26:21 -05:00
2004-05-20 06:39:25 -04:00
dnl Versioning.
2004-05-26 05:20:56 -04:00
dnl Don't fill the ALPHA_VERSION field, if not applicable.
2007-06-28 09:50:27 -04:00
LIBTIFF_MAJOR_VERSION=4
LIBTIFF_MINOR_VERSION=0
2012-06-15 20:19:35 -04:00
LIBTIFF_MICRO_VERSION=2
2011-12-21 19:29:28 -05:00
LIBTIFF_ALPHA_VERSION=
2004-04-20 14:17:41 -04:00
LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
2004-05-20 06:39:25 -04:00
dnl This will be used with the 'make release' target
LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"`
2004-03-19 12:26:21 -05:00
2009-08-27 13:40:49 -04:00
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
2007-06-28 09:50:27 -04:00
dnl
2009-08-27 13:40:49 -04:00
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.
2007-06-28 09:50:27 -04:00
dnl
2009-08-27 13:40:49 -04:00
dnl Here are a set of rules to help you update your library version
dnl information:
2007-06-28 09:50:27 -04:00
dnl
2009-08-27 13:40:49 -04:00
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.
2012-06-15 20:19:35 -04:00
LIBTIFF_CURRENT=6
LIBTIFF_REVISION=0
LIBTIFF_AGE=1
2007-06-28 09:50:27 -04:00
LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE
2005-05-26 04:16:00 -04:00
# 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.
2011-04-09 11:43:03 -04:00
#case "$host_os" in
2007-06-28 09:50:27 -04:00
# 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
2005-05-26 04:16:00 -04:00
2004-03-19 12:26:21 -05:00
AC_SUBST(LIBTIFF_MAJOR_VERSION)
AC_SUBST(LIBTIFF_MINOR_VERSION)
AC_SUBST(LIBTIFF_MICRO_VERSION)
2004-04-20 14:17:41 -04:00
AC_SUBST(LIBTIFF_ALPHA_VERSION)
2004-03-19 12:26:21 -05:00
AC_SUBST(LIBTIFF_VERSION)
2005-05-26 04:16:00 -04:00
AC_SUBST(LIBTIFF_VERSION_INFO)
2004-05-20 06:39:25 -04:00
AC_SUBST(LIBTIFF_RELEASE_DATE)
2004-03-19 12:26:21 -05:00
dnl Checks for programs.
AC_PROG_CC
2005-09-12 09:33:26 -04:00
AM_PROG_CC_C_O
2004-09-11 16:44:41 -04:00
dnl We want warnings. As many warnings as possible.
2005-04-08 05:58:12 -04:00
VL_PROG_CC_WARNINGS()
2004-09-11 16:44:41 -04:00
2004-03-19 12:26:21 -05:00
AC_PROG_INSTALL
AC_PROG_LN_S
2009-08-20 18:57:38 -04:00
2012-01-22 14:50:36 -05:00
# 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([--enable-ld-version-script],
[enable linker version script (default is disabled)]),
[have_ld_version_script=$enableval], [have_ld_version_script=no])
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 <<EOF
VERS_1 {
global: sym;
};
VERS_2 {
global: sym;
} VERS_1;
EOF
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[have_ld_version_script=yes], [have_ld_version_script=no])
rm -f conftest.map
LDFLAGS="$save_LDFLAGS"
AC_MSG_RESULT($have_ld_version_script)
fi
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
2009-08-20 18:57:38 -04:00
dnl Tests for Windows
AC_EXEEXT
AC_OBJEXT
dnl initialize libtool
LT_INIT([win32-dll])
LT_LANG([C++])
# Enable support for silent build rules
AM_SILENT_RULES
2004-03-19 12:26:21 -05:00
2006-06-07 11:40:44 -04:00
dnl We don't need to add math library to all targets
case "${host_os}" in
2004-03-19 12:26:21 -05:00
cygwin* | mingw32* | beos* | darwin*)
;;
*)
2006-06-07 11:40:44 -04:00
AC_CHECK_LIB(m,sin,,,)
2004-03-19 12:26:21 -05:00
;;
esac
2010-11-27 15:54:51 -05:00
tiff_libs_private=
AC_SUBST(tiff_libs_private)
2004-03-19 12:26:21 -05:00
dnl Checks for header files.
2006-04-20 08:26:46 -04:00
AC_CHECK_HEADERS([assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h])
2004-03-19 12:26:21 -05:00
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
2004-04-20 07:04:14 -04:00
AC_C_INLINE
2004-03-19 12:26:21 -05:00
AC_C_BIGENDIAN
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
2007-06-25 11:38:21 -04:00
dnl ---------------------------------------------------------------------------
dnl Compute sized types for current CPU and compiler options
dnl ---------------------------------------------------------------------------
# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
AC_CHECK_SIZEOF(signed short)
# Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
AC_CHECK_SIZEOF(unsigned short)
# Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
AC_CHECK_SIZEOF(signed int)
# Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
AC_CHECK_SIZEOF(unsigned int)
# Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
AC_CHECK_SIZEOF(signed long)
# Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
AC_CHECK_SIZEOF(unsigned long)
2007-06-26 16:05:33 -04:00
# Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG.
# If 'long long' is not supported then the value defined is zero.
2007-06-25 11:38:21 -04:00
AC_CHECK_SIZEOF(signed long long)
# Obtain size of a 'unsigned long long' and define as
# SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
# supported then the value defined is zero.
AC_CHECK_SIZEOF(unsigned long long)
2007-06-26 16:05:33 -04:00
# Obtain the size of an 'unsigned char *' and define as
# SIZEOF_UNSIGNED_CHAR_P. Result is available in
# ac_cv_sizeof_unsigned_char_p.
AC_CHECK_SIZEOF(unsigned char *)
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for signed 8-bit type)
INT8_T='signed char'
AC_MSG_RESULT($INT8_T)
AC_DEFINE_UNQUOTED(TIFF_INT8_T,$INT8_T,[Signed 8-bit type])
AC_MSG_CHECKING(for unsigned 8-bit type)
UINT8_T='unsigned char'
AC_MSG_RESULT($UINT8_T)
2007-06-26 11:39:51 -04:00
AC_DEFINE_UNQUOTED(TIFF_UINT8_T,$UINT8_T,[Unsigned 8-bit type])
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for signed 16-bit type)
INT16_T='signed short'
AC_MSG_RESULT($INT16_T)
AC_DEFINE_UNQUOTED(TIFF_INT16_T,$INT16_T,[Signed 16-bit type])
2008-12-31 18:48:01 -05:00
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for unsigned 16-bit type)
UINT16_T='unsigned short'
AC_MSG_RESULT($UINT16_T)
AC_DEFINE_UNQUOTED(TIFF_UINT16_T,$UINT16_T,[Unsigned 16-bit type])
AC_MSG_CHECKING(for signed 32-bit type)
INT32_T='none'
2008-12-31 18:48:01 -05:00
INT32_FORMAT='none'
2007-06-25 11:38:21 -04:00
if test $ac_cv_sizeof_signed_int -eq 4
then
INT32_T='signed int'
2008-12-31 18:48:01 -05:00
INT32_FORMAT='"%d"'
2007-06-25 11:38:21 -04:00
elif test $ac_cv_sizeof_signed_long -eq 4
then
INT32_T='signed long'
2008-12-31 18:48:01 -05:00
INT32_FORMAT='"%ld"'
2007-06-25 11:38:21 -04:00
fi
AC_MSG_RESULT($INT32_T)
AC_DEFINE_UNQUOTED(TIFF_INT32_T,$INT32_T,[Signed 32-bit type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_INT32_FORMAT,$INT32_FORMAT,[Signed 32-bit type formatter])
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for unsigned 32-bit type)
UINT32_T='none'
2008-12-31 18:48:01 -05:00
UINT32_FORMAT='none'
2007-06-25 11:38:21 -04:00
if test $ac_cv_sizeof_unsigned_int -eq 4
then
UINT32_T='unsigned int'
2008-12-31 18:48:01 -05:00
UINT32_FORMAT='"%u"'
2007-06-25 11:38:21 -04:00
elif test $ac_cv_sizeof_unsigned_long -eq 4
then
UINT32_T='unsigned long'
2008-12-31 18:48:01 -05:00
UINT32_FORMAT='"%lu"'
2007-06-25 11:38:21 -04:00
fi
AC_MSG_RESULT($UINT32_T)
AC_DEFINE_UNQUOTED(TIFF_UINT32_T,$UINT32_T,[Unsigned 32-bit type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_UINT32_FORMAT,$UINT32_FORMAT,[Unsigned 32-bit type formatter])
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for signed 64-bit type)
INT64_T='none'
2008-12-31 18:48:01 -05:00
INT64_FORMAT='none'
2007-06-25 11:38:21 -04:00
if test $ac_cv_sizeof_signed_long -eq 8
then
INT64_T='signed long'
2008-12-31 18:48:01 -05:00
INT64_FORMAT='"%ld"'
2007-06-25 11:38:21 -04:00
elif test $ac_cv_sizeof_signed_long_long -eq 8
then
INT64_T='signed long long'
2011-04-02 16:54:08 -04:00
case "${host_os}" in
mingw32*)
# MinGW32 understands 'long long', but uses printf from WIN32 CRT
INT64_FORMAT='"%I64d"'
;;
*)
INT64_FORMAT='"%lld"'
;;
esac
2007-06-25 11:38:21 -04:00
fi
2011-04-02 16:54:08 -04:00
2007-06-25 11:38:21 -04:00
AC_MSG_RESULT($INT64_T)
AC_DEFINE_UNQUOTED(TIFF_INT64_T,$INT64_T,[Signed 64-bit type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_INT64_FORMAT,$INT64_FORMAT,[Signed 64-bit type formatter])
2007-06-25 11:38:21 -04:00
AC_MSG_CHECKING(for unsigned 64-bit type)
UINT64_T='none'
2008-12-31 18:48:01 -05:00
UINT64_FORMAT='none'
2007-06-25 11:38:21 -04:00
if test $ac_cv_sizeof_unsigned_long -eq 8
then
UINT64_T='unsigned long'
2008-12-31 18:48:01 -05:00
UINT64_FORMAT='"%lu"'
2007-06-25 11:38:21 -04:00
elif test $ac_cv_sizeof_unsigned_long_long -eq 8
then
UINT64_T='unsigned long long'
2011-04-02 16:54:08 -04:00
case "${host_os}" in
mingw32*)
# MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT
UINT64_FORMAT='"%I64u"'
;;
*)
UINT64_FORMAT='"%llu"'
;;
esac
2007-06-25 11:38:21 -04:00
fi
AC_MSG_RESULT($UINT64_T)
AC_DEFINE_UNQUOTED(TIFF_UINT64_T,$UINT64_T,[Unsigned 64-bit type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_UINT64_FORMAT,$UINT64_FORMAT,[Unsigned 64-bit type formatter])
2007-06-25 11:38:21 -04:00
2007-06-26 18:52:05 -04:00
# Determine TIFF equivalent of ssize_t
AC_MSG_CHECKING(for signed size type)
SSIZE_T='unknown'
2008-12-31 18:48:01 -05:00
SSIZE_FORMAT='unknown'
2007-06-26 18:52:05 -04:00
if test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long'
2008-12-31 18:48:01 -05:00
SSIZE_FORMAT='"%ld"'
2007-06-26 18:52:05 -04:00
elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long long'
2008-12-31 18:48:01 -05:00
SSIZE_FORMAT='"%lld"'
2007-06-26 18:52:05 -04:00
fi
AC_MSG_RESULT($SSIZE_T)
AC_DEFINE_UNQUOTED(TIFF_SSIZE_T,$SSIZE_T,[Signed size type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_SSIZE_FORMAT,$SSIZE_FORMAT,[Signed size type formatter])
2007-06-26 18:52:05 -04:00
2007-06-26 16:05:33 -04:00
# Determine the type to use for the difference between two pointers.
# We will default to the POSIX ptrdiff_t if it is available, but will
# be prepared for the case when it is not.
PTRDIFF_T='unknown'
2008-12-31 18:48:01 -05:00
PTRDIFF_FORMAT='"%ld"'
2007-06-26 16:05:33 -04:00
AC_CHECK_TYPE(ptrdiff_t,[PTRDIFF_T=ptrdiff_t])
if test $PTRDIFF_T = unknown
then
2007-06-26 18:52:05 -04:00
PTRDIFF_T=$SSIZE_T
2008-12-31 18:48:01 -05:00
PTRDIFF_FORMAT=$SSIZE_FORMAT
2007-06-26 16:05:33 -04:00
fi
AC_MSG_CHECKING(for pointer difference type)
AC_MSG_RESULT($PTRDIFF_T)
AC_DEFINE_UNQUOTED(TIFF_PTRDIFF_T,$PTRDIFF_T,[Pointer difference type])
2008-12-31 18:48:01 -05:00
AC_DEFINE_UNQUOTED(TIFF_PTRDIFF_FORMAT,$PTRDIFF_FORMAT,[Pointer difference type formatter])
2007-06-26 16:05:33 -04:00
2004-04-25 14:00:11 -04:00
dnl Some compilers (IBM VisualAge) has these types defined, so check it here:
2004-06-05 05:02:19 -04:00
AC_CHECK_TYPES([int8, int16, int32],,,
[
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
])
2004-03-19 12:26:21 -05:00
dnl Checks for library functions.
2007-06-25 11:38:21 -04:00
AC_CHECK_FUNCS([floor isascii memmove memset mmap pow setmode sqrt strchr strrchr strstr strtol strtoull])
2004-03-19 12:26:21 -05:00
2004-04-08 10:29:48 -04:00
dnl Will use local replacements for unavailable functions
AC_REPLACE_FUNCS(getopt)
AC_REPLACE_FUNCS(strcasecmp)
AC_REPLACE_FUNCS(strtoul)
2007-06-25 11:38:21 -04:00
AC_REPLACE_FUNCS(strtoull)
2005-07-07 12:42:40 -04:00
AC_REPLACE_FUNCS(lfind)
2004-04-08 10:29:48 -04:00
2004-04-16 04:12:54 -04:00
dnl ---------------------------------------------------------------------------
2004-04-20 10:21:06 -04:00
dnl Check the native cpu bit order.
2004-04-16 04:12:54 -04:00
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING([native cpu bit order])
2011-04-09 11:43:03 -04:00
case "$host_cpu" in
2009-10-07 16:15:26 -04:00
i*86*|x86_64*)
2004-04-20 07:04:14 -04:00
HOST_FILLORDER=FILLORDER_LSB2MSB
2004-04-16 04:12:54 -04:00
AC_MSG_RESULT([lsb2msb])
;;
*)
HOST_FILLORDER=FILLORDER_MSB2LSB
AC_MSG_RESULT([msb2lsb])
;;
esac
2004-09-11 16:44:41 -04:00
AC_DEFINE_UNQUOTED(HOST_FILLORDER, $HOST_FILLORDER, [Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB)])
dnl ---------------------------------------------------------------------------
dnl Configure legacy tifconf.h HOST_BIGENDIAN.
dnl ---------------------------------------------------------------------------
if test "$ac_cv_c_bigendian" = yes ; then
HOST_BIGENDIAN=1
else
HOST_BIGENDIAN=0
fi
AC_DEFINE_UNQUOTED(HOST_BIGENDIAN,$HOST_BIGENDIAN,[Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel)])
2004-04-16 04:12:54 -04:00
2004-09-02 10:11:35 -04:00
dnl ---------------------------------------------------------------------------
dnl Make the POSIX.2 features available.
dnl ---------------------------------------------------------------------------
2004-09-11 16:44:41 -04:00
#_POSIX_C_SOURCE=2
#AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, $_POSIX_C_SOURCE, [Define this macro to a positive integer to control which POSIX functionality is made available.])
2004-09-02 10:11:35 -04:00
2004-04-20 10:21:06 -04:00
dnl ---------------------------------------------------------------------------
dnl Set the floating point format.
dnl FIXME: write appropriate test.
dnl ---------------------------------------------------------------------------
HAVE_IEEEFP=1
AC_DEFINE_UNQUOTED(HAVE_IEEEFP, $HAVE_IEEEFP, [Define as 0 or 1 according to the floating point format suported by the machine])
2004-04-16 04:12:54 -04:00
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
dnl Enable run-time paths to libraries usage.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(rpath,
AS_HELP_STRING([--enable-rpath],
[Enable runtime linker paths (-R libtool option)]),
[HAVE_RPATH=$enableval], [HAVE_RPATH=no])
2005-03-22 05:33:04 -05:00
AM_CONDITIONAL(HAVE_RPATH, test "$HAVE_RPATH" = "yes")
2004-10-27 08:43:40 -04:00
dnl ---------------------------------------------------------------------------
dnl Support large files.
2004-04-16 04:12:54 -04:00
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
AC_SYS_LARGEFILE
2005-01-15 12:24:52 -05:00
dnl ---------------------------------------------------------------------------
dnl Point to path where we should install documentation.
dnl ---------------------------------------------------------------------------
2005-01-30 07:08:03 -05:00
LIBTIFF_DOCDIR=\${prefix}/share/doc/${PACKAGE}-${LIBTIFF_VERSION}
2005-01-15 12:24:52 -05:00
AC_ARG_WITH(docdir,
AS_HELP_STRING([--with-docdir=DIR],
[directory where documentation should be installed]),,)
if test "x$with_docdir" != "x" ; then
LIBTIFF_DOCDIR=$with_docdir
fi
AC_SUBST(LIBTIFF_DOCDIR)
2004-10-27 08:43:40 -04:00
dnl ---------------------------------------------------------------------------
dnl Switch on/off internal codecs.
dnl ---------------------------------------------------------------------------
2004-04-16 04:12:54 -04:00
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(ccitt,
AS_HELP_STRING([--disable-ccitt],
[disable support for CCITT Group 3 & 4 algorithms]),
[HAVE_CCITT=$enableval], [HAVE_CCITT=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_CCITT" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(CCITT_SUPPORT,1,[Support CCITT Group 3 & 4 algorithms])
2004-04-16 04:12:54 -04:00
fi
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(packbits,
AS_HELP_STRING([--disable-packbits],
[disable support for Macintosh PackBits algorithm]),
[HAVE_PACKBITS=$enableval], [HAVE_PACKBITS=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_PACKBITS" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(PACKBITS_SUPPORT,1,[Support Macintosh PackBits algorithm])
2004-04-16 04:12:54 -04:00
fi
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(lzw,
AS_HELP_STRING([--disable-lzw],
[disable support for LZW algorithm]),
[HAVE_LZW=$enableval], [HAVE_LZW=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_LZW" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(LZW_SUPPORT,1,[Support LZW algorithm])
2004-04-16 04:12:54 -04:00
fi
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(thunder,
AS_HELP_STRING([--disable-thunder],
[disable support for ThunderScan 4-bit RLE algorithm]),
[HAVE_THUNDER=$enableval], [HAVE_THUNDER=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_THUNDER" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(THUNDER_SUPPORT,1,[Support ThunderScan 4-bit RLE algorithm])
2004-04-16 04:12:54 -04:00
fi
HAVE_NEXT=yes
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(next,
AS_HELP_STRING([--disable-next],
[disable support for NeXT 2-bit RLE algorithm]),
[HAVE_NEXT=$enableval], [HAVE_NEXT=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_NEXT" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(NEXT_SUPPORT,1,[Support NeXT 2-bit RLE algorithm])
2004-04-16 04:12:54 -04:00
fi
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(logluv,
AS_HELP_STRING([--disable-logluv],
[disable support for LogLuv high dynamic range encoding]),
[HAVE_LOGLUV=$enableval], [HAVE_LOGLUV=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_LOGLUV" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(LOGLUV_SUPPORT,1,[Support LogLuv high dynamic range encoding])
2004-04-16 04:12:54 -04:00
fi
2005-11-20 22:35:05 -05:00
dnl ---------------------------------------------------------------------------
dnl Switch on/off support for Microsoft Document Imaging
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(mdi,
AS_HELP_STRING([--disable-mdi],
[disable support for Microsoft Document Imaging]),
[HAVE_MDI=$enableval], [HAVE_MDI=yes])
if test "$HAVE_MDI" = "yes" ; then
AC_DEFINE(MDI_SUPPORT,1,[Support Microsoft Document Imaging format])
fi
2004-03-29 06:28:16 -05:00
dnl ---------------------------------------------------------------------------
dnl Check for ZLIB.
dnl ---------------------------------------------------------------------------
HAVE_ZLIB=no
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(zlib,
AS_HELP_STRING([--disable-zlib],
[disable Zlib usage (required for Deflate compression, enabled by default)]),,)
AC_ARG_WITH(zlib-include-dir,
AS_HELP_STRING([--with-zlib-include-dir=DIR],
[location of Zlib headers]),,)
AC_ARG_WITH(zlib-lib-dir,
AS_HELP_STRING([--with-zlib-lib-dir=DIR],
[location of Zlib library binary]),,)
2004-03-29 06:28:16 -05:00
if test "x$enable_zlib" != "xno" ; then
2004-04-08 10:29:48 -04:00
if test "x$with_zlib_lib_dir" != "x" ; then
2004-10-27 08:43:40 -04:00
LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
2004-04-08 10:29:48 -04:00
fi
2004-10-27 08:43:40 -04:00
2004-04-08 10:29:48 -04:00
AC_CHECK_LIB(z, inflateEnd, [zlib_lib=yes], [zlib_lib=no],)
if test "$zlib_lib" = "no" -a "x$with_zlib_lib_dir" != "x"; then
AC_MSG_ERROR([Zlib library not found at $with_zlib_lib_dir])
2004-03-29 06:28:16 -05:00
fi
2004-04-08 10:29:48 -04:00
if test "x$with_zlib_include_dir" != "x" ; then
2004-08-11 15:19:34 -04:00
CPPFLAGS="-I$with_zlib_include_dir $CPPFLAGS"
2004-04-08 10:29:48 -04:00
fi
AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no])
if test "$zlib_h" = "no" -a "x$with_zlib_include_dir" != "x" ; then
AC_MSG_ERROR([Zlib headers not found at $with_zlib_include_dir])
2004-03-29 06:28:16 -05:00
fi
if test "$zlib_lib" = "yes" -a "$zlib_h" = "yes" ; then
HAVE_ZLIB=yes
fi
fi
if test "$HAVE_ZLIB" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(ZIP_SUPPORT,1,[Support Deflate compression])
2004-03-29 06:28:16 -05:00
LIBS="-lz $LIBS"
2010-11-27 15:54:51 -05:00
tiff_libs_private="-lz ${tiff_libs_private}"
2005-03-22 05:33:04 -05:00
2005-07-04 08:39:54 -04:00
if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then
2005-03-22 05:33:04 -05:00
LIBDIR="-R $with_zlib_lib_dir $LIBDIR"
fi
2004-03-29 06:28:16 -05:00
fi
2004-04-16 04:12:54 -04:00
dnl ---------------------------------------------------------------------------
dnl Check for Pixar log-format algorithm.
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(pixarlog,
AS_HELP_STRING([--disable-pixarlog],
[disable support for Pixar log-format algorithm (requires Zlib)]),
[HAVE_PIXARLOG=$enableval], [HAVE_PIXARLOG=yes])
2004-04-16 04:12:54 -04:00
if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then
2004-10-27 08:43:40 -04:00
AC_DEFINE(PIXARLOG_SUPPORT, 1,
[Support Pixar log-format algorithm (requires Zlib)])
2004-05-26 05:20:56 -04:00
else
HAVE_PIXARLOG=no
2004-04-16 04:12:54 -04:00
fi
2004-03-29 06:28:16 -05:00
dnl ---------------------------------------------------------------------------
dnl Check for JPEG.
dnl ---------------------------------------------------------------------------
HAVE_JPEG=no
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(jpeg,
AS_HELP_STRING([--disable-jpeg],
[disable IJG JPEG library usage (required for JPEG compression, enabled by default)]),,)
AC_ARG_WITH(jpeg-include-dir,
AS_HELP_STRING([--with-jpeg-include-dir=DIR],
[location of IJG JPEG library headers]),,)
AC_ARG_WITH(jpeg-lib-dir,
AS_HELP_STRING([--with-jpeg-lib-dir=DIR],
[location of IJG JPEG library binary]),,)
2004-03-29 06:28:16 -05:00
if test "x$enable_jpeg" != "xno" ; then
2004-04-08 10:29:48 -04:00
if test "x$with_jpeg_lib_dir" != "x" ; then
2004-10-27 08:43:40 -04:00
LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
2004-04-08 10:29:48 -04:00
fi
2004-10-27 08:43:40 -04:00
2004-04-08 10:29:48 -04:00
AC_CHECK_LIB(jpeg, jpeg_read_scanlines, [jpeg_lib=yes], [jpeg_lib=no],)
if test "$jpeg_lib" = "no" -a "x$with_jpeg_lib_dir" != "x" ; then
AC_MSG_ERROR([IJG JPEG library not found at $with_jpeg_lib_dir])
2004-03-29 06:28:16 -05:00
fi
2004-04-08 10:29:48 -04:00
if test "x$with_jpeg_include_dir" != "x" ; then
2004-08-11 15:19:34 -04:00
CPPFLAGS="-I$with_jpeg_include_dir $CPPFLAGS"
2004-04-08 10:29:48 -04:00
fi
AC_CHECK_HEADER(jpeglib.h, [jpeg_h=yes], [jpeg_h=no])
if test "$jpeg_h" = "no" -a "x$with_jpeg_include_dir" != "x" ; then
AC_MSG_ERROR([IJG JPEG library headers not found at $with_jpeg_include_dir])
2004-03-29 06:28:16 -05:00
fi
if test "$jpeg_lib" = "yes" -a "$jpeg_h" = "yes" ; then
HAVE_JPEG=yes
fi
fi
if test "$HAVE_JPEG" = "yes" ; then
2004-09-11 16:44:41 -04:00
AC_DEFINE(JPEG_SUPPORT,1,[Support JPEG compression (requires IJG JPEG library)])
2004-03-29 06:28:16 -05:00
LIBS="-ljpeg $LIBS"
2010-11-27 15:54:51 -05:00
tiff_libs_private="-ljpeg ${tiff_libs_private}"
2005-03-22 05:33:04 -05:00
2005-07-04 08:39:54 -04:00
if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then
2005-03-22 05:33:04 -05:00
LIBDIR="-R $with_jpeg_lib_dir $LIBDIR"
fi
2004-03-29 06:28:16 -05:00
fi
dnl ---------------------------------------------------------------------------
dnl Check for Old JPEG.
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(old-jpeg,
2006-06-07 11:40:44 -04:00
AS_HELP_STRING([--disable-old-jpeg],
[disable support for Old JPEG compresson (read-only, enabled by default)]),
2006-06-07 12:09:07 -04:00
[HAVE_OJPEG=${enableval}], [HAVE_OJPEG=yes])
2004-03-29 06:28:16 -05:00
if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
2004-10-27 08:43:40 -04:00
AC_DEFINE(OJPEG_SUPPORT, 1,
2006-06-07 11:40:44 -04:00
[Support Old JPEG compresson (read-only)])
2004-05-26 05:20:56 -04:00
else
HAVE_OJPEG=no
2004-03-29 06:28:16 -05:00
fi
2006-06-07 11:40:44 -04:00
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"
2010-11-27 15:54:51 -05:00
tiff_libs_private="-ljbig ${tiff_libs_private}"
2006-06-07 11:40:44 -04:00
if test "$HAVE_RPATH" = "yes" -a "x$with_jbig_lib_dir" != "x" ; then
LIBDIR="-R $with_jbig_lib_dir $LIBDIR"
fi
2006-07-04 15:01:47 -04:00
# Older versions of jbigkit lack jbg_newlen
AC_CHECK_FUNCS([jbg_newlen])
2006-06-07 11:40:44 -04:00
fi
2010-12-14 07:52:59 -05:00
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"
2011-12-22 12:03:48 -05:00
tiff_libs_private="-llzma ${tiff_libs_private}"
2010-12-14 07:52:59 -05:00
if test "$HAVE_RPATH" = "yes" -a "x$with_lzma_lib_dir" != "x" ; then
LIBDIR="-R $with_lzma_lib_dir $LIBDIR"
fi
fi
2009-06-21 14:49:38 -04:00
dnl ---------------------------------------------------------------------------
dnl Should 8/12 bit jpeg mode be enabled?
dnl ---------------------------------------------------------------------------
HAVE_JPEG12=no
AC_ARG_ENABLE(jpeg12,
AS_HELP_STRING([--enable-jpeg12],
[enable libjpeg 8/12bit dual mode]),,)
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
2004-11-12 07:52:16 -05:00
dnl ---------------------------------------------------------------------------
dnl Check for C++.
dnl ---------------------------------------------------------------------------
2005-01-05 15:38:18 -05:00
AC_ARG_ENABLE(cxx,
AS_HELP_STRING([--enable-cxx],
2004-11-12 07:52:16 -05:00
[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")
2004-03-29 06:28:16 -05:00
dnl ---------------------------------------------------------------------------
2004-03-30 05:12:35 -05:00
dnl Check for OpenGL and GLUT.
dnl ---------------------------------------------------------------------------
HAVE_OPENGL=no
2012-08-19 12:56:32 -04:00
2004-09-12 05:15:05 -04:00
AC_PATH_XTRA
2004-03-30 05:12:35 -05:00
2012-08-19 12:56:32 -04:00
dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS,
dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect
2004-09-12 05:15:05 -04:00
AX_CHECK_GL
2012-08-19 12:56:32 -04:00
dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS
2004-09-12 05:15:05 -04:00
AX_CHECK_GLU
2012-08-19 12:56:32 -04:00
dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS
2004-09-12 05:15:05 -04:00
AX_CHECK_GLUT
2004-03-30 05:12:35 -05:00
2004-09-12 05:15:05 -04:00
if test "$no_x" != "yes" -a "$no_gl" != "yes" \
-a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then
HAVE_OPENGL=yes
2004-03-30 05:12:35 -05:00
fi
AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes")
2010-12-14 19:37:00 -05:00
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 ---------------------------------------------------------------------------
win32_io_ok=no
case "${host_os}" in
cygwin*)
;;
*)
if test x"$ac_cv_header_windows_h" = xyes; then
win32_io_ok=yes
AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system])
fi
;;
esac
AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes])
2007-02-24 10:03:47 -05:00
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")
2004-04-20 10:21:06 -04:00
dnl ===========================================================================
dnl ``Orthogonal Features''
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl Default handling of strip chopping support.
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
AC_ARG_ENABLE(strip-chopping,
AS_HELP_STRING([--disable-strip-chopping],
2005-10-07 13:27:09 -04:00
[disable support for strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)]),
2004-10-27 08:43:40 -04:00
[HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes])
2005-10-07 13:27:09 -04:00
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]]]),,)
2004-04-20 10:21:06 -04:00
2006-02-07 09:49:40 -05:00
if test "$HAVE_STRIPCHOP" = "yes" \
-a "x$with_default_strip_size" != "xno"; then
2005-10-07 13:27:09 -04:00
AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)])
2006-02-07 09:49:40 -05:00
if test "x$with_default_strip_size" = "x" \
-o "x$with_default_strip_size" = "xyes"; then
2005-10-07 13:27:09 -04:00
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)])
2004-04-20 10:21:06 -04:00
fi
2011-02-18 15:53:04 -05:00
dnl ---------------------------------------------------------------------------
dnl Should we try to defer loading of strip/tile offsets and sizes to
dnl optimize directory scanning? These is an experimental feature for
dnl libtiff 4.0.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(defer-strile-load,
AS_HELP_STRING([--enable-defer-strile-load],
[enable deferred strip/tile offset/size loading (experimental)]),
[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 (experimental)])
fi
2011-02-18 16:54:22 -05:00
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
2011-02-18 17:28:58 -05:00
AC_DEFINE(CHUNKY_STRIP_READ_SUPPORT,1,[enable partial strip reading for large strips (experimental)])
2011-02-18 16:54:22 -05:00
fi
2004-09-11 16:44:41 -04:00
dnl ---------------------------------------------------------------------------
dnl Default subifd support.
dnl ---------------------------------------------------------------------------
AC_DEFINE(SUBIFD_SUPPORT,1,[Enable SubIFD tag (330) support])
2004-04-20 10:21:06 -04:00
dnl ---------------------------------------------------------------------------
dnl Default handling of ASSOCALPHA support.
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
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])
2004-04-20 10:21:06 -04:00
if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then
2004-10-27 08:43:40 -04:00
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.])
2004-04-20 10:21:06 -04:00
fi
dnl ---------------------------------------------------------------------------
dnl Default handling of YCbCr subsampling support.
dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
dnl ---------------------------------------------------------------------------
2004-10-27 08:43:40 -04:00
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])
2004-04-20 10:21:06 -04:00
if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then
2004-10-27 08:43:40 -04:00
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).])
2004-04-20 10:21:06 -04:00
fi
2004-03-30 05:12:35 -05:00
dnl ---------------------------------------------------------------------------
2004-03-26 06:44:45 -05:00
2005-03-22 05:33:04 -05:00
AC_SUBST(LIBDIR)
2004-09-11 16:44:41 -04:00
AC_CONFIG_HEADERS([libtiff/tif_config.h libtiff/tiffconf.h])
2004-06-07 05:04:19 -04:00
2004-03-19 12:26:21 -05:00
AC_CONFIG_FILES([Makefile \
2007-02-24 10:03:47 -05:00
build/Makefile \
2004-03-30 05:12:35 -05:00
contrib/Makefile \
contrib/addtiffo/Makefile \
2004-05-03 12:46:36 -04:00
contrib/dbs/Makefile \
contrib/dbs/xtiff/Makefile \
2004-05-03 14:39:24 -04:00
contrib/iptcutil/Makefile \
contrib/mfs/Makefile \
2004-05-20 06:39:25 -04:00
contrib/pds/Makefile \
contrib/ras/Makefile \
contrib/stream/Makefile \
contrib/tags/Makefile \
contrib/win_dib/Makefile \
2004-03-19 12:26:21 -05:00
html/Makefile \
2004-03-28 07:01:22 -05:00
html/images/Makefile \
html/man/Makefile \
2010-11-27 15:54:51 -05:00
libtiff-4.pc \
2004-03-19 12:26:21 -05:00
libtiff/Makefile \
man/Makefile \
2004-03-29 06:28:16 -05:00
port/Makefile \
2004-08-01 06:35:02 -04:00
test/Makefile \
2004-03-19 12:26:21 -05:00
tools/Makefile])
AC_OUTPUT
2004-04-08 10:29:48 -04:00
dnl ---------------------------------------------------------------------------
dnl Display configuration status
dnl ---------------------------------------------------------------------------
2004-05-02 11:47:02 -04:00
LOC_MSG()
LOC_MSG([Libtiff is now configured for ${host}])
LOC_MSG()
2005-03-22 05:33:04 -05:00
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([ Enable runtime linker paths: ${HAVE_RPATH}])
2012-01-22 14:50:36 -05:00
LOC_MSG([ Enable linker symbol versioning: ${have_ld_version_script}])
2005-11-20 22:35:05 -05:00
LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}])
2010-12-14 19:37:00 -05:00
LOC_MSG([ Use win32 IO: ${win32_io_ok}])
2004-05-02 11:47:02 -04:00
LOC_MSG()
LOC_MSG([ Support for internal codecs:])
2005-03-22 05:33:04 -05:00
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}])
2004-05-02 11:47:02 -04:00
LOC_MSG()
LOC_MSG([ Support for external codecs:])
2005-03-22 05:33:04 -05:00
LOC_MSG([ ZLIB support: ${HAVE_ZLIB}])
LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}])
LOC_MSG([ JPEG support: ${HAVE_JPEG}])
LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}])
2009-06-21 14:49:38 -04:00
LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEG12}])
2006-06-07 11:40:44 -04:00
LOC_MSG([ ISO JBIG support: ${HAVE_JBIG}])
2010-12-14 07:52:59 -05:00
LOC_MSG([ LZMA2 support: ${HAVE_LZMA}])
2004-05-02 11:47:02 -04:00
LOC_MSG()
2005-03-22 05:33:04 -05:00
LOC_MSG([ C++ support: ${HAVE_CXX}])
2004-11-12 07:52:16 -05:00
LOC_MSG()
2007-02-24 10:03:47 -05:00
dnl LOC_MSG([ X Athena Widgets support: ${HAVE_XAW}])
2005-03-22 05:33:04 -05:00
LOC_MSG([ OpenGL support: ${HAVE_OPENGL}])
2004-05-02 11:47:02 -04:00
LOC_MSG()
2004-03-29 06:28:16 -05:00