From: cristy Date: Fri, 18 Jun 2010 13:12:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9209 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=712034030e1f437dcce5b8a49c70addc0af36342;p=imagemagick --- diff --git a/config/config.h.in b/config/config.h.in index 2814622d9..8d83d74f5 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -254,12 +254,12 @@ /* Define if you have the header file. */ #undef HAVE_LCMS2_H +/* Define if you have the header file. */ +#undef HAVE_LCMS2_LCMS2_H + /* Define if you have the header file. */ #undef HAVE_LCMS_H -/* Define if you have the header file. */ -#undef HAVE_LCMS_LCMS2_H - /* Define if you have the header file. */ #undef HAVE_LCMS_LCMS_H @@ -685,7 +685,7 @@ /* Define if you have JPEG library */ #undef JPEG_DELEGATE -/* Define if you have LCMS library */ +/* Define if you have LCMS (v1.11 or later) library */ #undef LCMS_DELEGATE /* Directory where architecture-dependent files live. */ diff --git a/config/configure.xml b/config/configure.xml index 9b75f0469..f69e6f176 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -9,7 +9,7 @@ - + diff --git a/configure b/configure index 5c582326e..bed9885b0 100755 --- a/configure +++ b/configure @@ -1248,6 +1248,7 @@ with_jbig with_jpeg with_jp2 with_lcms +with_lcms2 with_lqr with_openexr with_png @@ -1992,7 +1993,8 @@ Optional Packages: --without-jbig disable JBIG support --without-jpeg disable JPEG support --without-jp2 disable JPEG-2000 support - --without-lcms disable LCMS support + --without-lcms disable lcms (v1.1X) support + --without-lcms2 disable lcms (v2.X) support --without-lqr disable Liquid Rescale support --without-openexr disable OpenEXR support --without-png disable PNG support @@ -9706,13 +9708,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:9709: $ac_compile\"" >&5) + (eval echo "\"\$as_me:9711: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:9712: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:9714: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:9715: output\"" >&5) + (eval echo "\"\$as_me:9717: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -10903,7 +10905,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 10906 "configure"' > conftest.$ac_ext + echo '#line 10908 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -12988,11 +12990,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12991: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12993: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12995: \$? = $ac_status" >&5 + echo "$as_me:12997: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13327,11 +13329,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13330: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13332: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13334: \$? = $ac_status" >&5 + echo "$as_me:13336: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13432,11 +13434,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13435: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13437: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13439: \$? = $ac_status" >&5 + echo "$as_me:13441: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13487,11 +13489,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13490: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13492: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13494: \$? = $ac_status" >&5 + echo "$as_me:13496: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15857,7 +15859,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 15860 "configure" +#line 15862 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15953,7 +15955,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 15956 "configure" +#line 15958 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17909,11 +17911,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17912: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17914: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17916: \$? = $ac_status" >&5 + echo "$as_me:17918: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18008,11 +18010,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18011: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18013: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18015: \$? = $ac_status" >&5 + echo "$as_me:18017: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18060,11 +18062,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18063: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18065: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18067: \$? = $ac_status" >&5 + echo "$as_me:18069: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19472,7 +19474,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19475 "configure" +#line 19477 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -28037,6 +28039,7 @@ fi # # Check for LCMS delegate library. # +# Disable LCMS. # Check whether --with-lcms was given. if test "${with_lcms+set}" = set; then : @@ -28045,23 +28048,37 @@ else with_lcms='yes' fi - -if test "$with_lcms" != 'yes'; then +if test "$with_lcms" != 'yes' ; then DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms " fi -have_lcms='no' +# Disable LCMS2. + +# Check whether --with-lcms2 was given. +if test "${with_lcms2+set}" = set; then : + withval=$with_lcms2; with_lcms2=$withval +else + with_lcms2='yes' +fi + +if test "$with_lcms2" != 'yes' ; then + DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 " +fi + +have_lcms2='no' LCMS_LIBS='' -if test "$with_lcms" != 'no'; then +if test "$with_lcms2" != 'no'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5 $as_echo "-------------------------------------------------------------" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 -$as_echo_n "checking for LCMS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS v2" >&5 +$as_echo_n "checking for LCMS v2... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } failed=0 passed=0 have_lcms_header='no' + + # Check for ac_fn_c_check_header_mongrel "$LINENO" "lcms2.h" "ac_cv_header_lcms2_h" "$ac_includes_default" if test "x$ac_cv_header_lcms2_h" = x""yes; then : have_lcms_header='yes' @@ -28069,29 +28086,36 @@ fi if test "$have_lcms_header" = 'yes'; then - passed=`expr $passed + 1` $as_echo "#define HAVE_LCMS2_H 1" >>confdefs.h - else - ac_fn_c_check_header_mongrel "$LINENO" "lcms/lcms2.h" "ac_cv_header_lcms_lcms2_h" "$ac_includes_default" -if test "x$ac_cv_header_lcms_lcms2_h" = x""yes; then : + passed=`expr $passed + 1` + fi + + # Check for >confdefs.h +$as_echo "#define HAVE_LCMS2_LCMS2_H 1" >>confdefs.h - else - failed=`expr $failed + 1` - fi + fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromMem in -llcms2" >&5 -$as_echo_n "checking for cmsOpenProfileFromMem in -llcms2... " >&6; } -if test "${ac_cv_lib_lcms2_cmsOpenProfileFromMem+set}" = set; then : + + # Failed to find lcms header? + if test "$have_lcms_header" != 'yes'; then + failed=`expr $failed + 1` + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsSetLogErrorHandler in -llcms2" >&5 +$as_echo_n "checking for cmsSetLogErrorHandler in -llcms2... " >&6; } +if test "${ac_cv_lib_lcms2_cmsSetLogErrorHandler+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28105,96 +28129,111 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char cmsOpenProfileFromMem (); +char cmsSetLogErrorHandler (); int main () { -return cmsOpenProfileFromMem (); +return cmsSetLogErrorHandler (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lcms2_cmsOpenProfileFromMem=yes + ac_cv_lib_lcms2_cmsSetLogErrorHandler=yes else - ac_cv_lib_lcms2_cmsOpenProfileFromMem=no + ac_cv_lib_lcms2_cmsSetLogErrorHandler=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms2_cmsOpenProfileFromMem" >&5 -$as_echo "$ac_cv_lib_lcms2_cmsOpenProfileFromMem" >&6; } -if test "x$ac_cv_lib_lcms2_cmsOpenProfileFromMem" = x""yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms2_cmsSetLogErrorHandler" >&5 +$as_echo "$ac_cv_lib_lcms2_cmsSetLogErrorHandler" >&6; } +if test "x$ac_cv_lib_lcms2_cmsSetLogErrorHandler" = x""yes; then : passed=`expr $passed + 1` else failed=`expr $failed + 1` fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LCMS2 package is complete" >&5 -$as_echo_n "checking if LCMS2 package is complete... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LCMS v2 package is complete" >&5 +$as_echo_n "checking if LCMS v2 package is complete... " >&6; } if test $passed -gt 0; then - if test $failed -gt 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 + if test $failed -gt 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 $as_echo "no -- some components failed test" >&6; } - have_lcms='no (failed tests)' - else - LCMS_LIBS='-llcms2' - LIBS="$LCMS_LIBS $LIBS" - -$as_echo "#define LCMS_DELEGATE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + have_lcms2='no (failed tests)' + else + LCMS_LIBS='-llcms2' + LIBS="$LCMS_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - have_lcms='yes' - fi + have_lcms2='yes' + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi +# +# Check for LCMS v1 (1.11 or later) +# +if test $have_lcms2 = 'yes'; then + with_lcms='no' +fi + +have_lcms='no' if test "$with_lcms" != 'no'; then -if test "$have_lcms" == 'no'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5 $as_echo "-------------------------------------------------------------" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 -$as_echo_n "checking for LCMS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS v1.1X" >&5 +$as_echo_n "checking for LCMS v1.1X... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } failed=0 passed=0 have_lcms_header='no' - ac_fn_c_check_header_mongrel "$LINENO" "lcms.h" "ac_cv_header_lcms_h" "$ac_includes_default" + + # Check for + if test "$have_lcms_header" != 'yes'; then + ac_fn_c_check_header_mongrel "$LINENO" "lcms.h" "ac_cv_header_lcms_h" "$ac_includes_default" if test "x$ac_cv_header_lcms_h" = x""yes; then : have_lcms_header='yes' fi - if test "$have_lcms_header" = 'yes'; then + if test "$have_lcms_header" = 'yes'; then passed=`expr $passed + 1` $as_echo "#define HAVE_LCMS_H 1" >>confdefs.h - else - ac_fn_c_check_header_mongrel "$LINENO" "lcms/lcms.h" "ac_cv_header_lcms_lcms_h" "$ac_includes_default" + fi + fi + + # Check for + if test "$have_lcms_header" != 'yes'; then + ac_fn_c_check_header_mongrel "$LINENO" "lcms/lcms.h" "ac_cv_header_lcms_lcms_h" "$ac_includes_default" if test "x$ac_cv_header_lcms_lcms_h" = x""yes; then : have_lcms_header='yes' fi - if test "$have_lcms_header" = 'yes'; then - passed=`expr $passed + 1` + if test "$have_lcms_header" = 'yes'; then + passed=`expr $passed + 1` $as_echo "#define HAVE_LCMS_LCMS_H 1" >>confdefs.h - else - failed=`expr $failed + 1` - fi + fi + fi + + # Failed to find lcms header? + if test "$have_lcms_header" != 'yes'; then + failed=`expr $failed + 1` fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromMem in -llcms" >&5 -$as_echo_n "checking for cmsOpenProfileFromMem in -llcms... " >&6; } -if test "${ac_cv_lib_lcms_cmsOpenProfileFromMem+set}" = set; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsSetErrorHandler in -llcms" >&5 +$as_echo_n "checking for cmsSetErrorHandler in -llcms... " >&6; } +if test "${ac_cv_lib_lcms_cmsSetErrorHandler+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28208,27 +28247,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char cmsOpenProfileFromMem (); +char cmsSetErrorHandler (); int main () { -return cmsOpenProfileFromMem (); +return cmsSetErrorHandler (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lcms_cmsOpenProfileFromMem=yes + ac_cv_lib_lcms_cmsSetErrorHandler=yes else - ac_cv_lib_lcms_cmsOpenProfileFromMem=no + ac_cv_lib_lcms_cmsSetErrorHandler=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms_cmsOpenProfileFromMem" >&5 -$as_echo "$ac_cv_lib_lcms_cmsOpenProfileFromMem" >&6; } -if test "x$ac_cv_lib_lcms_cmsOpenProfileFromMem" = x""yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms_cmsSetErrorHandler" >&5 +$as_echo "$ac_cv_lib_lcms_cmsSetErrorHandler" >&6; } +if test "x$ac_cv_lib_lcms_cmsSetErrorHandler" = x""yes; then : passed=`expr $passed + 1` else failed=`expr $failed + 1` @@ -28237,27 +28276,24 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LCMS package is complete" >&5 $as_echo_n "checking if LCMS package is complete... " >&6; } if test $passed -gt 0; then - if test $failed -gt 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 + if test $failed -gt 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 $as_echo "no -- some components failed test" >&6; } - have_lcms='no (failed tests)' - else - LCMS_LIBS='-llcms' - LIBS="$LCMS_LIBS $LIBS" - -$as_echo "#define LCMS_DELEGATE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + have_lcms='no (failed tests)' + else + LCMS_LIBS='-llcms' + LIBS="$LCMS_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - have_lcms='yes' - fi + have_lcms='yes' + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi -fi - if test "$have_lcms" = 'yes'; then + + if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then LCMS_DELEGATE_TRUE= LCMS_DELEGATE_FALSE='#' else @@ -28265,6 +28301,12 @@ else LCMS_DELEGATE_FALSE= fi +if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then + +$as_echo "#define LCMS_DELEGATE 1" >>confdefs.h + +fi + @@ -32432,6 +32474,7 @@ if test "$have_jpeg" = 'yes'; then if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi fi if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi +if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi @@ -35649,7 +35692,8 @@ Graphviz --with-gvc=$with_gvc $have_gvc JBIG --with-jbig=$with_jbig $have_jbig JPEG v1 --with-jpeg=$with_jpeg $have_jpeg JPEG-2000 --with-jp2=$with_jp2 $have_jp2 -LCMS --with-lcms=$with_lcms $have_lcms +LCMS v1 --with-lcms=$with_lcms $have_lcms +LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2 LQR --with-lqr=$with_lqr $have_lqr Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus OpenEXR --with-openexr=$with_openexr $have_openexr @@ -35720,7 +35764,8 @@ Graphviz --with-gvc=$with_gvc $have_gvc JBIG --with-jbig=$with_jbig $have_jbig JPEG v1 --with-jpeg=$with_jpeg $have_jpeg JPEG-2000 --with-jp2=$with_jp2 $have_jp2 -LCMS --with-lcms=$with_lcms $have_lcms +LCMS v1 --with-lcms=$with_lcms $have_lcms +LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2 LQR --with-lqr=$with_lqr $have_lqr Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus OpenEXR --with-openexr=$with_openexr $have_openexr diff --git a/configure.ac b/configure.ac index 6972ce116..df784ab28 100755 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ # # Copyright (C) 2003 - 2008 GraphicsMagick Group -AC_PREREQ(2.63) +AC_PREREQ(2.64) AC_INIT([ImageMagick],[6.6.2],[http://www.imagemagick.org],[ImageMagick]) AC_CONFIG_SRCDIR([magick/MagickCore.h]) AC_CONFIG_AUX_DIR([config]) @@ -2097,98 +2097,135 @@ dnl =========================================================================== # # Check for LCMS delegate library. # +# Disable LCMS. AC_ARG_WITH(lcms, - [AC_HELP_STRING([--without-lcms], - [disable LCMS support])], - [with_lcms=$withval], - [with_lcms='yes']) - -if test "$with_lcms" != 'yes'; then + [ --without-lcms disable lcms (v1.1X) support], + [with_lcms=$withval], + [with_lcms='yes']) +if test "$with_lcms" != 'yes' ; then DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms " fi -have_lcms='no' +# Disable LCMS2. +AC_ARG_WITH(lcms2, + [ --without-lcms2 disable lcms (v2.X) support], + [with_lcms2=$withval], + [with_lcms2='yes']) +if test "$with_lcms2" != 'yes' ; then + DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 " +fi + +have_lcms2='no' LCMS_LIBS='' -if test "$with_lcms" != 'no'; then +if test "$with_lcms2" != 'no'; then AC_MSG_RESULT([-------------------------------------------------------------]) - AC_MSG_CHECKING([for LCMS]) - AC_MSG_RESULT([]) + AC_MSG_CHECKING([for LCMS v2]) + AC_MSG_RESULT() failed=0 passed=0 have_lcms_header='no' + + # Check for AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,) if test "$have_lcms_header" = 'yes'; then + AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the header file.) + passed=`expr $passed + 1` + fi + + # Check for header file.) - else - AC_CHECK_HEADER(lcms/lcms2.h,have_lcms_header='yes',,) - if test "$have_lcms_header" = 'yes'; then - passed=`expr $passed + 1` - AC_DEFINE(HAVE_LCMS_LCMS2_H,1,Define if you have the header file.) - else - failed=`expr $failed + 1` - fi + AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the header file.) + fi + fi + + # Failed to find lcms header? + if test "$have_lcms_header" != 'yes'; then + failed=`expr $failed + 1` fi - AC_CHECK_LIB(lcms2,cmsOpenProfileFromMem,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) - AC_MSG_CHECKING([if LCMS2 package is complete]) + + AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) + AC_MSG_CHECKING(if LCMS v2 package is complete) if test $passed -gt 0; then - if test $failed -gt 0; then - AC_MSG_RESULT([no -- some components failed test]) - have_lcms='no (failed tests)' - else - LCMS_LIBS='-llcms2' - LIBS="$LCMS_LIBS $LIBS" - AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library) - AC_MSG_RESULT([yes]) - have_lcms='yes' - fi + if test $failed -gt 0; then + AC_MSG_RESULT(no -- some components failed test) + have_lcms2='no (failed tests)' + else + LCMS_LIBS='-llcms2' + LIBS="$LCMS_LIBS $LIBS" + AC_MSG_RESULT(yes) + have_lcms2='yes' + fi else - AC_MSG_RESULT([no]) + AC_MSG_RESULT(no) fi fi +# +# Check for LCMS v1 (1.11 or later) +# +if test $have_lcms2 = 'yes'; then + with_lcms='no' +fi + +have_lcms='no' if test "$with_lcms" != 'no'; then -if test "$have_lcms" == 'no'; then AC_MSG_RESULT([-------------------------------------------------------------]) - AC_MSG_CHECKING([for LCMS]) - AC_MSG_RESULT([]) + AC_MSG_CHECKING([for LCMS v1.1X]) + AC_MSG_RESULT() failed=0 passed=0 have_lcms_header='no' - AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,) - if test "$have_lcms_header" = 'yes'; then + + # Check for + if test "$have_lcms_header" != 'yes'; then + AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,) + if test "$have_lcms_header" = 'yes'; then passed=`expr $passed + 1` AC_DEFINE(HAVE_LCMS_H,1,Define if you have the header file.) - else - AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,) - if test "$have_lcms_header" = 'yes'; then - passed=`expr $passed + 1` - AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the header file.) - else - failed=`expr $failed + 1` - fi + fi + fi + + # Check for + if test "$have_lcms_header" != 'yes'; then + AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,) + if test "$have_lcms_header" = 'yes'; then + passed=`expr $passed + 1` + AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the header file.) + fi fi - AC_CHECK_LIB(lcms,cmsOpenProfileFromMem,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) - AC_MSG_CHECKING([if LCMS package is complete]) + + # Failed to find lcms header? + if test "$have_lcms_header" != 'yes'; then + failed=`expr $failed + 1` + fi + + AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) + AC_MSG_CHECKING(if LCMS package is complete) if test $passed -gt 0; then - if test $failed -gt 0; then - AC_MSG_RESULT([no -- some components failed test]) - have_lcms='no (failed tests)' - else - LCMS_LIBS='-llcms' - LIBS="$LCMS_LIBS $LIBS" - AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library) - AC_MSG_RESULT([yes]) - have_lcms='yes' - fi + if test $failed -gt 0; then + AC_MSG_RESULT(no -- some components failed test) + have_lcms='no (failed tests)' + else + LCMS_LIBS='-llcms' + LIBS="$LCMS_LIBS $LIBS" + AC_MSG_RESULT(yes) + have_lcms='yes' + fi else - AC_MSG_RESULT([no]) + AC_MSG_RESULT(no) fi fi + +AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes') +if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then + AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library]) fi -AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes') AC_SUBST(LCMS_LIBS) + dnl =========================================================================== # @@ -3263,6 +3300,7 @@ if test "$have_jpeg" = 'yes'; then if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi fi if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi +if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi @@ -3448,7 +3486,8 @@ Graphviz --with-gvc=$with_gvc $have_gvc JBIG --with-jbig=$with_jbig $have_jbig JPEG v1 --with-jpeg=$with_jpeg $have_jpeg JPEG-2000 --with-jp2=$with_jp2 $have_jp2 -LCMS --with-lcms=$with_lcms $have_lcms +LCMS v1 --with-lcms=$with_lcms $have_lcms +LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2 LQR --with-lqr=$with_lqr $have_lqr Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus OpenEXR --with-openexr=$with_openexr $have_openexr diff --git a/ltdl/config/ltmain.sh b/ltdl/config/ltmain.sh index be43f4188..04eaea408 100755 --- a/ltdl/config/ltmain.sh +++ b/ltdl/config/ltmain.sh @@ -1,6 +1,6 @@ # Generated from ltmain.m4sh. -# libtool (GNU libtool) 2.2.8 +# libtool (GNU libtool) 2.2.10 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.8 +# $progname: (GNU libtool) 2.2.10 # automake: $automake_version # autoconf: $autoconf_version # @@ -78,9 +78,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.8 +VERSION=2.2.10 TIMESTAMP="" -package_revision=1.3169 +package_revision=1.3175 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -124,10 +124,6 @@ export LANGUAGE LC_ALL $lt_unset CDPATH - - - - # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special @@ -655,7 +651,6 @@ func_show_eval_locale () } - # func_version # Echo version message to standard output and exit. func_version () @@ -664,7 +659,7 @@ func_version () :more /\./!{ N - s/\n# // + s/\n# / / b more } :go diff --git a/ltdl/libltdl/lt_dlloader.h b/ltdl/libltdl/lt_dlloader.h index 589fd0dc3..ae131fae9 100644 --- a/ltdl/libltdl/lt_dlloader.h +++ b/ltdl/libltdl/lt_dlloader.h @@ -73,8 +73,8 @@ typedef struct { LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable); LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader); -LT_SCOPE lt_dlvtable * lt_dlloader_remove (const char *name); -LT_SCOPE const lt_dlvtable *lt_dlloader_find (const char *name); +LT_SCOPE lt_dlvtable * lt_dlloader_remove (char *name); +LT_SCOPE const lt_dlvtable *lt_dlloader_find (char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader); diff --git a/ltdl/libltdl/slist.h b/ltdl/libltdl/slist.h index 4d5650997..e4b7ead8d 100644 --- a/ltdl/libltdl/slist.h +++ b/ltdl/libltdl/slist.h @@ -1,6 +1,6 @@ /* slist.h -- generalised singly linked lists - Copyright (C) 2000, 2004, 2009 Free Software Foundation, Inc. + Copyright (C) 2000, 2004 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2000 NOTE: The canonical source of this file is maintained with the @@ -48,8 +48,6 @@ or obtained by writing to the Free Software Foundation, Inc., # define LT_SCOPE #endif -#include - #if defined(__cplusplus) extern "C" { #endif @@ -67,7 +65,7 @@ LT_SCOPE SList *slist_concat (SList *head, SList *tail); LT_SCOPE SList *slist_cons (SList *item, SList *slist); LT_SCOPE SList *slist_delete (SList *slist, void (*delete_fct) (void *item)); -LT_SCOPE SList *slist_remove (SList **phead, SListCallback *find, +LT_SCOPE void * slist_remove (SList **phead, SListCallback *find, void *matchdata); LT_SCOPE SList *slist_reverse (SList *slist); LT_SCOPE SList *slist_sort (SList *slist, SListCompare *compare, diff --git a/ltdl/loaders/loadlibrary.c b/ltdl/loaders/loadlibrary.c index 179c00980..564467651 100644 --- a/ltdl/loaders/loadlibrary.c +++ b/ltdl/loaders/loadlibrary.c @@ -1,7 +1,7 @@ /* loader-loadlibrary.c -- dynamic linking for Win32 Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006, - 2007, 2008, 2010 Free Software Foundation, Inc. + 2007, 2008 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the @@ -98,32 +98,12 @@ get_vtable (lt_user_data loader_data) #include -#define LOCALFREE(mem) LT_STMT_START { \ - if (mem) { LocalFree ((void *)mem); mem = NULL; } } LT_STMT_END -#define LOADLIB__SETERROR(errmsg) LT__SETERRORSTR (loadlibraryerror (errmsg)) -#define LOADLIB_SETERROR(errcode) LOADLIB__SETERROR (LT__STRERROR (errcode)) - -static const char *loadlibraryerror (const char *default_errmsg); -static DWORD WINAPI wrap_getthreaderrormode (void); -static DWORD WINAPI fallback_getthreaderrormode (void); -static BOOL WINAPI wrap_setthreaderrormode (DWORD mode, DWORD *oldmode); -static BOOL WINAPI fallback_setthreaderrormode (DWORD mode, DWORD *oldmode); - -typedef DWORD (WINAPI getthreaderrormode_type) (void); -typedef BOOL (WINAPI setthreaderrormode_type) (DWORD, DWORD *); - -static getthreaderrormode_type *getthreaderrormode = wrap_getthreaderrormode; -static setthreaderrormode_type *setthreaderrormode = wrap_setthreaderrormode; -static char *error_message = 0; - - /* A function called through the vtable when this loader is no longer needed by the application. */ static int vl_exit (lt_user_data LT__UNUSED loader_data) { vtable = NULL; - LOCALFREE (error_message); return 0; } @@ -176,7 +156,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, /* Append a `.' to stop Windows from adding an implicit `.dll' extension. */ if (!len) - len = strlen (wpath); + len = LT_STRLEN (wpath); if (len + 1 >= MAX_PATH) { @@ -190,18 +170,16 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, } { - /* Silence dialog from LoadLibrary on some failures. */ - DWORD errormode = getthreaderrormode (); - DWORD last_error; - - setthreaderrormode (errormode | SEM_FAILCRITICALERRORS, NULL); + /* Silence dialog from LoadLibrary on some failures. + No way to get the error mode, but to set it, + so set it twice to preserve any previous flags. */ + UINT errormode = SetErrorMode(SEM_FAILCRITICALERRORS); + SetErrorMode(errormode | SEM_FAILCRITICALERRORS); module = LoadLibrary (wpath); /* Restore the error mode. */ - last_error = GetLastError (); - setthreaderrormode (errormode, NULL); - SetLastError (last_error); + SetErrorMode(errormode); } /* libltdl expects this function to fail if it is unable @@ -229,9 +207,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename, } } - if (!module) - LOADLIB_SETERROR (CANNOT_OPEN); - else if (cur) + if (cur || !module) { LT__SETERROR (CANNOT_OPEN); module = 0; @@ -249,9 +225,9 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module) { int errors = 0; - if (FreeLibrary ((HMODULE) module) == 0) + if (FreeLibrary((HMODULE) module) == 0) { - LOADLIB_SETERROR (CANNOT_CLOSE); + LT__SETERROR (CANNOT_CLOSE); ++errors; } @@ -268,102 +244,8 @@ vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name) if (!address) { - LOADLIB_SETERROR (SYMBOL_NOT_FOUND); + LT__SETERROR (SYMBOL_NOT_FOUND); } return address; } - - - -/* --- HELPER FUNCTIONS --- */ - - -/* Return the windows error message, or the passed in error message on - failure. */ -static const char * -loadlibraryerror (const char *default_errmsg) -{ - size_t len; - LOCALFREE (error_message); - - FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError (), - 0, - (char *) &error_message, - 0, NULL); - - /* Remove trailing CRNL */ - len = LT_STRLEN (error_message); - if (len && error_message[len - 1] == '\n') - error_message[--len] = LT_EOS_CHAR; - if (len && error_message[len - 1] == '\r') - error_message[--len] = LT_EOS_CHAR; - - return len ? error_message : default_errmsg; -} - -/* A function called through the getthreaderrormode variable which checks - if the system supports GetThreadErrorMode (or GetErrorMode) and arranges - for it or a fallback implementation to be called directly in the future. - The selected version is then called. */ -static DWORD WINAPI -wrap_getthreaderrormode (void) -{ - HMODULE kernel32 = GetModuleHandleA ("kernel32.dll"); - getthreaderrormode - = (getthreaderrormode_type *) GetProcAddress (kernel32, - "GetThreadErrorMode"); - if (!getthreaderrormode) - getthreaderrormode - = (getthreaderrormode_type *) GetProcAddress (kernel32, - "GetErrorMode"); - if (!getthreaderrormode) - getthreaderrormode = fallback_getthreaderrormode; - return getthreaderrormode (); -} - -/* A function called through the getthreaderrormode variable for cases - where the system does not support GetThreadErrorMode or GetErrorMode */ -static DWORD WINAPI -fallback_getthreaderrormode (void) -{ - /* Prior to Windows Vista, the only way to get the current error - mode was to set a new one. In our case, we are setting a new - error mode right after "getting" it while ignoring the error - mode in effect when setting the new error mode, so that's - fairly ok. */ - return (DWORD) SetErrorMode (SEM_FAILCRITICALERRORS); -} - -/* A function called through the setthreaderrormode variable which checks - if the system supports SetThreadErrorMode and arranges for it or a - fallback implementation to be called directly in the future. - The selected version is then called. */ -static BOOL WINAPI -wrap_setthreaderrormode (DWORD mode, DWORD *oldmode) -{ - HMODULE kernel32 = GetModuleHandleA ("kernel32.dll"); - setthreaderrormode - = (setthreaderrormode_type *) GetProcAddress (kernel32, - "SetThreadErrorMode"); - if (!setthreaderrormode) - setthreaderrormode = fallback_setthreaderrormode; - return setthreaderrormode (mode, oldmode); -} - -/* A function called through the setthreaderrormode variable for cases - where the system does not support SetThreadErrorMode. */ -static BOOL WINAPI -fallback_setthreaderrormode (DWORD mode, DWORD *oldmode) -{ - /* Prior to Windows 7, there was no way to set the thread local error - mode, so set the process global error mode instead. */ - DWORD old = (DWORD) SetErrorMode (mode); - if (oldmode) - *oldmode = old; - return TRUE; -} diff --git a/ltdl/lt_dlloader.c b/ltdl/lt_dlloader.c index 2c99a22d4..4e66a6ca1 100644 --- a/ltdl/lt_dlloader.c +++ b/ltdl/lt_dlloader.c @@ -150,7 +150,7 @@ lt_dlloader_get (lt_dlloader loader) modules need this loader; in either case, the loader list is not changed if NULL is returned. */ lt_dlvtable * -lt_dlloader_remove (const char *name) +lt_dlloader_remove (char *name) { const lt_dlvtable * vtable = lt_dlloader_find (name); static const char id_string[] = "lt_dlloader_remove"; @@ -199,12 +199,12 @@ lt_dlloader_remove (const char *name) /* If we got this far, remove the loader from our global list. */ return (lt_dlvtable *) - slist_unbox ((SList *) slist_remove (&loaders, loader_callback, (void *) name)); + slist_unbox ((SList *) slist_remove (&loaders, loader_callback, name)); } const lt_dlvtable * -lt_dlloader_find (const char *name) +lt_dlloader_find (char *name) { - return lt_dlloader_get (slist_find (loaders, loader_callback, (void *) name)); + return lt_dlloader_get (slist_find (loaders, loader_callback, name)); } diff --git a/ltdl/ltdl.c b/ltdl/ltdl.c index 4e1a4025f..7c426351c 100644 --- a/ltdl/ltdl.c +++ b/ltdl/ltdl.c @@ -208,7 +208,7 @@ LT_BEGIN_C_DECLS LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data); LT_END_C_DECLS #ifdef HAVE_LIBDLLOADER -extern lt_dlsymlist preloaded_symbols[]; +extern lt_dlsymlist preloaded_symbols; #endif /* Initialize libltdl. */ @@ -234,7 +234,7 @@ lt_dlinit (void) #ifdef HAVE_LIBDLLOADER if (!errors) { - errors += lt_dlpreload (preloaded_symbols); + errors += lt_dlpreload (&preloaded_symbols); } if (!errors) @@ -994,7 +994,7 @@ trim (char **dest, const char *str) FREE (*dest); - if (!end || end == str) + if (!end) return 1; if (len > 3 && str[0] == '\'') @@ -1265,7 +1265,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, if (vtable) { /* name + "." + libext + NULL */ - archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2); + archive_name = MALLOC (char, LT_STRLEN (name) + LT_STRLEN (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) @@ -1487,7 +1487,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, } -/* If the last error message stored was `FILE_NOT_FOUND', then return +/* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ static int file_not_found (void) @@ -1507,7 +1507,7 @@ file_not_found (void) static int has_library_ext (const char *filename) { - const char * ext = 0; + char * ext = 0; assert (filename); @@ -1615,9 +1615,6 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise) { lt_dlhandle handle = 0; int errors = 0; - const char * saved_error = 0; - - LT__GETERROR (saved_error); /* Can't have symbols hidden and visible at the same time! */ if (advise && advise->is_symlocal && advise->is_symglobal) @@ -1654,7 +1651,6 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise) #if defined(LT_MODULE_EXT) /* Try appending SHLIB_EXT. */ - LT__SETERRORSTR (saved_error); errors = try_dlopen (&handle, filename, shlib_ext, advise); /* As before, if the file was found but loading failed, return now @@ -2066,7 +2062,7 @@ lt_dlerror (void) LT__GETERROR (error); LT__SETERRORSTR (0); - return error; + return error ? error : NULL; } static int diff --git a/ltdl/m4/ltversion.m4 b/ltdl/m4/ltversion.m4 index 2e8f92925..93fc77124 100644 --- a/ltdl/m4/ltversion.m4 +++ b/ltdl/m4/ltversion.m4 @@ -9,15 +9,15 @@ # Generated from ltversion.in. -# serial 3169 ltversion.m4 +# serial 3175 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.8]) -m4_define([LT_PACKAGE_REVISION], [1.3169]) +m4_define([LT_PACKAGE_VERSION], [2.2.10]) +m4_define([LT_PACKAGE_REVISION], [1.3175]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.8' -macro_revision='1.3169' +[macro_version='2.2.10' +macro_revision='1.3175' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/ltdl/slist.c b/ltdl/slist.c index 25906a43a..c99f39914 100644 --- a/ltdl/slist.c +++ b/ltdl/slist.c @@ -1,6 +1,6 @@ /* slist.c -- generalised singly linked lists - Copyright (C) 2000, 2004, 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2000 NOTE: The canonical source of this file is maintained with the @@ -32,7 +32,6 @@ or obtained by writing to the Free Software Foundation, Inc., #include "slist.h" #include -#include static SList * slist_sort_merge (SList *left, SList *right, SListCompare *compare, void *userdata); @@ -74,7 +73,7 @@ slist_delete (SList *head, void (*delete_fct) (void *item)) the stale item, you should probably return that from FIND if it makes a successful match. Don't forget to slist_unbox() every item in a boxed list before operating on its contents. */ -SList * +void * slist_remove (SList **phead, SListCallback *find, void *matchdata) { SList *stale = 0; @@ -108,7 +107,7 @@ slist_remove (SList **phead, SListCallback *find, void *matchdata) } } - return (SList *) result; + return result; } /* Call FIND repeatedly with each element of SLIST and MATCHDATA, until @@ -315,9 +314,6 @@ slist_sort (SList *slist, SListCompare *compare, void *userdata) left = slist; right = slist->next; - if (!right) - return left; - /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off the end. SLIST must be about half way along. */ while (right && (right = right->next)) diff --git a/magick/magick-config.h b/magick/magick-config.h index 0371f44a9..83cf54cc9 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -379,14 +379,14 @@ /* Define if you have the header file. */ /* #undef HAVE_LCMS2_H */ +/* Define if you have the header file. */ +/* #undef HAVE_LCMS2_LCMS2_H */ + /* Define if you have the header file. */ #ifndef MAGICKCORE_HAVE_LCMS_H #define MAGICKCORE_HAVE_LCMS_H 1 #endif -/* Define if you have the header file. */ -/* #undef HAVE_LCMS_LCMS2_H */ - /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -1038,7 +1038,7 @@ #define MAGICKCORE_JPEG_DELEGATE 1 #endif -/* Define if you have LCMS library */ +/* Define if you have LCMS (v1.11 or later) library */ #ifndef MAGICKCORE_LCMS_DELEGATE #define MAGICKCORE_LCMS_DELEGATE 1 #endif diff --git a/magick/profile.c b/magick/profile.c index a83724aa0..b8830f986 100644 --- a/magick/profile.c +++ b/magick/profile.c @@ -77,9 +77,7 @@ /* Define declarations. */ -#if defined(MAGICKCORE_LCMS_DELEGATE) -#if defined(LCMS_VERSION) && (LCMS_VERSION < 2000) -#define cmsUInt32Number DWORD +#if !defined(LCMS_VERSION) || (LCMS_VERSION < 2000) #define cmsSigCmykData icSigCmykData #define cmsSigGrayData icSigGrayData #define cmsSigLabData icSigLabData @@ -89,7 +87,13 @@ #define cmsSigYCbCrData icSigYCbCrData #define cmsSigLinkClass icSigLinkClass #define cmsColorSpaceSignature icColorSpaceSignature -#endif +#define cmsUInt32Number DWORD +#define cmsSetLogErrorHandler(handler) cmsSetErrorHandler(handler) +#define cmsCreateTransformTHR(context,source_profile,source_type, \ + target_profile,target_type,intent,flags) cmsCreateTransform(source_profile, \ + source_type,target_profile,target_type,intent,flags); +#define cmsOpenProfileFromMemTHR(context,profile,length) \ + cmsOpenProfileFromMem(profile,length) #endif /* @@ -412,8 +416,8 @@ static cmsHTRANSFORM *AcquireTransformThreadSet( (void) ResetMagickMemory(transform,0,number_threads*sizeof(*transform)); for (i=0; i < (ssize_t) number_threads; i++) { - transform[i]=cmsCreateTransform(source_profile,source_type,target_profile, - target_type,intent,flags); + transform[i]=cmsCreateTransformTHR(image,source_profile,source_type, + target_profile,target_type,intent,flags); if (transform[i] == (cmsHTRANSFORM) NULL) return(DestroyTransformThreadSet(transform)); } @@ -807,17 +811,22 @@ static MagickBooleanType SetsRGBImageProfile(Image *image) } #if defined(MAGICKCORE_LCMS_DELEGATE) #if defined(LCMS_VERSION) && (LCMS_VERSION >= 2000) -static void LCMSErrorHandler(cmsContext context,cmsUInt32Number severity, +static void LCMSExceptionHandler(cmsContext context,cmsUInt32Number severity, const char *message) { - (void) context; - (void) LogMagickEvent(TransformEvent,GetMagickModule(),"lcms: #%d, %s", + Image + *image; + + (void) LogMagickEvent(TransformEvent,GetMagickModule(),"lcms: #%u, %s", severity,message != (char *) NULL ? message : "no message"); + image=(Image *) context; + if (image != (Image *) NULL) + (void) ThrowMagickException(&image->exception,GetMagickModule(), + ImageWarning,"UnableToTransformColorspace","`%s'",image->filename); + } -#endif -#if defined(LCMS_VERSION) && (LCMS_VERSION < 2000) -#if defined(LCMS_VERSION) && (LCMS_VERSION > 1010) -static int LCMSErrorHandler(int severity,const char *message) +#else +static int LCMSExceptionHandler(int severity,const char *message) { (void) LogMagickEvent(TransformEvent,GetMagickModule(),"lcms: #%d, %s", severity,message != (char *) NULL ? message : "no message"); @@ -825,7 +834,6 @@ static int LCMSErrorHandler(int severity,const char *message) } #endif #endif -#endif MagickExport MagickBooleanType ProfileImage(Image *image,const char *name, const void *datum,const size_t length, @@ -944,18 +952,10 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name, /* Transform pixel colors as defined by the color profiles. */ -#if defined(LCMS_VERSION) && (LCMS_VERSION >= 2000) - cmsSetLogErrorHandler(LCMSErrorHandler); -#endif -#if defined(LCMS_VERSION) && (LCMS_VERSION < 2000) -#if defined(LCMS_VERSION) && (LCMS_VERSION > 1010) - cmsSetErrorHandler(LCMSErrorHandler); -#else - (void) cmsErrorAction(LCMS_ERROR_SHOW); -#endif -#endif - source_profile=cmsOpenProfileFromMem(GetStringInfoDatum(profile), - (cmsUInt32Number) GetStringInfoLength(profile)); + cmsSetLogErrorHandler(LCMSExceptionHandler); + source_profile=cmsOpenProfileFromMemTHR(image, + GetStringInfoDatum(profile),(cmsUInt32Number) + GetStringInfoLength(profile)); if (source_profile == (cmsHPROFILE) NULL) ThrowBinaryException(ResourceLimitError, "ColorspaceColorProfileMismatch",name); @@ -1014,7 +1014,7 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name, if (icc_profile != (StringInfo *) NULL) { target_profile=source_profile; - source_profile=cmsOpenProfileFromMem( + source_profile=cmsOpenProfileFromMemTHR(image, GetStringInfoDatum(icc_profile),(cmsUInt32Number) GetStringInfoLength(icc_profile)); if (source_profile == (cmsHPROFILE) NULL) diff --git a/magick/version.h b/magick/version.h index 602c43462..87486f93e 100644 --- a/magick/version.h +++ b/magick/version.h @@ -33,8 +33,8 @@ extern "C" { #define MagickLibAddendum "-7" #define MagickLibInterface 3 #define MagickLibMinInterface 3 -#define MagickReleaseDate "2010-06-16" -#define MagickChangeDate "20100614" +#define MagickReleaseDate "2010-06-18" +#define MagickChangeDate "20100617" #define MagickAuthoritativeURL "http://www.imagemagick.org" #define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.6.2/index.html" #if (MAGICKCORE_QUANTUM_DEPTH == 8)