Add --enable-rpath option to embed linker path into library binary.

This commit is contained in:
Andrey Kiselev 2004-10-27 12:43:40 +00:00
parent 3fcbbf055b
commit 9e8f48c9ab
3 changed files with 212 additions and 138 deletions

View File

@ -1,3 +1,8 @@
2004-10-27 Andrey Kiselev <dron@remotesensing.org>
* configure, configure.ac: Added --enable-rpath option to embed linker
paths into library binary.
2004-10-26 Andrey Kiselev <dron@remotesensing.org>
* tools/tiffset.c: Check the malloc return value (Dmitry V. Levin).

202
configure vendored
View File

@ -1042,6 +1042,7 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-rpath Enable runtime linker paths (-R libtool option)
--disable-largefile omit support for large files
--disable-ccitt disable support for CCITT Group 3 & 4 algorithms
--disable-packbits disable support for Macintosh PackBits algorithm
@ -4779,7 +4780,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4782 "configure"' > conftest.$ac_ext
echo '#line 4783 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6343,7 +6344,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:6346:" \
echo "$as_me:6347:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -7375,11 +7376,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7378: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7379: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7382: \$? = $ac_status" >&5
echo "$as_me:7383: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7608,11 +7609,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7611: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7612: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7615: \$? = $ac_status" >&5
echo "$as_me:7616: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7668,11 +7669,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7671: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7672: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7675: \$? = $ac_status" >&5
echo "$as_me:7676: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -9856,7 +9857,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9859 "configure"
#line 9860 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9954,7 +9955,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9957 "configure"
#line 9958 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12131,11 +12132,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12134: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12135: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12138: \$? = $ac_status" >&5
echo "$as_me:12139: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -12191,11 +12192,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12194: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12195: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12198: \$? = $ac_status" >&5
echo "$as_me:12199: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -13560,7 +13561,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 13563 "configure"
#line 13564 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13658,7 +13659,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 13661 "configure"
#line 13662 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -14485,11 +14486,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14488: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14489: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14492: \$? = $ac_status" >&5
echo "$as_me:14493: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -14545,11 +14546,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14548: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14549: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14552: \$? = $ac_status" >&5
echo "$as_me:14553: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -16590,11 +16591,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16593: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16594: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16597: \$? = $ac_status" >&5
echo "$as_me:16598: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -16823,11 +16824,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16826: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16827: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16830: \$? = $ac_status" >&5
echo "$as_me:16831: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -16883,11 +16884,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16886: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16887: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16890: \$? = $ac_status" >&5
echo "$as_me:16891: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -19071,7 +19072,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 19074 "configure"
#line 19075 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -19169,7 +19170,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 19172 "configure"
#line 19173 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -22604,6 +22605,57 @@ done
echo "$as_me:$LINENO: checking native cpu bit order" >&5
echo $ECHO_N "checking native cpu bit order... $ECHO_C" >&6
case "$target_cpu" in
i*86*)
HOST_FILLORDER=FILLORDER_LSB2MSB
echo "$as_me:$LINENO: result: lsb2msb" >&5
echo "${ECHO_T}lsb2msb" >&6
;;
*)
HOST_FILLORDER=FILLORDER_MSB2LSB
echo "$as_me:$LINENO: result: msb2lsb" >&5
echo "${ECHO_T}msb2lsb" >&6
;;
esac
cat >>confdefs.h <<_ACEOF
#define HOST_FILLORDER $HOST_FILLORDER
_ACEOF
if test "$ac_cv_c_bigendian" = yes ; then
HOST_BIGENDIAN=1
else
HOST_BIGENDIAN=0
fi
cat >>confdefs.h <<_ACEOF
#define HOST_BIGENDIAN $HOST_BIGENDIAN
_ACEOF
#_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.])
HAVE_IEEEFP=1
cat >>confdefs.h <<_ACEOF
#define HAVE_IEEEFP $HAVE_IEEEFP
_ACEOF
# Check whether --enable-rpath or --disable-rpath was given.
if test "${enable_rpath+set}" = set; then
enableval="$enable_rpath"
HAVE_RPATH=$enableval
else
HAVE_RPATH=no
fi;
# Check whether --enable-largefile or --disable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval="$enable_largefile"
@ -22963,54 +23015,11 @@ rm -f conftest*
fi
echo "$as_me:$LINENO: checking native cpu bit order" >&5
echo $ECHO_N "checking native cpu bit order... $ECHO_C" >&6
case "$target_cpu" in
i*86*)
HOST_FILLORDER=FILLORDER_LSB2MSB
echo "$as_me:$LINENO: result: lsb2msb" >&5
echo "${ECHO_T}lsb2msb" >&6
;;
*)
HOST_FILLORDER=FILLORDER_MSB2LSB
echo "$as_me:$LINENO: result: msb2lsb" >&5
echo "${ECHO_T}msb2lsb" >&6
;;
esac
cat >>confdefs.h <<_ACEOF
#define HOST_FILLORDER $HOST_FILLORDER
_ACEOF
if test "$ac_cv_c_bigendian" = yes ; then
HOST_BIGENDIAN=1
else
HOST_BIGENDIAN=0
fi
cat >>confdefs.h <<_ACEOF
#define HOST_BIGENDIAN $HOST_BIGENDIAN
_ACEOF
#_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.])
HAVE_IEEEFP=1
cat >>confdefs.h <<_ACEOF
#define HAVE_IEEEFP $HAVE_IEEEFP
_ACEOF
HAVE_CCITT=yes
# Check whether --enable-ccitt or --disable-ccitt was given.
if test "${enable_ccitt+set}" = set; then
enableval="$enable_ccitt"
HAVE_CCITT=no
HAVE_CCITT=$enableval
else
HAVE_CCITT=yes
fi;
@ -23023,12 +23032,10 @@ _ACEOF
fi
HAVE_PACKBITS=yes
# Check whether --enable-packbits or --disable-packbits was given.
if test "${enable_packbits+set}" = set; then
enableval="$enable_packbits"
HAVE_PACKBITS=no
HAVE_PACKBITS=$enableval
else
HAVE_PACKBITS=yes
fi;
@ -23041,12 +23048,10 @@ _ACEOF
fi
HAVE_LZW=yes
# Check whether --enable-lzw or --disable-lzw was given.
if test "${enable_lzw+set}" = set; then
enableval="$enable_lzw"
HAVE_LZW=no
HAVE_LZW=$enableval
else
HAVE_LZW=yes
fi;
@ -23059,12 +23064,10 @@ _ACEOF
fi
HAVE_THUNDER=yes
# Check whether --enable-thunder or --disable-thunder was given.
if test "${enable_thunder+set}" = set; then
enableval="$enable_thunder"
HAVE_THUNDER=no
HAVE_THUNDER=$enableval
else
HAVE_THUNDER=yes
fi;
@ -23082,7 +23085,7 @@ HAVE_NEXT=yes
# Check whether --enable-next or --disable-next was given.
if test "${enable_next+set}" = set; then
enableval="$enable_next"
HAVE_NEXT=no
HAVE_NEXT=$enableval
else
HAVE_NEXT=yes
fi;
@ -23095,12 +23098,10 @@ _ACEOF
fi
HAVE_LOGLUV=yes
# Check whether --enable-logluv or --disable-logluv was given.
if test "${enable_logluv+set}" = set; then
enableval="$enable_logluv"
HAVE_LOGLUV=no
HAVE_LOGLUV=$enableval
else
HAVE_LOGLUV=yes
fi;
@ -23137,8 +23138,14 @@ fi;
if test "x$enable_zlib" != "xno" ; then
if test "x$with_zlib_lib_dir" != "x" ; then
LIBS="-L$with_zlib_lib_dir $LIBS"
LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
if test "$HAVE_RPATH" = "yes"; then
LDFLAGS="-R$with_zlib_lib_dir $LDFLAGS"
fi
fi
echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
@ -23385,7 +23392,7 @@ fi
# Check whether --enable-pixarlog or --disable-pixarlog was given.
if test "${enable_pixarlog+set}" = set; then
enableval="$enable_pixarlog"
HAVE_PIXARLOG=no
HAVE_PIXARLOG=$enableval
else
HAVE_PIXARLOG=yes
fi;
@ -23424,8 +23431,14 @@ fi;
if test "x$enable_jpeg" != "xno" ; then
if test "x$with_jpeg_lib_dir" != "x" ; then
LIBS="-L$with_jpeg_lib_dir $LIBS"
LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
if test "$HAVE_RPATH" = "yes"; then
LDFLAGS="-R$with_jpeg_lib_dir $LDFLAGS"
fi
fi
echo "$as_me:$LINENO: checking for jpeg_read_scanlines in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_read_scanlines in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_read_scanlines+set}" = set; then
@ -26068,12 +26081,10 @@ fi
HAVE_STRIPCHOP=yes
# Check whether --enable-strip-chopping or --disable-strip-chopping was given.
if test "${enable_strip_chopping+set}" = set; then
enableval="$enable_strip_chopping"
HAVE_STRIPCHOP=no
HAVE_STRIPCHOP=$enableval
else
HAVE_STRIPCHOP=yes
fi;
@ -26093,12 +26104,10 @@ _ACEOF
HAVE_EXTRASAMPLE_AS_ALPHA=yes
# Check whether --enable-extrasample-as-alpha or --disable-extrasample-as-alpha was given.
if test "${enable_extrasample_as_alpha+set}" = set; then
enableval="$enable_extrasample_as_alpha"
HAVE_EXTRASAMPLE_AS_ALPHA=no
HAVE_EXTRASAMPLE_AS_ALPHA=$enableval
else
HAVE_EXTRASAMPLE_AS_ALPHA=yes
fi;
@ -26112,12 +26121,10 @@ _ACEOF
fi
CHECK_JPEG_YCBCR_SUBSAMPLING=yes
# Check whether --enable-check-ycbcr-subsampling or --disable-check-ycbcr-subsampling was given.
if test "${enable_check_ycbcr_subsampling+set}" = set; then
enableval="$enable_check_ycbcr_subsampling"
CHECK_JPEG_YCBCR_SUBSAMPLING=no
CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval
else
CHECK_JPEG_YCBCR_SUBSAMPLING=yes
fi;
@ -27644,6 +27651,7 @@ echo "Libtiff is now configured for ${host}"
echo ""
echo " Installation directory: ${prefix}"
echo " C compiler: ${CC} ${CFLAGS}"
echo " Enable runtime linker paths: ${HAVE_RPATH}"
echo ""
echo " Support for internal codecs:"
echo " CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}"

