diff --git a/acinclude.m4 b/acinclude.m4 index edc7eccc0..e10f8ceb2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -630,8 +630,8 @@ for be in ${BACKENDS}; do echo "*** $be backend currently requires JPEG library - $DISABLE_MSG" backend_supported="no" else - if test "x${have_jpeg_crop_scanline}" != "xyes" \ - || test "x${have_jpeg_skip_scanline}" != "xyes"; then + if test "x${ac_cv_func_jpeg_crop_scanline}" != "xyes" \ + || test "x${ac_cv_func_jpeg_skip_scanlines}" != "xyes"; then echo "*** $be backend requires a newer JPEG library - $DISABLE_MSG" backend_supported="no" fi diff --git a/configure.ac b/configure.ac index 5ce16a263..d927f8b2b 100644 --- a/configure.ac +++ b/configure.ac @@ -697,7 +697,10 @@ fi if test "${sane_cv_use_libjpeg}" = "yes"; then SANEI_SANEI_JPEG_LO="../sanei/sanei_jpeg.lo" + saved_LIBS="${LIBS}" + LIBS="${JPEG_LIBS}" AC_CHECK_FUNCS(jpeg_crop_scanline jpeg_skip_scanlines) + LIBS="${saved_LIBS}" fi AM_CONDITIONAL(HAVE_JPEG, test x$sane_cv_use_libjpeg = xyes) AC_SUBST(SANEI_SANEI_JPEG_LO)