From: cristy Date: Thu, 15 Dec 2011 01:40:41 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6537 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03f7cf934e865083f570c1d7045f0b6a34011466;p=imagemagick --- diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 8fbcafb57..2e5bd7028 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -1517,7 +1517,12 @@ /* Define if using the dmalloc debugging malloc package */ /* #undef WITH_DMALLOC */ -/* Define if you have WMF library */ +/* Define if you have wmflite library */ +#ifndef MAGICKCORE_WMFLITE_DELEGATE +#define MAGICKCORE_WMFLITE_DELEGATE 1 +#endif + +/* Define if you have wmf library */ /* #undef WMF_DELEGATE */ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most diff --git a/MagickCore/version.h b/MagickCore/version.h index 5479cef78..766ad47da 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,7 +27,7 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC" -#define MagickSVNRevision "6141" +#define MagickSVNRevision "6188" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 diff --git a/Makefile.in b/Makefile.in index 0241a3e68..19997a8f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1589,7 +1589,8 @@ coders_webp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @WEBP_DELEGATE_TRUE@@WITH_MODULES_TRUE@am_coders_webp_la_rpath = \ @WEBP_DELEGATE_TRUE@@WITH_MODULES_TRUE@ -rpath $(codersdir) coders_wmf_la_DEPENDENCIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_coders_wmf_la_OBJECTS = coders/coders_wmf_la-wmf.lo coders_wmf_la_OBJECTS = $(am_coders_wmf_la_OBJECTS) coders_wmf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -2564,6 +2565,7 @@ VERSION = @VERSION@ WEBP_LIBS = @WEBP_LIBS@ WMFDecodeDelegate = @WMFDecodeDelegate@ WMF_LIBS = @WMF_LIBS@ +WMF_LIBS_DEPS = @WMF_LIBS_DEPS@ WWWDecodeDelegate = @WWWDecodeDelegate@ WinPathScript = @WinPathScript@ X11_LIBS = @X11_LIBS@ diff --git a/config/config.h.in b/config/config.h.in index 4b48d53ad..8e56fca1e 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -1008,7 +1008,10 @@ /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC -/* Define if you have WMF library */ +/* Define if you have wmflite library */ +#undef WMFLITE_DELEGATE + +/* Define if you have wmf library */ #undef WMF_DELEGATE /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most diff --git a/config/configure.xml b/config/configure.xml index a502821ee..fe6d6697d 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -10,7 +10,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/configure b/configure index f8b8dba68..40b95d123 100755 --- a/configure +++ b/configure @@ -735,6 +735,7 @@ XML_LIBS XML_DELEGATE_FALSE XML_DELEGATE_TRUE xml2_config +WMF_LIBS_DEPS WMF_LIBS WMF_DELEGATE_FALSE WMF_DELEGATE_TRUE @@ -3609,7 +3610,7 @@ MAGICK_LIBRARY_CURRENT_MIN=`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE` MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE -MAGICK_SVN_REVISION=6141 +MAGICK_SVN_REVISION=6188 @@ -31578,30 +31579,34 @@ fi have_wmf='no' WMF_LIBS='' +WMF_LIBS_DEPS='' +OLIBS="$LIBS" if test "$with_wmf" != 'no'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------------------------------------------" >&5 -$as_echo "$as_me: -------------------------------------------------------------" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5 +$as_echo "-------------------------------------------------------------" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WMF" >&5 $as_echo_n "checking for WMF... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5 -$as_echo "$as_me: " >&6;} - failed=0 - passed=0 - ac_fn_c_check_header_mongrel "$LINENO" "libwmf/eps.h" "ac_cv_header_libwmf_eps_h" "$ac_includes_default" -if test "x$ac_cv_header_libwmf_eps_h" = xyes; then : - passed=`expr $passed + 1` -else - failed=`expr $failed + 1` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } + have_libwmf='no' + have_libwmflite='no' + have_libwmf_ipa_h='no' + + ac_fn_c_check_header_compile "$LINENO" "libwmf/ipa.h" "ac_cv_header_libwmf_ipa_h" "$FT2BUILD_H +" +if test "x$ac_cv_header_libwmf_ipa_h" = xyes; then : + have_libwmf_ipa_h='yes' fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmf_eps_function in -lwmf" >&5 -$as_echo_n "checking for wmf_eps_function in -lwmf... " >&6; } -if ${ac_cv_lib_wmf_wmf_eps_function+:} false; then : + if test "$have_libwmf_ipa_h" = 'yes'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmf_lite_create in -lwmflite" >&5 +$as_echo_n "checking for wmf_lite_create in -lwmflite... " >&6; } +if ${ac_cv_lib_wmflite_wmf_lite_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lwmf "-lwmflite" $LIBS" +LIBS="-lwmflite $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -31611,52 +31616,109 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char wmf_eps_function (); +char wmf_lite_create (); int main () { -return wmf_eps_function (); +return wmf_lite_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_wmf_wmf_eps_function=yes + ac_cv_lib_wmflite_wmf_lite_create=yes else - ac_cv_lib_wmf_wmf_eps_function=no + ac_cv_lib_wmflite_wmf_lite_create=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_wmf_wmf_eps_function" >&5 -$as_echo "$ac_cv_lib_wmf_wmf_eps_function" >&6; } -if test "x$ac_cv_lib_wmf_wmf_eps_function" = xyes; then : - passed=`expr $passed + 1` -else - failed=`expr $failed + 1` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wmflite_wmf_lite_create" >&5 +$as_echo "$ac_cv_lib_wmflite_wmf_lite_create" >&6; } +if test "x$ac_cv_lib_wmflite_wmf_lite_create" = xyes; then : + have_libwmflite='yes' fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if WMF package is complete" >&5 -$as_echo_n "checking if WMF package is complete... " >&6; } - if test $passed -gt 0; then - if test $failed -gt 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: no -- some components failed test" >&5 -$as_echo "$as_me: no -- some components failed test" >&6;} - have_wmf='no (failed tests)' - else - WMF_LIBS='-lwmf -lwmflite' + if test "$have_libwmflite" = 'yes'; then + +$as_echo "#define WMFLITE_DELEGATE 1" >>confdefs.h + + WMF_LIBS='-lwmflite' LIBS="$WMF_LIBS $LIBS" + have_wmf='yes' + else + WMF_LIBS_DEPS='' + WMF_CONFIG_LIBS=`libwmf-config --libs` + for lib in xml2 expat freetype jpeg png z; do + testlib="-l${lib}" + echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib" + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmf_api_create in -lwmf" >&5 +$as_echo_n "checking for wmf_api_create in -lwmf... " >&6; } +if ${ac_cv_lib_wmf_wmf_api_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwmf $WMF_LIBS_DEPS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char wmf_api_create (); +int +main () +{ +return wmf_api_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_wmf_wmf_api_create=yes +else + ac_cv_lib_wmf_wmf_api_create=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_wmf_wmf_api_create" >&5 +$as_echo "$ac_cv_lib_wmf_wmf_api_create" >&6; } +if test "x$ac_cv_lib_wmf_wmf_api_create" = xyes; then : + have_libwmf='yes' +fi + + if test "$have_libwmf" = 'yes'; then $as_echo "#define WMF_DELEGATE 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: yes" >&5 -$as_echo "$as_me: yes" >&6;} - have_wmf='yes' + WMF_LIBS='-lwmf' + LIBS="$WMF_LIBS $LIBS" + have_wmf='yes' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 +$as_echo "no -- some components failed test" >&6; } + have_wmf='no (failed tests)' + have_wmflite='no (failed tests)' + LIBS="$OLIBS" + WMF_LIBS='' + fi fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if WMF package is complete" >&5 +$as_echo_n "checking if WMF package is complete... " >&6; } + if test "$have_wmf" = 'yes'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: no" >&5 -$as_echo "$as_me: no" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi if test "$have_wmf" = 'yes'; then diff --git a/configure.ac b/configure.ac index 65f1faa17..258b18a51 100755 --- a/configure.ac +++ b/configure.ac @@ -2755,34 +2755,56 @@ fi have_wmf='no' WMF_LIBS='' +WMF_LIBS_DEPS='' +OLIBS="$LIBS" if test "$with_wmf" != 'no'; then - AC_MSG_NOTICE([-------------------------------------------------------------]) + AC_MSG_RESULT([-------------------------------------------------------------]) AC_MSG_CHECKING([for WMF]) - AC_MSG_NOTICE([]) - failed=0 - passed=0 - AC_CHECK_HEADER(libwmf/eps.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) - AC_CHECK_LIB(wmf,wmf_eps_function,passed=`expr $passed + 1`,failed=`expr $failed + 1`,"-lwmflite") - AC_MSG_CHECKING([if WMF package is complete]) - if test $passed -gt 0; then - if test $failed -gt 0; then - AC_MSG_NOTICE([no -- some components failed test]) - have_wmf='no (failed tests)' - else - WMF_LIBS='-lwmf -lwmflite' + AC_MSG_RESULT([]) + have_libwmf='no' + have_libwmflite='no' + have_libwmf_ipa_h='no' + + AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H]) + if test "$have_libwmf_ipa_h" = 'yes'; then + AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,) + if test "$have_libwmflite" = 'yes'; then + AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library) + WMF_LIBS='-lwmflite' LIBS="$WMF_LIBS $LIBS" - AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library) - AC_MSG_NOTICE([yes]) have_wmf='yes' + else + WMF_LIBS_DEPS='' + WMF_CONFIG_LIBS=`libwmf-config --libs` + for lib in xml2 expat freetype jpeg png z; do + testlib="-l${lib}" + echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib" + done + AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS) + if test "$have_libwmf" = 'yes'; then + AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library) + WMF_LIBS='-lwmf' + LIBS="$WMF_LIBS $LIBS" + have_wmf='yes' + else + AC_MSG_RESULT([no -- some components failed test]) + have_wmf='no (failed tests)' + have_wmflite='no (failed tests)' + LIBS="$OLIBS" + WMF_LIBS='' + fi fi + fi + AC_MSG_CHECKING([if WMF package is complete]) + if test "$have_wmf" = 'yes'; then + AC_MSG_RESULT([yes]) else - AC_MSG_NOTICE([no]) + AC_MSG_RESULT([no]) fi fi -AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes') +AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes') AC_SUBST(WMF_LIBS) - -dnl =========================================================================== +AC_SUBST(WMF_LIBS_DEPS) dnl ===========================================================================