diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-08-01 11:37:20 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-08-01 14:45:05 +0100 |
commit | 0927eb3e278e998248f3022c096b4f93685c6a9d (patch) | |
tree | ca2e18df9503275feed4a1c415bda3c348732514 | |
parent | b5b6b5cdbedd6ae50e8d3c4e32673f11532181dc (diff) | |
download | gdk-pixbuf-0927eb3e278e998248f3022c096b4f93685c6a9d.tar.gz |
build: Check for libtiff using pkg-config
-rw-r--r-- | configure.ac | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 22d7ccbde..b2354054c 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 |