File imlib-1.9.10-autoconf.patch of Package imlib

--- imlib-1.9.14/configure.in
+++ imlib-1.9.14/configure.in
@@ -234,22 +234,38 @@
 fi
 
 dnl Test for libtiff
-AC_CHECK_LIB(tiff, TIFFReadScanline,
-  AC_CHECK_HEADER(tiffio.h,
+AC_CHECK_LIB(tiff, TIFFReadScanline,[
+  AC_CHECK_HEADER(tiffio.h,[
     TIFFLIBS="-ltiff"
-    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF),
-    AC_MSG_ERROR(*** TIFF header files not found ***)),
-  AC_CHECK_LIB(tiff, TIFFWriteScanline,
-    AC_CHECK_HEADER(tiffio.h,
+    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF)],[
+    AC_MSG_ERROR(*** TIFF header files not found ***)])
+],[
+  AC_CHECK_LIB(tiff, TIFFWriteScanline,[
+    AC_CHECK_HEADER(tiffio.h,[
       TIFFLIBS="-ltiff -ljpeg -lz"
-      SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
-      AC_MSG_ERROR(*** TIFF header files not found ***)),
-    AC_CHECK_LIB(tiff34, TIFFFlushData,
-      AC_CHECK_HEADER(tiffio.h,
+      SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"
+      AC_DEFINE(HAVE_LIBTIFF)
+    ],[
+      AC_MSG_ERROR(*** TIFF header files not found ***)
+    ])
+  ],[
+    AC_CHECK_LIB(tiff34, TIFFFlushData,[
+      AC_CHECK_HEADER(tiffio.h,[
         TIFFLIBS="-ltiff34 -ljpeg -lz"
-        SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
-        AC_MSG_ERROR(*** TIFF header files not found ***)),
-    AC_MSG_ERROR(*** TIFF library not found ***), -ljpeg -lz $GX_LIBS), -ljpeg -lz $GX_LIBS), $GX_LIBS)
+        SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"
+        AC_DEFINE(HAVE_LIBTIFF)
+      ],[
+        AC_MSG_ERROR(*** TIFF header files not found ***)
+      ])
+    ],[
+      AC_MSG_ERROR(*** TIFF library not found ***)
+    ],[-ljpeg -lz $GX_LIBS])
+  ],[
+    -ljpeg -lz $GX_LIBS
+  ])
+],[
+  $GX_LIBS
+])
 
 
 AC_CHECK_HEADER(gif_lib.h,
@@ -266,10 +282,10 @@
     $GX_LIBS),
   AC_MSG_ERROR(*** GIF header not found ***))
 
-AC_CHECK_LIB(png, png_read_info,
+AC_CHECK_LIB(png, png_read_info,[
   AC_CHECK_HEADER(png.h,
     png_ok=yes,
-    png_ok=no),
+    png_ok=no)],
   AC_MSG_ERROR(*** PNG library not found ***), -lz -lm $GX_LIBS)
 if test "$png_ok" = yes; then
   AC_MSG_CHECKING([for png_structp in png.h])
openSUSE Build Service is sponsored by