diff -Nurd poppler-0.47.0.orig/configure poppler-0.47.0/configure
--- poppler-0.47.0.orig/configure	2016-08-18 16:16:43.000000000 -0400
+++ poppler-0.47.0/configure	2022-01-07 07:36:18.000000000 -0500
@@ -18531,6 +18531,7 @@
     CXXFLAGS="$CXXFLAGS -D__USE_MINGW_ANSI_STDIO=1"
   ;;
 esac
+create_shared_lib="-no-undefined"
 
 
 
@@ -25805,14 +25806,6 @@
 esac
 
 
-case `$PKG_CONFIG --version` in
-  0.?|0.10-7)
-    PC_REQUIRES_PRIVATE="";
-    PC_REQUIRES="poppler = $VERSION";;
-  *)
-    PC_REQUIRES_PRIVATE="Requires.private: poppler = $VERSION";
-    PC_REQUIRES="";;
-esac
 
 
 
diff -Nurd poppler-0.47.0.orig/glib/Makefile.in poppler-0.47.0/glib/Makefile.in
--- poppler-0.47.0.orig/glib/Makefile.in	2016-08-18 16:16:50.000000000 -0400
+++ poppler-0.47.0/glib/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -143,7 +143,6 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libpoppler_glib_la_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/poppler/libpoppler-cairo.la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
@@ -569,7 +568,7 @@
 	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
 
 libpoppler_glib_la_LIBADD = \
-	$(top_builddir)/poppler/libpoppler.la		\
+	-lpoppler					\
 	$(top_builddir)/poppler/libpoppler-cairo.la	\
 	$(PTHREAD_LIBS)					\
 	$(POPPLER_GLIB_LIBS)				\
diff -Nurd poppler-0.47.0.orig/glib/demo/Makefile.in poppler-0.47.0/glib/demo/Makefile.in
--- poppler-0.47.0.orig/glib/demo/Makefile.in	2016-08-18 16:16:50.000000000 -0400
+++ poppler-0.47.0/glib/demo/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -131,7 +131,7 @@
 am__DEPENDENCIES_1 =
 poppler_glib_demo_DEPENDENCIES =  \
 	$(top_builddir)/glib/libpoppler-glib.la \
-	$(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
@@ -478,7 +478,7 @@
 
 poppler_glib_demo_LDADD = \
 	$(top_builddir)/glib/libpoppler-glib.la	\
-	$(top_builddir)/poppler/libpoppler.la	\
+	-lpoppler				\
 	$(GTK_TEST_LIBS)
 
 all: all-am
diff -Nurd poppler-0.47.0.orig/glib/poppler-annot.cc poppler-0.47.0/glib/poppler-annot.cc
--- poppler-0.47.0.orig/glib/poppler-annot.cc	2016-05-01 18:08:03.000000000 -0400
+++ poppler-0.47.0/glib/poppler-annot.cc	2022-01-07 07:36:18.000000000 -0500
@@ -264,6 +264,26 @@
   return _poppler_create_annot (POPPLER_TYPE_ANNOT_TEXT_MARKUP, annot);
 }
 
