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

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