summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbfriesen <bfriesen>2015-06-21 18:46:29 +0000
committerbfriesen <bfriesen>2015-06-21 18:46:29 +0000
commit8af53c421f17aea1e1f72dd5da6dc4fc4ffcba4b (patch)
tree77f26044556e438c4b8f4fb2c4ac1ca3750fe660
parent2a4f5b125a262c3c66db426ff2cb44e4b9282705 (diff)
downloadlibtiff-8af53c421f17aea1e1f72dd5da6dc4fc4ffcba4b.tar.gz
* configure.ac: Add a HAVE_FOO Automake conditional for each
add-on library. * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode requires JPEG support to compile. Use Automake conditional to only include it when JPEG support is available.
-rw-r--r--ChangeLog7
-rwxr-xr-xconfigure45
-rw-r--r--configure.ac6
-rw-r--r--test/Makefile.am10
-rw-r--r--test/Makefile.in17
5 files changed, 77 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 63076dd9..0ac633d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2015-06-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * configure.ac: Add a HAVE_FOO Automake conditional for each
+ add-on library.
+
+ * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode
+ requires JPEG support to compile. Use Automake conditional to
+ only include it when JPEG support is available.
+
* html/build.html: Try to improve the nmake-based VC++ build
description.
diff --git a/configure b/configure
index b7cb1d0e..da03404e 100755
--- a/configure
+++ b/configure
@@ -656,6 +656,12 @@ X_CFLAGS
XMKMF
HAVE_CXX_FALSE
HAVE_CXX_TRUE
+HAVE_LZMA_FALSE
+HAVE_LZMA_TRUE
+HAVE_JBIG_FALSE
+HAVE_JBIG_TRUE
+HAVE_JPEG_FALSE
+HAVE_JPEG_TRUE
LIBTIFF_DOCDIR
HAVE_RPATH_FALSE
HAVE_RPATH_TRUE
@@ -18623,6 +18629,15 @@ $as_echo "#define JPEG_SUPPORT 1" >>confdefs.h
fi
+ if test "$HAVE_JPEG" = 'yes'; then
+ HAVE_JPEG_TRUE=
+ HAVE_JPEG_FALSE='#'
+else
+ HAVE_JPEG_TRUE='#'
+ HAVE_JPEG_FALSE=
+fi
+
+
# Check whether --enable-old-jpeg was given.
if test "${enable_old_jpeg+set}" = set; then :
@@ -18761,6 +18776,15 @@ done
fi
+ if test "$HAVE_JBIG" = 'yes'; then
+ HAVE_JBIG_TRUE=
+ HAVE_JBIG_FALSE='#'
+else
+ HAVE_JBIG_TRUE='#'
+ HAVE_JBIG_FALSE=
+fi
+
+
HAVE_LZMA=no
@@ -18868,6 +18892,15 @@ $as_echo "#define LZMA_SUPPORT 1" >>confdefs.h
fi
+ if test "$HAVE_LZMA" = 'yes'; then
+ HAVE_LZMA_TRUE=
+ HAVE_LZMA_FALSE='#'
+else
+ HAVE_LZMA_TRUE='#'
+ HAVE_LZMA_FALSE=
+fi
+
+
HAVE_JPEG12=no
@@ -20796,6 +20829,18 @@ if test -z "${HAVE_RPATH_TRUE}" && test -z "${HAVE_RPATH_FALSE}"; then
as_fn_error $? "conditional \"HAVE_RPATH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JPEG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_JBIG_TRUE}" && test -z "${HAVE_JBIG_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JBIG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LZMA_TRUE}" && test -z "${HAVE_LZMA_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LZMA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then
as_fn_error $? "conditional \"HAVE_CXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 7851956c..5448dc07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -688,6 +688,8 @@ if test "$HAVE_JPEG" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_JPEG, test "$HAVE_JPEG" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Check for Old JPEG.
dnl ---------------------------------------------------------------------------
@@ -760,6 +762,8 @@ if test "$HAVE_JBIG" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_JBIG, test "$HAVE_JBIG" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Check for liblzma2.
dnl ---------------------------------------------------------------------------
@@ -812,6 +816,8 @@ if test "$HAVE_LZMA" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_LZMA, test "$HAVE_LZMA" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Should 8/12 bit jpeg mode be enabled?
dnl ---------------------------------------------------------------------------
diff --git a/test/Makefile.am b/test/Makefile.am
index da8e37b8..7936667b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -47,8 +47,16 @@ XFAIL_TESTS =
# Extra files which should be cleaned by 'make clean'
CLEANFILES = test_packbits.tif o-*
+if HAVE_JPEG
+JPEG_DEPENDENT_CHECK_PROG=raw_decode
+else
+JPEG_DEPENDENT_CHECK_PROG=
+endif
+
# Executable programs which need to be built in order to support tests
-check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite raw_decode custom_dir
+check_PROGRAMS = \
+ ascii_tag long_tag short_tag strip_rw rewrite custom_dir \
+ $(JPEG_DEPENDENT_CHECK_PROG)
# Test scripts to execute
TESTSCRIPTS = \
diff --git a/test/Makefile.in b/test/Makefile.in
index b7a6e7b6..39af0bfd 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -116,7 +116,7 @@ host_triplet = @host@
XFAIL_TESTS =
check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \
short_tag$(EXEEXT) strip_rw$(EXEEXT) rewrite$(EXEEXT) \
- raw_decode$(EXEEXT) custom_dir$(EXEEXT)
+ custom_dir$(EXEEXT) $(am__EXEEXT_1)
subdir = test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
@@ -132,6 +132,7 @@ CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+@HAVE_JPEG_TRUE@am__EXEEXT_1 = raw_decode$(EXEEXT)
am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT)
ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS)
ascii_tag_DEPENDENCIES = $(LIBTIFF)
@@ -597,6 +598,8 @@ TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
# Extra files which should be cleaned by 'make clean'
CLEANFILES = test_packbits.tif o-*
+@HAVE_JPEG_FALSE@JPEG_DEPENDENT_CHECK_PROG =
+@HAVE_JPEG_TRUE@JPEG_DEPENDENT_CHECK_PROG = raw_decode
# Test scripts to execute
TESTSCRIPTS = \
@@ -1074,16 +1077,16 @@ rewrite.log: rewrite$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-raw_decode.log: raw_decode$(EXEEXT)
- @p='raw_decode$(EXEEXT)'; \
- b='raw_decode'; \
+custom_dir.log: custom_dir$(EXEEXT)
+ @p='custom_dir$(EXEEXT)'; \
+ b='custom_dir'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-custom_dir.log: custom_dir$(EXEEXT)
- @p='custom_dir$(EXEEXT)'; \
- b='custom_dir'; \
+raw_decode.log: raw_decode$(EXEEXT)
+ @p='raw_decode$(EXEEXT)'; \
+ b='raw_decode'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \