my $inc = join ' ', map "-I\"$_\"", @incdir;
my $lib = join ' ', map "-L\"$_\"", @libdir;
- $lib .= " -lMagickCore";
- return ($inc, $lib, '-O2');
+ return ($inc, $lib);
}
my $delegate;
foreach $delegate (qw/@DELEGATES@/) {
if ( -d "t/$delegate" ) {
- if ($delegate =~ /x11/) {
+ if ( defined($ENV{'DISPLAY'}) && ($^O ne 'MSWin32') ) {
if ( defined $ENV{'DISPLAY'} ) {
$delegate_tests .= " t/$delegate/*.t";
}
my $INC_magick = '-I../ -I@top_srcdir@ @CPPFLAGS@ -I"' . $Config{'usrinc'} . '/ImageMagick"';
my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl @MATH_LIBS@';
my $CCFLAGS_magick = "$Config{'ccflags'} @CFLAGS@";
+my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} @LDFLAGS@";
+my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} @LDDFLAGS@";
if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) {
# a special setup for strawberry perl
- ($INC_magick, $LIBS_magick, $CCFLAGS_magick) = AutodetectWin32gcc();
+ my ($Ipaths, $Lpaths) = AutodetectWin32gcc();
+ $INC_magick = "$Ipaths";
+ $LIBS_magick = "-lMagickCore";
+ $CCFLAGS_magick = "$Config{'ccflags'}";
+ $LDFLAGS_magick = "$Config{'ldflags'} $Lpaths ";
+ $LDDLFLAGS_magick = "$Config{'lddlflags'} $Lpaths ";
}
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# Perl module name is Image::Magick
'NAME' => 'Image::Magick',
- # Module author
+ Module author
'AUTHOR' => 'ImageMagick Studio LLC',
# Module version
#'LD' => $Config{'ld'} == $Config{'cc'} ? '@CC@' : $Config{'ld'},
# Linker flags for building an executable
- 'LDFLAGS' => "-L../magick/.libs -lMagickCore $Config{'ldflags'} @LDFLAGS@",
+ 'LDFLAGS' => $LDFLAGS_magick,
# Linker flags for building a dynamically loadable module
- 'LDDLFLAGS' => "-L../magick/.libs -lMagickCore $Config{'lddlflags'} @LDFLAGS@",
+ 'LDDLFLAGS' => $LDDLFLAGS_magick,
# Install PerlMagick binary into ImageMagick bin directory
'INSTALLBIN' => '@BIN_DIR@',
information. You are now ready to utilize the PerlMagick routines from
within your Perl scripts.
+Installation - Win32 Strawberry perl
+
+ On Win32 Strawberry perl the prefered way of installing PerlMagick is the
+ following:
+
+ 1) Download and install ImageMagick Windows binaries from
+ http://www.imagemagick.org/script/binary-releases.php#windows
+
+ 2) You HAVE TO choose dynamic (DLL) ImageMagick binaries. Note: it is not
+ possible to mix 32/64bit binaries of perl and ImageMagick
+
+ 3) During installation select that you want to install ImageMagick's
+ development files (libraries+headers)
+
+ 4) You NEED TO have ImageMagick's directory in your PATH. Note: we are
+ checking the presence of convert.exe or identify.exe tools
+
+ 5) You might need Visual C++ Redistributable Package installed on your
+ system. See instructions on ImageMagick's Binary Release webpage.
+
+ 6) If you have all prerequisites 1)...5) you can simply install
+ ImageMagick by running: cpan -i Image::Magick
+
Testing PerlMagick