summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2001-01-03 10:45:12 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-01-03 10:45:12 +0000
commitd5b358fe3e5123842533ea445460d8a337eced5d (patch)
treec51bb9232a7933ca280f68737a0c60b4c9b11250
parentdc23b8bf572adc64cb57be39fdaf02732e50bb72 (diff)
downloadpango-d5b358fe3e5123842533ea445460d8a337eced5d.tar.gz
Update the default list of included modules for
2001-01-03 Alexander Larsson <alexl@redhat.com> * configure.in: Update the default list of included modules for --with-included-modules=yes to include all new modules. Split INCLUDED_MODULES and module-defs.c into per shaper engine type lists. * modules/arabic/Makefile.am: Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT. * modules/arabic/arabic-xft.c: Change module prefix to _pango_arabic_xft_ * modules/basic/Makefile.am: Build static libs for all included modules. * modules/basic/basic-ft2.c: Change module prefix to _pango_basic_ft2_ * modules/basic/basic-xft.c: Change module prefix to _pango_basic_xft_ * pango/Makefile.am: Include correct module-defs-XXX in libs. * pango/modules.h: Split _pango_included_modules[] into separate lists. * pango/pangox.c: * pango/pangoft2.c: * pango/pangoxft-fontmap.c: Register built in modules.
-rw-r--r--ChangeLog34
-rw-r--r--ChangeLog.pre-1-034
-rw-r--r--ChangeLog.pre-1-1034
-rw-r--r--ChangeLog.pre-1-234
-rw-r--r--ChangeLog.pre-1-434
-rw-r--r--ChangeLog.pre-1-634
-rw-r--r--ChangeLog.pre-1-834
-rw-r--r--configure.in116
-rw-r--r--modules/arabic/Makefile.am36
-rw-r--r--modules/arabic/arabic-fc.c4
-rw-r--r--modules/arabic/arabic-xft.c4
-rw-r--r--modules/basic/Makefile.am42
-rw-r--r--modules/basic/basic-fc.c6
-rw-r--r--modules/basic/basic-ft2.c4
-rw-r--r--modules/basic/basic-xft.c6
-rw-r--r--pango/Makefile.am18
-rw-r--r--pango/modules.h4
-rw-r--r--pango/pangoft2.c13
-rw-r--r--pango/pangox.c4
-rw-r--r--pango/pangoxft-fontmap.c11
20 files changed, 450 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index a35bc5a0..8309c780 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index a35bc5a0..8309c780 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,37 @@
+2001-01-03 Alexander Larsson <alexl@redhat.com>
+
+ * configure.in:
+ Update the default list of included modules for
+ --with-included-modules=yes to include all new modules.
+ Split INCLUDED_MODULES and module-defs.c into per shaper
+ engine type lists.
+
+ * modules/arabic/Makefile.am:
+ Build libpango-arabic-xft.la if INCLUDE_ARABIC_XFT.
+
+ * modules/arabic/arabic-xft.c:
+ Change module prefix to _pango_arabic_xft_
+
+ * modules/basic/Makefile.am:
+ Build static libs for all included modules.
+
+ * modules/basic/basic-ft2.c:
+ Change module prefix to _pango_basic_ft2_
+
+ * modules/basic/basic-xft.c:
+ Change module prefix to _pango_basic_xft_
+
+ * pango/Makefile.am:
+ Include correct module-defs-XXX in libs.
+
+ * pango/modules.h:
+ Split _pango_included_modules[] into separate lists.
+
+ * pango/pangox.c:
+ * pango/pangoft2.c:
+ * pango/pangoxft-fontmap.c:
+ Register built in modules.
+
2000-12-22 Alexander Larsson <alla@lysator.liu.se>
* pango/pangoft2.c:
diff --git a/configure.in b/configure.in
index c0b76ce6..7c977d0a 100644
--- a/configure.in
+++ b/configure.in
@@ -146,13 +146,14 @@ AC_MSG_CHECKING(modules to link statically)
AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... Build the given modules into Pango])
indic_modules="gurmukhi,bengali,gujarati,devanagari,myanmar"
+all_modules="arabic,arabic-xft,basic,basic-ft2,basic-xft,hangul,tamil,thai,$indic_modules"
included_modules=""
if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then
# If no modules specified, include all modules
if test "x$with_included_modules" = xyes ; then
- included_modules="arabic,basic,hangul,tamil,thai,$indic_modules"
+ included_modules="$all_modules"
else
included_modules="$with_included_modules"
fi
@@ -160,21 +161,40 @@ fi
AC_MSG_RESULT($included_modules)
-INCLUDED_MODULES=
+INCLUDED_X_MODULES=
+INCLUDED_XFT_MODULES=
+INCLUDED_FT2_MODULES=
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
- if echo $indic_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then
- INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/indic/libpango-$module.la"
+ if ! (echo "$all_modules" | grep "\(^\|,\)$module\(\$\|,\)" > /dev/null); then
+ AC_MSG_ERROR([the specified module $module does not exist])
else
- INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/$module/libpango-$module.la"
+ if echo $indic_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then
+ dir=indic
+ else
+ dir=`echo $module | sed "s/-.*//"`
+ fi
+
+ if echo $module | grep -- "-xft" > /dev/null; then
+ INCLUDED_XFT_MODULES="$INCLUDED_XFT_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
+ elif echo $module | grep -- "-ft2" > /dev/null; then
+ INCLUDED_FT2_MODULES="$INCLUDED_FT2_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
+ else
+ INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
+ fi
fi
done
IFS="$pango_save_ifs"
-AC_SUBST(INCLUDED_MODULES)
+AC_SUBST(INCLUDED_X_MODULES)
+AC_SUBST(INCLUDED_XFT_MODULES)
+AC_SUBST(INCLUDED_FT2_MODULES)
AM_CONDITIONAL(INCLUDE_ARABIC,echo $included_modules | grep '\(^\|,\)arabic\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_ARABIC_XFT,echo $included_modules | grep '\(^\|,\)arabic-xft\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC,echo $included_modules | grep '\(^\|,\)basic\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_BASIC_FT2,echo $included_modules | grep '\(^\|,\)basic-ft2\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_BASIC_XFT,echo $included_modules | grep '\(^\|,\)basic-xft\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_HANGUL,echo $included_modules | grep '\(^\|,\)hangul\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_TAMIL,echo $included_modules | grep '\(^\|,\)tamil\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_THAI,echo $included_modules | grep '\(^\|,\)thai\($\|,\)' > /dev/null)
@@ -212,7 +232,7 @@ QTDIR=
AC_MSG_CHECKING(For Qt location)
if test "x$with_qt" = xyes ; then
-# Search for Qt in various possibly standard ocations
+# Search for Qt in various possibly standard locations
for dir in /usr/lib/qt-2.2.0 /usr/lib/qt-2.1.0 /usr/lib/qt-2.0.1 /usr/lib/qt-2.0.0 /usr/lib/qt2 ; do
if test -x $dir/bin/moc ; then
QTDIR=$dir
@@ -278,7 +298,7 @@ AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
AC_OUTPUT_COMMANDS([
-cat > pango/module-defs.c <<EOTEXT
+cat > pango/module-defs.h <<EOTEXT
/* Autogenerated by configure. Do not edit */
#include "modules.h"
@@ -287,31 +307,93 @@ EOTEXT
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
- cat >> pango/module-defs.c <<EOTEXT
-extern void _pango_${module}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
-extern PangoEngine *_pango_${module}_script_engine_load (const char *id);
-extern void _pango_${module}_script_engine_unload (PangoEngine *engine);
+ module_c=`echo $module | sed s/-/_/`
+ cat >> pango/module-defs.h <<EOTEXT
+extern void _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
+extern PangoEngine *_pango_${module_c}_script_engine_load (const char *id);
+extern void _pango_${module_c}_script_engine_unload (PangoEngine *engine);
EOTEXT
done
IFS="$pango_save_ifs"
-cat >> pango/module-defs.c <<EOTEXT
+### X modules
+cat > pango/module-defs-x.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "module-defs.h"
+
+PangoIncludedModule _pango_included_x_modules[] = {
+EOTEXT
+
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ if ! (echo $module | grep -- "-ft2" > /dev/null || echo $module | grep -- "-xft" > /dev/null); then
+ module_c=`echo $module | sed s/-/_/`
+ cat >> pango/module-defs-x.c <<EOTEXT
+ { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
+EOTEXT
+ fi
+done
+
+IFS="$pango_save_ifs"
+
+cat >> pango/module-defs-x.c <<EOTEXT
+ { NULL, NULL, NULL },
+};
+EOTEXT
+
+
+### XFT modules
+cat > pango/module-defs-xft.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "module-defs.h"
-PangoIncludedModule _pango_included_modules[] = {
+PangoIncludedModule _pango_included_xft_modules[] = {
EOTEXT
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
- cat >> pango/module-defs.c <<EOTEXT
- { _pango_${module}_script_engine_list, _pango_${module}_script_engine_load,_pango_${module}_script_engine_unload },
+ if echo $module | grep -- "-xft" > /dev/null; then
+ module_c=`echo $module | sed s/-/_/`
+ cat >> pango/module-defs-xft.c <<EOTEXT
+ { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
EOTEXT
+ fi
+done
+
+IFS="$pango_save_ifs"
+
+cat >> pango/module-defs-xft.c <<EOTEXT
+ { NULL, NULL, NULL },
+};
+EOTEXT
+
+
+### FT2 modules
+cat > pango/module-defs-ft2.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "module-defs.h"
+
+PangoIncludedModule _pango_included_ft2_modules[] = {
+EOTEXT
+
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ if echo $module | grep -- "-ft2" > /dev/null; then
+ module_c=`echo $module | sed s/-/_/`
+ cat >> pango/module-defs-ft2.c <<EOTEXT
+ { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
+EOTEXT
+ fi
done
IFS="$pango_save_ifs"
-cat >> pango/module-defs.c <<EOTEXT
+cat >> pango/module-defs-ft2.c <<EOTEXT
{ NULL, NULL, NULL },
};
EOTEXT
diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am
index b276f02f..e12664c5 100644
--- a/modules/arabic/Makefile.am
+++ b/modules/arabic/Makefile.am
@@ -2,8 +2,17 @@
if HAVE_XFT
XFT_MODULES=pango-arabic-xft.la
+if INCLUDE_ARABIC_XFT
+XFT_INCLUDED=libpango-arabic-xft.la
+XFT_PREFIX=-DXFT_MODULE_PREFIX
+else
+XFT_INCLUDED=
+XFT_PREFIX=
+endif
else
XFT_MODULES=
+XFT_INCLUDED=
+XFT_PREFIX=
endif
sources = \
@@ -17,15 +26,28 @@ sources = \
naqshfont.h \
arconv.h
+xft_sources = \
+ arabic-xft.c \
+ arabic-ot.c \
+ arabic-ot.h
+
if INCLUDE_ARABIC
-noinst_LTLIBRARIES = libpango-arabic.la
-moddefine = -DMODULE_PREFIX
+X_MODULES=
+X_INCLUDED=libpango-arabic.la
+X_PREFIX=-DMODULE_PREFIX
else
-moduledir = $(libdir)/pango/modules
-module_LTLIBRARIES = $(XFT_MODULES) pango-arabic.la
-moduleflags = -rpath $(libdir)
+X_MODULES=pango-arabic.la
+X_INCLUDED=
+X_PREFIX=
endif
+
+noinst_LTLIBRARIES = $(X_INCLUDED) $(XFT_INCLUDED)
+module_LTLIBRARIES = $(X_MODULES) $(XFT_MODULES)
+moddefine = $(X_PREFIX) $(XFT_PREFIX)
+moduledir = $(libdir)/pango/modules
+moduleflags=-rpath $(libdir)
+
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/pango/ $(moddefine) $(X_CFLAGS) $(FREETYPE_CFLAGS)
pango_arabic_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
@@ -33,8 +55,8 @@ pango_arabic_la_SOURCES = $(sources)
libpango_arabic_la_SOURCES = $(sources)
-
pango_arabic_xft_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
pango_arabic_xft_la_LIBADD =
-pango_arabic_xft_la_SOURCES = arabic-xft.c arabic-ot.c arabic-ot.h
+pango_arabic_xft_la_SOURCES = $(xft_sources)
+libpango_arabic_xft_la_SOURCES = $(xft_sources)
diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c
index 6ca37eee..b1dde7af 100644
--- a/modules/arabic/arabic-fc.c
+++ b/modules/arabic/arabic-fc.c
@@ -327,8 +327,8 @@ arabic_engine_xft_new ()
* to have distinct names for this module, so we prepend
* _pango_arabic_
*/
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_arabic_##func
+#ifdef XFT_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_arabic_xft_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/arabic/arabic-xft.c b/modules/arabic/arabic-xft.c
index 6ca37eee..b1dde7af 100644
--- a/modules/arabic/arabic-xft.c
+++ b/modules/arabic/arabic-xft.c
@@ -327,8 +327,8 @@ arabic_engine_xft_new ()
* to have distinct names for this module, so we prepend
* _pango_arabic_
*/
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_arabic_##func
+#ifdef XFT_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_arabic_xft_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am
index af7cd382..f3d0b191 100644
--- a/modules/basic/Makefile.am
+++ b/modules/basic/Makefile.am
@@ -3,27 +3,52 @@
basic_sources = basic.c
if HAVE_XFT
+if INCLUDE_BASIC_XFT
+XFT_INCLUDED=libpango-basic-xft.la
+XFT_MODULES=
+XFT_PREFIX=-DXFT_MODULE_PREFIX
+else
+XFT_INCLUDED=
XFT_MODULES=pango-basic-xft.la
+XFT_PREFIX=
+endif
else
XFT_MODULES=
+XFT_INCLUDED=
+XFT_PREFIX=
endif
if HAVE_FREETYPE
+if INCLUDE_BASIC_FT2
+FT2_INCLUDED=libpango-basic-ft2.la
+FT2_MODULES=
+FT2_PREFIX=-DFT2_MODULE_PREFIX
+else
+FT2_INCLUDED=
FT2_MODULES=pango-basic-ft2.la
+FT2_PREFIX=
+endif
else
FT2_MODULES=
+FT2_INCLUDED=
+FT2_PREFIX=
endif
-
if INCLUDE_BASIC
-noinst_LTLIBRARIES = libpango-basic.la
-moddefine = -DMODULE_PREFIX
-
+X_INCLUDED=libpango-basic.la
+X_MODULES=
+X_PREFIX=-DMODULE_PREFIX
else
+X_INCLUDED=
+X_MODULES=pango-basic.la
+X_PREFIX=
+endif
+
+noinst_LTLIBRARIES = $(X_INCLUDED) $(XFT_INCLUDED) $(FT2_INCLUDED)
+module_LTLIBRARIES = $(X_MODULES) $(XFT_MODULES) $(FT2_MODULES)
+moddefine = $(X_PREFIX) $(XFT_PREFIX) $(FT2_PREFIX)
moduledir = $(libdir)/pango/modules
-module_LTLIBRARIES = $(FT2_MODULES) $(XFT_MODULES) pango-basic.la
moduleflags=-rpath $(libdir)
-endif
INCLUDES = \
-I$(top_srcdir) \
@@ -35,21 +60,22 @@ INCLUDES = \
pango_basic_la_LDFLAGS = $(moduleflags) -export-dynamic -avoid-version -module
pango_basic_la_LIBADD =
pango_basic_la_SOURCES = $(basic_sources)
-
libpango_basic_la_SOURCES = $(basic_sources)
pango_basic_xft_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
pango_basic_xft_la_LIBADD =
pango_basic_xft_la_SOURCES = basic-xft.c
+libpango_basic_xft_la_SOURCES = basic-xft.c
pango_basic_ft2_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
pango_basic_ft2_la_LIBADD = $(FREETYPE_LIBS)
pango_basic_ft2_la_SOURCES = basic-ft2.c
+libpango_basic_ft2_la_SOURCES = basic-ft2.c
EXTRA_DIST = \
tables-big.i \
tables-small.i \
basic-win32.c \
- basic-ft2.c \
makefile.mingw \
makefile.mingw.in
+
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index c9be386c..6f6e869a 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -252,10 +252,10 @@ basic_engine_xft_new ()
* entry points script_engine_list, etc. But if we are compiling
* it for inclusion directly in Pango, then we need them to
* to have distinct names for this module, so we prepend
- * _pango_basic_
+ * _pango_basic_xft_
*/
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_basic_##func
+#ifdef XFT_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_basic_xft_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/basic/basic-ft2.c b/modules/basic/basic-ft2.c
index ed0f3e98..38d03800 100644
--- a/modules/basic/basic-ft2.c
+++ b/modules/basic/basic-ft2.c
@@ -314,8 +314,8 @@ basic_engine_ft2_new (void)
/* The following three functions provide the public module API for
* Pango
*/
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_basic_##func
+#ifdef FT2_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_basic_ft2_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/modules/basic/basic-xft.c b/modules/basic/basic-xft.c
index c9be386c..6f6e869a 100644
--- a/modules/basic/basic-xft.c
+++ b/modules/basic/basic-xft.c
@@ -252,10 +252,10 @@ basic_engine_xft_new ()
* entry points script_engine_list, etc. But if we are compiling
* it for inclusion directly in Pango, then we need them to
* to have distinct names for this module, so we prepend
- * _pango_basic_
+ * _pango_basic_xft_
*/
-#ifdef MODULE_PREFIX
-#define MODULE_ENTRY(func) _pango_basic_##func
+#ifdef XFT_MODULE_PREFIX
+#define MODULE_ENTRY(func) _pango_basic_xft_##func
#else
#define MODULE_ENTRY(func) func
#endif
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 66287f9f..56e03616 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -69,7 +69,7 @@ libpango_la_SOURCES = \
libpangox_la_SOURCES = \
modules.h \
- module-defs.c \
+ module-defs-x.c \
pangox.c \
pangox-private.h \
pangox-fontcache.c \
@@ -87,13 +87,13 @@ libpango_la_LIBADD = mini-fribidi/libmini-fribidi.la
endif
libpangox_la_LDFLAGS = -release $(VERSION)
-libpangox_la_LIBADD = $(INCLUDED_MODULES) $(X_LIBS)
-
+libpangox_la_LIBADD = $(X_LIBS) $(INCLUDED_X_MODULES)
libpangoxft_la_SOURCES = \
pangoxft-font.c \
- pangoxft-fontmap.c
+ pangoxft-fontmap.c \
+ module-defs-xft.c
-libpangoxft_la_LIBADD = $(INCLUDED_MODULES) $(XFT_LIBS) opentype/libpango-ot.la
+libpangoxft_la_LIBADD = $(INCLUDED_XFT_MODULES) $(XFT_LIBS) opentype/libpango-ot.la
libpangoxft_la_LDFLAGS = -release $(VERSION)
libpangoft2_la_SOURCES = \
@@ -101,10 +101,11 @@ libpangoft2_la_SOURCES = \
pangoft2.c \
pangoft2-private.h \
pangoft2-fontcache.c \
- pangoft2-fontmap.c
+ pangoft2-fontmap.c \
+ module-defs-ft2.c
-libpangoxft_la_LIBADD = $(INCLUDED_MODULES) $(FREETYPE_LIBS)
-libpangoxft_la_LDFLAGS = -release $(VERSION)
+libpangoft2_la_LIBADD = $(INCLUDED_FT2_MODULES) $(FREETYPE_LIBS)
+libpangoft2_la_LDFLAGS = -release $(VERSION)
pangoincludedir=$(includedir)/pango-1.0/pango
@@ -155,6 +156,7 @@ EXTRA_DIST = \
$(pango_built_headers) \
makeenums.pl \
module-defs.c.win32 \
+ module-defs.h \
pango.def \
pangowin32.def \
pangowin32.h \
diff --git a/pango/modules.h b/pango/modules.h
index 409fb433..2e1b73e2 100644
--- a/pango/modules.h
+++ b/pango/modules.h
@@ -25,6 +25,8 @@
#ifndef __MODULES_H__
#define __MODULES_H__
-extern PangoIncludedModule _pango_included_modules[];
+extern PangoIncludedModule _pango_included_x_modules[];
+extern PangoIncludedModule _pango_included_xft_modules[];
+extern PangoIncludedModule _pango_included_ft2_modules[];
#endif /* __MODULES_H__ */
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index 902a81d4..37198e50 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -33,6 +33,7 @@
#include "pango-utils.h"
#include "pangoft2.h"
#include "pangoft2-private.h"
+#include "modules.h"
#define PANGO_TYPE_FT2_FONT (pango_ft2_font_get_type ())
#define PANGO_FT2_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT, PangoFT2Font))
@@ -155,7 +156,17 @@ PangoContext *
pango_ft2_get_context (void)
{
PangoContext *result;
-
+ static gboolean registered_modules = FALSE;
+ int i;
+
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_ft2_modules[i].list; i++)
+ pango_module_register (&_pango_included_ft2_modules[i]);
+ }
+
result = pango_context_new ();
pango_context_add_font_map (result, pango_ft2_font_map_for_display ());
diff --git a/pango/pangox.c b/pango/pangox.c
index 7dd7f00c..3c8a9d1f 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -256,8 +256,8 @@ pango_x_get_context (Display *display)
{
registered_modules = TRUE;
- for (i = 0; _pango_included_modules[i].list; i++)
- pango_module_register (&_pango_included_modules[i]);
+ for (i = 0; _pango_included_x_modules[i].list; i++)
+ pango_module_register (&_pango_included_x_modules[i]);
}
result = pango_context_new ();
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index df1e31f7..ce81ba4d 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -22,6 +22,7 @@
#include "pango-fontmap.h"
#include "pangoxft.h"
#include "pangoxft-private.h"
+#include "modules.h"
#include "X11/Xft/XftFreetype.h"
@@ -183,9 +184,19 @@ pango_xft_get_context (Display *display,
int screen)
{
PangoContext *result;
+ int i;
+ static gboolean registered_modules = FALSE;
g_return_val_if_fail (display != NULL, NULL);
+ if (!registered_modules)
+ {
+ registered_modules = TRUE;
+
+ for (i = 0; _pango_included_xft_modules[i].list; i++)
+ pango_module_register (&_pango_included_xft_modules[i]);
+ }
+
result = pango_context_new ();
pango_context_add_font_map (result, pango_xft_get_font_map (display, screen));