From 853809365f332d534444679c9a0a09e7dbebf7b4 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 25 Apr 2011 17:11:52 +0000 Subject: [PATCH] --- Magick++/bin/Magick++-config | 2 +- PerlMagick/Makefile.PL | 6 +++--- PerlMagick/check.sh | 4 ++-- coders/png.c | 2 +- config/configure.xml | 8 ++++---- libtool | 16 ++++++++-------- magick/Magick-config | 2 +- magick/magick-config.h | 12 +++++++++--- wand/Wand-config | 2 +- 9 files changed, 30 insertions(+), 24 deletions(-) diff --git a/Magick++/bin/Magick++-config b/Magick++/bin/Magick++-config index 63faaca27..fa4a26ecc 100755 --- a/Magick++/bin/Magick++-config +++ b/Magick++/bin/Magick++-config @@ -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 " + 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 "${usage}" 1>&2 diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index 83ca8f3fc..41a41bf8e 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -198,7 +198,7 @@ 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", @@ -207,7 +207,7 @@ WriteMakefile '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 +228,7 @@ WriteMakefile # 'OPTIMIZE' => '', # Use same compiler as ImageMagick - 'PERLMAINCC' => 'g++ -fopenmp', + 'PERLMAINCC' => ' -fopenmp', # Set Perl installation prefix to ImageMagick installation prefix # 'PREFIX' => '/usr/local', diff --git a/PerlMagick/check.sh b/PerlMagick/check.sh index 521a28a24..731f0ecc0 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='g++' TEST_VERBOSE=1 test + ${MAKE} -f Makefile.aperl CC='gcc -std=gnu99 -std=gnu99' TEST_VERBOSE=1 test elif test -f Makefile -a -f Magick.o; then # Shared build test incantation - ${MAKE} CC='g++' TEST_VERBOSE=1 test + ${MAKE} CC='gcc -std=gnu99 -std=gnu99' TEST_VERBOSE=1 test else echo 'PerlMagick has not been built!' exit 1 diff --git a/coders/png.c b/coders/png.c index ded28b8c0..837543642 100644 --- a/coders/png.c +++ b/coders/png.c @@ -8645,7 +8645,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image_depth > MAGICKCORE_QUANTUM_DEPTH) image_depth=MAGICKCORE_QUANTUM_DEPTH; - if ((image_colors == 0) || ((ssize_t) image_colors-1 > MaxColormapSize)) + if ((image_colors == 0) || ((ssize_t) (image_colors-1) > MaxColormapSize)) image_colors=(int) (one << image_depth); if (image_depth > 8) diff --git a/config/configure.xml b/config/configure.xml index 3a97fc0d9..fcd05c312 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -12,7 +12,7 @@ - + @@ -22,16 +22,16 @@ - + - + - + diff --git a/libtool b/libtool index 4ecdcfc58..7b4dd920d 100755 --- a/libtool +++ b/libtool @@ -74,7 +74,7 @@ DLLTOOL="false" OBJDUMP="objdump" # Whether or not to build shared libraries. -build_libtool_libs=no +build_libtool_libs=yes # 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=needless +fast_install=yes # The host system. host_alias= @@ -161,7 +161,7 @@ old_postuninstall_cmds="" lock_old_archive_extraction=no # A C compiler. -LTCC="g++" +LTCC="gcc -std=gnu99 -std=gnu99" # 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=no +dlopen_self=yes # Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown +dlopen_self_static=yes # 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="g++" +CC="gcc -std=gnu99 -std=gnu99" # Is the compiler the GNU compiler? with_gcc=yes # Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" +no_builtin_flag=" -fno-builtin" # 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=yes +build_libtool_need_lc=no # 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 ef87e9f77..ef6408ca0 100755 --- a/magick/Magick-config +++ b/magick/Magick-config @@ -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 " + 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 "${usage}" 1>&2 diff --git a/magick/magick-config.h b/magick/magick-config.h index 2e55f41be..a42a7bf66 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -502,7 +502,9 @@ #endif /* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP_FILEIO */ +#ifndef MAGICKCORE_HAVE_MMAP_FILEIO +#define MAGICKCORE_HAVE_MMAP_FILEIO 1 +#endif /* Define to 1 if you have the `munmap' function. */ #ifndef MAGICKCORE_HAVE_MUNMAP @@ -1027,7 +1029,9 @@ #endif /* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ +#ifndef MAGICKCORE_HAVE__BOOL +#define MAGICKCORE_HAVE__BOOL 1 +#endif /* Define to 1 if you have the `_exit' function. */ #ifndef MAGICKCORE_HAVE__EXIT @@ -1098,7 +1102,9 @@ /* #undef LQR_DELEGATE */ /* Define if using libltdl to support dynamically loadable modules */ -/* #undef LTDL_DELEGATE */ +#ifndef MAGICKCORE_LTDL_DELEGATE +#define MAGICKCORE_LTDL_DELEGATE 1 +#endif /* Define if the OS needs help to load dependent libraries for dlopen(). */ /* #undef LTDL_DLOPEN_DEPLIBS */ diff --git a/wand/Wand-config b/wand/Wand-config index 2296fec0f..6e6ca30c5 100755 --- a/wand/Wand-config +++ b/wand/Wand-config @@ -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 " + 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 "${usage}" 1>&2 -- 2.49.0