+/* g_malloc0_n code imported from glib-2.40.0 gmem.c, which is LGPL2+ */
+/* renamed _gmalloc0_n to avoid collision */
+
+#define SIZE_OVERFLOWS(a,b) (G_UNLIKELY ((b) > 0 && (a) > G_MAXSIZE / (b)))
+
+gpointer
+_g_malloc0_n (gsize n_blocks,
+	     gsize n_block_bytes)
+{
+  if (SIZE_OVERFLOWS (n_blocks, n_block_bytes))
+    {
+      g_error ("%s: overflow allocating %"G_GSIZE_FORMAT"*%"G_GSIZE_FORMAT" bytes",
+               G_STRLOC, n_blocks, n_block_bytes);
+    }
+
+  return g_malloc0 (n_blocks * n_block_bytes);
+}
+
+/* end gmem.c import */
+
 static AnnotQuadrilaterals *
 create_annot_quads_from_poppler_quads (GArray *quads)
 {
@@ -271,7 +291,7 @@
 
   g_assert (quads->len > 0);
 
-  quads_array = (AnnotQuadrilaterals::AnnotQuadrilateral **) g_malloc0_n (
+  quads_array = (AnnotQuadrilaterals::AnnotQuadrilateral **) _g_malloc0_n (
     sizeof (AnnotQuadrilaterals::AnnotQuadrilateral *),
     quads->len);
 
diff -Nurd poppler-0.47.0.orig/glib/reference/Makefile.in poppler-0.47.0/glib/reference/Makefile.in
--- poppler-0.47.0.orig/glib/reference/Makefile.in	2016-08-18 16:16:50.000000000 -0400
+++ poppler-0.47.0/glib/reference/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -425,7 +425,7 @@
 	$(POPPLER_GLIB_CFLAGS)				\
 	$(FREETYPE_CFLAGS)
 
-GTKDOC_LIBS = $(top_builddir)/poppler/libpoppler.la	\
+GTKDOC_LIBS = -lpoppler					\
 	$(top_builddir)/glib/libpoppler-glib.la		\
 	$(POPPLER_GLIB_LIBS)				\
 	$(FREETYPE_LIBS)				\
diff -Nurd poppler-0.47.0.orig/poppler-cairo.pc.in poppler-0.47.0/poppler-cairo.pc.in
--- poppler-0.47.0.orig/poppler-cairo.pc.in	2013-09-25 15:47:34.000000000 -0400
+++ poppler-0.47.0/poppler-cairo.pc.in	2022-01-07 07:36:18.000000000 -0500
@@ -6,4 +6,4 @@
 Name: poppler-cairo
 Description: Cairo backend for Poppler PDF rendering library
 Version: @VERSION@
-Requires: poppler = @VERSION@ cairo >= @CAIRO_VERSION@
+Requires: poppler = @VERSION@
diff -Nurd poppler-0.47.0.orig/qt4/demos/Makefile.in poppler-0.47.0/qt4/demos/Makefile.in
--- poppler-0.47.0.orig/qt4/demos/Makefile.in	2016-08-18 16:16:51.000000000 -0400
+++ poppler-0.47.0/qt4/demos/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -125,7 +125,6 @@
 poppler_qt4viewer_OBJECTS = $(am_poppler_qt4viewer_OBJECTS)
 am__DEPENDENCIES_1 =
 poppler_qt4viewer_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -476,7 +475,7 @@
 	$(POPPLER_QT4_CFLAGS)
 
 poppler_qt4viewer_LDADD = \
-	$(top_builddir)/poppler/libpoppler.la		\
+	-lpoppler 					\
 	$(top_builddir)/qt4/src/libpoppler-qt4.la	\
 	$(POPPLER_QT4_LIBS)
 
diff -Nurd poppler-0.47.0.orig/qt4/src/Makefile.in poppler-0.47.0/qt4/src/Makefile.in
--- poppler-0.47.0.orig/qt4/src/Makefile.in	2016-08-18 16:16:51.000000000 -0400
+++ poppler-0.47.0/qt4/src/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -139,7 +139,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libpoppler_qt4_la_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1)
 am_libpoppler_qt4_la_OBJECTS = libpoppler_qt4_la-poppler-document.lo \
 	libpoppler_qt4_la-poppler-page.lo \
 	libpoppler_qt4_la-poppler-fontinfo.lo \
@@ -520,7 +520,7 @@
 	-Dpoppler_qt4_EXPORTS
 
 libpoppler_qt4_la_LIBADD = \
-	$(top_builddir)/poppler/libpoppler.la	\
+	-lpoppler	\
 	$(POPPLER_QT4_LIBS)
 
 libpoppler_qt4_la_LDFLAGS = \
diff -Nurd poppler-0.47.0.orig/qt4/tests/Makefile.in poppler-0.47.0/qt4/tests/Makefile.in
--- poppler-0.47.0.orig/qt4/tests/Makefile.in	2016-08-18 16:16:52.000000000 -0400
+++ poppler-0.47.0/qt4/tests/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -150,7 +150,7 @@
 @BUILD_POPPLER_QT4_TRUE@	check_actualtext.$(OBJEXT)
 check_actualtext_OBJECTS = $(am_check_actualtext_OBJECTS)
 am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
+am__DEPENDENCIES_2 = \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 @BUILD_POPPLER_QT4_TRUE@check_actualtext_DEPENDENCIES =  \
@@ -269,66 +269,60 @@
 poppler_attachments_OBJECTS = $(am_poppler_attachments_OBJECTS)
 poppler_attachments_LDADD = $(LDADD)
 poppler_attachments_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_fonts_OBJECTS = poppler-fonts.$(OBJEXT)
 poppler_fonts_OBJECTS = $(am_poppler_fonts_OBJECTS)
 poppler_fonts_LDADD = $(LDADD)
-poppler_fonts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_fonts_DEPENDENCIES = \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_forms_OBJECTS = poppler-forms.$(OBJEXT)
 poppler_forms_OBJECTS = $(am_poppler_forms_OBJECTS)
 poppler_forms_LDADD = $(LDADD)
-poppler_forms_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_forms_DEPENDENCIES = \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_texts_OBJECTS = poppler-texts.$(OBJEXT)
 poppler_texts_OBJECTS = $(am_poppler_texts_OBJECTS)
 poppler_texts_LDADD = $(LDADD)
-poppler_texts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_texts_DEPENDENCIES = \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_stress_poppler_dir_OBJECTS = stress-poppler-dir.$(OBJEXT)
 stress_poppler_dir_OBJECTS = $(am_stress_poppler_dir_OBJECTS)
 stress_poppler_dir_LDADD = $(LDADD)
 stress_poppler_dir_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_stress_poppler_qt4_OBJECTS = stress-poppler-qt4.$(OBJEXT)
 stress_poppler_qt4_OBJECTS = $(am_stress_poppler_qt4_OBJECTS)
 stress_poppler_qt4_LDADD = $(LDADD)
 stress_poppler_qt4_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_stress_threads_qt4_OBJECTS = stress-threads-qt4.$(OBJEXT)
 stress_threads_qt4_OBJECTS = $(am_stress_threads_qt4_OBJECTS)
 stress_threads_qt4_LDADD = $(LDADD)
 stress_threads_qt4_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_test_password_qt4_OBJECTS = test-password-qt4.$(OBJEXT)
 test_password_qt4_OBJECTS = $(am_test_password_qt4_OBJECTS)
 test_password_qt4_LDADD = $(LDADD)
 test_password_qt4_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_test_poppler_qt4_OBJECTS = test-poppler-qt4.$(OBJEXT)
 test_poppler_qt4_OBJECTS = $(am_test_poppler_qt4_OBJECTS)
 test_poppler_qt4_LDADD = $(LDADD)
-test_poppler_qt4_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+test_poppler_qt4_DEPENDENCIES = \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 am_test_render_to_file_OBJECTS = test-render-to-file.$(OBJEXT)
 test_render_to_file_OBJECTS = $(am_test_render_to_file_OBJECTS)
 test_render_to_file_LDADD = $(LDADD)
 test_render_to_file_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt4/src/libpoppler-qt4.la \
 	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -852,7 +846,7 @@
 	$(POPPLER_QT4_CFLAGS)
 
 LDADD = \
-	$(top_builddir)/poppler/libpoppler.la		\
+	-lpoppler					\
 	$(top_builddir)/qt4/src/libpoppler-qt4.la	\
 	$(POPPLER_QT4_LIBS)
 
diff -Nurd poppler-0.47.0.orig/qt5/demos/Makefile.in poppler-0.47.0/qt5/demos/Makefile.in
--- poppler-0.47.0.orig/qt5/demos/Makefile.in	2016-08-18 16:16:52.000000000 -0400
+++ poppler-0.47.0/qt5/demos/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -125,7 +125,6 @@
 poppler_qt5viewer_OBJECTS = $(am_poppler_qt5viewer_OBJECTS)
 am__DEPENDENCIES_1 =
 poppler_qt5viewer_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -476,7 +475,7 @@
 	$(POPPLER_QT5_CFLAGS)
 
 poppler_qt5viewer_LDADD = \
-	$(top_builddir)/poppler/libpoppler.la		\
+	-lpoppler					\
 	$(top_builddir)/qt5/src/libpoppler-qt5.la	\
 	$(POPPLER_QT5_LIBS)
 
diff -Nurd poppler-0.47.0.orig/qt5/src/Makefile.in poppler-0.47.0/qt5/src/Makefile.in
--- poppler-0.47.0.orig/qt5/src/Makefile.in	2016-08-18 16:16:52.000000000 -0400
+++ poppler-0.47.0/qt5/src/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -139,7 +139,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libpoppler_qt5_la_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1)
 am_libpoppler_qt5_la_OBJECTS = libpoppler_qt5_la-poppler-document.lo \
 	libpoppler_qt5_la-poppler-page.lo \
 	libpoppler_qt5_la-poppler-fontinfo.lo \
