summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@imendio.com>2005-11-22 09:12:05 +0000
committerAnders Carlsson <andersca@src.gnome.org>2005-11-22 09:12:05 +0000
commitc830201fcd8fb1d63c20fcefc70d36c24e54187d (patch)
tree4c4bc101cec5be62b2c7d24a57dd001ed815fa74 /configure.in
parenta319318a43a3b85d349d22ba8a0a1e1cbda61ac9 (diff)
downloadpango-c830201fcd8fb1d63c20fcefc70d36c24e54187d.tar.gz
Add checks for ATSUI.
2005-11-21 Anders Carlsson <andersca@imendio.com> * configure.in: Add checks for ATSUI. * examples/Makefile.am: Only build pango-cairoview if freetype is detected. * modules/basic/Makefile.am: Add basic ATSUI module. * pango/Makefile.am: Add ATSUI files for cairo backend. * pango/pangocairo-fontmap.c: (pango_cairo_font_map_new): Support creating ATSUI font maps here. * pango/pangoatsui-fontmap.c: * pango/pangoatsui-private.h: * pango/pangoatsui.c: * pango/pangoatsui.h: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: * pango/pangocairo-atsuifont.h: * pango/pangocairo-atsuifontmap.c: Add.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in52
1 files changed, 49 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index a6418690..ced767e5 100644
--- a/configure.in
+++ b/configure.in
@@ -271,11 +271,17 @@ AC_SUBST(WIN32_LIBS)
AM_CONDITIONAL(HAVE_WIN32, $have_win32)
#
+# Checks for ATSUI
+#
+AC_CHECK_HEADER(Carbon/Carbon.h, [have_atsui=true], [have_atsui=true])
+
+#
# Checks for Cairo
#
have_cairo=false
have_cairo_freetype=false
have_cairo_win32=false
+have_cairo_atsui=false
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.2-head, have_cairo=true, :)
@@ -290,7 +296,12 @@ if $have_cairo ; then
if $have_cairo_freetype && $have_freetype ; then
AC_DEFINE(HAVE_CAIRO_FREETYPE, 1, [Whether Cairo uses FreeType for fonts])
else
- have_cairo=false
+ AC_CHECK_LIB(cairo, cairo_atsui_font_face_create_for_atsu_font_id, have_cairo_atsui=true, :)
+ if $have_cairo_atsui && $have_atsui ; then
+ AC_DEFINE(HAVE_CAIRO_ATSUI, 1, [Whether Cairo uses ATSUI for fonts])
+ else
+ have_cairo=false
+ fi
fi
fi
LDFLAGS=$pango_save_ldflags
@@ -299,6 +310,7 @@ fi
AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32 && $have_win32)
AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype && $have_freetype)
+AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui && $have_atsui)
#
# We must have some backend defined, in order for the pango-querymodules
@@ -306,8 +318,8 @@ AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype && $have_freetype)
# a new Pango backend outside of Pango, you are up to sending the necessary
# patch to fix that rule. :-)
#
-if $have_freetype || $have_x || $have_xft || $have_win32 ; then : ; else
- AC_MSG_ERROR([*** Didn't find any of FreeType, X11, or Win32.
+if $have_freetype || $have_x || $have_xft || $have_win32 || $have_cairo_atsui ; then : ; else
+ AC_MSG_ERROR([*** Didn't find any of FreeType, X11, ATSUI or Win32.
*** Must have at least one backend to build Pango.])
fi
@@ -386,6 +398,7 @@ AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x)
INCLUDED_X_MODULES=
INCLUDED_FC_MODULES=
INCLUDED_WIN32_MODULES=
+INCLUDED_ATSUI_MODULES=
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
if echo $indic_modules | egrep "(^| )$module(\$| )" > /dev/null; then
@@ -400,6 +413,8 @@ for module in $included_modules; do
INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
elif echo $module | egrep -- "-win32($|,)" > /dev/null; then
INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
+ elif echo $module | egrep -- "-atsui($|,)" > /dev/null; then
+ INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
else
AC_MSG_ERROR([the specified module $module does not exist])
fi
@@ -409,12 +424,14 @@ IFS="$pango_save_ifs"
AC_SUBST(INCLUDED_X_MODULES)
AC_SUBST(INCLUDED_FC_MODULES)
AC_SUBST(INCLUDED_WIN32_MODULES)
+AC_SUBST(INCLUDED_ATSUI_MODULES)
AM_CONDITIONAL(INCLUDE_ARABIC_FC,echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC_FC,echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
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-x($|,)' > /dev/null)
AM_CONDITIONAL(INCLUDE_HANGUL_FC,echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null)
@@ -699,6 +716,35 @@ cat >> pango/module-defs-win32.c <<EOTEXT
EOTEXT
])
+AC_CONFIG_COMMANDS([pango/module-defs-atsui.c],
+[
+### ATSUI modules
+cat > pango/module-defs-atsui.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "module-defs.h"
+
+PangoIncludedModule _pango_included_atsui_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-atsui.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-atsui.c <<EOTEXT
+ { NULL, NULL, NULL, NULL },
+};
+EOTEXT
+])
+
AC_HEADER_DIRENT
AC_CHECK_HEADERS(unistd.h)