--- inc/CheckForLibPng.pm.orig	2022-10-01 03:02:27.000000000 -0700
+++ inc/CheckForLibPng.pm	2022-10-01 03:09:33.000000000 -0700
@@ -210,7 +210,9 @@
 	#    my $ccflags;
 	my $ccflags = $Config{ccflags};
 	# The C compiler to use
-	my $cc = $Config{cc};
+	# my $cc = $Config{cc};
+       # Get C compiler from CC env variable
+       my $cc = $ENV{CC};
 	if (! $cc) {
 	    die "I cannot find a C compiler in your \%Config";
 	}
