$OpenBSD: patch-configure,v 1.2 2018/03/11 22:42:00 sthen Exp $
Index: configure
--- configure.orig
+++ configure
@@ -13124,7 +13124,7 @@ if ${ac_cv_lib_tiff_TIFFClientOpen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff -lz $LIBS"
+LIBS="-ltiff -ljpeg -lz $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -13463,7 +13463,7 @@ _ACEOF
             # Disable dynamic jpeg since we're linking it explicitly
             jpg_lib=''
         fi
-        IMG_LIBS="-ltiff -lz $IMG_LIBS"
+        IMG_LIBS="-ltiff -ljpeg -lz $IMG_LIBS"
     fi
 fi
 if test x$enable_jpg = xyes -a x$have_jpg_hdr = xyes -a x$have_jpg_lib = xyes; then
