Skip to content

Commit

Permalink
Use the $cc variable not cc; die if no $cc found
Browse files Browse the repository at this point in the history
  • Loading branch information
benkasminbullock committed Sep 14, 2018
1 parent 12ca2cb commit 9e54c8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/CheckForLibPng.pm
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,15 @@ EOF
my $ccflags = $Config{ccflags};
# The C compiler to use
my $cc = $Config{cc};
if (! $cc) {
die "I cannot find a C compiler in your \%Config";
}
open my $output, ">", $c_file_name
or die "Error opening file '$c_file_name' for writing: $!";
print $output $test_c;
close $output
or die "Error closing file '$c_file_name': $!";
my $compile = "cc $ccflags $inc -o $exe_file_name $c_file_name $ldflags $libs";
my $compile = "$cc $ccflags $inc -o $exe_file_name $c_file_name $ldflags $libs";
msg ("The compile command is '$compile'");
$compile_ok = (system ($compile) == 0);
if ($compile_ok) {
Expand Down

0 comments on commit 9e54c8e

Please sign in to comment.