summaryrefslogtreecommitdiff
path: root/configure.in
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 /configure.in
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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in90
1 files changed, 82 insertions, 8 deletions
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