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

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