@@ -520,7 +520,7 @@
 	-Dpoppler_qt5_EXPORTS
 
 libpoppler_qt5_la_LIBADD = \
-	$(top_builddir)/poppler/libpoppler.la	\
+	-lpoppler				\
 	$(POPPLER_QT5_LIBS)
 
 libpoppler_qt5_la_LDFLAGS = \
diff -Nurd poppler-0.47.0.orig/qt5/tests/Makefile.in poppler-0.47.0/qt5/tests/Makefile.in
--- poppler-0.47.0.orig/qt5/tests/Makefile.in	2016-08-18 16:16:52.000000000 -0400
+++ poppler-0.47.0/qt5/tests/Makefile.in	2022-01-07 07:36:18.000000000 -0500
@@ -150,7 +150,7 @@
 @BUILD_POPPLER_QT5_TRUE@	check_actualtext.$(OBJEXT)
 check_actualtext_OBJECTS = $(am_check_actualtext_OBJECTS)
 am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
+am__DEPENDENCIES_2 = \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 @BUILD_POPPLER_QT5_TRUE@check_actualtext_DEPENDENCIES =  \
@@ -269,66 +269,60 @@
 poppler_attachments_OBJECTS = $(am_poppler_attachments_OBJECTS)
 poppler_attachments_LDADD = $(LDADD)
 poppler_attachments_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_fonts_OBJECTS = poppler-fonts.$(OBJEXT)
 poppler_fonts_OBJECTS = $(am_poppler_fonts_OBJECTS)
 poppler_fonts_LDADD = $(LDADD)
