From bb454aeb66f83d60dd133a44ccff25d463cea1cf Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Mon, 26 May 2025 23:45:29 +0200 Subject: [PATCH] fix build when libjpeg is not in its default location (#8172) --- coders/Makefile.am | 2 +- configure.ac | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coders/Makefile.am b/coders/Makefile.am index 179a94fa8c..87ceabe8be 100644 --- a/coders/Makefile.am +++ b/coders/Makefile.am @@ -1025,7 +1025,7 @@ coders_json_la_LIBADD = $(MAGICKCORE_LIBS) # JXL coder module coders_jxl_la_SOURCES = coders/jxl.c -coders_jxl_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS) +coders_jxl_la_CPPFLAGS = $(MAGICK_CODER_CPPFLAGS) $(JXL_CFLAGS) coders_jxl_la_LDFLAGS = $(MODULECOMMONFLAGS) coders_jxl_la_LIBADD = $(MAGICKCORE_LIBS) $(JXL_LIBS) diff --git a/configure.ac b/configure.ac index be1c4cf709..421f318f61 100644 --- a/configure.ac +++ b/configure.ac @@ -2470,7 +2470,9 @@ if test "$with_jpeg" != 'no'; then AC_MSG_RESULT([no -- some components failed test]) have_jpeg='no (failed tests)' else - JPEG_LIBS='-ljpeg' + if test -z "$JPEG_LIBS"; then + JPEG_LIBS='-ljpeg' + fi LIBS="$JPEG_LIBS $LIBS" AC_DEFINE([JPEG_DELEGATE],[1],[Define if you have JPEG library]) AC_MSG_RESULT([yes])