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