From 3bf1c6a5711eb8d4046bbfb87a6fb12b824a5b5b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 29 Aug 2018 18:24:48 +0200 Subject: [PATCH] configure: Simplify libjpeg detection The jpeg_save_markers API has existed since 27th March 1998! So it's safe to assume that everybody has it, and there's no need to check for it. libjpeg-turbo has had a libjpeg.pc since 2016, and the IJG's software has it too. Dropping support for old libraries is a small price to pay for the benefits of a simpler build. https://gitlab.gnome.org/GNOME/gimp/merge_requests/28 --- configure.ac | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 4b9e4fa559..4beb9b1d8d 100644 --- a/configure.ac +++ b/configure.ac @@ -1499,29 +1499,9 @@ AC_SUBST(TIFF_LIBS) # Check for libjpeg ################### -if test -z "$JPEG_LIBS"; then - AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, , - add_deps_error([libjpeg], [JPEG library not found])) - AC_MSG_CHECKING([for jpeglib.h]) - AC_PREPROC_IFELSE( - [AC_LANG_SOURCE([[ -#include -#undef HAVE_STDDEF_H -#undef HAVE_STDLIB_H -#undef PACKAGE -#undef VERSION -#include ]])], - AC_MSG_RESULT([yes]), - add_deps_error([libjpeg], [JPEG header file not found])) - AC_CHECK_LIB(jpeg, jpeg_save_markers, - JPEG_LIBS='-ljpeg', - add_deps_error([libjpeg], [JPEG library is too old])) -fi - +PKG_CHECK_MODULES(JPEG, [libjpeg],, [add_deps_error([libjpeg])]) MIME_TYPES="$MIME_TYPES;image/jpeg" -AC_SUBST(JPEG_LIBS) - ################ # Check for libz