--- a/scripts/libpng-config-body.in
+++ b/scripts/libpng-config-body.in
@@ -83,6 +83,7 @@
 
     --static)
         R_opts=""
+        libs=${all_libs}
         ;;
 
     *)
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -6,5 +6,5 @@
 Name: libpng
 Description: Loads and saves PNG files
 Version: 1.2.41
-Libs: -L${libdir} -lpng12
+Libs: -lpng12
 Cflags: -I${includedir}
