Skip to content

Commit

Permalink
force using -std=c89 when compiling Tk::JPEG on macOS #8
Browse files Browse the repository at this point in the history
  • Loading branch information
matyaskopp committed Jun 14, 2024
1 parent 30cded4 commit 2f3bfe8
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- JPEG/Makefile.jpeg.maybe.orig 2020-03-19 21:41:00.000000000 +0100
+++ JPEG/Makefile.jpeg.maybe 2024-06-14 14:35:38.313024340 +0200
@@ -31,9 +31,10 @@
}
else
{
+ my $ccstdflags = ($^O eq 'darwin') ? '-std=c89' : '';
$ENV{CC} = $Config{cc};
- local $ENV{CFLAGS} = "$Config{ccflags} $Config{cccdlflags}";
- local $ENV{LDFLAGS} = "$Config{ccflags} $Config{ldflags}";
+ local $ENV{CFLAGS} = "$ccstdflags $Config{ccflags} $Config{cccdlflags}";
+ local $ENV{LDFLAGS} = "$ccstdflags $Config{ccflags} $Config{ldflags}";
system(sh => "./configure");
}

0 comments on commit 2f3bfe8

Please sign in to comment.