From: cristy Date: Thu, 24 Jan 2013 00:22:19 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03f187ee83f1927717c93c57af06d5e030a194be;p=imagemagick --- diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index 85199d14c..8b423d5a3 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -82,9 +82,7 @@ #if defined(__MINGW32__) || defined(__MINGW64__) # undef interface #endif -#if defined(MAGICKCORE_HAVE_FT2BUILD_H) -# include -#endif +#include #if defined(FT_FREETYPE_H) # include FT_FREETYPE_H #else diff --git a/MagickCore/magick-baseconfig.h b/MagickCore/magick-baseconfig.h index 77969af4f..76e591fa1 100644 --- a/MagickCore/magick-baseconfig.h +++ b/MagickCore/magick-baseconfig.h @@ -79,7 +79,7 @@ /* Define if you have FlashPIX library */ /* #undef FPX_DELEGATE */ -/* Define if you have FreeType (TrueType font) library */ +/* Define if you have FREETYPE library */ #ifndef MAGICKCORE_FREETYPE_DELEGATE #define MAGICKCORE_FREETYPE_DELEGATE 1 #endif @@ -98,6 +98,11 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARM_LIMITS_H */ +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_ARPA_INET_H +#define MAGICKCORE_HAVE_ARPA_INET_H 1 +#endif + /* Define to 1 if you have the `asinh' function. */ #ifndef MAGICKCORE_HAVE_ASINH #define MAGICKCORE_HAVE_ASINH 1 @@ -267,11 +272,6 @@ #define MAGICKCORE_HAVE_FSEEKO 1 #endif -/* Define to 1 if you have the header file. */ -#ifndef MAGICKCORE_HAVE_FT2BUILD_H -#define MAGICKCORE_HAVE_FT2BUILD_H 1 -#endif - /* Define to 1 if you have the `ftime' function. */ #ifndef MAGICKCORE_HAVE_FTIME #define MAGICKCORE_HAVE_FTIME 1 diff --git a/MagickCore/version.h b/MagickCore/version.h index bc17602ca..e8c8c6960 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,17 +27,17 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2013 ImageMagick Studio LLC" -#define MagickSVNRevision "10572:10583M" +#define MagickSVNRevision "10737:10755M" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 8,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 8 #define MagickLibMinInterface 8 -#define MagickReleaseDate "2013-01-10" +#define MagickReleaseDate "2013-01-23" #define MagickChangeDate "20121005" #define MagickAuthoritativeURL "http://www.imagemagick.org" -#define MagickFeatures "DistributedPixelCache HDRI OpenMP" +#define MagickFeatures "DPC HDRI OpenMP" #define MagickDelegates "bzlib freetype jp2 jpeg lcms lzma ps tiff x xml zlib" #define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-7.0.0/index.html" #if (MAGICKCORE_QUANTUM_DEPTH == 8) diff --git a/Makefile.in b/Makefile.in index 12354e9d3..753406c1f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2530,6 +2530,7 @@ FILTER_PATH = @FILTER_PATH@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FPX_LIBS = @FPX_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ GDI32_LIBS = @GDI32_LIBS@ GOMP_LIBS = @GOMP_LIBS@ @@ -2787,7 +2788,6 @@ dejavu_font_dir = @dejavu_font_dir@ docdir = $(DOCUMENTATION_PATH) dvidir = @dvidir@ exec_prefix = @exec_prefix@ -freetype_config = @freetype_config@ ghostscript_font_dir = @ghostscript_font_dir@ host = @host@ host_alias = @host_alias@ diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index ec31c7a38..7e11c47cb 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -161,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.. -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; +my $INC_magick = '-I../ -I.. -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; my $LIBS_magick = '-L../MagickCore/.libs -lMagickCore-Q16HDRI -lperl -lm'; -my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"; -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"; +my $CCFLAGS_magick = "$Config{'ccflags'} -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"; +my $LDFLAGS_magick = "-L../MagickCore/.libs -lMagickCore-Q16HDRI $Config{'ldflags'} "; +my $LDDLFLAGS_magick = "-L../MagickCore/.libs -lMagickCore-Q16HDRI $Config{'lddlflags'} "; if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) { my($Ipaths, $Lpaths) = AutodetectWin32gcc(); @@ -206,7 +206,7 @@ WriteMakefile #'CC' => 'gcc -std=gnu99 -std=gnu99', # C pre-processor flags (e.g. -I & -D options) - # 'CPPFLAGS' => "$Config{'cppflags'} -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/freetype2 -I/usr/include/libxml2", + # 'CPPFLAGS' => "$Config{'cppflags'} -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2", # C compiler flags (e.g. -O -g) 'CCFLAGS' => $CCFLAGS_magick, diff --git a/coders/ttf.c b/coders/ttf.c index 822ec06c3..1979c3884 100644 --- a/coders/ttf.c +++ b/coders/ttf.c @@ -57,9 +57,7 @@ #include "MagickCore/type.h" #include "MagickWand/MagickWand.h" #if defined(MAGICKCORE_FREETYPE_DELEGATE) -#if defined(MAGICKCORE_HAVE_FT2BUILD_H) -# include -#endif +#include #if defined(FT_FREETYPE_H) # include FT_FREETYPE_H #else diff --git a/config/config.h.in b/config/config.h.in index f3b4e1cf9..e84517f2b 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -58,7 +58,7 @@ /* Define if you have FlashPIX library */ #undef FPX_DELEGATE -/* Define if you have FreeType (TrueType font) library */ +/* Define if you have FREETYPE library */ #undef FREETYPE_DELEGATE /* Define if you have Ghostscript library or framework */ @@ -73,6 +73,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ARM_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + /* Define to 1 if you have the `asinh' function. */ #undef HAVE_ASINH @@ -182,9 +185,6 @@ /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO -/* Define to 1 if you have the header file. */ -#undef HAVE_FT2BUILD_H - /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME diff --git a/configure b/configure index f484375d0..a6c487e32 100755 --- a/configure +++ b/configure @@ -813,10 +813,10 @@ GVC_CFLAGS GS_LIBS GS_DELEGATE_FALSE GS_DELEGATE_TRUE -FREETYPE_LIBS FREETYPE_DELEGATE_FALSE FREETYPE_DELEGATE_TRUE -freetype_config +FREETYPE_LIBS +FREETYPE_CFLAGS FONTCONFIG_DELEGATE_FALSE FONTCONFIG_DELEGATE_TRUE FONTCONFIG_LIBS @@ -1190,6 +1190,8 @@ AUTOTRACE_CFLAGS AUTOTRACE_LIBS FONTCONFIG_CFLAGS FONTCONFIG_LIBS +FREETYPE_CFLAGS +FREETYPE_LIBS GVC_CFLAGS GVC_LIBS LQR_CFLAGS @@ -1958,6 +1960,10 @@ Some influential environment variables: C compiler flags for FONTCONFIG, overriding pkg-config FONTCONFIG_LIBS linker flags for FONTCONFIG, overriding pkg-config + FREETYPE_CFLAGS + C compiler flags for FREETYPE, overriding pkg-config + FREETYPE_LIBS + linker flags for FREETYPE, overriding pkg-config GVC_CFLAGS C compiler flags for GVC, overriding pkg-config GVC_LIBS linker flags for GVC, overriding pkg-config LQR_CFLAGS C compiler flags for LQR, overriding pkg-config @@ -3650,7 +3656,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=10572:10583M +MAGICK_SVN_REVISION=10737:10755M @@ -21508,7 +21514,7 @@ fi # Check additional headers -for ac_header in arm/limits.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h +for ac_header in arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -25001,7 +25007,7 @@ if test "$ac_res" != no; then : $as_echo "#define HAVE_SOCKET 1" >>confdefs.h - MAGICK_FEATURES="DistributedPixelCache $MAGICK_FEATURES" + MAGICK_FEATURES="DPC $MAGICK_FEATURES" fi @@ -28950,7 +28956,7 @@ fi # -# Check for freetype delegate library. +# Check for the Freetype delegate library. # # Check whether --with-freetype was given. @@ -28961,181 +28967,95 @@ else fi - if test "$with_freetype" != 'yes'; then DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype " fi have_freetype='no' -FREETYPE_LIBS='' -if test "$with_freetype" != 'no'; then +FREETYPE_CFLAGS="" +FREETYPE_LIBS="" +FREETYPE_PKG="" +if test "x$with_freetype" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5 $as_echo "-------------------------------------------------------------" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeType 2.0 " >&5 -$as_echo_n "checking for FreeType 2.0 ... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - failed=0 - passed=0 - PERSIST_LDFLAGS="$LDFLAGS" - PERSIST_CPPFLAGS="$CPPFLAGS" - freetype_config='' - # Allow the user to specify the location of freetype. - if test "$with_freetype" != 'yes'; then - if test -x "${with_freetype}/bin/freetype-config"; then - freetype_config="${with_freetype}/bin/freetype-config" - elif test -x "${with_freetype}"; then - freetype_config=${with_freetype} - fi - fi - if test -z "$freetype_config"; then - # Extract the first word of "freetype-config", so it can be a program name with args. -set dummy freetype-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_freetype_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $freetype_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_freetype_config="$freetype_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_freetype_config="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -freetype_config=$ac_cv_path_freetype_config -if test -n "$freetype_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $freetype_config" >&5 -$as_echo "$freetype_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - fi - if test -n "$freetype_config"; then - freetype_prefix=`${freetype_config} --prefix` - freetype_exec_prefix=`${freetype_config} --exec-prefix` - LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib" - CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2" - fi - - if test "$FREETYPE_LIBS" = ''; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 -$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } -if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfreetype $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 +$as_echo_n "checking for FREETYPE... " >&6; } -/* 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 FT_Init_FreeType (); -int -main () -{ -return FT_Init_FreeType (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_freetype_FT_Init_FreeType=yes +if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` else - ac_cv_lib_freetype_FT_Init_FreeType=no + pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 -$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } -if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then : - FREETYPE_LIBS='-lfreetype' +if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi - if test "$FREETYPE_LIBS" != ''; then - passed=`expr $passed + 1` - else - failed=`expr $failed + 1` - LDFLAGS="$PERSIST_LDFLAGS" - fi - fi - ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default" -if test "x$ac_cv_header_ft2build_h" = xyes; then : - FT2BUILD_H='#include ' -else - ft2build='' -fi +if test $pkg_failed = yes; then - ac_fn_c_check_header_compile "$LINENO" "freetype/freetype.h" "ac_cv_header_freetype_freetype_h" "$FT2BUILD_H -" -if test "x$ac_cv_header_freetype_freetype_h" = xyes; then : - have_freetype_h='yes' +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - have_freetype_h='no' + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` + else + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$FREETYPE_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_freetype=no +elif test $pkg_failed = untried; then + have_freetype=no +else + FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS + FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_freetype=yes +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } +fi - if test "$have_freetype_h" = 'yes'; then - passed=`expr $passed + 1` - else - failed=`expr $failed + 1` - CPPFLAGS="$PERSIST_CPPFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FreeType package is complete" >&5 -$as_echo_n "checking if FreeType package is complete... " >&6; } - if test $passed -gt 0; then - if test $failed -gt 0; then - FREETYPE_LIBS='' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5 -$as_echo "no -- some components failed test" >&6; } - have_freetype='no (failed tests)' - else - LIBS="$FREETYPE_LIBS $LIBS" +if test "$have_freetype" = 'yes'; then $as_echo "#define FREETYPE_DELEGATE 1" >>confdefs.h - if test "$ac_cv_header_ft2build_h" = 'yes'; then - -$as_echo "#define HAVE_FT2BUILD_H 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_freetype='yes' - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi + CFLAGS="$FREETYPE_CFLAGS $CFLAGS" fi + if test "$have_freetype" = 'yes'; then FREETYPE_DELEGATE_TRUE= FREETYPE_DELEGATE_FALSE='#' @@ -29147,6 +29067,7 @@ fi + # # Check for Ghostscript library or framework. # @@ -30763,6 +30684,178 @@ $as_echo "yes" >&6; } fi if test $passed -gt 0 -a $failed -le 0; then + if test "1${var}" = '17' ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng17" >&5 +$as_echo_n "checking for png_get_io_ptr in -lpng17... " >&6; } +if ${ac_cv_lib_png17_png_get_io_ptr+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng17 $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 png_get_io_ptr (); +int +main () +{ +return png_get_io_ptr (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png17_png_get_io_ptr=yes +else + ac_cv_lib_png17_png_get_io_ptr=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_png17_png_get_io_ptr" >&5 +$as_echo "$ac_cv_lib_png17_png_get_io_ptr" >&6; } +if test "x$ac_cv_lib_png17_png_get_io_ptr" = xyes; then : + passed=`expr $passed + 1` +else + failed=`expr $failed + 1` +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_longjmp in -lpng17" >&5 +$as_echo_n "checking for png_longjmp in -lpng17... " >&6; } +if ${ac_cv_lib_png17_png_longjmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng17 $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 png_longjmp (); +int +main () +{ +return png_longjmp (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png17_png_longjmp=yes +else + ac_cv_lib_png17_png_longjmp=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_png17_png_longjmp" >&5 +$as_echo "$ac_cv_lib_png17_png_longjmp" >&6; } +if test "x$ac_cv_lib_png17_png_longjmp" = xyes; then : + passed=`expr $passed + 1` +else + failed=`expr $failed + 1` +fi + + fi + if test "1${var}" = '16' ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng16" >&5 +$as_echo_n "checking for png_get_io_ptr in -lpng16... " >&6; } +if ${ac_cv_lib_png16_png_get_io_ptr+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng16 $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 png_get_io_ptr (); +int +main () +{ +return png_get_io_ptr (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png16_png_get_io_ptr=yes +else + ac_cv_lib_png16_png_get_io_ptr=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_png16_png_get_io_ptr" >&5 +$as_echo "$ac_cv_lib_png16_png_get_io_ptr" >&6; } +if test "x$ac_cv_lib_png16_png_get_io_ptr" = xyes; then : + passed=`expr $passed + 1` +else + failed=`expr $failed + 1` +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_longjmp in -lpng16" >&5 +$as_echo_n "checking for png_longjmp in -lpng16... " >&6; } +if ${ac_cv_lib_png16_png_longjmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng16 $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 png_longjmp (); +int +main () +{ +return png_longjmp (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png16_png_longjmp=yes +else + ac_cv_lib_png16_png_longjmp=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_png16_png_longjmp" >&5 +$as_echo "$ac_cv_lib_png16_png_longjmp" >&6; } +if test "x$ac_cv_lib_png16_png_longjmp" = xyes; then : + passed=`expr $passed + 1` +else + failed=`expr $failed + 1` +fi + + fi if test "1${var}" = '15' ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng15" >&5 $as_echo_n "checking for png_get_io_ptr in -lpng15... " >&6; } diff --git a/configure.ac b/configure.ac index fdfc215c6..69f22f50b 100755 --- a/configure.ac +++ b/configure.ac @@ -1920,7 +1920,7 @@ AC_SUBST(FONTCONFIG_LIBS) dnl =========================================================================== # -# Check for freetype delegate library. +# Check for the Freetype delegate library. # AC_ARG_WITH([freetype], [AC_HELP_STRING([--without-freetype], @@ -1928,81 +1928,27 @@ AC_ARG_WITH([freetype], [with_freetype=$withval], [with_freetype='yes']) - if test "$with_freetype" != 'yes'; then DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype " fi have_freetype='no' -FREETYPE_LIBS='' -if test "$with_freetype" != 'no'; then +FREETYPE_CFLAGS="" +FREETYPE_LIBS="" +FREETYPE_PKG="" +if test "x$with_freetype" = "xyes"; then AC_MSG_RESULT([-------------------------------------------------------------]) - AC_MSG_CHECKING(for FreeType 2.0 ) - AC_MSG_RESULT() - failed=0 - passed=0 - PERSIST_LDFLAGS="$LDFLAGS" - PERSIST_CPPFLAGS="$CPPFLAGS" - freetype_config='' - # Allow the user to specify the location of freetype. - if test "$with_freetype" != 'yes'; then - if test -x "${with_freetype}/bin/freetype-config"; then - freetype_config="${with_freetype}/bin/freetype-config" - elif test -x "${with_freetype}"; then - freetype_config=${with_freetype} - fi - fi - if test -z "$freetype_config"; then - AC_PATH_PROG(freetype_config,freetype-config,)dnl - fi - if test -n "$freetype_config"; then - freetype_prefix=`${freetype_config} --prefix` - freetype_exec_prefix=`${freetype_config} --exec-prefix` - LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib" - CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2" - fi - -dnl First see if there is a library - if test "$FREETYPE_LIBS" = ''; then - AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,) - if test "$FREETYPE_LIBS" != ''; then - passed=`expr $passed + 1` - else - failed=`expr $failed + 1` - LDFLAGS="$PERSIST_LDFLAGS" - fi - fi - -dnl Now test for the headers - AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include '],[ft2build=''],[]) - AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H]) - if test "$have_freetype_h" = 'yes'; then - passed=`expr $passed + 1` - else - failed=`expr $failed + 1` - CPPFLAGS="$PERSIST_CPPFLAGS" - fi + PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no) + AC_MSG_RESULT([]) +fi - AC_MSG_CHECKING(if FreeType package is complete) - if test $passed -gt 0; then - if test $failed -gt 0; then - FREETYPE_LIBS='' - AC_MSG_RESULT(no -- some components failed test) - have_freetype='no (failed tests)' - else - LIBS="$FREETYPE_LIBS $LIBS" - AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library) - if test "$ac_cv_header_ft2build_h" = 'yes'; then - AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the header file.]) - fi - AC_MSG_RESULT(yes) - have_freetype='yes' - fi - else - AC_MSG_RESULT(no) - fi +if test "$have_freetype" = 'yes'; then + AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library) + CFLAGS="$FREETYPE_CFLAGS $CFLAGS" fi + AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes') +AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) dnl ===========================================================================