1 dnl Process this file with autoconf to create configure.
4 dnl ==========================================================================
6 dnl ==========================================================================
9 dnl PANGO_VERSION_MICRO += 1;
10 dnl PANGO_INTERFACE_AGE += 1;
11 dnl PANGO_BINARY_AGE += 1;
12 dnl if any functions have been added, set PANGO_INTERFACE_AGE to 0.
13 dnl if backwards compatibility has been broken,
14 dnl set PANGO_BINARY_AGE _and_ PANGO_INTERFACE_AGE to 0.
17 dnl We do the version number components as m4 macros
18 dnl so that we can base configure --help output off
23 m4_define([pango_version_major], [1])
24 m4_define([pango_version_minor], [30])
25 m4_define([pango_version_micro], [0])
27 m4_define([pango_version],
28 [pango_version_major.pango_version_minor.pango_version_micro])
29 dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2.
30 m4_define([pango_api_version], [1.0])
31 m4_if(m4_eval(pango_version_minor % 2), [1],
33 dnl for unstable releases
34 m4_define([pango_interface_age], [0])
37 dnl for stable releases
38 m4_define([pango_interface_age], pango_version_micro)
40 dnl Number of releases since we've broken binary compatibility.
41 m4_define([pango_binary_age],
42 [m4_eval(100 * pango_version_minor + pango_version_micro)])
43 dnl Module API version. This should be stepped up when a change causes
44 dnl older modules to not work with new pango.
45 m4_define([pango_module_version], [1.6.0])
48 AC_INIT(pango, pango_version(),
49 [http://bugzilla.gnome.org/enter_bug.cgi?product=pango])
51 AC_CONFIG_SRCDIR([pango.pc.in])
53 dnl -Wno-portability tells automake to stop complaining about the
54 dnl usage of GNU Make specific features.
55 AM_INIT_AUTOMAKE(1.9 gnits dist-xz no-dist-gzip -Wno-portability)
56 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
57 AM_CONFIG_HEADER([config.h])
60 PANGO_VERSION_MAJOR=pango_version_major()
61 PANGO_VERSION_MINOR=pango_version_minor()
62 PANGO_VERSION_MICRO=pango_version_micro()
63 PANGO_VERSION=pango_version()
64 PANGO_API_VERSION=pango_api_version()
65 PANGO_INTERFACE_AGE=pango_interface_age()
66 PANGO_BINARY_AGE=pango_binary_age()
67 PANGO_MODULE_VERSION=pango_module_version()
69 AC_SUBST(PANGO_VERSION_MAJOR)
70 AC_SUBST(PANGO_VERSION_MINOR)
71 AC_SUBST(PANGO_VERSION_MICRO)
72 AC_SUBST(PANGO_VERSION)
73 AC_SUBST(PANGO_API_VERSION)
74 AC_SUBST(PANGO_INTERFACE_AGE)
75 AC_SUBST(PANGO_BINARY_AGE)
76 AC_SUBST(PANGO_MODULE_VERSION)
78 AC_DEFINE(MODULE_VERSION, "pango_module_version()", [Module interface version])
79 AC_DEFINE(PANGO_BINARY_AGE, pango_binary_age(), [PANGO binary age])
80 AC_DEFINE(PANGO_INTERFACE_AGE, pango_interface_age(), [PANGO interface age])
81 AC_DEFINE(PANGO_VERSION_MAJOR, pango_version_major(), [PANGO major version])
82 AC_DEFINE(PANGO_VERSION_MINOR, pango_version_minor(), [PANGO minor version])
83 AC_DEFINE(PANGO_VERSION_MICRO, pango_version_micro(), [PANGO micro version])
85 dnl libtool versioning
86 m4_define([lt_current], [m4_eval(100 * pango_version_minor + pango_version_micro - pango_interface_age)])
87 m4_define([lt_revision], [pango_interface_age])
88 m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)])
89 VERSION_INFO="lt_current():lt_revision():lt_age()"
90 PANGO_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
92 AC_SUBST(PANGO_CURRENT_MINUS_AGE)
94 dnl ==========================================================================
98 AC_MSG_CHECKING([for native Win32])
104 LIB_EXE_MACHINE_FLAG=X64
107 LIB_EXE_MACHINE_FLAG=X86
115 AC_MSG_RESULT([$pango_os_win32])
117 AC_SUBST(LIB_EXE_MACHINE_FLAG)
119 AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes")
124 dnl Check for a working C++ compiler, but do not bail out, if none is found.
125 dnl We use this for an automated test for C++ header correctness.
127 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
130 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
131 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
135 # Checks for HarfBuzz
139 AC_CHECK_FUNCS(mprotect sysconf getpagesize)
140 AC_CHECK_HEADERS(unistd.h sys/mman.h)
142 # Make sure we don't link to libstdc++ (needs de-gcc-fication)
143 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
153 if test "$pango_os_win32" = "yes"; then
154 if test x$enable_static = xyes -o x$enable_static = x; then
155 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
158 if test x$enable_shared = xno; then
159 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
165 dnl when using libtool 2.x create libtool early, because it's used in configure
166 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
168 AC_MSG_CHECKING([for some Win32 platform])
170 *-*-mingw*|*-*-cygwin*)
171 pango_platform_win32=yes
174 pango_platform_win32=no
177 AC_MSG_RESULT([$pango_platform_win32])
178 AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes")
180 if test "$pango_platform_win32" = "yes"; then
181 AC_CHECK_TOOL(WINDRES, windres, no)
182 if test "$WINDRES" = no; then
183 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
185 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
187 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
190 if test "x$GCC" = "xyes"; then
192 *[\ \ ]-Wall[\ \ ]*) ;;
193 *) CFLAGS="$CFLAGS -Wall" ;;
198 dnl declare --enable-* args and collect ac_help strings
200 m4_define([debug_default],
201 m4_if(m4_eval(pango_version_minor() % 2), [1], [yes], [minimum]))
204 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
205 [turn on debugging @<:@default=debug_default()@:>@]),
207 enable_debug=debug_default())
209 if test "x$enable_debug" = "xyes"; then
210 PANGO_DEBUG_FLAGS="-DPANGO_ENABLE_DEBUG"
212 PANGO_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
214 if test "x$enable_debug" = "xno"; then
215 PANGO_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS $PANGO_DEBUG_FLAGS"
219 AC_SUBST(PANGO_DEBUG_FLAGS)
221 AC_ARG_ENABLE(rebuilds,
222 [AC_HELP_STRING([--disable-rebuilds],
223 [disable all source autogeneration rules])],,
224 [enable_rebuilds=yes])
226 AM_CONDITIONAL(CROSS_COMPILING, [test $cross_compiling = yes])
229 if test "x$pango_os_win32" != xyes; then
232 if test x$no_x = xyes ; then
233 AC_MSG_WARN([X development libraries not found])
236 X_LIBS="$X_LIBS -lX11"
238 AC_DEFINE(HAVE_X, 1, [Have X libraries])
241 AM_CONDITIONAL(HAVE_X, $have_x)
243 have_fontconfig=false
248 # Check for fontconfig
250 PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.5.0, have_fontconfig=true, AC_MSG_RESULT([no]))
253 # Checks for FreeType
255 if $have_fontconfig ; then
256 # The first version of freetype with a .pc file is 2.1.5. That's recent
257 # enough for all the functions we use I guess. No version check needed.
258 PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, AC_MSG_RESULT([no]))
260 if $have_freetype ; then
261 AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
262 # By freetype, we really always mean freetype+fontconfig
263 FREETYPE_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS"
264 FREETYPE_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS"
266 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
269 # Checks for Xft/XRender
271 if $have_x && $have_freetype ; then
272 PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no]))
275 AC_DEFINE(HAVE_XFT, 1, [Have Xft library])
277 AM_CONDITIONAL(HAVE_XFT, $have_xft)
280 # Checks for Win32 GDI
285 # The following doesn't work with autoconf-2.13, so we check $host instead
286 # AC_CHECK_LIB(gdi32, GetTextMetricsA@8, have_win32=true, : )
288 *-*-mingw*|*-*-cygwin*) have_win32=true ;;
292 if test $have_win32 = true; then
297 AM_CONDITIONAL(HAVE_WIN32, $have_win32)
299 # Ensure MSVC-compatible struct packing convention is used when
300 # compiling for Win32 with gcc.
301 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
302 # gcc2 uses "-fnative-struct".
303 if test "$pango_os_win32" = "yes"; then
304 if test x"$GCC" = xyes; then
306 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
307 if test -z "$ac_cv_prog_CC"; then
310 our_gcc="$ac_cv_prog_CC"
312 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
314 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
315 msnative_struct='-fnative-struct'
319 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
320 msnative_struct='-mms-bitfields'
324 if test x"$msnative_struct" = x ; then
325 AC_MSG_RESULT([no way])
326 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
328 CFLAGS="$CFLAGS $msnative_struct"
329 AC_MSG_RESULT([${msnative_struct}])
337 AC_CHECK_HEADER(Carbon/Carbon.h, [have_atsui=true], [have_atsui=false])
340 # Checks for CoreText
343 AC_MSG_CHECKING([for CoreText availability])
344 pango_save_libs=$LIBS
345 LIBS="$LIBS -framework ApplicationServices"
346 AC_TRY_LINK([#include <Carbon/Carbon.h>], [CTGetCoreTextVersion ();],
347 [have_core_text=yes], [have_core_text=no])
348 LIBS=$pango_save_libs
350 if test "$have_core_text" = "yes"; then
351 AC_DEFINE(HAVE_CORE_TEXT, 1, [Whether CoreText is available on the system])
354 AC_MSG_RESULT([$have_core_text])
356 AM_CONDITIONAL(HAVE_CORE_TEXT, test "$have_core_text" = "yes")
365 have_cairo_xlib=false
366 have_cairo_freetype=false
367 have_cairo_win32=false
368 have_cairo_atsui=false
371 PKG_CHECK_MODULES(CAIRO, cairo >= $cairo_required, have_cairo=true, AC_MSG_RESULT([no]))
373 if $have_cairo ; then
374 pango_save_libs=$LIBS
375 LIBS="$LIBS $CAIRO_LIBS"
376 pango_save_ldflags=$LDFLAGS
377 LDFLAGS="$LDFLAGS $CAIRO_LIBS"
380 cairo_font_backends=""
382 if $have_freetype; then
383 PKG_CHECK_EXISTS(cairo-ft >= $cairo_required, have_cairo_freetype=true, :)
385 if $have_cairo_freetype; then
386 AC_DEFINE(HAVE_CAIRO_FREETYPE, 1, [Whether Cairo can use FreeType for fonts])
387 cairo_font_backends="freetype $cairo_font_backends"
392 PKG_CHECK_EXISTS(cairo-win32 >= $cairo_required, have_cairo_win32=true, :)
394 if $have_cairo_win32; then
395 AC_DEFINE(HAVE_CAIRO_WIN32, 1, [Whether Cairo can use the Win32 GDI for fonts])
396 cairo_font_backends="win32 $cairo_font_backends"
400 if test $have_atsui -o $have_core_text; then
401 PKG_CHECK_EXISTS(cairo-quartz-font >= $cairo_required, have_cairo_atsui=true, :)
403 if $have_cairo_atsui; then
404 AC_DEFINE(HAVE_CAIRO_ATSUI, 1, [Whether Cairo can use ATSUI for fonts])
405 cairo_font_backends="quartz $cairo_font_backends"
409 AC_MSG_CHECKING([which cairo font backends could be used])
410 if $have_cairo ; then
411 AC_MSG_RESULT([$cairo_font_backends])
413 AC_MSG_RESULT([none])
414 AC_MSG_NOTICE([Disabling cairo support])
417 if $have_cairo ; then
418 AC_DEFINE(HAVE_CAIRO, 1, [Have usable Cairo library and font backend])
420 PKG_CHECK_EXISTS(cairo-png >= $cairo_required, have_cairo_png=true, :)
421 if $have_cairo_png; then
422 AC_DEFINE(HAVE_CAIRO_PNG, 1, [Whether Cairo has PNG support])
425 PKG_CHECK_EXISTS(cairo-ps >= $cairo_required, have_cairo_ps=true, :)
426 if $have_cairo_ps; then
427 AC_DEFINE(HAVE_CAIRO_PS, 1, [Whether Cairo has PS support])
430 PKG_CHECK_EXISTS(cairo-pdf >= $cairo_required, have_cairo_pdf=true, :)
431 if $have_cairo_pdf; then
432 AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether Cairo has PDF support])
435 PKG_CHECK_EXISTS(cairo-xlib >= $cairo_required, have_cairo_xlib=true, :)
436 if $have_cairo_xlib; then
437 AC_DEFINE(HAVE_CAIRO_XLIB, 1, [Whether Cairo has Xlib support])
441 LIBS=$pango_save_libs
442 LDFLAGS=$pango_save_ldflags
445 AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
446 AM_CONDITIONAL(HAVE_CAIRO_PNG, $have_cairo_png)
447 AM_CONDITIONAL(HAVE_CAIRO_PS, $have_cairo_ps)
448 AM_CONDITIONAL(HAVE_CAIRO_PDF, $have_cairo_pdf)
449 AM_CONDITIONAL(HAVE_CAIRO_XLIB, $have_cairo_xlib)
450 AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32)
451 AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype)
452 AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui)
455 # We must have some backend defined, in order for the pango-querymodules
456 # rule in pango/Makefile.am to work correctly. If you are up to writing
457 # a new Pango backend outside of Pango, you are up to sending the necessary
458 # patch to fix that rule. :-)
460 if $have_freetype || $have_x || $have_xft || $have_cairo || $have_win32 ; then : ; else
461 AC_MSG_ERROR([*** Could not enable any of FreeType, X11, Cairo, or Win32 backends.
462 *** Must have at least one backend to build Pango.])
468 GLIB_REQUIRED_VERSION=2.31.0
469 GLIB_MODULES="glib-2.0 >= $GLIB_REQUIRED_VERSION gobject-2.0 gmodule-no-export-2.0"
471 PKG_CHECK_MODULES(GLIB, $GLIB_MODULES, :,
473 *** Glib $GLIB_REQUIRED_VERSION or better is required. The latest version of
474 *** Glib is always available from ftp://ftp.gtk.org/.]))
476 # Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled.
477 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
478 AC_SUBST(GLIB_MKENUMS)
481 # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any
482 # necesary defines for thread-safety.
483 GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_MODULES gthread-2.0`
489 LIBTHAI_REQUIRED_VERSION=0.1.9
490 PKG_CHECK_MODULES(LIBTHAI, libthai >= $LIBTHAI_REQUIRED_VERSION, have_libthai=true, :)
493 # Checks for GObject Introspection
496 GOBJECT_INTROSPECTION_CHECK([0.9.5])
501 arabic_modules="arabic-fc,arabic-lang"
502 basic_modules="basic-fc,basic-win32,basic-x,basic-atsui,basic-coretext"
503 hangul_modules="hangul-fc"
504 hebrew_modules="hebrew-fc"
505 indic_modules="indic-fc,indic-lang"
506 khmer_modules="khmer-fc"
507 syriac_modules="syriac-fc"
508 thai_modules="thai-fc"
509 tibetan_modules="tibetan-fc"
511 if $have_libthai ; then
512 thai_modules="$thai_modules,thai-lang"
515 all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$khmer_modules,$syriac_modules,$thai_modules,$tibetan_modules"
518 # Allow building some or all modules included
520 AC_MSG_CHECKING(modules to link statically)
522 AC_ARG_WITH(included_modules,
523 AC_HELP_STRING([--with-included-modules=no/yes/MODULE1 MODULE2 ...],
524 [build the given modules included @<:@default=no@:>@]))
527 case x$with_included_modules in
528 xyes) included_modules=$all_modules ;;
529 xno|x) included_modules="" ;;
530 *) included_modules=$with_included_modules ;;
532 AC_MSG_RESULT($included_modules)
533 AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x)
536 # Allow building only some or none of modules dynamic
538 AC_MSG_CHECKING(dynamic modules to build)
540 AC_ARG_WITH(dynamic_modules,
541 AC_HELP_STRING([--with-dynamic-modules=no/yes/MODULE1 MODULE2 ...],
542 [build the given dynamic modules @<:@default=yes@:>@]))
545 case x$with_dynamic_modules in
546 xyes|x) dynamic_modules=$all_modules ;;
547 xno) dynamic_modules="" ;;
548 *) dynamic_modules=$with_dynamic_modules ;;
550 AC_MSG_RESULT([$dynamic_modules (those built into Pango will be excluded)])
551 AM_CONDITIONAL(HAVE_DYNAMIC_MODULES, test "x$dynamic_modules" != x)
556 INCLUDED_WIN32_MODULES=
557 INCLUDED_ATSUI_MODULES=
558 INCLUDED_CORE_TEXT_MODULES=
559 INCLUDED_LANG_MODULES=
561 AC_SUBST(INCLUDED_X_MODULES)
562 AC_SUBST(INCLUDED_FC_MODULES)
563 AC_SUBST(INCLUDED_WIN32_MODULES)
564 AC_SUBST(INCLUDED_ATSUI_MODULES)
565 AC_SUBST(INCLUDED_CORE_TEXT_MODULES)
566 AC_SUBST(INCLUDED_LANG_MODULES)
568 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=", "
569 for module in $included_modules; do
570 case $indic_modules in
571 *$module*) dir=indic ;;
572 *) dir=`echo $module | sed "s/-.*//"` ;;
574 included_path="\$(top_builddir)/modules/$dir/libpango-$module.la"
577 *-x) INCLUDED_X_MODULES="$INCLUDED_X_MODULES $included_path" ;;
578 *-fc) INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES $included_path" ;;
579 *-win32) INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES $included_path" ;;
580 *-atsui) INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES $included_path" ;;
581 *-coretext) INCLUDED_CORE_TEXT_MODULES="$INCLUDED_CORE_TEXT_MODULES $included_path" ;;
582 *-lang) INCLUDED_LANG_MODULES="$INCLUDED_LANG_MODULES $included_path" ;;
583 *) IFS="$pango_save_ifs"; AC_MSG_ERROR([specified module $module not recognized]) ;;
586 IFS="$pango_save_ifs"
588 AM_CONDITIONAL(INCLUDE_ARABIC_FC, echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
589 AM_CONDITIONAL(INCLUDE_ARABIC_LANG, echo $included_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
590 AM_CONDITIONAL(INCLUDE_BASIC_FC, echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
591 AM_CONDITIONAL(INCLUDE_BASIC_WIN32, echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
592 AM_CONDITIONAL(INCLUDE_BASIC_X, echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
593 AM_CONDITIONAL(INCLUDE_BASIC_ATSUI, echo $included_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null)
594 AM_CONDITIONAL(INCLUDE_BASIC_CORE_TEXT, echo $included_modules | egrep '(^|,)basic-coretext($|,)' > /dev/null)
595 AM_CONDITIONAL(INCLUDE_HANGUL_FC, echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null)
596 AM_CONDITIONAL(INCLUDE_HEBREW_FC, echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null)
597 AM_CONDITIONAL(INCLUDE_INDIC_FC, echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null)
598 AM_CONDITIONAL(INCLUDE_INDIC_LANG, echo $included_modules | egrep '(^|,)indic-lang($|,)' > /dev/null)
599 AM_CONDITIONAL(INCLUDE_KHMER_FC, echo $included_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null)
600 AM_CONDITIONAL(INCLUDE_SYRIAC_FC, echo $included_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null)
601 AM_CONDITIONAL(INCLUDE_THAI_FC, echo $included_modules | egrep '(^|,)thai-fc($|,)' > /dev/null)
602 AM_CONDITIONAL(INCLUDE_THAI_LANG, echo $included_modules | egrep '(^|,)thai-lang($|,)' > /dev/null)
603 AM_CONDITIONAL(INCLUDE_TIBETAN_FC, echo $included_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null)
605 AM_CONDITIONAL(DYNAMIC_ARABIC_FC, echo $dynamic_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
606 AM_CONDITIONAL(DYNAMIC_ARABIC_LANG, echo $dynamic_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
607 AM_CONDITIONAL(DYNAMIC_BASIC_FC, echo $dynamic_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
608 AM_CONDITIONAL(DYNAMIC_BASIC_WIN32, echo $dynamic_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
609 AM_CONDITIONAL(DYNAMIC_BASIC_X, echo $dynamic_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
610 AM_CONDITIONAL(DYNAMIC_BASIC_ATSUI, echo $dynamic_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null)
611 AM_CONDITIONAL(DYNAMIC_BASIC_CORE_TEXT, echo $dynamic_modules | egrep '(^|,)basic-coretext($|,)' > /dev/null)
612 AM_CONDITIONAL(DYNAMIC_HANGUL_FC, echo $dynamic_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null)
613 AM_CONDITIONAL(DYNAMIC_HEBREW_FC, echo $dynamic_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null)
614 AM_CONDITIONAL(DYNAMIC_INDIC_FC, echo $dynamic_modules | egrep '(^|,)indic-fc($|,)' > /dev/null)
615 AM_CONDITIONAL(DYNAMIC_INDIC_LANG, echo $dynamic_modules | egrep '(^|,)indic-lang($|,)' > /dev/null)
616 AM_CONDITIONAL(DYNAMIC_KHMER_FC, echo $dynamic_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null)
617 AM_CONDITIONAL(DYNAMIC_SYRIAC_FC, echo $dynamic_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null)
618 AM_CONDITIONAL(DYNAMIC_THAI_FC, echo $dynamic_modules | egrep '(^|,)thai-fc($|,)' > /dev/null)
619 AM_CONDITIONAL(DYNAMIC_THAI_LANG, echo $dynamic_modules | egrep '(^|,)thai-lang($|,)' > /dev/null)
620 AM_CONDITIONAL(DYNAMIC_TIBETAN_FC, echo $dynamic_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null)
623 # We use flockfile to implement pango_getline() - should be moved to GLib
624 # strtok_r isn't present on some systems
626 AC_CHECK_FUNCS(flockfile strtok_r)
628 dnl **************************
629 dnl *** Checks for gtk-doc ***
630 dnl **************************
632 if $have_cairo ; then : ; else
633 if test x$enable_gtk_doc = xyes ; then
634 AC_MSG_WARN([Cairo not present, disabling doc building])
642 AC_HELP_STRING([--enable-man],
643 [regenerate man pages from Docbook @<:@default=no@:>@]),
647 if test "x$enable_man" != xno ; then
649 dnl Check for xsltproc
651 AC_PATH_PROG([XSLTPROC], [xsltproc])
652 if test -z "$XSLTPROC"; then
657 if test "x$enable_man" != xno ; then
658 dnl check for DocBook DTD and stylesheets in the local catalog.
659 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
660 [DocBook XML DTD V4.1.2],,enable_man=no)
661 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
662 [DocBook XSL Stylesheets],,enable_man=no)
665 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
667 AC_ARG_ENABLE(doc-cross-references,
668 AC_HELP_STRING([--disable-doc-cross-references],
669 [cross reference glib and cairo symbols @<:@default=yes@:>@]),
670 enable_doc_cross_references=$enableval,
671 enable_doc_cross_references=yes)
673 if test "x$enable_doc_cross_references" != xno ; then
674 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
675 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
676 AC_SUBST(GLIB_PREFIX)
677 AC_SUBST(CAIRO_PREFIX)
679 AM_CONDITIONAL(ENABLE_DOC_CROSS_REFERENCES, test x$enable_doc_cross_references != xno)
681 dnl ********************************************************
682 dnl * Options to pass to libtool
683 dnl ********************************************************
685 # Note that -module isn't included here since automake needs to see it to know
686 # that something like pango-arabic-fc.la is a valid libtool archive
688 LIBRARY_LIBTOOL_OPTIONS="-version-info $VERSION_INFO"
689 MODULE_LIBTOOL_OPTIONS="-export-dynamic -avoid-version"
690 if test "$pango_platform_win32" = yes; then
691 # We currently use .def files on Windows
693 LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS -no-undefined"
694 MODULE_LIBTOOL_OPTIONS="$MODULE_LIBTOOL_OPTIONS -no-undefined"
696 # libtool option to control which symbols are exported
697 # right now, symbols starting with '_' are not exported
698 LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS "'-export-symbols-regex "^pango_.*"'
699 MODULE_LIBTOOL_OPTIONS="$MODULE_LIBTOOL_OPTIONS "'-export-symbols-regex "^script_engine_.*"'
701 AC_SUBST(LIBRARY_LIBTOOL_OPTIONS)
702 AC_SUBST(MODULE_LIBTOOL_OPTIONS)
704 dnl ********************************************************
705 dnl * See whether we need to load our modules as .la files *
706 dnl ********************************************************
710 # is there any platform that we have to use .la files?
712 if $use_la_modules ; then
713 AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly])
716 dnl ******************************************************
717 dnl * See whether to include shared library dependencies *
718 dnl ******************************************************
720 AC_ARG_ENABLE(explicit-deps,
721 AC_HELP_STRING([--enable-explicit-deps=@<:@no/auto/yes@:>@],
722 [use explicit dependencies in .pc files @<:@default=auto@:>@]),
723 enable_explicit_deps="$enableval",
724 enable_explicit_deps=auto)
726 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
727 case $enable_explicit_deps in
730 deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
731 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
732 enable_explicit_deps=yes
734 enable_explicit_deps=no
739 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
742 AC_MSG_RESULT($enable_explicit_deps)
745 PKGCONFIG_CAIRO_REQUIRES=
747 if test $enable_explicit_deps = yes ; then
748 PKGCONFIG_MATH_LIBS=-lm
750 X_LIBS="$X_LIBS $X_EXTRA_LIBS"
752 if $have_cairo_freetype; then
753 PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangoft2"
755 if $have_cairo_win32; then
756 PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangowin32"
760 AC_SUBST(PKGCONFIG_MATH_LIBS)
761 AC_SUBST(PKGCONFIG_CAIRO_REQUIRES)
762 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
764 AC_CONFIG_COMMANDS([pango/module-defs.h],
766 cat > pango/module-defs.h <<EOTEXT
767 /* Autogenerated by configure. Do not edit */
773 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
774 for module in $included_modules; do
775 module_c=`echo $module | sed s/-/_/`
776 cat >> pango/module-defs.h <<EOTEXT
777 extern void _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
778 extern void _pango_${module_c}_script_engine_init (GTypeModule *module);
779 extern void _pango_${module_c}_script_engine_exit (void);
780 extern PangoEngine *_pango_${module_c}_script_engine_create (const char *id);
785 IFS="$pango_save_ifs"
787 included_modules=$included_modules
790 AC_CONFIG_COMMANDS([pango/module-defs-x.c],
793 cat > pango/module-defs-x.c <<EOTEXT
794 /* Autogenerated by configure. Do not edit */
796 #include "module-defs.h"
798 PangoIncludedModule _pango_included_x_modules@<:@@:>@ = {
801 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
802 for module in $included_modules; do
803 if echo $module | egrep -- "-x($|,)" > /dev/null; then
804 module_c=`echo $module | sed s/-/_/`
805 cat >> pango/module-defs-x.c <<EOTEXT
806 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
811 IFS="$pango_save_ifs"
813 cat >> pango/module-defs-x.c <<EOTEXT
814 { NULL, NULL, NULL, NULL },
819 AC_CONFIG_COMMANDS([pango/module-defs-fc.c],
822 cat > pango/module-defs-fc.c <<EOTEXT
823 /* Autogenerated by configure. Do not edit */
825 #include "module-defs.h"
827 PangoIncludedModule _pango_included_fc_modules@<:@@:>@ = {
830 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
831 for module in $included_modules; do
832 if echo $module | egrep -- "-fc($|,)" > /dev/null; then
833 module_c=`echo $module | sed s/-/_/`
834 cat >> pango/module-defs-fc.c <<EOTEXT
835 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
840 IFS="$pango_save_ifs"
842 cat >> pango/module-defs-fc.c <<EOTEXT
843 { NULL, NULL, NULL, NULL },
848 AC_CONFIG_COMMANDS([pango/module-defs-win32.c],
851 cat > pango/module-defs-win32.c <<EOTEXT
852 /* Autogenerated by configure. Do not edit */
854 #include "module-defs.h"
856 PangoIncludedModule _pango_included_win32_modules@<:@@:>@ = {
859 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
860 for module in $included_modules; do
861 if echo $module | egrep -- "-win32($|,)" > /dev/null; then
862 module_c=`echo $module | sed s/-/_/`
863 cat >> pango/module-defs-win32.c <<EOTEXT
864 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
869 IFS="$pango_save_ifs"
871 cat >> pango/module-defs-win32.c <<EOTEXT
872 { NULL, NULL, NULL, NULL },
877 AC_CONFIG_COMMANDS([pango/module-defs-atsui.c],
880 cat > pango/module-defs-atsui.c <<EOTEXT
881 /* Autogenerated by configure. Do not edit */
883 #include "module-defs.h"
885 PangoIncludedModule _pango_included_atsui_modules@<:@@:>@ = {
888 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
889 for module in $included_modules; do
890 if echo $module | egrep -- "-atsui($|,)" > /dev/null; then
891 module_c=`echo $module | sed s/-/_/`
892 cat >> pango/module-defs-atsui.c <<EOTEXT
893 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
898 IFS="$pango_save_ifs"
900 cat >> pango/module-defs-atsui.c <<EOTEXT
901 { NULL, NULL, NULL, NULL },
906 AC_CONFIG_COMMANDS([pango/module-defs-coretext.c],
909 cat > pango/module-defs-coretext.c <<EOTEXT
910 /* Autogenerated by configure. Do not edit */
912 #include "module-defs.h"
914 PangoIncludedModule _pango_included_core_text_modules@<:@@:>@ = {
917 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
918 for module in $included_modules; do
919 if echo $module | egrep -- "-coretext($|,)" > /dev/null; then
920 module_c=`echo $module | sed s/-/_/`
921 cat >> pango/module-defs-coretext.c <<EOTEXT
922 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
927 IFS="$pango_save_ifs"
929 cat >> pango/module-defs-coretext.c <<EOTEXT
930 { NULL, NULL, NULL, NULL },
935 AC_CONFIG_COMMANDS([pango/module-defs-lang.c],
938 cat > pango/module-defs-lang.c <<EOTEXT
939 /* Autogenerated by configure. Do not edit */
941 #include "module-defs.h"
943 PangoIncludedModule _pango_included_lang_modules@<:@@:>@ = {
946 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
947 for module in $included_modules; do
948 if echo $module | egrep -- "-lang($|,)" > /dev/null; then
949 module_c=`echo $module | sed s/-/_/`
950 cat >> pango/module-defs-lang.c <<EOTEXT
951 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
956 IFS="$pango_save_ifs"
958 cat >> pango/module-defs-lang.c <<EOTEXT
959 { NULL, NULL, NULL, NULL },
966 AC_CHECK_HEADERS(unistd.h)
968 # Honor aclocal flags
969 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
970 dnl ===========================================================================
971 AC_CONFIG_COMMANDS([pango/pango-features.h],
972 [featuresfile=pango/pango-features.h
973 outfile=$featuresfile.tmp
974 AC_MSG_NOTICE([creating $featuresfile])
976 /* Generated by configure. Do not edit */
977 #ifndef PANGO_FEATURES_H
978 #define PANGO_FEATURES_H
980 #define PANGO_VERSION_MAJOR $PANGO_VERSION_MAJOR
981 #define PANGO_VERSION_MINOR $PANGO_VERSION_MINOR
982 #define PANGO_VERSION_MICRO $PANGO_VERSION_MICRO
984 #define PANGO_VERSION_STRING "$PANGO_VERSION_MAJOR.$PANGO_VERSION_MINOR.$PANGO_VERSION_MICRO"
987 # TODO: define macros for enabled features/backends here
990 echo '#endif' >>$outfile
992 if cmp -s $outfile $featuresfile; then
993 AC_MSG_NOTICE([$featuresfile is unchanged])
996 mv $outfile $featuresfile
999 PANGO_VERSION_MAJOR=$PANGO_VERSION_MAJOR
1000 PANGO_VERSION_MINOR=$PANGO_VERSION_MINOR
1001 PANGO_VERSION_MICRO=$PANGO_VERSION_MICRO
1007 pango/mini-fribidi/Makefile
1008 pango/opentype/Makefile
1017 modules/arabic/Makefile
1018 modules/basic/Makefile
1019 modules/hangul/Makefile
1020 modules/hebrew/Makefile
1021 modules/indic/Makefile
1022 modules/khmer/Makefile
1023 modules/syriac/Makefile
1024 modules/thai/Makefile
1025 modules/tibetan/Makefile
1032 build/win32/Makefile
1033 build/win32/vs9/Makefile
1034 build/win32/vs10/Makefile
1041 pango-uninstalled.pc
1042 pangox-uninstalled.pc
1043 pangowin32-uninstalled.pc
1044 pangoft2-uninstalled.pc
1045 pangoxft-uninstalled.pc
1046 pangocairo-uninstalled.pc
1051 AC_CONFIG_FILES([tests/runtests.sh],
1052 [chmod +x tests/runtests.sh])
1057 if $have_cairo ; then backends="$backends Cairo"; fi
1058 if $have_win32 ; then backends="$backends Win32"; fi
1059 if $have_xft ; then backends="$backends Xft"; fi
1060 if $have_freetype && $have_fontconfig ; then backends="$backends FreeType"; fi
1061 if $have_x ; then backends="$backends X"; fi
1063 echo "configuration: