[gdk-pixbuf] build: Check for libtiff using pkg-config
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] build: Check for libtiff using pkg-config
- Date: Tue, 1 Aug 2017 13:45:47 +0000 (UTC)
commit 0927eb3e278e998248f3022c096b4f93685c6a9d
Author: Bastien Nocera <hadess hadess net>
Date: Tue Aug 1 11:37:20 2017 +0100
build: Check for libtiff using pkg-config
configure.ac | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 22d7ccb..b235405 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,24 +452,14 @@ AC_ARG_WITH(gdiplus,
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$with_gdiplus != xno ])
dnl Test for libtiff
+libtiff_found=no
if test x$os_win32 = xno || test x$with_gdiplus = xno; then
- if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
- AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
- [AC_CHECK_HEADER(tiffio.h,
- TIFF='tiff'; LIBTIFF='-ltiff',
- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
- [AC_CHECK_LIB(tiff, TIFFWriteScanline,
- [AC_CHECK_HEADER(tiffio.h,
- TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
- [AC_CHECK_LIB(tiff34, TIFFFlushData,
- [AC_CHECK_HEADER(tiffio.h,
- TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
- AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)],
-ljpeg -lz -lm)], -lm)
+ if test x$with_libtiff != xno; then
+ PKG_CHECK_MODULES(TIFF, libtiff-4)
+ libtiff_found=yes
fi
- if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
+ if test x$with_libtiff != xno && test x$libtiff_found = xno; then
AC_MSG_ERROR([
*** Checks for TIFF loader failed. You can build without it by passing
*** --without-libtiff to configure but some programs using GTK+ may
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]