Blame SOURCES/autotrace-0.31.1-pstoedit-detection-fix.patch

b7cf7d
--- autotrace-0.31.1.orig/configure.in
b7cf7d
+++ autotrace-0.31.1/configure.in
b7cf7d
@@ -282,8 +300,12 @@ AC_CHECK_LIB(dl,main,[LIBLD_LDFLAGS=-ldl
b7cf7d
 if test "x${LIBLD_LDFLAGS}" != x; then
b7cf7d
    LIBPSTOEDIT_EXTRA_LIBS="${LIBPSTOEDIT_EXTRA_LIBS} ${LIBLD_LDFLAGS}"
b7cf7d
 fi
b7cf7d
-
b7cf7d
-echo '*** Checking pstoedit existence TWICE(if needed) ***'
b7cf7d
+        
b7cf7d
+echo '*** Checking pstoedit existence THRICE(if needed)***'
b7cf7d
+echo '*** This is the 0th check                        ***'
b7cf7d
+PKG_CHECK_MODULES(LIBPSTOEDIT,[pstoedit >= 3.32.1],HAVE_LIBPSTOEDIT_321=yes)
b7cf7d
+if test ${HAVE_LIBPSTOEDIT_321} != yes; then
b7cf7d
+   echo '*** The 0th check failed                         ***'
b7cf7d
 echo '*** This is the 1st check                        ***'
b7cf7d
 AM_PATH_PSTOEDIT(3.32.1,HAVE_LIBPSTOEDIT_321=yes)
b7cf7d
 if test ${HAVE_LIBPSTOEDIT_321} != yes; then
b7cf7d
@@ -310,6 +332,15 @@ else
b7cf7d
 	LIBPSTOEDIT_LIBS="${PSTOEDIT_LIBS} ${LIBPSTOEDIT_EXTRA_LIBS}"	
b7cf7d
 	LIBPSTOEDIT_CFLAGS="${PSTOEDIT_CFLAGS}"
b7cf7d
 fi
b7cf7d
+else
b7cf7d
+        echo '*** The 0th check is passed.                     ***'
b7cf7d
+	HAVE_LIBPSTOEDIT=yes
b7cf7d
+
b7cf7d
+       # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1415258
b7cf7d
+       LIBPSTOEDIT_LIBS="${LIBPSTOEDIT_LIBS/@LIBPNG_LDFLAGS@/-lpng}"
b7cf7d
+
b7cf7d
+	AC_DEFINE(HAVE_LIBPSTOEDIT)
b7cf7d
+fi
b7cf7d
 
b7cf7d
 if test ${HAVE_LIBPSTOEDIT} = yes; then
b7cf7d
 	AC_CHECK_FUNCS([mkstemp])