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], [26])
25 m4_define([pango_version_micro], [1])
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 dnl Number of releases since we've added interfaces
32 dnl XXX For 1.25 release simply remove it and make it automatic.
33 m4_define([pango_interface_age], [0])
34 m4_if(m4_eval(pango_version_minor % 2), [1],
36 dnl for unstable releases
37 m4_define([pango_interface_age], [0])
40 dnl for stable releases
41 m4_define([pango_interface_age], pango_version_micro)
43 dnl Number of releases since we've broken binary compatibility.
44 m4_define([pango_binary_age],
45 [m4_eval(100 * pango_version_minor + pango_version_micro)])
46 dnl Module API version. This should be stepped up when a change causes
47 dnl older modules to not work with new pango.
48 m4_define([pango_module_version], [1.6.0])
51 AC_INIT(pango, pango_version(),
52 [http://bugzilla.gnome.org/enter_bug.cgi?product=pango])
54 AC_CONFIG_SRCDIR([pango.pc.in])
56 dnl -Wno-portability tells automake to stop complaining about the
57 dnl usage of GNU Make specific features.
58 AM_INIT_AUTOMAKE(1.9 gnits dist-bzip2 no-dist-gzip -Wno-portability)
59 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
60 AM_CONFIG_HEADER([config.h])
63 PANGO_VERSION_MAJOR=pango_version_major()
64 PANGO_VERSION_MINOR=pango_version_minor()
65 PANGO_VERSION_MICRO=pango_version_micro()
66 PANGO_VERSION=pango_version()
67 PANGO_API_VERSION=pango_api_version()
68 PANGO_INTERFACE_AGE=pango_interface_age()
69 PANGO_BINARY_AGE=pango_binary_age()
70 PANGO_MODULE_VERSION=pango_module_version()
72 AC_SUBST(PANGO_VERSION_MAJOR)
73 AC_SUBST(PANGO_VERSION_MINOR)
74 AC_SUBST(PANGO_VERSION_MICRO)
75 AC_SUBST(PANGO_VERSION)
76 AC_SUBST(PANGO_API_VERSION)
77 AC_SUBST(PANGO_INTERFACE_AGE)
78 AC_SUBST(PANGO_BINARY_AGE)
79 AC_SUBST(PANGO_MODULE_VERSION)
81 AC_DEFINE(MODULE_VERSION, "pango_module_version()", [Module interface version])
82 AC_DEFINE(PANGO_BINARY_AGE, pango_binary_age(), [PANGO binary age])
83 AC_DEFINE(PANGO_INTERFACE_AGE, pango_interface_age(), [PANGO interface age])
84 AC_DEFINE(PANGO_VERSION_MAJOR, pango_version_major(), [PANGO major version])
85 AC_DEFINE(PANGO_VERSION_MINOR, pango_version_minor(), [PANGO minor version])
86 AC_DEFINE(PANGO_VERSION_MICRO, pango_version_micro(), [PANGO micro version])
88 dnl libtool versioning
89 m4_define([lt_current], [m4_eval(100 * pango_version_minor + pango_version_micro - pango_interface_age)])
90 m4_define([lt_revision], [pango_interface_age])
91 m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)])
92 VERSION_INFO="lt_current():lt_revision():lt_age()"
93 PANGO_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
95 AC_SUBST(PANGO_CURRENT_MINUS_AGE)
97 dnl ==========================================================================
101 AC_MSG_CHECKING([for native Win32])
107 LIB_EXE_MACHINE_FLAG=X64
110 LIB_EXE_MACHINE_FLAG=X86
118 AC_MSG_RESULT([$pango_os_win32])
120 AC_SUBST(LIB_EXE_MACHINE_FLAG)
122 AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes")
127 dnl Check for a working C++ compiler, but do not bail out, if none is found.
128 dnl We use this for an automated test for C++ header correctness.
130 AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
133 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
134 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
138 # Checks for HarfBuzz
142 AC_CHECK_FUNCS(mprotect sysconf getpagesize)
143 AC_CHECK_HEADERS(unistd.h sys/mman.h)
145 # Make sure we don't link to libstdc++ (needs de-gcc-fication)
146 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
156 if test "$pango_os_win32" = "yes"; then
157 if test x$enable_static = xyes -o x$enable_static = x; then
158 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
161 if test x$enable_shared = xno; then
162 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
168 dnl when using libtool 2.x create libtool early, because it's used in configure
169 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
171 AC_MSG_CHECKING([for some Win32 platform])
173 *-*-mingw*|*-*-cygwin*)
174 pango_platform_win32=yes
177 pango_platform_win32=no
180 AC_MSG_RESULT([$pango_platform_win32])
181 AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes")
183 if test "$pango_platform_win32" = "yes"; then
184 AC_CHECK_TOOL(WINDRES, windres, no)
185 if test "$WINDRES" = no; then
186 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
188 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
190 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
193 if test "x$GCC" = "xyes"; then
195 *[\ \ ]-Wall[\ \ ]*) ;;
196 *) CFLAGS="$CFLAGS -Wall" ;;
201 dnl declare --enable-* args and collect ac_help strings
203 m4_define([debug_default],
204 m4_if(m4_eval(pango_version_minor() % 2), [1], [yes], [minimum]))
207 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
208 [turn on debugging @<:@default=debug_default()@:>@]),
210 enable_debug=debug_default())
212 if test "x$enable_debug" = "xyes"; then
213 PANGO_DEBUG_FLAGS="-DPANGO_ENABLE_DEBUG"
215 PANGO_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
217 if test "x$enable_debug" = "xno"; then
218 PANGO_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS $PANGO_DEBUG_FLAGS"
222 AC_SUBST(PANGO_DEBUG_FLAGS)
224 AC_ARG_ENABLE(rebuilds,
225 [AC_HELP_STRING([--disable-rebuilds],
226 [disable all source autogeneration rules])],,
227 [enable_rebuilds=yes])
229 AM_CONDITIONAL(CROSS_COMPILING, [test $cross_compiling = yes])
232 if test "x$pango_os_win32" != xyes; then
235 if test x$no_x = xyes ; then
236 AC_MSG_WARN([X development libraries not found])
239 X_LIBS="$X_LIBS -lX11"
241 AC_DEFINE(HAVE_X, 1, [Have X libraries])
244 AM_CONDITIONAL(HAVE_X, $have_x)
246 have_fontconfig=false
251 # Check for fontconfig
253 PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.5.0, have_fontconfig=true, AC_MSG_RESULT([no]))
256 # Checks for FreeType
258 if $have_fontconfig ; then
259 # The first version of freetype with a .pc file is 2.1.5. That's recent
260 # enough for all the functions we use I guess. No version check needed.
261 PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, AC_MSG_RESULT([no]))
263 if $have_freetype ; then
264 AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
265 # By freetype, we really always mean freetype+fontconfig
266 FREETYPE_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS"
267 FREETYPE_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS"
269 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
272 # Checks for Xft/XRender
274 if $have_x && $have_freetype ; then
275 PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no]))
278 AC_DEFINE(HAVE_XFT, 1, [Have Xft library])
280 AM_CONDITIONAL(HAVE_XFT, $have_xft)
283 # Checks for Win32 GDI
288 # The following doesn't work with autoconf-2.13, so we check $host instead
289 # AC_CHECK_LIB(gdi32, GetTextMetricsA@8, have_win32=true, : )
291 *-*-mingw*|*-*-cygwin*) have_win32=true ;;
295 if test $have_win32 = true; then
300 AM_CONDITIONAL(HAVE_WIN32, $have_win32)
302 # Ensure MSVC-compatible struct packing convention is used when
303 # compiling for Win32 with gcc.
304 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
305 # gcc2 uses "-fnative-struct".
306 if test "$pango_os_win32" = "yes"; then
307 if test x"$GCC" = xyes; then
309 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
310 if test -z "$ac_cv_prog_CC"; then
313 our_gcc="$ac_cv_prog_CC"
315 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
317 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
318 msnative_struct='-fnative-struct'
322 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
323 msnative_struct='-mms-bitfields'
327 if test x"$msnative_struct" = x ; then
328 AC_MSG_RESULT([no way])
329 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
331 CFLAGS="$CFLAGS $msnative_struct"
332 AC_MSG_RESULT([${msnative_struct}])
340 AC_CHECK_HEADER(Carbon/Carbon.h, [have_atsui=true], [have_atsui=false])
349 have_cairo_xlib=false
350 have_cairo_freetype=false
351 have_cairo_win32=false
352 have_cairo_atsui=false
355 PKG_CHECK_MODULES(CAIRO, cairo >= $cairo_required, have_cairo=true, AC_MSG_RESULT([no]))
357 if $have_cairo ; then
358 pango_save_libs=$LIBS
359 LIBS="$LIBS $CAIRO_LIBS"
360 pango_save_ldflags=$LDFLAGS
361 LDFLAGS="$LDFLAGS $CAIRO_LIBS"
364 cairo_font_backends=""
366 if $have_freetype; then
367 PKG_CHECK_EXISTS(cairo-ft >= $cairo_required, have_cairo_freetype=true, :)
369 if $have_cairo_freetype; then
370 AC_DEFINE(HAVE_CAIRO_FREETYPE, 1, [Whether Cairo can use FreeType for fonts])
371 cairo_font_backends="freetype $cairo_font_backends"
376 PKG_CHECK_EXISTS(cairo-win32 >= $cairo_required, have_cairo_win32=true, :)
378 if $have_cairo_win32; then
379 AC_DEFINE(HAVE_CAIRO_WIN32, 1, [Whether Cairo can use the Win32 GDI for fonts])
380 cairo_font_backends="win32 $cairo_font_backends"
385 PKG_CHECK_EXISTS(cairo-quartz-font >= $cairo_required, have_cairo_atsui=true, :)
387 if $have_cairo_atsui; then
388 AC_DEFINE(HAVE_CAIRO_ATSUI, 1, [Whether Cairo can use ATSUI for fonts])
389 cairo_font_backends="quartz $cairo_font_backends"
393 AC_MSG_CHECKING([which cairo font backends could be used])
394 if $have_cairo ; then
395 AC_MSG_RESULT([$cairo_font_backends])
397 AC_MSG_RESULT([none])
398 AC_MSG_NOTICE([Disabling cairo support])
401 if $have_cairo ; then
402 AC_DEFINE(HAVE_CAIRO, 1, [Have usable Cairo library and font backend])
404 PKG_CHECK_EXISTS(cairo-png >= $cairo_required, have_cairo_png=true, :)
405 if $have_cairo_png; then
406 AC_DEFINE(HAVE_CAIRO_PNG, 1, [Whether Cairo has PNG support])
409 PKG_CHECK_EXISTS(cairo-ps >= $cairo_required, have_cairo_ps=true, :)
410 if $have_cairo_ps; then
411 AC_DEFINE(HAVE_CAIRO_PS, 1, [Whether Cairo has PS support])
414 PKG_CHECK_EXISTS(cairo-pdf >= $cairo_required, have_cairo_pdf=true, :)
415 if $have_cairo_pdf; then
416 AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether Cairo has PDF support])
419 PKG_CHECK_EXISTS(cairo-xlib >= $cairo_required, have_cairo_xlib=true, :)
420 if $have_cairo_xlib; then
421 AC_DEFINE(HAVE_CAIRO_XLIB, 1, [Whether Cairo has Xlib support])
425 LIBS=$pango_save_libs
426 LDFLAGS=$pango_save_ldflags
429 AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
430 AM_CONDITIONAL(HAVE_CAIRO_PNG, $have_cairo_png)
431 AM_CONDITIONAL(HAVE_CAIRO_PS, $have_cairo_ps)
432 AM_CONDITIONAL(HAVE_CAIRO_PDF, $have_cairo_pdf)
433 AM_CONDITIONAL(HAVE_CAIRO_XLIB, $have_cairo_xlib)
434 AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32)
435 AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype)
436 AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui)
439 # We must have some backend defined, in order for the pango-querymodules
440 # rule in pango/Makefile.am to work correctly. If you are up to writing
441 # a new Pango backend outside of Pango, you are up to sending the necessary
442 # patch to fix that rule. :-)
444 if $have_freetype || $have_x || $have_xft || $have_cairo || $have_win32 ; then : ; else
445 AC_MSG_ERROR([*** Could not enable any of FreeType, X11, Cairo, or Win32 backends.
446 *** Must have at least one backend to build Pango.])
452 GLIB_REQUIRED_VERSION=2.17.3
453 GLIB_MODULES="glib-2.0 >= $GLIB_REQUIRED_VERSION gobject-2.0 gmodule-no-export-2.0"
455 PKG_CHECK_MODULES(GLIB, $GLIB_MODULES, :,
457 *** Glib $GLIB_REQUIRED_VERSION or better is required. The latest version of
458 *** Glib is always available from ftp://ftp.gtk.org/.]))
460 # Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled.
461 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
462 AC_SUBST(GLIB_MKENUMS)
465 # Add in gthread-2.0 to CFLAGS but not to LIBS so we get any
466 # necesary defines for thread-safety.
467 GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_MODULES gthread-2.0`
469 # See if it's safe to turn G_DISABLE_DEPRECATED on.
470 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
471 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo $GLIB_REQUIRED_VERSION | sed "s/\.@<:@^.@:>@*\$//"`
472 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
473 GLIB_CFLAGS="-DG_DISABLE_DEPRECATED $GLIB_CFLAGS"
480 LIBTHAI_REQUIRED_VERSION=0.1.9
481 PKG_CHECK_MODULES(LIBTHAI, libthai >= $LIBTHAI_REQUIRED_VERSION, have_libthai=true, AC_MSG_RESULT([no]))
484 # Checks for GObject Introspection
486 have_introspection=false
487 PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.6.4, have_introspection=true, have_introspection=false)
488 AM_CONDITIONAL(HAVE_INTROSPECTION, $have_introspection)
495 if $have_introspection; then
496 G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
497 G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
498 G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
499 GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
500 TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
502 AC_SUBST(G_IR_SCANNER)
503 AC_SUBST(G_IR_COMPILER)
504 AC_SUBST(G_IR_GENERATE)
511 arabic_modules="arabic-fc,arabic-lang"
512 basic_modules="basic-fc,basic-win32,basic-x,basic-atsui"
513 hangul_modules="hangul-fc"
514 hebrew_modules="hebrew-fc"
515 indic_modules="indic-fc,indic-lang"
516 khmer_modules="khmer-fc"
517 syriac_modules="syriac-fc"
518 thai_modules="thai-fc"
519 tibetan_modules="tibetan-fc"
521 if $have_libthai ; then
522 thai_modules="$thai_modules,thai-lang"
525 all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$khmer_modules,$syriac_modules,$thai_modules,$tibetan_modules"
528 # Allow building some or all modules included
530 AC_MSG_CHECKING(modules to link statically)
532 AC_ARG_WITH(included_modules,
533 AC_HELP_STRING([--with-included-modules=no/yes/MODULE1 MODULE2 ...],
534 [build the given modules included @<:@default=no@:>@]))
537 case x$with_included_modules in
538 xyes) included_modules=$all_modules ;;
539 xno|x) included_modules="" ;;
540 *) included_modules=$with_included_modules ;;
542 AC_MSG_RESULT($included_modules)
543 AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x)
546 # Allow building only some or none of modules dynamic
548 AC_MSG_CHECKING(dynamic modules to build)
550 AC_ARG_WITH(dynamic_modules,
551 AC_HELP_STRING([--with-dynamic-modules=no/yes/MODULE1 MODULE2 ...],
552 [build the given dynamic modules @<:@default=yes@:>@]))
555 case x$with_dynamic_modules in
556 xyes|x) dynamic_modules=$all_modules ;;
557 xno) dynamic_modules="" ;;
558 *) dynamic_modules=$with_dynamic_modules ;;
560 AC_MSG_RESULT([$dynamic_modules (those built into Pango will be excluded)])
561 AM_CONDITIONAL(HAVE_DYNAMIC_MODULES, test "x$dynamic_modules" != x)
566 INCLUDED_WIN32_MODULES=
567 INCLUDED_ATSUI_MODULES=
568 INCLUDED_LANG_MODULES=
570 AC_SUBST(INCLUDED_X_MODULES)
571 AC_SUBST(INCLUDED_FC_MODULES)
572 AC_SUBST(INCLUDED_WIN32_MODULES)
573 AC_SUBST(INCLUDED_ATSUI_MODULES)
574 AC_SUBST(INCLUDED_LANG_MODULES)
576 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=", "
577 for module in $included_modules; do
578 case $indic_modules in
579 *$module*) dir=indic ;;
580 *) dir=`echo $module | sed "s/-.*//"` ;;
582 included_path="\$(top_builddir)/modules/$dir/libpango-$module.la"
585 *-x) INCLUDED_X_MODULES="$INCLUDED_X_MODULES $included_path" ;;
586 *-fc) INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES $included_path" ;;
587 *-win32) INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES $included_path" ;;
588 *-atsui) INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES $included_path" ;;
589 *-lang) INCLUDED_LANG_MODULES="$INCLUDED_LANG_MODULES $included_path" ;;
590 *) AC_MSG_ERROR([specified module $module not recognized]) ;;
593 IFS="$pango_save_ifs"
595 AM_CONDITIONAL(INCLUDE_ARABIC_FC, echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
596 AM_CONDITIONAL(INCLUDE_ARABIC_LANG, echo $included_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
597 AM_CONDITIONAL(INCLUDE_BASIC_FC, echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
598 AM_CONDITIONAL(INCLUDE_BASIC_WIN32, echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
599 AM_CONDITIONAL(INCLUDE_BASIC_X, echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
600 AM_CONDITIONAL(INCLUDE_BASIC_ATSUI, echo $included_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null)
601 AM_CONDITIONAL(INCLUDE_HANGUL_FC, echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null)
602 AM_CONDITIONAL(INCLUDE_HEBREW_FC, echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null)
603 AM_CONDITIONAL(INCLUDE_INDIC_FC, echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null)
604 AM_CONDITIONAL(INCLUDE_INDIC_LANG, echo $included_modules | egrep '(^|,)indic-lang($|,)' > /dev/null)
605 AM_CONDITIONAL(INCLUDE_KHMER_FC, echo $included_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null)
606 AM_CONDITIONAL(INCLUDE_SYRIAC_FC, echo $included_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null)
607 AM_CONDITIONAL(INCLUDE_THAI_FC, echo $included_modules | egrep '(^|,)thai-fc($|,)' > /dev/null)
608 AM_CONDITIONAL(INCLUDE_THAI_LANG, echo $included_modules | egrep '(^|,)thai-lang($|,)' > /dev/null)
609 AM_CONDITIONAL(INCLUDE_TIBETAN_FC, echo $included_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null)
611 AM_CONDITIONAL(DYNAMIC_ARABIC_FC, echo $dynamic_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
612 AM_CONDITIONAL(DYNAMIC_ARABIC_LANG, echo $dynamic_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
613 AM_CONDITIONAL(DYNAMIC_BASIC_FC, echo $dynamic_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
614 AM_CONDITIONAL(DYNAMIC_BASIC_WIN32, echo $dynamic_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
615 AM_CONDITIONAL(DYNAMIC_BASIC_X, echo $dynamic_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
616 AM_CONDITIONAL(DYNAMIC_BASIC_ATSUI, echo $dynamic_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null)
617 AM_CONDITIONAL(DYNAMIC_HANGUL_FC, echo $dynamic_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null)
618 AM_CONDITIONAL(DYNAMIC_HEBREW_FC, echo $dynamic_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null)
619 AM_CONDITIONAL(DYNAMIC_INDIC_FC, echo $dynamic_modules | egrep '(^|,)indic-fc($|,)' > /dev/null)
620 AM_CONDITIONAL(DYNAMIC_INDIC_LANG, echo $dynamic_modules | egrep '(^|,)indic-lang($|,)' > /dev/null)
621 AM_CONDITIONAL(DYNAMIC_KHMER_FC, echo $dynamic_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null)
622 AM_CONDITIONAL(DYNAMIC_SYRIAC_FC, echo $dynamic_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null)
623 AM_CONDITIONAL(DYNAMIC_THAI_FC, echo $dynamic_modules | egrep '(^|,)thai-fc($|,)' > /dev/null)
624 AM_CONDITIONAL(DYNAMIC_THAI_LANG, echo $dynamic_modules | egrep '(^|,)thai-lang($|,)' > /dev/null)
625 AM_CONDITIONAL(DYNAMIC_TIBETAN_FC, echo $dynamic_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null)
628 # We use flockfile to implement pango_getline() - should be moved to GLib
629 # strtok_r isn't present on some systems
631 AC_CHECK_FUNCS(flockfile strtok_r)
633 dnl **************************
634 dnl *** Checks for gtk-doc ***
635 dnl **************************
637 if $have_cairo ; then : ; else
638 if test x$enable_gtk_doc = xyes ; then
639 AC_MSG_WARN([Cairo not present, disabling doc building])
647 AC_HELP_STRING([--enable-man],
648 [regenerate man pages from Docbook @<:@default=no@:>@]),
652 if test "x$enable_man" != xno ; then
654 dnl Check for xsltproc
656 AC_PATH_PROG([XSLTPROC], [xsltproc])
657 if test -z "$XSLTPROC"; then
662 if test "x$enable_man" != xno ; then
663 dnl check for DocBook DTD and stylesheets in the local catalog.
664 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
665 [DocBook XML DTD V4.1.2],,enable_man=no)
666 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
667 [DocBook XSL Stylesheets],,enable_man=no)
670 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
672 AC_ARG_ENABLE(doc-cross-references,
673 AC_HELP_STRING([--disable-doc-cross-references],
674 [cross reference glib and cairo symbols @<:@default=yes@:>@]),
675 enable_doc_cross_references=$enableval,
676 enable_doc_cross_references=yes)
678 if test "x$enable_doc_cross_references" != xno ; then
679 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
680 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
681 AC_SUBST(GLIB_PREFIX)
682 AC_SUBST(CAIRO_PREFIX)
684 AM_CONDITIONAL(ENABLE_DOC_CROSS_REFERENCES, test x$enable_doc_cross_references != xno)
686 dnl ********************************************************
687 dnl * Options to pass to libtool
688 dnl ********************************************************
690 # Note that -module isn't included here since automake needs to see it to know
691 # that something like pango-arabic-fc.la is a valid libtool archive
693 LIBRARY_LIBTOOL_OPTIONS="-version-info $VERSION_INFO"
694 MODULE_LIBTOOL_OPTIONS="-export-dynamic -avoid-version"
695 if test "$pango_platform_win32" = yes; then
696 # We currently use .def files on Windows
698 LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS -no-undefined"
699 MODULE_LIBTOOL_OPTIONS="$MODULE_LIBTOOL_OPTIONS -no-undefined"
701 # libtool option to control which symbols are exported
702 # right now, symbols starting with '_' are not exported
703 LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS "'-export-symbols-regex "^pango_.*"'
704 MODULE_LIBTOOL_OPTIONS="$MODULE_LIBTOOL_OPTIONS "'-export-symbols-regex "^script_engine_.*"'
706 AC_SUBST(LIBRARY_LIBTOOL_OPTIONS)
707 AC_SUBST(MODULE_LIBTOOL_OPTIONS)
709 dnl ********************************************************
710 dnl * See whether we need to load our modules as .la files *
711 dnl ********************************************************
715 # is there any platform that we have to use .la files?
717 if $use_la_modules ; then
718 AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly])
721 dnl ******************************************************
722 dnl * See whether to include shared library dependencies *
723 dnl ******************************************************
725 AC_ARG_ENABLE(explicit-deps,
726 AC_HELP_STRING([--enable-explicit-deps=@<:@no/auto/yes@:>@],
727 [use explicit dependencies in .pc files @<:@default=auto@:>@]),
728 enable_explicit_deps="$enableval",
729 enable_explicit_deps=auto)
731 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
732 case $enable_explicit_deps in
735 deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
736 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
737 enable_explicit_deps=yes
739 enable_explicit_deps=no
744 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
747 AC_MSG_RESULT($enable_explicit_deps)
750 PKGCONFIG_CAIRO_REQUIRES=
752 if test $enable_explicit_deps = yes ; then
753 PKGCONFIG_MATH_LIBS=-lm
755 X_LIBS="$X_LIBS $X_EXTRA_LIBS"
757 if $have_cairo_freetype; then
758 PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangoft2"
760 if $have_cairo_win32; then
761 PKGCONFIG_CAIRO_REQUIRES="$PKGCONFIG_CAIRO_REQUIRES pangowin32"
765 AC_SUBST(PKGCONFIG_MATH_LIBS)
766 AC_SUBST(PKGCONFIG_CAIRO_REQUIRES)
767 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
769 AC_CONFIG_COMMANDS([pango/module-defs.h],
771 cat > pango/module-defs.h <<EOTEXT
772 /* Autogenerated by configure. Do not edit */
778 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
779 for module in $included_modules; do
780 module_c=`echo $module | sed s/-/_/`
781 cat >> pango/module-defs.h <<EOTEXT
782 extern void _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
783 extern PangoEngine *_pango_${module_c}_script_engine_init (GTypeModule *module);
784 extern void _pango_${module_c}_script_engine_exit (void);
785 extern void _pango_${module_c}_script_engine_create (const char *id);
790 IFS="$pango_save_ifs"
792 included_modules=$included_modules
795 AC_CONFIG_COMMANDS([pango/module-defs-x.c],
798 cat > pango/module-defs-x.c <<EOTEXT
799 /* Autogenerated by configure. Do not edit */
801 #include "module-defs.h"
803 PangoIncludedModule _pango_included_x_modules@<:@@:>@ = {
806 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
807 for module in $included_modules; do
808 if echo $module | egrep -- "-x($|,)" > /dev/null; then
809 module_c=`echo $module | sed s/-/_/`
810 cat >> pango/module-defs-x.c <<EOTEXT
811 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
816 IFS="$pango_save_ifs"
818 cat >> pango/module-defs-x.c <<EOTEXT
819 { NULL, NULL, NULL, NULL },
824 AC_CONFIG_COMMANDS([pango/module-defs-fc.c],
827 cat > pango/module-defs-fc.c <<EOTEXT
828 /* Autogenerated by configure. Do not edit */
830 #include "module-defs.h"
832 PangoIncludedModule _pango_included_fc_modules@<:@@:>@ = {
835 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
836 for module in $included_modules; do
837 if echo $module | egrep -- "-fc($|,)" > /dev/null; then
838 module_c=`echo $module | sed s/-/_/`
839 cat >> pango/module-defs-fc.c <<EOTEXT
840 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
845 IFS="$pango_save_ifs"
847 cat >> pango/module-defs-fc.c <<EOTEXT
848 { NULL, NULL, NULL, NULL },
853 AC_CONFIG_COMMANDS([pango/module-defs-win32.c],
856 cat > pango/module-defs-win32.c <<EOTEXT
857 /* Autogenerated by configure. Do not edit */
859 #include "module-defs.h"
861 PangoIncludedModule _pango_included_win32_modules@<:@@:>@ = {
864 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
865 for module in $included_modules; do
866 if echo $module | egrep -- "-win32($|,)" > /dev/null; then
867 module_c=`echo $module | sed s/-/_/`
868 cat >> pango/module-defs-win32.c <<EOTEXT
869 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
874 IFS="$pango_save_ifs"
876 cat >> pango/module-defs-win32.c <<EOTEXT
877 { NULL, NULL, NULL, NULL },
882 AC_CONFIG_COMMANDS([pango/module-defs-atsui.c],
885 cat > pango/module-defs-atsui.c <<EOTEXT
886 /* Autogenerated by configure. Do not edit */
888 #include "module-defs.h"
890 PangoIncludedModule _pango_included_atsui_modules@<:@@:>@ = {
893 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
894 for module in $included_modules; do
895 if echo $module | egrep -- "-atsui($|,)" > /dev/null; then
896 module_c=`echo $module | sed s/-/_/`
897 cat >> pango/module-defs-atsui.c <<EOTEXT
898 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
903 IFS="$pango_save_ifs"
905 cat >> pango/module-defs-atsui.c <<EOTEXT
906 { NULL, NULL, NULL, NULL },
911 AC_CONFIG_COMMANDS([pango/module-defs-lang.c],
914 cat > pango/module-defs-lang.c <<EOTEXT
915 /* Autogenerated by configure. Do not edit */
917 #include "module-defs.h"
919 PangoIncludedModule _pango_included_lang_modules@<:@@:>@ = {
922 IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
923 for module in $included_modules; do
924 if echo $module | egrep -- "-lang($|,)" > /dev/null; then
925 module_c=`echo $module | sed s/-/_/`
926 cat >> pango/module-defs-lang.c <<EOTEXT
927 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create },
932 IFS="$pango_save_ifs"
934 cat >> pango/module-defs-lang.c <<EOTEXT
935 { NULL, NULL, NULL, NULL },
942 AC_CHECK_HEADERS(unistd.h)
944 # Honor aclocal flags
945 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
946 dnl ===========================================================================
947 AC_CONFIG_COMMANDS([pango/pango-features.h],
948 [featuresfile=pango/pango-features.h
949 outfile=$featuresfile.tmp
950 AC_MSG_NOTICE([creating $featuresfile])
952 /* Generated by configure. Do not edit */
953 #ifndef PANGO_FEATURES_H
954 #define PANGO_FEATURES_H
956 #define PANGO_VERSION_MAJOR $PANGO_VERSION_MAJOR
957 #define PANGO_VERSION_MINOR $PANGO_VERSION_MINOR
958 #define PANGO_VERSION_MICRO $PANGO_VERSION_MICRO
960 #define PANGO_VERSION_STRING "$PANGO_VERSION_MAJOR.$PANGO_VERSION_MINOR.$PANGO_VERSION_MICRO"
963 # TODO: define macros for enabled features/backends here
966 echo '#endif' >>$outfile
968 if cmp -s $outfile $featuresfile; then
969 AC_MSG_NOTICE([$featuresfile is unchanged])
972 mv $outfile $featuresfile
975 PANGO_VERSION_MAJOR=$PANGO_VERSION_MAJOR
976 PANGO_VERSION_MINOR=$PANGO_VERSION_MINOR
977 PANGO_VERSION_MICRO=$PANGO_VERSION_MICRO
983 pango/mini-fribidi/Makefile
984 pango/opentype/Makefile
992 modules/arabic/Makefile
993 modules/basic/Makefile
994 modules/hangul/Makefile
995 modules/hebrew/Makefile
996 modules/indic/Makefile
997 modules/khmer/Makefile
998 modules/syriac/Makefile
999 modules/thai/Makefile
1000 modules/tibetan/Makefile
1012 pango-uninstalled.pc
1013 pangox-uninstalled.pc
1014 pangowin32-uninstalled.pc
1015 pangoft2-uninstalled.pc
1016 pangoxft-uninstalled.pc
1017 pangocairo-uninstalled.pc
1021 AC_CONFIG_FILES([tests/runtests.sh],
1022 [chmod +x tests/runtests.sh])
1027 if $have_cairo ; then backends="$backends Cairo"; fi
1028 if $have_win32 ; then backends="$backends Win32"; fi
1029 if $have_xft ; then backends="$backends Xft"; fi
1030 if $have_freetype && $have_fontconfig ; then backends="$backends FreeType"; fi
1031 if $have_x ; then backends="$backends X"; fi
1033 echo "configuration: