FreeType autoconf checks - please test
This works on my system (Red Hat 7.1 with FreeType 2.0.1). Please try it on other variants and let me know if it works. -- ======================================================================== Ian Pilcher ian.pilcher(a)home.com ======================================================================== diff -urN ../wine-20010529cvs/configure.in ./configure.in --- ../wine-20010529cvs/configure.in Thu May 31 09:16:57 2001 +++ ./configure.in Thu May 31 09:19:41 2001 @@ -402,8 +402,21 @@ wine_cv_msg_freetype=yes else AC_DEFINE(HAVE_FREETYPE) - FREETYPELIBS=`$ft_devel --libs` - FREETYPEINCL=`$ft_devel --cflags` + FREETYPELIBS=`$ft_devel --libs` + FREETYPEINCL=`$ft_devel --cflags` + ft_incl_dir=${FREETYPEINCL#-I} + old_c_include_path="$C_INCLUDE_PATH" + C_INCLUDE_PATH="$ft_incl_dir:$C_INCLUDE_PATH" + export C_INCLUDE_PATH + ft_incl_dir=$ft_incl_dir/freetype + AC_CHECK_HEADER($ft_incl_dir/freetype.h,AC_DEFINE(HAVE_FREETYPE_H)) + AC_CHECK_HEADER($ft_incl_dir/ftglyph.h,AC_DEFINE(HAVE_FTGLYPH_H)) + AC_CHECK_HEADER($ft_incl_dir/tttables.h,AC_DEFINE(HAVE_TTTABLES_H)) + AC_CHECK_HEADER($ft_incl_dir/ftnames.h,AC_DEFINE(HAVE_FTNAMES_H)) + AC_CHECK_HEADER($ft_incl_dir/ftsnames.h,AC_DEFINE(HAVE_FTSNAMES_H)) + AC_CHECK_HEADER($ft_incl_dir/ttnameid.h,AC_DEFINE(HAVE_TTNAMEID_H)) + C_INCLUDE_PATH="$old_c_include_path" + export C_INCLUDE_PATH wine_cv_msg_freetype=no fi fi diff -urN ../wine-20010529cvs/dlls/wineps/truetype.c ./dlls/wineps/truetype.c --- ../wine-20010529cvs/dlls/wineps/truetype.c Thu May 31 09:17:26 2001 +++ ./dlls/wineps/truetype.c Thu May 31 09:17:56 2001 @@ -9,11 +9,30 @@ #ifdef HAVE_FREETYPE +/* + * These stupid #ifdefs should work for FreeType 2.0.1 and 2.0.2. Beyond that + * is anybody's guess. + */ + +#ifdef HAVE_FREETYPE_H #include <freetype/freetype.h> -#include FT_NAMES_H -#include FT_TRUETYPE_NAMES_H -#include FT_TRUETYPE_TABLES_H -#include FT_GLYPH_H +#endif +#ifdef HAVE_FTGLYPH_H +#include <freetype/ftglyph.h> +#endif +#ifdef HAVE_TTTABLES_H +#include <freetype/tttables.h> +#endif +#ifdef HAVE_FTNAMES_H +#include <freetype/ftnames.h> +#endif +#ifdef HAVE_FTSNAMES_H +#include <freetype/ftsnames.h> +#endif +#ifdef HAVE_TTNAMEID_H +#include <freetype/ttnameid.h> +#endif + #include <sys/types.h> #include <dirent.h> #include <string.h> diff -urN ../wine-20010529cvs/include/acconfig.h ./include/acconfig.h --- ../wine-20010529cvs/include/acconfig.h Tue May 29 18:16:35 2001 +++ ./include/acconfig.h Thu May 31 09:17:56 2001 @@ -129,3 +129,11 @@ /* Define if FreeType 2 is installed */ #undef HAVE_FREETYPE + +/* Define if various FreeType headers are present */ +#undef HAVE_FREETYPE_H +#undef HAVE_FTGLYPH_H +#undef HAVE_TTTABLES_H +#undef HAVE_FTNAMES_H +#undef HAVE_FTSNAMES_H +#undef HAVE_TTNAMEID_H
On Thu, May 31, 2001 at 10:02:55AM -0500, Ian Pilcher wrote:
This works on my system (Red Hat 7.1 with FreeType 2.0.1). Please try it on other variants and let me know if it works.
Ian, Looks good with freetype 2.0.3 (and RH 7.1). It's not an offical rpm though, I just dropped the 2.0.3 tarball into the build directory and tweaked the spec file a little. Huw.
participants (2)
-
Huw D M Davies -
Ian Pilcher