Skip to content

Commit

Permalink
Fix configure for Ubuntu LTS distributions.
Browse files Browse the repository at this point in the history
Their pc files do not contain a version. Fallback to a header and
lib approach. Rather minimimalistic macro setup, I am not into
adding more into this.

Please setup your pc files in case of issues.

Signed-off-by: Tobias Stoeckmann <[email protected]>
  • Loading branch information
stoeckmann committed Aug 8, 2020
1 parent cb59b18 commit 2cc3153
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ AC_ARG_WITH([jpeg],
AC_MSG_RESULT($jpeg_support)
if test "$jpeg_support" != no ; then
PKG_CHECK_MODULES(JPEG, libjpeg >= 1.5, [jpeg_ok="yes"], [jpeg_ok="no"])
# Ubuntu Bionic Beaver fix, can be removed after April 2023.
# See issue #25 for more details. TLDR: The relevant .pc file is broken
if test "$jpeg_ok" = no ; then
AC_CHECK_HEADER(jpeglib.h,
AC_CHECK_LIB(jpeg, jpeg_std_error,
[jpeg_ok="yes"], [jpeg_ok="no"]))
if test "$jpeg_ok" = yes ; then
JPEG_LIB="-ljpeg"
AC_SUBST(JPEG_LIB)
fi
fi
else
jpeg_ok="no"
fi
Expand Down

0 comments on commit 2cc3153

Please sign in to comment.