View File

@ -104,8 +104,6 @@ AC_REPLACE_FUNCS(getopt)
AC_REPLACE_FUNCS(strcasecmp)
AC_REPLACE_FUNCS(strtoul)
AC_SYS_LARGEFILE
dnl ---------------------------------------------------------------------------
dnl Check the native cpu bit order.
dnl ---------------------------------------------------------------------------
@ -145,37 +143,56 @@ 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])
dnl ---------------------------------------------------------------------------
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])
dnl ---------------------------------------------------------------------------
dnl Support large files.
dnl ---------------------------------------------------------------------------
AC_SYS_LARGEFILE
dnl ---------------------------------------------------------------------------
dnl Switch on/off internal codecs.
dnl ---------------------------------------------------------------------------
HAVE_CCITT=yes
AC_ARG_ENABLE(ccitt, AS_HELP_STRING([--disable-ccitt], [disable support for CCITT Group 3 & 4 algorithms]), [HAVE_CCITT=no], [HAVE_CCITT=yes])
AC_ARG_ENABLE(ccitt,
AS_HELP_STRING([--disable-ccitt],
[disable support for CCITT Group 3 & 4 algorithms]),
[HAVE_CCITT=$enableval], [HAVE_CCITT=yes])
if test "$HAVE_CCITT" = "yes" ; then
AC_DEFINE(CCITT_SUPPORT,1,[Support CCITT Group 3 & 4 algorithms])
fi
HAVE_PACKBITS=yes
AC_ARG_ENABLE(packbits, AS_HELP_STRING([--disable-packbits], [disable support for Macintosh PackBits algorithm]), [HAVE_PACKBITS=no], [HAVE_PACKBITS=yes])
AC_ARG_ENABLE(packbits,
AS_HELP_STRING([--disable-packbits],
[disable support for Macintosh PackBits algorithm]),
[HAVE_PACKBITS=$enableval], [HAVE_PACKBITS=yes])
if test "$HAVE_PACKBITS" = "yes" ; then
AC_DEFINE(PACKBITS_SUPPORT,1,[Support Macintosh PackBits algorithm])
fi
HAVE_LZW=yes
AC_ARG_ENABLE(lzw, AS_HELP_STRING([--disable-lzw], [disable support for LZW algorithm]), [HAVE_LZW=no], [HAVE_LZW=yes])
AC_ARG_ENABLE(lzw,
AS_HELP_STRING([--disable-lzw],
[disable support for LZW algorithm]),
[HAVE_LZW=$enableval], [HAVE_LZW=yes])
if test "$HAVE_LZW" = "yes" ; then
AC_DEFINE(LZW_SUPPORT,1,[Support LZW algorithm])
fi
HAVE_THUNDER=yes
AC_ARG_ENABLE(thunder, AS_HELP_STRING([--disable-thunder], [disable support for ThunderScan 4-bit RLE algorithm]), [HAVE_THUNDER=no], [HAVE_THUNDER=yes])
AC_ARG_ENABLE(thunder,
AS_HELP_STRING([--disable-thunder],
[disable support for ThunderScan 4-bit RLE algorithm]),
[HAVE_THUNDER=$enableval], [HAVE_THUNDER=yes])
if test "$HAVE_THUNDER" = "yes" ; then
AC_DEFINE(THUNDER_SUPPORT,1,[Support ThunderScan 4-bit RLE algorithm])
@ -183,15 +200,19 @@ fi
HAVE_NEXT=yes
AC_ARG_ENABLE(next, AS_HELP_STRING([--disable-next], [disable support for NeXT 2-bit RLE algorithm]), [HAVE_NEXT=no], [HAVE_NEXT=yes])
AC_ARG_ENABLE(next,
AS_HELP_STRING([--disable-next],
[disable support for NeXT 2-bit RLE algorithm]),
[HAVE_NEXT=$enableval], [HAVE_NEXT=yes])
if test "$HAVE_NEXT" = "yes" ; then
AC_DEFINE(NEXT_SUPPORT,1,[Support NeXT 2-bit RLE algorithm])
fi
HAVE_LOGLUV=yes
AC_ARG_ENABLE(logluv, AS_HELP_STRING([--disable-logluv], [disable support for LogLuv high dynamic range encoding]), [HAVE_LOGLUV=no], [HAVE_LOGLUV=yes])
AC_ARG_ENABLE(logluv,
AS_HELP_STRING([--disable-logluv],
[disable support for LogLuv high dynamic range encoding]),
[HAVE_LOGLUV=$enableval], [HAVE_LOGLUV=yes])
if test "$HAVE_LOGLUV" = "yes" ; then
AC_DEFINE(LOGLUV_SUPPORT,1,[Support LogLuv high dynamic range encoding])
@ -203,15 +224,27 @@ dnl ---------------------------------------------------------------------------
HAVE_ZLIB=no
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]),,)
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]),,)
if test "x$enable_zlib" != "xno" ; then
if test "x$with_zlib_lib_dir" != "x" ; then
LIBS="-L$with_zlib_lib_dir $LIBS"
LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
if test "$HAVE_RPATH" = "yes"; then
LDFLAGS="-R$with_zlib_lib_dir $LDFLAGS"
fi
fi
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])
@ -240,10 +273,14 @@ dnl ---------------------------------------------------------------------------
dnl Check for Pixar log-format algorithm.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(pixarlog, AS_HELP_STRING([--disable-pixarlog], [disable support for Pixar log-format algorithm (requires Zlib)]), [HAVE_PIXARLOG=no], [HAVE_PIXARLOG=yes])
AC_ARG_ENABLE(pixarlog,
AS_HELP_STRING([--disable-pixarlog],
[disable support for Pixar log-format algorithm (requires Zlib)]),
[HAVE_PIXARLOG=$enableval], [HAVE_PIXARLOG=yes])
if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then
AC_DEFINE(PIXARLOG_SUPPORT,1,[Support Pixar log-format algorithm (requires Zlib)])
AC_DEFINE(PIXARLOG_SUPPORT, 1,
[Support Pixar log-format algorithm (requires Zlib)])
else
HAVE_PIXARLOG=no
fi
@ -254,15 +291,27 @@ dnl ---------------------------------------------------------------------------
HAVE_JPEG=no
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]),,)
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]),,)
if test "x$enable_jpeg" != "xno" ; then
if test "x$with_jpeg_lib_dir" != "x" ; then
LIBS="-L$with_jpeg_lib_dir $LIBS"
LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
if test "$HAVE_RPATH" = "yes"; then
LDFLAGS="-R$with_jpeg_lib_dir $LDFLAGS"
fi
fi
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])
@ -291,10 +340,14 @@ dnl ---------------------------------------------------------------------------
dnl Check for Old JPEG.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(old-jpeg, AS_HELP_STRING([--enable-old-jpeg], [enable support for Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)]), [HAVE_OJPEG=$enableval], [HAVE_OJPEG=no])
AC_ARG_ENABLE(old-jpeg,
AS_HELP_STRING([--enable-old-jpeg],
[enable support for Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)]),
[HAVE_OJPEG=$enableval], [HAVE_OJPEG=no])
if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
AC_DEFINE(OJPEG_SUPPORT,1,[Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)])
AC_DEFINE(OJPEG_SUPPORT, 1,
[Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)])
else
HAVE_OJPEG=no
fi
@ -326,9 +379,10 @@ dnl ---------------------------------------------------------------------------
dnl Default handling of strip chopping support.
dnl ---------------------------------------------------------------------------
HAVE_STRIPCHOP=yes
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 mutiple strips of ~8Kb to reduce memory usage)]), [HAVE_STRIPCHOP=no], [HAVE_STRIPCHOP=yes])
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 mutiple strips of ~8Kb to reduce memory usage)]),
[HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes])
if test "$HAVE_STRIPCHOP" = "yes" ; then
AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of ~8Kb to reduce memory usage)])
@ -343,12 +397,15 @@ dnl ---------------------------------------------------------------------------
dnl Default handling of ASSOCALPHA support.
dnl ---------------------------------------------------------------------------
HAVE_EXTRASAMPLE_AS_ALPHA=yes
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=no], [HAVE_EXTRASAMPLE_AS_ALPHA=yes])
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.])
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 ---------------------------------------------------------------------------
@ -356,12 +413,15 @@ dnl Default handling of YCbCr subsampling support.
dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
dnl ---------------------------------------------------------------------------
CHECK_JPEG_YCBCR_SUBSAMPLING=yes
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=no], [CHECK_JPEG_YCBCR_SUBSAMPLING=yes])
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).])
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
dnl ---------------------------------------------------------------------------
@ -403,6 +463,7 @@ LOC_MSG([Libtiff is now configured for ${host}])
LOC_MSG()
LOC_MSG([ Installation directory: ${prefix}])
LOC_MSG([ C compiler: ${CC} ${CFLAGS}])
LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}])
LOC_MSG()
LOC_MSG([ Support for internal codecs:])
LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}])