From: cristy Date: Tue, 20 Oct 2009 12:33:26 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~10487 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f912c450f2b91dcc4d5e5ae1826476670ebc0218;p=imagemagick --- diff --git a/PerlMagick/Makefile.PL.in b/PerlMagick/Makefile.PL.in index a9a56027c..c2d91bcc1 100644 --- a/PerlMagick/Makefile.PL.in +++ b/PerlMagick/Makefile.PL.in @@ -117,9 +117,8 @@ EOF my $inc = join ' ', map "-I\"$_\"", @incdir; my $lib = join ' ', map "-L\"$_\"", @libdir; - $lib .= " -lMagickCore"; - return ($inc, $lib, '-O2'); + return ($inc, $lib); } @@ -128,7 +127,7 @@ my $delegate_tests='t/*.t'; 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"; } @@ -142,10 +141,17 @@ foreach $delegate (qw/@DELEGATES@/) { 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 @@ -158,7 +164,7 @@ WriteMakefile # Perl module name is Image::Magick 'NAME' => 'Image::Magick', - # Module author + Module author 'AUTHOR' => 'ImageMagick Studio LLC', # Module version @@ -183,10 +189,10 @@ WriteMakefile #'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@', diff --git a/PerlMagick/README.txt b/PerlMagick/README.txt index acea60013..b58d9b664 100644 --- a/PerlMagick/README.txt +++ b/PerlMagick/README.txt @@ -74,6 +74,29 @@ Installation 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