X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=PerlMagick%2FMakefile.PL;h=13fda27d59211183be21c7b76afa08f01ffb9ea0;hb=0756e449ad62cc8ea1c29d5ff732f909b62cef26;hp=f24e06f41f0f0158df9b312e5381ede6c78d04a2;hpb=8d74fc1f224b5ec4673768bcc787fe29d55ee908;p=imagemagick diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index f24e06f41..13fda27d5 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -1,4 +1,4 @@ -# Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization +# Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization # dedicated to making software imaging solutions freely available. # # You may not use this file except in compliance with the License. You may @@ -44,12 +44,15 @@ sub AutodetectWin32gcc { my (@l,@b,@i) = ( (),(),() ); # try to detect 'lib' dir + push @l, catfile($dirpath,'lib'); push @l, catfile($dirpath,'..','lib'); push @l, catfile($dirpath,'..','..','lib'); push @l, catfile($dirpath,'..','..','..','lib'); foreach (@l) { push @libdir, $_ if (-d $_) }; # try to detect 'bin' dir + push @b, catfile($dirpath); + push @b, catfile($dirpath,'bin'); push @b, catfile($dirpath,'..'); push @b, catfile($dirpath,'..','bin'); push @b, catfile($dirpath,'..','..'); @@ -59,13 +62,15 @@ sub AutodetectWin32gcc { foreach (@b) { push @bindir, $_ if (-e "$_/convert.exe" || -e "$_/identify.exe") }; # try to detect 'include' dir + push @i, catfile($dirpath,'include'); + push @i, catfile($dirpath,'include','ImageMagick'); push @i, catfile($dirpath,'..','include'); push @i, catfile($dirpath,'..','include','ImageMagick'); push @i, catfile($dirpath,'..','..','include'); push @i, catfile($dirpath,'..','..','include','ImageMagick'); push @i, catfile($dirpath,'..','..','..','include'); push @i, catfile($dirpath,'..','..','..','include','ImageMagick'); - foreach (@i) { push @incdir, $_ if (-e "$_/magick/MagickCore.h") }; + foreach (@i) { push @incdir, $_ if (-e "$_/MagickCore/MagickCore.h") }; } }; @@ -156,11 +161,11 @@ foreach my $delegate (@tested_delegates) { } # defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile -my $INC_magick = '-I../ -I.. -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; -my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl -lm'; +my $INC_magick = '-I../ -I.. -I/usr/include/freetype2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; +my $LIBS_magick = '-L../MagickCore/.libs -lMagickCore-Q16HDRI -lperl -lm'; my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread"; -my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} "; -my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} "; +my $LDFLAGS_magick = "-L../MagickCore/.libs -lMagickCore-Q16HDRI $Config{'ldflags'} -L/usr/lib"; +my $LDDLFLAGS_magick = "-L../MagickCore/.libs -lMagickCore-Q16HDRI $Config{'lddlflags'} -L/usr/lib"; if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) { my($Ipaths, $Lpaths) = AutodetectWin32gcc(); @@ -169,7 +174,7 @@ if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) { # Setup for strawberry perl. # $INC_magick = "$Ipaths"; - $LIBS_magick = "-lMagickCore"; + $LIBS_magick = "-lMagickCore-Q16HDRI"; $CCFLAGS_magick = "$Config{'ccflags'}"; $LDFLAGS_magick = "$Config{'ldflags'} $Lpaths "; $LDDLFLAGS_magick = "$Config{'lddlflags'} $Lpaths "; @@ -189,7 +194,7 @@ WriteMakefile 'AUTHOR' => 'ImageMagick Studio LLC', # Module version - 'VERSION' => '6.7.0', + 'VERSION' => '7.00', # Preprocessor defines 'DEFINE' => ' -D_LARGE_FILES=1 -DHAVE_CONFIG_H', # e.g., '-DHAVE_SOMETHING' @@ -198,16 +203,16 @@ WriteMakefile 'INC' => $INC_magick, # C compiler - #'CC' => 'g++', + #'CC' => 'gcc -std=gnu99 -std=gnu99', # C pre-processor flags (e.g. -I & -D options) - # 'CPPFLAGS' => "$Config{'cppflags'} -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2", + # 'CPPFLAGS' => "$Config{'cppflags'} -I/usr/include/freetype2", # C compiler flags (e.g. -O -g) 'CCFLAGS' => $CCFLAGS_magick, # Linker - #'LD' => $Config{'ld'} == $Config{'cc'} ? 'g++' : $Config{'ld'}, + #'LD' => $Config{'ld'} == $Config{'cc'} ? 'gcc -std=gnu99 -std=gnu99' : $Config{'ld'}, # Linker flags for building an executable 'LDFLAGS' => $LDFLAGS_magick, @@ -228,7 +233,9 @@ WriteMakefile # 'OPTIMIZE' => '', # Use same compiler as ImageMagick - 'PERLMAINCC' => 'g++ -fopenmp', + 'PERLMAINCC' => ' -fopenmp', + 'AR' => 'ar', + 'LD' => '', # Set Perl installation prefix to ImageMagick installation prefix # 'PREFIX' => '/usr/local',