Index: libpng-config.in
--- libpng-config.in.orig	2022-09-14 21:42:00.000000000 +0200
+++ libpng-config.in	2022-09-16 18:43:27.116720000 +0200
@@ -16,8 +16,8 @@
 exec_prefix="@exec_prefix@"
 libdir="@libdir@"
 includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
+libs="-lpng"
+all_libs="-lpng -lz @LIBS@"
 I_opts="-I${includedir}"
 L_opts="-L${libdir}"
 R_opts=""
Index: libpng.pc.in
--- libpng.pc.in.orig	2022-09-16 18:43:27.116800000 +0200
+++ libpng.pc.in	2022-09-16 20:33:10.371902000 +0200
@@ -7,6 +7,6 @@
 Description: Loads and saves PNG files
 Version: @PNGLIB_VERSION@
 Requires.private: zlib
-Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
+Libs: -L${libdir} -lpng
 Libs.private: @LIBS@
 Cflags: -I${includedir}
