diff --git a/Magick++/bin/Magick++-config b/Magick++/bin/Magick++-config index fa4a26eccf..f98e6c9aa9 100755 --- a/Magick++/bin/Magick++-config +++ b/Magick++/bin/Magick++-config @@ -40,7 +40,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo '6.6.9 Q16 ' + echo '6.6.9 Q16 HDRI' ;; --cflags) echo "-I${includedir} -fopenmp" @@ -55,7 +55,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread " ;; *) echo "${usage}" 1>&2 diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index 41a41bf8e2..83ca8f3fc1 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -198,7 +198,7 @@ WriteMakefile 'INC' => $INC_magick, # C compiler - #'CC' => 'gcc -std=gnu99 -std=gnu99', + #'CC' => 'g++', # 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", @@ -207,7 +207,7 @@ WriteMakefile 'CCFLAGS' => $CCFLAGS_magick, # Linker - #'LD' => $Config{'ld'} == $Config{'cc'} ? 'gcc -std=gnu99 -std=gnu99' : $Config{'ld'}, + #'LD' => $Config{'ld'} == $Config{'cc'} ? 'g++' : $Config{'ld'}, # Linker flags for building an executable 'LDFLAGS' => $LDFLAGS_magick, @@ -228,7 +228,7 @@ WriteMakefile # 'OPTIMIZE' => '', # Use same compiler as ImageMagick - 'PERLMAINCC' => ' -fopenmp', + 'PERLMAINCC' => 'g++ -fopenmp', # Set Perl installation prefix to ImageMagick installation prefix # 'PREFIX' => '/usr/local', diff --git a/PerlMagick/check.sh b/PerlMagick/check.sh index 731f0ecc02..521a28a248 100755 --- a/PerlMagick/check.sh +++ b/PerlMagick/check.sh @@ -41,10 +41,10 @@ fi if test -x PerlMagick -a -f Makefile.aperl ; then # Static build test incantation - ${MAKE} -f Makefile.aperl CC='gcc -std=gnu99 -std=gnu99' TEST_VERBOSE=1 test + ${MAKE} -f Makefile.aperl CC='g++' TEST_VERBOSE=1 test elif test -f Makefile -a -f Magick.o; then # Shared build test incantation - ${MAKE} CC='gcc -std=gnu99 -std=gnu99' TEST_VERBOSE=1 test + ${MAKE} CC='g++' TEST_VERBOSE=1 test else echo 'PerlMagick has not been built!' exit 1 diff --git a/config/configure.xml b/config/configure.xml index d9c1d372d2..7064fa9d9d 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -12,7 +12,7 @@ - + @@ -22,21 +22,21 @@ - + - + - + - + diff --git a/libtool b/libtool index 7b4dd920df..4ecdcfc58d 100755 --- a/libtool +++ b/libtool @@ -74,7 +74,7 @@ DLLTOOL="false" OBJDUMP="objdump" # Whether or not to build shared libraries. -build_libtool_libs=yes +build_libtool_libs=no # Whether or not to build static libraries. build_old_libs=yes @@ -83,7 +83,7 @@ build_old_libs=yes pic_mode=default # Whether or not to optimize for fast installation. -fast_install=yes +fast_install=needless # The host system. host_alias= @@ -161,7 +161,7 @@ old_postuninstall_cmds="" lock_old_archive_extraction=no # A C compiler. -LTCC="gcc -std=gnu99 -std=gnu99" +LTCC="g++" # LTCC compiler flags. LTCFLAGS="-fopenmp -g -O2 -Wall -pthread" @@ -281,10 +281,10 @@ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /us dlopen_support=yes # Whether dlopen of programs is supported. -dlopen_self=yes +dlopen_self=no # Whether dlopen of statically linked programs is supported. -dlopen_self_static=yes +dlopen_self_static=unknown # Commands to strip libraries. old_striplib="strip --strip-debug" @@ -302,13 +302,13 @@ reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" # A language specific compiler. -CC="gcc -std=gnu99 -std=gnu99" +CC="g++" # Is the compiler the GNU compiler? with_gcc=yes # Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" +no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" # Additional compiler flags for building library objects. pic_flag=" -fPIC -DPIC" @@ -323,7 +323,7 @@ link_static_flag="" compiler_c_o="yes" # Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no +build_libtool_need_lc=yes # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=no diff --git a/magick/Magick-config b/magick/Magick-config index ef6408ca0c..dd241305e0 100755 --- a/magick/Magick-config +++ b/magick/Magick-config @@ -37,7 +37,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo '6.6.9 Q16 ' + echo '6.6.9 Q16 HDRI' ;; --cflags) echo "-I${includedir} -fopenmp" @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread " ;; *) echo "${usage}" 1>&2 diff --git a/magick/magick-config.h b/magick/magick-config.h index a42a7bf66d..c5b9be1650 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -502,9 +502,7 @@ #endif /* Define to 1 if you have a working `mmap' system call. */ -#ifndef MAGICKCORE_HAVE_MMAP_FILEIO -#define MAGICKCORE_HAVE_MMAP_FILEIO 1 -#endif +/* #undef HAVE_MMAP_FILEIO */ /* Define to 1 if you have the `munmap' function. */ #ifndef MAGICKCORE_HAVE_MUNMAP @@ -1029,9 +1027,7 @@ #endif /* Define to 1 if the system has the type `_Bool'. */ -#ifndef MAGICKCORE_HAVE__BOOL -#define MAGICKCORE_HAVE__BOOL 1 -#endif +/* #undef HAVE__BOOL */ /* Define to 1 if you have the `_exit' function. */ #ifndef MAGICKCORE_HAVE__EXIT @@ -1059,7 +1055,9 @@ #endif /* accurately represent the wide range of intensity levels in real scenes */ -/* #undef HDRI_SUPPORT */ +#ifndef MAGICKCORE_HDRI_SUPPORT +#define MAGICKCORE_HDRI_SUPPORT 1 +#endif /* Define if you have umem memory allocation library */ /* #undef HasUMEM */ @@ -1102,9 +1100,7 @@ /* #undef LQR_DELEGATE */ /* Define if using libltdl to support dynamically loadable modules */ -#ifndef MAGICKCORE_LTDL_DELEGATE -#define MAGICKCORE_LTDL_DELEGATE 1 -#endif +/* #undef LTDL_DELEGATE */ /* Define if the OS needs help to load dependent libraries for dlopen(). */ /* #undef LTDL_DLOPEN_DEPLIBS */ diff --git a/magick/statistic.c b/magick/statistic.c index 16cbcd3bc4..4858ef12b5 100644 --- a/magick/statistic.c +++ b/magick/statistic.c @@ -1595,7 +1595,7 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); (void) ResetMagickMemory(channel_statistics,0,length* sizeof(*channel_statistics)); - for (i=0; i <= CompositeChannels; i++) + for (i=0; i <= (ssize_t) CompositeChannels; i++) { channel_statistics[i].depth=1; channel_statistics[i].maxima=(-1.0E-37); @@ -1622,8 +1622,9 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, { depth=channel_statistics[RedChannel].depth; range=GetQuantumRange(depth); - status=GetRedPixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetRedPixelComponent(p),range), - range) ? MagickTrue : MagickFalse; + status=GetRedPixelComponent(p) != ScaleAnyToQuantum( + ScaleQuantumToAny(GetRedPixelComponent(p),range),range) ? + MagickTrue : MagickFalse; if (status != MagickFalse) { channel_statistics[RedChannel].depth++; @@ -1634,8 +1635,9 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, { depth=channel_statistics[GreenChannel].depth; range=GetQuantumRange(depth); - status=GetGreenPixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetGreenPixelComponent(p), - range),range) ? MagickTrue : MagickFalse; + status=GetGreenPixelComponent(p) != ScaleAnyToQuantum( + ScaleQuantumToAny(GetGreenPixelComponent(p),range),range) ? + MagickTrue : MagickFalse; if (status != MagickFalse) { channel_statistics[GreenChannel].depth++; @@ -1646,8 +1648,9 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, { depth=channel_statistics[BlueChannel].depth; range=GetQuantumRange(depth); - status=GetBluePixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny(GetBluePixelComponent(p), - range),range) ? MagickTrue : MagickFalse; + status=GetBluePixelComponent(p) != ScaleAnyToQuantum( + ScaleQuantumToAny(GetBluePixelComponent(p),range),range) ? + MagickTrue : MagickFalse; if (status != MagickFalse) { channel_statistics[BlueChannel].depth++; @@ -1660,8 +1663,9 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, { depth=channel_statistics[OpacityChannel].depth; range=GetQuantumRange(depth); - status=GetOpacityPixelComponent(p) != ScaleAnyToQuantum(ScaleQuantumToAny( - GetOpacityPixelComponent(p),range),range) ? MagickTrue : MagickFalse; + status=GetOpacityPixelComponent(p) != ScaleAnyToQuantum( + ScaleQuantumToAny(GetOpacityPixelComponent(p),range),range) ? + MagickTrue : MagickFalse; if (status != MagickFalse) { channel_statistics[OpacityChannel].depth++; @@ -1691,9 +1695,11 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, channel_statistics[RedChannel].sum+=GetRedPixelComponent(p); channel_statistics[RedChannel].sum_squared+=(double) GetRedPixelComponent(p)* GetRedPixelComponent(p); - channel_statistics[RedChannel].sum_cubed+=(double) GetRedPixelComponent(p)*GetRedPixelComponent(p)* + channel_statistics[RedChannel].sum_cubed+=(double) + GetRedPixelComponent(p)*GetRedPixelComponent(p)* GetRedPixelComponent(p); - channel_statistics[RedChannel].sum_fourth_power+=(double) GetRedPixelComponent(p)*GetRedPixelComponent(p)* + channel_statistics[RedChannel].sum_fourth_power+=(double) + GetRedPixelComponent(p)*GetRedPixelComponent(p)* GetRedPixelComponent(p)*GetRedPixelComponent(p); if ((double) GetGreenPixelComponent(p) < channel_statistics[GreenChannel].minima) channel_statistics[GreenChannel].minima=(double) @@ -1702,12 +1708,14 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, channel_statistics[GreenChannel].maxima=(double) GetGreenPixelComponent(p); channel_statistics[GreenChannel].sum+=GetGreenPixelComponent(p); - channel_statistics[GreenChannel].sum_squared+=(double) GetGreenPixelComponent(p)* + channel_statistics[GreenChannel].sum_squared+=(double) + GetGreenPixelComponent(p)*GetGreenPixelComponent(p); + channel_statistics[GreenChannel].sum_cubed+=(double) + GetGreenPixelComponent(p)*GetGreenPixelComponent(p)* GetGreenPixelComponent(p); - channel_statistics[GreenChannel].sum_cubed+=(double) GetGreenPixelComponent(p)*GetGreenPixelComponent(p)* - GetGreenPixelComponent(p); - channel_statistics[GreenChannel].sum_fourth_power+=(double) GetGreenPixelComponent(p)* - GetGreenPixelComponent(p)*GetGreenPixelComponent(p)*GetGreenPixelComponent(p); + channel_statistics[GreenChannel].sum_fourth_power+=(double) + GetGreenPixelComponent(p)*GetGreenPixelComponent(p)* + GetGreenPixelComponent(p)*GetGreenPixelComponent(p); if ((double) GetBluePixelComponent(p) < channel_statistics[BlueChannel].minima) channel_statistics[BlueChannel].minima=(double) GetBluePixelComponent(p); @@ -1715,12 +1723,14 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, channel_statistics[BlueChannel].maxima=(double) GetBluePixelComponent(p); channel_statistics[BlueChannel].sum+=GetBluePixelComponent(p); - channel_statistics[BlueChannel].sum_squared+=(double) GetBluePixelComponent(p)* + channel_statistics[BlueChannel].sum_squared+=(double) + GetBluePixelComponent(p)*GetBluePixelComponent(p); + channel_statistics[BlueChannel].sum_cubed+=(double) + GetBluePixelComponent(p)*GetBluePixelComponent(p)* GetBluePixelComponent(p); - channel_statistics[BlueChannel].sum_cubed+=(double) GetBluePixelComponent(p)*GetBluePixelComponent(p)* - GetBluePixelComponent(p); - channel_statistics[BlueChannel].sum_fourth_power+=(double) GetBluePixelComponent(p)* - GetBluePixelComponent(p)*GetBluePixelComponent(p)*GetBluePixelComponent(p); + channel_statistics[BlueChannel].sum_fourth_power+=(double) + GetBluePixelComponent(p)*GetBluePixelComponent(p)* + GetBluePixelComponent(p)*GetBluePixelComponent(p); if (image->matte != MagickFalse) { if ((double) GetOpacityPixelComponent(p) < channel_statistics[OpacityChannel].minima) @@ -1732,10 +1742,12 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, channel_statistics[OpacityChannel].sum+=GetOpacityPixelComponent(p); channel_statistics[OpacityChannel].sum_squared+=(double) GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p); - channel_statistics[OpacityChannel].sum_cubed+=(double) GetOpacityPixelComponent(p)* - GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p); + channel_statistics[OpacityChannel].sum_cubed+=(double) + GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)* + GetOpacityPixelComponent(p); channel_statistics[OpacityChannel].sum_fourth_power+=(double) - GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p); + GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p)* + GetOpacityPixelComponent(p)*GetOpacityPixelComponent(p); } if (image->colorspace == CMYKColorspace) { @@ -1756,7 +1768,7 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, } } area=(double) image->columns*image->rows; - for (i=0; i < CompositeChannels; i++) + for (i=0; i < (ssize_t) CompositeChannels; i++) { channel_statistics[i].sum/=area; channel_statistics[i].sum_squared/=area; @@ -1768,24 +1780,28 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, channel_statistics[i].variance-(channel_statistics[i].mean* channel_statistics[i].mean)); } - for (i=0; i < CompositeChannels; i++) + for (i=0; i < (ssize_t) CompositeChannels; i++) { channel_statistics[CompositeChannels].depth=(size_t) MagickMax((double) channel_statistics[CompositeChannels].depth,(double) channel_statistics[i].depth); channel_statistics[CompositeChannels].minima=MagickMin( - channel_statistics[CompositeChannels].minima,channel_statistics[i].minima); + channel_statistics[CompositeChannels].minima, + channel_statistics[i].minima); channel_statistics[CompositeChannels].maxima=MagickMax( - channel_statistics[CompositeChannels].maxima,channel_statistics[i].maxima); + channel_statistics[CompositeChannels].maxima, + channel_statistics[i].maxima); channel_statistics[CompositeChannels].sum+=channel_statistics[i].sum; channel_statistics[CompositeChannels].sum_squared+= channel_statistics[i].sum_squared; - channel_statistics[CompositeChannels].sum_cubed+=channel_statistics[i].sum_cubed; + channel_statistics[CompositeChannels].sum_cubed+= + channel_statistics[i].sum_cubed; channel_statistics[CompositeChannels].sum_fourth_power+= channel_statistics[i].sum_fourth_power; channel_statistics[CompositeChannels].mean+=channel_statistics[i].mean; - channel_statistics[CompositeChannels].variance+=channel_statistics[i].variance- - channel_statistics[i].mean*channel_statistics[i].mean; + channel_statistics[CompositeChannels].variance+= + channel_statistics[i].variance-channel_statistics[i].mean* + channel_statistics[i].mean; channel_statistics[CompositeChannels].standard_deviation+= channel_statistics[i].variance-channel_statistics[i].mean* channel_statistics[i].mean; @@ -1805,7 +1821,7 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image, sqrt(channel_statistics[CompositeChannels].standard_deviation/channels); channel_statistics[CompositeChannels].kurtosis/=channels; channel_statistics[CompositeChannels].skewness/=channels; - for (i=0; i <= CompositeChannels; i++) + for (i=0; i <= (ssize_t) CompositeChannels; i++) { if (channel_statistics[i].standard_deviation == 0.0) continue; diff --git a/wand/Wand-config b/wand/Wand-config index 6e6ca30c56..49c6e7699c 100755 --- a/wand/Wand-config +++ b/wand/Wand-config @@ -37,7 +37,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo '6.6.9 Q16 ' + echo '6.6.9 Q16 HDRI' ;; --cflags) echo "-I${includedir} -fopenmp" @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl" + echo "-L${libdir} -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread " ;; *) echo "${usage}" 1>&2