diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c
index 85199d1..8b423d5 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 <ft2build.h>
-#endif
+#include <ft2build.h>
#if defined(FT_FREETYPE_H)
# include FT_FREETYPE_H
#else
diff --git a/MagickCore/magick-baseconfig.h b/MagickCore/magick-baseconfig.h
index 77969af..76e591f 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 <arm/limits.h> header file. */
/* #undef HAVE_ARM_LIMITS_H */
+/* Define to 1 if you have the <arpa/inet.h> 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 <ft2build.h> 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 bc17602..e8c8c69 100644
--- a/MagickCore/version.h
+++ b/MagickCore/version.h
@@ -27,17 +27,17 @@
*/
#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 12354e9..753406c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2530,6 +2530,7 @@
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 @@
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 ec31c7a..7e11c47 100644
--- a/PerlMagick/Makefile.PL
+++ b/PerlMagick/Makefile.PL
@@ -161,11 +161,11 @@
}
# 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 @@
#'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 822ec06..1979c38 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 <ft2build.h>
-#endif
+#include <ft2build.h>
#if defined(FT_FREETYPE_H)
# include FT_FREETYPE_H
#else
diff --git a/config/config.h.in b/config/config.h.in
index f3b4e1c..e84517f 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 <arm/limits.h> header file. */
#undef HAVE_ARM_LIMITS_H
+/* Define to 1 if you have the <arpa/inet.h> 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 <ft2build.h> 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 f484375..a6c487e 100755
--- a/configure
+++ b/configure
@@ -813,10 +813,10 @@
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_LIBS
FONTCONFIG_CFLAGS
FONTCONFIG_LIBS
+FREETYPE_CFLAGS
+FREETYPE_LIBS
GVC_CFLAGS
GVC_LIBS
LQR_CFLAGS
@@ -1958,6 +1960,10 @@
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_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 @@
# 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 @@
$as_echo "#define HAVE_SOCKET 1" >>confdefs.h
- MAGICK_FEATURES="DistributedPixelCache $MAGICK_FEATURES"
+ MAGICK_FEATURES="DPC $MAGICK_FEATURES"
fi
@@ -28950,7 +28956,7 @@
#
-# Check for freetype delegate library.
+# Check for the Freetype delegate library.
#
# Check whether --with-freetype was given.
@@ -28961,181 +28967,95 @@
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; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
+$as_echo_n "checking for FREETYPE... " >&6; }
+
+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
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+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 $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _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; }
- 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. */
-
-/* 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
-else
- ac_cv_lib_freetype_FT_Init_FreeType=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_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'
-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 <ft2build.h>'
-else
- ft2build=''
-fi
-
-
- 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'
-else
- have_freetype_h='no'
-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 @@
+
#
# Check for Ghostscript library or framework.
#
@@ -30763,6 +30684,178 @@
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 fdfc215..69f22f5 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1920,7 +1920,7 @@
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 @@
[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.h>'],[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
-
- 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 <ft2build.h> header file.])
- fi
- AC_MSG_RESULT(yes)
- have_freetype='yes'
- fi
- else
- AC_MSG_RESULT(no)
- fi
+ PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
+ AC_MSG_RESULT([])
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 ===========================================================================