diff options
author | Kristian Rietveld <kris@gtk.org> | 2010-03-05 21:46:38 +0100 |
---|---|---|
committer | Kristian Rietveld <kris@gtk.org> | 2011-04-14 12:30:03 +0200 |
commit | 87882adf1ccacfb49e8c119b1fcb6d13a0e4731f (patch) | |
tree | e2a7f92ba363d739d75a9a3d36914b8c9948909d /configure.in | |
parent | 08fd5cf33d875c161dd5280b92d1633469943620 (diff) | |
download | pango-87882adf1ccacfb49e8c119b1fcb6d13a0e4731f.tar.gz |
Start implementation of CoreText backend
On Mac OS X systems where CoreText is available (that is, 10.5 or
higher), we will build the CoreText backend instead of the ATSUI
backend. In this case, the ATSUI backend will not be built and
installed. This change is necessary because since Mac OS 10.5
ATSUI has been marked as deprecated.
For older systems, we will have to continue to use the
ATSUI backend.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 03c79a84..7d8cbeb3 100644 --- a/configure.in +++ b/configure.in @@ -337,6 +337,25 @@ fi AC_CHECK_HEADER(Carbon/Carbon.h, [have_atsui=true], [have_atsui=false]) # +# Checks for CoreText +# + +AC_MSG_CHECKING([for CoreText availability]) +pango_save_libs=$LIBS +LIBS="$LIBS -framework ApplicationServices" +AC_TRY_LINK([#include <Carbon/Carbon.h>], [CTGetCoreTextVersion ();], +[have_core_text=yes], [have_core_text=no]) +LIBS=$pango_save_libs + +if test "$have_core_text" = "yes"; then + AC_DEFINE(HAVE_CORE_TEXT, 1, [Whether CoreText is available on the system]) +fi + +AC_MSG_RESULT([$have_core_text]) + +AM_CONDITIONAL(HAVE_CORE_TEXT, test "$have_core_text" = "yes") + +# # Checks for Cairo # have_cairo=false @@ -378,7 +397,7 @@ if $have_cairo ; then have_cairo=true fi - if $have_atsui; then + if test $have_atsui -o $have_core_text; then PKG_CHECK_EXISTS(cairo-quartz-font >= $cairo_required, have_cairo_atsui=true, :) fi if $have_cairo_atsui; then @@ -487,7 +506,7 @@ GOBJECT_INTROSPECTION_CHECK([0.9.5]) # Modules to build # arabic_modules="arabic-fc,arabic-lang" -basic_modules="basic-fc,basic-win32,basic-x,basic-atsui" +basic_modules="basic-fc,basic-win32,basic-x,basic-atsui,basic-coretext" hangul_modules="hangul-fc" hebrew_modules="hebrew-fc" indic_modules="indic-fc,indic-lang" @@ -543,12 +562,14 @@ INCLUDED_X_MODULES= INCLUDED_FC_MODULES= INCLUDED_WIN32_MODULES= INCLUDED_ATSUI_MODULES= +INCLUDED_CORE_TEXT_MODULES= INCLUDED_LANG_MODULES= AC_SUBST(INCLUDED_X_MODULES) AC_SUBST(INCLUDED_FC_MODULES) AC_SUBST(INCLUDED_WIN32_MODULES) AC_SUBST(INCLUDED_ATSUI_MODULES) +AC_SUBST(INCLUDED_CORE_TEXT_MODULES) AC_SUBST(INCLUDED_LANG_MODULES) IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=", " @@ -564,6 +585,7 @@ for module in $included_modules; do *-fc) INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES $included_path" ;; *-win32) INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES $included_path" ;; *-atsui) INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES $included_path" ;; + *-coretext) INCLUDED_CORE_TEXT_MODULES="$INCLUDED_CORE_TEXT_MODULES $included_path" ;; *-lang) INCLUDED_LANG_MODULES="$INCLUDED_LANG_MODULES $included_path" ;; *) IFS="$pango_save_ifs"; AC_MSG_ERROR([specified module $module not recognized]) ;; esac @@ -576,6 +598,7 @@ AM_CONDITIONAL(INCLUDE_BASIC_FC, echo $included_modules | egrep '(^|,)basic-fc($ AM_CONDITIONAL(INCLUDE_BASIC_WIN32, echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) AM_CONDITIONAL(INCLUDE_BASIC_X, echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) AM_CONDITIONAL(INCLUDE_BASIC_ATSUI, echo $included_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_BASIC_CORE_TEXT, echo $included_modules | egrep '(^|,)basic-coretext($|,)' > /dev/null) AM_CONDITIONAL(INCLUDE_HANGUL_FC, echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) AM_CONDITIONAL(INCLUDE_HEBREW_FC, echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) AM_CONDITIONAL(INCLUDE_INDIC_FC, echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) @@ -592,6 +615,7 @@ AM_CONDITIONAL(DYNAMIC_BASIC_FC, echo $dynamic_modules | egrep '(^|,)basic-fc($| AM_CONDITIONAL(DYNAMIC_BASIC_WIN32, echo $dynamic_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) AM_CONDITIONAL(DYNAMIC_BASIC_X, echo $dynamic_modules | egrep '(^|,)basic-x($|,)' > /dev/null) AM_CONDITIONAL(DYNAMIC_BASIC_ATSUI, echo $dynamic_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_BASIC_CORE_TEXT, echo $dynamic_modules | egrep '(^|,)basic-coretext($|,)' > /dev/null) AM_CONDITIONAL(DYNAMIC_HANGUL_FC, echo $dynamic_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) AM_CONDITIONAL(DYNAMIC_HEBREW_FC, echo $dynamic_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) AM_CONDITIONAL(DYNAMIC_INDIC_FC, echo $dynamic_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) @@ -886,6 +910,35 @@ cat >> pango/module-defs-atsui.c <<EOTEXT EOTEXT ]) +AC_CONFIG_COMMANDS([pango/module-defs-coretext.c], +[ +### CoreText modules +cat > pango/module-defs-coretext.c <<EOTEXT +/* Autogenerated by configure. Do not edit */ + +#include "module-defs.h" + +PangoIncludedModule _pango_included_core_text_modules@<:@@:>@ = { +EOTEXT + +IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," +for module in $included_modules; do + if echo $module | egrep -- "-atsui($|,)" > /dev/null; then + module_c=`echo $module | sed s/-/_/` + cat >> pango/module-defs-coretext.c <<EOTEXT + { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create }, +EOTEXT + fi +done + +IFS="$pango_save_ifs" + +cat >> pango/module-defs-coretext.c <<EOTEXT + { NULL, NULL, NULL, NULL }, +}; +EOTEXT +]) + AC_CONFIG_COMMANDS([pango/module-defs-lang.c], [ ### lang modules |