Commit 3bf1c6a5 authored by Debarshi Ray's avatar Debarshi Ray

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.

!28
parent 072d6b0d
...@@ -1499,29 +1499,9 @@ AC_SUBST(TIFF_LIBS) ...@@ -1499,29 +1499,9 @@ AC_SUBST(TIFF_LIBS)
# Check for libjpeg # Check for libjpeg
################### ###################
if test -z "$JPEG_LIBS"; then PKG_CHECK_MODULES(JPEG, [libjpeg],, [add_deps_error([libjpeg])])
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 <stdio.h>
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H
#undef PACKAGE
#undef VERSION
#include <jpeglib.h>]])],
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
MIME_TYPES="$MIME_TYPES;image/jpeg" MIME_TYPES="$MIME_TYPES;image/jpeg"
AC_SUBST(JPEG_LIBS)
################ ################
# Check for libz # Check for libz
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment