diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 90 |
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 |