summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2001-10-03 06:18:15 +0000
committerTor Lillqvist <tml@src.gnome.org>2001-10-03 06:18:15 +0000
commit5c3dee45a584a81d800ffc8291b9169af6d790c0 (patch)
treef5b5614634e91472fc15219ea301da7f4cc247c8
parent3346b3802575f161ac9880a3ca08a3f772eb7e0d (diff)
downloadpango-5c3dee45a584a81d800ffc8291b9169af6d790c0.tar.gz
Add the Win32 GDI Pango backend to autoconfiguration:
2001-10-03 Tor Lillqvist <tml@iki.fi> Add the Win32 GDI Pango backend to autoconfiguration: * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32 or Cygwin, set automake conditional PLATFORM_WIN32. Check for native Win32, set OS_WIN32. Refactor the Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside eachother, autoconf 2.52e on Cygwin generated bad shell code for that. Check for gdi32 library, set automake conditional HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate pangowin32*.pc. * pangowin32.pc.in * pangowin32-uninstalled.pc.in: New files. * Makefile.am: Add pangowin32*.pc.in. * .cvsignore: Add pangowin32*.pc. * modules/basic/Makefile.am: Add the basic-win32 backend. Use -no-undefined on PLATFORM_WIN32. * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2 with GLIB_LIBS. * pango/pango-utils.c: (DllMain): New function, on G_OS_WIN32. Used to get the actual DLL name, which is tucked away. (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory): (Win32): Append VERSION to the registry key passed to g_win32_get_package_installation_subdirectory(). Use the real DLL name from above instead of assuming the DLL has a certain name. Other Win32 backend fixes: * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused. * pango/pangowin32.c: Remove unused variables. * pango/pangowin32.def: Add pango_win32_font_get_glyph_index. * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which is static.
-rw-r--r--.cvsignore2
-rw-r--r--ChangeLog46
-rw-r--r--ChangeLog.pre-1-046
-rw-r--r--ChangeLog.pre-1-1046
-rw-r--r--ChangeLog.pre-1-246
-rw-r--r--ChangeLog.pre-1-446
-rw-r--r--ChangeLog.pre-1-646
-rw-r--r--ChangeLog.pre-1-846
-rw-r--r--Makefile.am8
-rw-r--r--configure.in90
-rw-r--r--modules/basic/Makefile.am36
-rw-r--r--pango/Makefile.am41
-rw-r--r--pango/pango-utils.c27
-rw-r--r--pango/pangowin32-fontmap.c8
-rw-r--r--pango/pangowin32.c8
-rw-r--r--pango/pangowin32.def1
-rw-r--r--pango/pangowin32.h2
-rw-r--r--pangowin32-uninstalled.pc.in6
-rw-r--r--pangowin32.pc.in12
19 files changed, 521 insertions, 42 deletions
diff --git a/.cvsignore b/.cvsignore
index e55c4655..d4e2e654 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -10,10 +10,12 @@ pango.pc
pangox.pc
pangoxft.pc
pangoft2.pc
+pangowin32.pc
pango-uninstalled.pc
pangox-uninstalled.pc
pangoxft-uninstalled.pc
pangoft2-uninstalled.pc
+pangowin32-uninstalled.pc
pango.spec
pango-config
stamp-h
diff --git a/ChangeLog b/ChangeLog
index 397bc432..55a9d76b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 397bc432..55a9d76b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,49 @@
+2001-10-03 Tor Lillqvist <tml@iki.fi>
+
+ Add the Win32 GDI Pango backend to autoconfiguration:
+
+ * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for native Win32
+ or Cygwin, set automake conditional PLATFORM_WIN32. Check for
+ native Win32, set OS_WIN32. Refactor the
+ Xrender+Xft+Xft+FreeType.h checks not to use AC_CHECK_LIBs inside
+ eachother, autoconf 2.52e on Cygwin generated bad shell code for
+ that. Check for gdi32 library, set automake conditional
+ HAVE_WIN32. Add the basic-win32 module, add INCLUDED_WIN32_MODULES
+ and INCLUDE_BASIC_WIN32. Write pango/module-defs-win32.c. Generate
+ pangowin32*.pc.
+
+ * pangowin32.pc.in
+ * pangowin32-uninstalled.pc.in: New files.
+
+ * Makefile.am: Add pangowin32*.pc.in.
+
+ * .cvsignore: Add pangowin32*.pc.
+
+ * modules/basic/Makefile.am: Add the basic-win32 backend. Use
+ -no-undefined on PLATFORM_WIN32.
+
+ * pango/Makefile.am: Add the Win32 backend. Use -no-undefined on
+ PLATFORM_WIN32. Use the .def files on OS_WIN32. Link libpangoft2
+ with GLIB_LIBS.
+
+ * pango/pango-utils.c: (DllMain): New function, on
+ G_OS_WIN32. Used to get the actual DLL name, which is tucked away.
+ (pango_get_sysconf_subdirectory, pango_get_lib_subdirectory):
+ (Win32): Append VERSION to the registry key passed to
+ g_win32_get_package_installation_subdirectory(). Use the real DLL
+ name from above instead of assuming the DLL has a certain name.
+
+ Other Win32 backend fixes:
+
+ * pango/pangowin32-fontmap.c: (free_coverages_foreach): Remove, unused.
+
+ * pango/pangowin32.c: Remove unused variables.
+
+ * pango/pangowin32.def: Add pango_win32_font_get_glyph_index.
+
+ * pango/pangowin32.h: Remove pango_win32_font_get_coverage, which
+ is static.
+
Mon Oct 1 16:02:54 2001 Owen Taylor <otaylor@redhat.com>
* pango/fonts.c: g_string_printfa => g_string_append_printf.
diff --git a/Makefile.am b/Makefile.am
index c2f10ad1..c5400034 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,10 +8,12 @@ EXTRA_DIST = \
pangox.pc.in \
pangoxft.pc.in \
pangoft2.pc.in \
+ pangowin32.pc.in \
pango-uninstalled.pc.in \
pangox-uninstalled.pc.in \
pangoxft-uninstalled.pc.in \
pangoft2-uninstalled.pc.in \
+ pangowin32-uninstalled.pc.in \
TODO.xml \
README.win32
@@ -27,8 +29,12 @@ if HAVE_FREETYPE
FT2_PC=pangoft2.pc
endif
+if HAVE_WIN32
+WIN32_PC=pangowin32.pc
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = pango.pc $(X_PC) $(XFT_PC) $(FT2_PC)
+pkgconfig_DATA = pango.pc $(X_PC) $(XFT_PC) $(FT2_PC) $(WIN32_PC)
dist-hook: pango.spec
cp pango.spec $(distdir)
diff --git a/configure.in b/configure.in
index c1f96dd2..9520f69b 100644
--- a/configure.in
+++ b/configure.in
@@ -13,8 +13,33 @@ AM_INIT_AUTOMAKE(pango, $PANGO_MAJOR_VERSION.$PANGO_MINOR_VERSION)
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
+AC_MSG_CHECKING([for some Win32 platform])
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ pango_platform_win32=yes
+ ;;
+ *)
+ pango_platform_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$pango_platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes")
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ pango_os_win32=yes
+ ;;
+ *)
+ pango_os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$pango_os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes")
+
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
@@ -104,16 +129,17 @@ if test $have_x = true ; then
pango_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
- AC_CHECK_LIB(Xrender, XRenderFindFormat,
- AC_CHECK_LIB(Xft, XftFontOpen,
- AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
- have_xft=true,:),
- :,-lXrender -lXext $X_LIBS $FREETYPE_LIBS)
- ,:,-lXext $X_LIBS)
+ AC_CHECK_LIB(Xrender, XRenderFindFormat, have_lib_xrender = true, have_lib_xrender = false, -lXext $X_LIBS)
+ if test $have_lib_xrender = true; then
+ AC_CHECK_LIB(Xft, XftFontOpen, have_lib_xft = true, have_lib_xft = false, -lXrender -lXext $X_LIBS $FREETYPE_LIBS)
+ if test $have_lib_xft = true; then
+ AC_CHECK_HEADER(X11/Xft/XftFreetype.h, have_xft=true, :)
+ fi
+ fi
CPPFLAGS="$pango_save_cppflags"
- if $have_xft = 'true' ; then
+ if $have_xft ; then
XFT_LIBS="-lXft -lXrender -lXext $X_LIBS $FREETYPE_LIBS"
fi
fi
@@ -123,6 +149,21 @@ AC_SUBST(XFT_LIBS)
AM_CONDITIONAL(HAVE_XFT, $have_xft)
#
+# Checks for Win32 GDI
+#
+have_win32=false
+WIN32_LIBS=""
+WIN32_CFLAGS=""
+AC_CHECK_LIB(gdi32, GetTextMetricsA@8, have_win32=true, : )
+
+if test $have_win32 = true; then
+ WIN32_LIBS="-lgdi32"
+fi
+
+AC_SUBST(WIN32_LIBS)
+AM_CONDITIONAL(HAVE_WIN32, $have_win32)
+
+#
# Checks for GLib
#
GLIB_REQUIRED_VERSION=1.3.9
@@ -198,7 +239,7 @@ 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-x,bengali-x,gujarati-x,devanagari-x,myanmar-x"
-all_modules="arabic-x,arabic-xft,hebrew-x,basic-x,basic-ft2,basic-xft,hangul-x,tamil-x,tamil-xft,thai-x,$indic_modules"
+all_modules="arabic-x,arabic-xft,hebrew-x,basic-x,basic-ft2,basic-xft,basic-win32,hangul-x,tamil-x,tamil-xft,thai-x,$indic_modules"
included_modules=""
if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then
@@ -217,6 +258,7 @@ AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x)
INCLUDED_X_MODULES=
INCLUDED_XFT_MODULES=
INCLUDED_FT2_MODULES=
+INCLUDED_WIN32_MODULES=
IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
for module in $included_modules; do
if echo $indic_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then
@@ -231,6 +273,8 @@ for module in $included_modules; do
INCLUDED_FT2_MODULES="$INCLUDED_FT2_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
elif echo $module | grep -- "-x\($\|,\)" > /dev/null; then
INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
+ elif echo $module | grep -- "-win32\($\|,\)" > /dev/null; then
+ INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
else
AC_MSG_ERROR([the specified module $module does not exist])
fi
@@ -240,12 +284,14 @@ IFS="$pango_save_ifs"
AC_SUBST(INCLUDED_X_MODULES)
AC_SUBST(INCLUDED_XFT_MODULES)
AC_SUBST(INCLUDED_FT2_MODULES)
+AC_SUBST(INCLUDED_WIN32_MODULES)
AM_CONDITIONAL(INCLUDE_ARABIC_X,echo $included_modules | grep '\(^\|,\)arabic-x\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_ARABIC_XFT,echo $included_modules | grep '\(^\|,\)arabic-xft\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | grep '\(^\|,\)basic-x\($\|,\)' > /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_BASIC_WIN32,echo $included_modules | grep '\(^\|,\)basic-win32\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_HANGUL_X,echo $included_modules | grep '\(^\|,\)hangul-x\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_TAMIL_X,echo $included_modules | grep '\(^\|,\)tamil-x\($\|,\)' > /dev/null)
AM_CONDITIONAL(INCLUDE_TAMIL_XFT,echo $included_modules | grep '\(^\|,\)tamil-xft\($\|,\)' > /dev/null)
@@ -461,6 +507,32 @@ cat >> pango/module-defs-ft2.c <<EOTEXT
};
EOTEXT
+### Win32 modules
+cat > pango/module-defs-win32.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "module-defs.h"
+
+PangoIncludedModule _pango_included_win32_modules[] = {
+EOTEXT
+
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ if echo $module | grep -- "-win32\($\|,\)" > /dev/null; then
+ module_c=`echo $module | sed s/-/_/`
+ cat >> pango/module-defs-win32.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-win32.c <<EOTEXT
+ { NULL, NULL, NULL },
+};
+EOTEXT
+
],[
included_modules=$included_modules
])
@@ -495,10 +567,12 @@ tests/Makefile
pango.spec
pango.pc
pangox.pc
+pangowin32.pc
pangoft2.pc
pangoxft.pc
pango-uninstalled.pc
pangox-uninstalled.pc
+pangowin32-uninstalled.pc
pangoft2-uninstalled.pc
pangoxft-uninstalled.pc
],[case "$CONFIG_FILES" in
diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am
index b42f5a17..f22a6824 100644
--- a/modules/basic/Makefile.am
+++ b/modules/basic/Makefile.am
@@ -6,6 +6,7 @@ pangolibs = $(top_builddir)/pango/libpango.la $(FRIBIDI_LIBS) $(GLIB_LIBS)
pangoxlibs = $(top_builddir)/pango/libpangox.la $(X_LIBS) $(pangolibs)
pangoxftlibs = $(top_builddir)/pango/libpangoxft.la $(XFT_LIBS) $(pangolibs)
pangoft2libs = $(top_builddir)/pango/libpangoft2.la $(FREETYPE_LIBS) $(pangolibs)
+pangowin32libs = $(top_builddir)/pango/libpangowin32.la $(pangolibs)
if HAVE_XFT
if INCLUDE_BASIC_XFT
@@ -58,9 +59,30 @@ X_MODULES=
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)
+if HAVE_WIN32
+if INCLUDE_BASIC_WIN32
+WIN32_INCLUDED=libpango-basic-win32.la
+WIN32_MODULES=
+WIN32_PREFIX=-DWIN32_MODULE_PREFIX
+else
+WIN32_INCLUDED=
+WIN32_MODULES=pango-basic-win32.la
+WIN32_PREFIX=
+basic_win32_libadd=$(pangowin32libs)
+endif
+else
+WIN32_INCLUDED=
+WIN32_MODULES=
+WIN32_PREFIX=
+endif
+
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+endif
+
+noinst_LTLIBRARIES = $(X_INCLUDED) $(XFT_INCLUDED) $(FT2_INCLUDED) $(WIN32_INCLUDED)
+module_LTLIBRARIES = $(X_MODULES) $(XFT_MODULES) $(FT2_MODULES) $(WIN32_MODULES)
+moddefine = $(X_PREFIX) $(XFT_PREFIX) $(FT2_PREFIX) $(WIN32_PREFIX)
moduledir = $(libdir)/pango/modules
INCLUDES = \
@@ -81,15 +103,19 @@ pango_basic_xft_la_LIBADD = $(basic_xft_libadd)
pango_basic_xft_la_SOURCES = basic-xft.c
libpango_basic_xft_la_SOURCES = basic-xft.c
-pango_basic_ft2_la_LDFLAGS = -export-dynamic -avoid-version -module
+pango_basic_ft2_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
pango_basic_ft2_la_LIBADD = $(basic_ft2_libadd)
pango_basic_ft2_la_SOURCES = basic-ft2.c
libpango_basic_ft2_la_SOURCES = basic-ft2.c
+pango_basic_win32_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_basic_win32_la_LIBADD = $(basic_win32_libadd)
+pango_basic_win32_la_SOURCES = basic-win32.c
+libpango_basic_win32_la_SOURCES = basic-win32.c
+
EXTRA_DIST = \
tables-big.i \
tables-small.i \
- basic-win32.c \
makefile.mingw \
makefile.mingw.in
diff --git a/pango/Makefile.am b/pango/Makefile.am
index d00dac0f..303c5564 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -34,6 +34,14 @@ X_HFILES=
X_BUILD_LIBS=
endif
+if HAVE_WIN32
+WIN32_HFILES=pangowin32.h
+WIN32_BUILD_LIBS=libpangowin32.la
+else
+WIN32_HFILES=
+WIN32_BUILD_LIBS=
+endif
+
if HAVE_XFT
XFT_HFILES=pangoxft.h pango-ot.h
XFT_BUILD_LIBS=libpangoxft.la
@@ -50,8 +58,17 @@ FT2_BUILD_LIBS=
FT2_HFILES=
endif
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+endif
-lib_LTLIBRARIES = libpango.la $(X_BUILD_LIBS) $(XFT_BUILD_LIBS) $(FT2_BUILD_LIBS)
+if OS_WIN32
+pango_export_symbols = -export-symbols pango.def
+pangowin32_export_symbols = -export-symbols pangowin32.def
+pangoft2_export_symbols = -export-symbols pangoft2.def
+endif
+
+lib_LTLIBRARIES = libpango.la $(X_BUILD_LIBS) $(WIN32_BUILD_LIBS) $(XFT_BUILD_LIBS) $(FT2_BUILD_LIBS)
bin_PROGRAMS = pango-querymodules
@@ -95,7 +112,7 @@ libpangox_la_SOURCES = \
# down at which point we'll either use the GTK+ versioning
# scheme or the standard libtool scheme.
#
-libpango_la_LDFLAGS = -release $(VERSION) $(GLIB_LIBS)
+libpango_la_LDFLAGS = -release $(VERSION) $(GLIB_LIBS) $(no_undefined) $(pango_export_symbols)
if HAVE_FRIBIDI
else
libpango_la_LIBADD = mini-fribidi/libmini-fribidi.la
@@ -105,6 +122,19 @@ libpangox_la_LDFLAGS = -release $(VERSION)
libpangox_la_LIBADD = $(INCLUDED_X_MODULES) $(X_LIBS) libpango.la
libpangox_la_DEPENDENCIES = $(INCLUDED_X_MODULES) libpango.la
+libpangowin32_la_SOURCES = \
+ pangowin32.h \
+ pangowin32.c \
+ pangowin32-private.h \
+ pangowin32-fontcache.c \
+ pangowin32-fontmap.c \
+ module-defs-win32.c
+
+libpangowin32_la_LDFLAGS = -release $(VERSION) $(GLIB_LIBS) $(no_undefined) $(pangowin32_export_symbols)
+libpangowin32_la_LIBADD = $(INCLUDED_WIN32_MODULES) $(WIN32_LIBS) libpango.la
+libpangowin32_la_DEPENDENCIES = libpango.la
+
+
libpangoxft_la_SOURCES = \
pangoxft-font.c \
pangoxft-fontmap.c \
@@ -124,7 +154,7 @@ libpangoft2_la_SOURCES = \
module-defs-ft2.c
libpangoft2_la_LIBADD = $(INCLUDED_FT2_MODULES) $(FREETYPE_LIBS) libpango.la
-libpangoft2_la_LDFLAGS = -release $(VERSION)
+libpangoft2_la_LDFLAGS = -release $(VERSION) $(GLIB_LIBS) $(no_undefined) $(pangoft2_export_symbols)
libpangoft2_la_DEPENDENCIES = $(INCLUDED_FT2_MODULES) libpango.la
pangoincludedir=$(includedir)/pango-1.0/pango
@@ -204,11 +234,6 @@ EXTRA_DIST = \
module-defs.h \
pango.def \
pangowin32.def \
- pangowin32.h \
- pangowin32.c \
- pangowin32-private.h \
- pangowin32-fontcache.c \
- pangowin32-fontmap.c \
pangoft2.def \
makefile.mingw \
makefile.mingw.in \
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 66fa2567..930a12e2 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -615,6 +615,29 @@ pango_config_key_get (const char *key)
return g_strdup (g_hash_table_lookup (config_hash, key));
}
+#ifdef G_OS_WIN32
+
+/* DllMain function needed to tuck away the DLL name */
+
+static char dll_name[MAX_PATH];
+
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ GetModuleFileName ((HMODULE) hinstDLL, dll_name, sizeof (dll_name));
+ break;
+ }
+
+ return TRUE;
+}
+
+#endif /* G_OS_WIN32 */
+
G_CONST_RETURN char *
pango_get_sysconf_subdirectory (void)
{
@@ -623,7 +646,7 @@ pango_get_sysconf_subdirectory (void)
if (result == NULL)
result = g_win32_get_package_installation_subdirectory
- ("pango", g_strdup_printf ("pango-%s.dll", PANGO_VERSION), "etc\\pango");
+ (PACKAGE " " VERSION, g_path_get_basename (dll_name), "etc\\pango");
return result;
#else
@@ -639,7 +662,7 @@ pango_get_lib_subdirectory (void)
if (result == NULL)
result = g_win32_get_package_installation_subdirectory
- ("pango", g_strdup_printf ("pango-%s.dll", PANGO_VERSION), "lib\\pango");
+ (PACKAGE " " VERSION, g_path_get_basename (dll_name), "lib\\pango");
return result;
#else
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 3d4f48a9..7f2e2b6e 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -887,14 +887,6 @@ pango_win32_make_matching_logfont (PangoFontMap *fontmap,
*out = *lfp; /* Whatever. We need to pass something... */
}
-static void
-free_coverages_foreach (gpointer key,
- gpointer value,
- gpointer data)
-{
- pango_coverage_unref (value);
-}
-
void
pango_win32_font_entry_set_coverage (PangoWin32Face *face,
PangoCoverage *coverage)
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 18f128f0..c670fc6e 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -82,7 +82,6 @@ pango_win32_get_hfont (PangoFont *font)
{
PangoWin32Font *win32font = (PangoWin32Font *)font;
PangoWin32FontCache *cache;
- HGDIOBJ oldfont;
TEXTMETRIC tm;
if (!win32font->hfont)
@@ -233,9 +232,7 @@ pango_win32_render (HDC hdc,
{
HFONT old_hfont = NULL;
HFONT hfont;
- UINT orig_align = -1;
int i;
- int x_off = 0;
guint16 *glyph_indexes;
INT *dX;
@@ -275,7 +272,6 @@ pango_win32_font_get_glyph_extents (PangoFont *font,
{
PangoWin32Font *win32font = (PangoWin32Font *)font;
guint16 glyph_index = glyph;
- SIZE size;
GLYPHMETRICS gm;
guint32 res;
HFONT hfont;
@@ -434,7 +430,6 @@ pango_win32_font_finalize (GObject *object)
{
PangoWin32Font *win32font = (PangoWin32Font *)object;
PangoWin32FontCache *cache = pango_win32_font_map_get_font_cache (win32font->fontmap);
- int i;
if (win32font->hfont != NULL)
pango_win32_font_cache_unload (cache, win32font->hfont);
@@ -1049,14 +1044,11 @@ pango_win32_font_calc_coverage (PangoFont *font,
{
struct type_4_table *table;
guint16 *id_range_offset;
- guint16 *id_delta;
guint16 *start_count;
guint16 *end_count;
guint16 seg_count;
- guint segment;
guint16 id;
guint32 ch;
- guint16 glyph;
int i;
/* Do GetFontData magic on font->hfont here. */
diff --git a/pango/pangowin32.def b/pango/pangowin32.def
index d11c1c65..9592753c 100644
--- a/pango/pangowin32.def
+++ b/pango/pangowin32.def
@@ -5,6 +5,7 @@ EXPORTS
pango_win32_font_cache_unload
pango_win32_font_entry_get_coverage
pango_win32_font_entry_remove
+ pango_win32_font_get_glyph_index
pango_win32_font_map_for_display
pango_win32_font_map_get_font_cache
pango_win32_font_new
diff --git a/pango/pangowin32.h b/pango/pangowin32.h
index ffcc8f2a..f060bdbb 100644
--- a/pango/pangowin32.h
+++ b/pango/pangowin32.h
@@ -59,8 +59,6 @@ void pango_win32_render_layout (HDC hdc,
*/
PangoGlyph pango_win32_get_unknown_glyph (PangoFont *font);
-PangoCoverage *pango_win32_font_get_coverage (PangoFont *font,
- PangoLanguage *lang);
gint pango_win32_font_get_glyph_index (PangoFont *font,
gunichar wc);
diff --git a/pangowin32-uninstalled.pc.in b/pangowin32-uninstalled.pc.in
new file mode 100644
index 00000000..5541c4e4
--- /dev/null
+++ b/pangowin32-uninstalled.pc.in
@@ -0,0 +1,6 @@
+Name: Pango Win32 Uninstalled
+Description: Win32 GDI font support for Pango, Not Installed
+Version: @VERSION@
+Requires: pango
+Libs: ${pc_top_builddir}/${pcfiledir}/pango/libpangowin32.la @WIN32_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@
diff --git a/pangowin32.pc.in b/pangowin32.pc.in
new file mode 100644
index 00000000..5cb3d4b3
--- /dev/null
+++ b/pangowin32.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Pango Win32
+Description: Win32 GDI font support for Pango
+Version: @VERSION@
+Requires: pango
+Libs: -L${libdir} -lpangowin32 @WIN32_LIBS@
+Cflags: -I${includedir}/pango-1.0
+