-poppler_fonts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_fonts_DEPENDENCIES = \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_forms_OBJECTS = poppler-forms.$(OBJEXT)
 poppler_forms_OBJECTS = $(am_poppler_forms_OBJECTS)
 poppler_forms_LDADD = $(LDADD)
-poppler_forms_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_forms_DEPENDENCIES = \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_poppler_texts_OBJECTS = poppler-texts.$(OBJEXT)
 poppler_texts_OBJECTS = $(am_poppler_texts_OBJECTS)
 poppler_texts_LDADD = $(LDADD)
-poppler_texts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+poppler_texts_DEPENDENCIES = \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_stress_poppler_dir_OBJECTS = stress-poppler-dir.$(OBJEXT)
 stress_poppler_dir_OBJECTS = $(am_stress_poppler_dir_OBJECTS)
 stress_poppler_dir_LDADD = $(LDADD)
 stress_poppler_dir_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_stress_poppler_qt5_OBJECTS = stress-poppler-qt5.$(OBJEXT)
 stress_poppler_qt5_OBJECTS = $(am_stress_poppler_qt5_OBJECTS)
 stress_poppler_qt5_LDADD = $(LDADD)
 stress_poppler_qt5_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_stress_threads_qt5_OBJECTS = stress-threads-qt5.$(OBJEXT)
 stress_threads_qt5_OBJECTS = $(am_stress_threads_qt5_OBJECTS)
 stress_threads_qt5_LDADD = $(LDADD)
 stress_threads_qt5_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_test_password_qt5_OBJECTS = test-password-qt5.$(OBJEXT)
 test_password_qt5_OBJECTS = $(am_test_password_qt5_OBJECTS)
 test_password_qt5_LDADD = $(LDADD)
 test_password_qt5_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_test_poppler_qt5_OBJECTS = test-poppler-qt5.$(OBJEXT)
 test_poppler_qt5_OBJECTS = $(am_test_poppler_qt5_OBJECTS)
 test_poppler_qt5_LDADD = $(LDADD)
-test_poppler_qt5_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+test_poppler_qt5_DEPENDENCIES = \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 am_test_render_to_file_OBJECTS = test-render-to-file.$(OBJEXT)
 test_render_to_file_OBJECTS = $(am_test_render_to_file_OBJECTS)
 test_render_to_file_LDADD = $(LDADD)
 test_render_to_file_DEPENDENCIES =  \
-	$(top_builddir)/poppler/libpoppler.la \
 	$(top_builddir)/qt5/src/libpoppler-qt5.la \
 	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -852,7 +846,7 @@
 	$(POPPLER_QT5_CFLAGS)
 
 LDADD = \
-	$(top_builddir)/poppler/libpoppler.la		\
+	-lpoppler					\
 	$(top_builddir)/qt5/src/libpoppler-qt5.la	\
 	$(POPPLER_QT5_LIBS)
 
