Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ my @check = qw(/usr/include /usr/local/include /opt/local/include);
# Check in environment-supplied locations before standard ones
unshift @check, split /:/, $ENV{INCLUDE};

my $libjpeg_local_windows = '../libjpeg-turbo-1.1.1';
my $libpng_local_windows = '../lpng143';
my $giflib_local_windows = '../giflib-4.1.6/lib';
if ( $^O =~ /Win32/i ) {
push @check, '../libjpeg-turbo-1.1.1';
push @check, '../lpng143';
push @check, '../giflib-4.1.6/lib';
push @check, $Config{incpath};
push @check, $libjpeg_local_windows;
push @check, $libpng_local_windows;
push @check, $giflib_local_windows;
}

# Look for libjpeg
Expand All @@ -98,7 +102,8 @@ for my $incdir ( $jpeg_inc, @check ) {
push @LIBS, '-ljpeg';
}

if ( $^O =~ /Win32/i ) {
if ( $^O =~ /Win32/i && -e catfile($incdir, 'build', 'jconfig.h')) {
#Strawberry 5.14.0 has version in jpeglib.h only, jconfig.h is in strawberry\c\include\
$JPEG_VERSION = _re_find( catfile($incdir, 'build', 'jconfig.h'), qr/JPEG_LIB_VERSION\s+(\d+)/ ) || 'unknown';
}
else {
Expand Down Expand Up @@ -225,17 +230,17 @@ print "\n";
if ( $^O =~ /Win32/i ) {
*MY::postamble = sub {};

if ($JPEG) {
if ($JPEG && $jpeg_inc eq $libjpeg_local_windows) {
push @INC, '-I../libjpeg-turbo-1.1.1/build'; # for jconfig.h
$MYEXTLIB .= '../libjpeg-turbo-1.1.1/build/jpeg-static.lib ';
}

if ($PNG) {
if ($PNG && $png_inc eq $libpng_local_windows) {
push @INC, '-I../zlib';
$MYEXTLIB .= '../lpng143/libpng.lib ../zlib/zlib.lib ';
}

if ($GIF) {
if ($GIF && $gif_inc eq $giflib_local_windows) {
$MYEXTLIB .= '../giflib-4.1.6/windows/Release/giflib.lib ';
}
}
Expand Down
2 changes: 1 addition & 1 deletion Scale.xs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW32__)
#define NO_XSLOCKS // Needed to avoid PerlProc_setjmp/PerlProc_longjmp unresolved symbols
#endif

Expand Down