File libgdiplus-libjpeg_prefix.patch of Package libgdiplus

Index: libgdiplus-3.12/configure.ac
===================================================================
--- libgdiplus-3.12.orig/configure.ac
+++ libgdiplus-3.12/configure.ac
@@ -203,10 +203,6 @@ AC_ARG_WITH([libjpeg],
 	[libjpeg_prefix="$withval"], [libjpeg_prefix="${prefix}"])
 
   if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
-    JPEG_CFLAGS="-I${libjpeg_prefix}/include"
-    JPEG_LIBS="-L${libjpeg_prefix}/lib"
-    save_cflags=$CFLAGS; CFLAGS=$JPEG_CFLAGS
-    save_libs=$LIBS; LIBS=$JPEG_LIBS
     AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
       jpeg_ok=yes,
       jpeg_ok=no
@@ -223,7 +219,7 @@ AC_ARG_WITH([libjpeg],
         jpeg_ok=no)
       AC_MSG_RESULT($jpeg_ok)
       if test "$jpeg_ok" = yes; then
-        JPEG='jpeg'; LIBJPEG='-L${libjpeg_prefix}/lib -ljpeg'
+        JPEG='jpeg'; LIBJPEG='-ljpeg'
       else
         AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
       fi
@@ -246,10 +242,6 @@ AC_ARG_WITH([libtiff],
 	[libtiff_prefix="$withval"], [libtiff_prefix="${prefix}"])
 
   if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
-    TIFF_CFLAGS="-I${libjpeg_prefix}/include -I${libtiff_prefix}/include"
-    TIFF_LIBS="-L${libjpeg_prefix}/lib -L${libtiff_prefix}/lib"
-    save_cflags=$CFLAGS; CFLAGS=$TIFF_CFLAGS
-    save_libs=$LIBS; LIBS=$TIFF_LIBS
     AC_CHECK_LIB(tiff, TIFFReadScanline,
       [AC_CHECK_HEADER(tiffio.h,
         TIFF='tiff'; LIBTIFF='-ltiff'; tiff_ok=yes,
@@ -281,10 +273,6 @@ AC_ARG_WITH([libgif],
 	[libgif_prefix="$withval"], [libgif_prefix="${prefix}"])
 
   if test x$with_libgif != xno && test -z "$LIBGIF"; then
-    GIF_CFLAGS="-I${libgif_prefix}/include"
-    GIF_LIBS="-L${libgif_prefix}/lib"
-    save_cflags=$CFLAGS; CFLAGS=$GIF_CFLAGS
-    save_libs=$LIBS; LIBS=$GIF_LIBS
     AC_CHECK_LIB(gif, DGifOpenFileName,
       [AC_CHECK_HEADER(gif_lib.h,
         GIF='gif'; LIBGIF='-lgif'; gif_ok=yes,