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