source: trunk/third/pango/configure.in @ 18248

Revision 18248, 22.7 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18247, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to create configure.
2
3AC_PREREQ(2.53)
4AC_INIT(ChangeLog)
5
6dnl ==========================================================================
7dnl                               Versioning             
8dnl ==========================================================================
9
10dnl Making releases:
11dnl   PANGO_MICRO_VERSION += 1;
12dnl   PANGO_INTERFACE_AGE += 1;
13dnl   PANGO_BINARY_AGE += 1;
14dnl if any functions have been added, set PANGO_INTERFACE_AGE to 0.
15dnl if backwards compatibility has been broken,
16dnl set PANGO_BINARY_AGE _and_ PANGO_INTERFACE_AGE to 0.
17
18dnl The triplet
19PANGO_MAJOR_VERSION=1
20PANGO_MINOR_VERSION=2
21PANGO_MICRO_VERSION=0
22PANGO_VERSION=$PANGO_MAJOR_VERSION.$PANGO_MINOR_VERSION.$PANGO_MICRO_VERSION
23
24dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2.
25PANGO_API_VERSION=1.0
26
27dnl Number of releases since we've added interfaces
28PANGO_INTERFACE_AGE=0
29
30dnl Number of releases since we've broken binary compatibility.
31# PANGO_BINARY_AGE=0
32PANGO_BINARY_AGE=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION`
33
34dnl This is the last version with which we have compatibility with
35dnl with the modules for; it isn't the same as
36dnl PANGO_API_VERSION.'PANGO_MICRO_VERSION - PANGO_BINARY_AGE' since we have
37dnl engine only API   
38PANGO_MODULE_VERSION=1.2.0
39
40AC_SUBST(PANGO_MAJOR_VERSION)
41AC_SUBST(PANGO_MINOR_VERSION)
42AC_SUBST(PANGO_VERSION)
43AC_SUBST(PANGO_API_VERSION)
44AC_SUBST(PANGO_MICRO_VERSION)
45AC_SUBST(PANGO_INTERFACE_AGE)
46AC_SUBST(PANGO_BINARY_AGE)
47AC_SUBST(PANGO_MODULE_VERSION)
48
49dnl libtool versioning
50lt_current=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION - $PANGO_INTERFACE_AGE`
51lt_revision=$PANGO_INTERFACE_AGE
52lt_age=`expr $PANGO_BINARY_AGE - $PANGO_INTERFACE_AGE`
53LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
54LT_CURRENT_MINUS_AGE=`expr $lt_current - $lt_age`
55
56AC_SUBST(LT_VERSION_INFO)
57AC_SUBST(LT_CURRENT_MINUS_AGE)
58
59dnl ==========================================================================
60
61AM_INIT_AUTOMAKE(pango, $PANGO_VERSION)
62
63AM_CONFIG_HEADER(config.h)
64
65AC_PROG_CC
66       
67dnl
68dnl Check for a working C++ compiler, but do not bail out, if none is found.
69dnl We use this for an automated test for C++ header correctness.
70dnl
71AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
72AC_LANG_SAVE
73AC_LANG_CPLUSPLUS
74AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
75AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
76AC_LANG_RESTORE
77
78AC_LIBTOOL_WIN32_DLL
79AM_DISABLE_STATIC
80AM_PROG_LIBTOOL
81
82AC_MSG_CHECKING([for some Win32 platform])
83case "$host" in
84  *-*-mingw*|*-*-cygwin*)
85    pango_platform_win32=yes
86    ;;
87  *)
88    pango_platform_win32=no
89    ;;
90esac
91AC_MSG_RESULT([$pango_platform_win32])
92AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes")
93
94AC_MSG_CHECKING([for native Win32])
95case "$host" in
96  *-*-mingw*)
97    pango_os_win32=yes
98    ;;
99  *)
100    pango_os_win32=no
101    ;;
102esac
103AC_MSG_RESULT([$pango_os_win32])
104AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes")
105
106if test "$pango_os_win32" = "yes"; then
107  AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
108fi
109AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
110
111changequote(,)dnl
112if test "x$GCC" = "xyes"; then
113  case " $CFLAGS " in
114  *[\ \ ]-Wall[\ \      ]*) ;;
115  *) CFLAGS="$CFLAGS -Wall" ;;
116  esac
117fi
118changequote([,])dnl
119
120AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
121
122AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
123
124# define a MAINT-like variable REBUILD which is set if Perl
125# is found, so autogenerated sources can be rebuilt
126
127AC_CHECK_PROGS(PERL, perl5 perl)
128
129REBUILD=\#
130if test "x$enable_rebuilds" = "xyes" && \
131     test -n "$PERL" && \
132     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
133  REBUILD=
134fi
135AC_SUBST(REBUILD)
136
137AC_PATH_XTRA
138
139if test x$no_x = xyes ; then
140  AC_MSG_WARN([X development libraries not found])
141  have_x=false
142else
143  X_LIBS="$X_LIBS -lX11"
144  have_x=true
145fi
146AM_CONDITIONAL(HAVE_X, $have_x)
147
148#
149# Checks for FreeType
150#
151FREETYPE_LIBS=
152FREETYPE_CFLAGS=
153have_freetype=false
154AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
155if test "x$FREETYPE_CONFIG" != "xno" ; then
156  FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
157  FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
158
159  pango_save_ldflags=$LDFLAGS
160  LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
161  AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true, :)
162  LDFLAGS=$pango_save_ldflags
163
164  if $have_freetype ; then
165    pango_save_cppflags="$CPPFLAGS"
166    CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
167
168    AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
169    AC_TRY_COMPILE([
170#include <freetype/freetype.h>
171#include FT_ERRORS_H
172]
173                ,[(void)1;],:,have_freetype=false)
174    if $have_freetype ; then
175      AC_MSG_RESULT(yes)
176    else
177      AC_MSG_RESULT(no)
178    fi
179
180    CPPFLAGS="$pango_save_cppflags"
181  fi
182fi
183AC_SUBST(FREETYPE_LIBS)
184AC_SUBST(FREETYPE_CFLAGS)
185
186## see which freetype we have, 2.0.3 vs. 2.0.4
187pango_save_cppflags="$CPPFLAGS" 
188CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
189AC_CHECK_HEADER(freetype/internal/tterrors.h, AC_DEFINE(HAVE_FREETYPE_2_0_3))
190CPPFLAGS="$pango_save_cppflags"
191
192## Check to see whether we have FT_Get_First_Char(), new in 2.0.9
193pango_save_libs=$LIBS
194LIBS="$LIBS $FREETYPE_LIBS"
195AC_CHECK_FUNCS(FT_Get_First_Char)
196LIBS=$pango_save_libs
197
198#
199# Check for fontconfig
200#
201have_fontconfig=false
202
203PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 1.0.1, have_fontconfig=true, :)
204
205AC_SUBST(FONTCONFIG_LIBS)
206AC_SUBST(FONTCONFIG_CFLAGS)
207
208AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype && $have_fontconfig)
209
210#
211# Checks for Xft/XRender
212#
213have_xft=false
214
215PKG_CHECK_MODULES(XFT, xft >= 2.0.0, have_xft=true, :)
216
217AC_SUBST(XFT_LIBS)
218AC_SUBST(XFT_CFLAGS)
219AM_CONDITIONAL(HAVE_XFT, $have_xft)
220
221#
222# Checks for Win32 GDI
223#
224have_win32=false
225WIN32_LIBS=""
226WIN32_CFLAGS=""
227# The following doesn't work with autoconf-2.13, so we check $host instead
228# AC_CHECK_LIB(gdi32, GetTextMetricsA@8, have_win32=true, : )
229case "$host" in
230  *-*-mingw*|*-*-cygwin*) have_win32=true ;;
231esac
232
233
234if test $have_win32 = true; then
235  WIN32_LIBS="-lgdi32"
236fi
237
238AC_SUBST(WIN32_LIBS)
239AM_CONDITIONAL(HAVE_WIN32, $have_win32)
240
241#
242# We must have some backend defined, in order for the pango-querymodules
243# rule in pango/Makefile.am to work correctly. If you are up to writing
244# a new Pango backend outside of Pango, you are up to sending the necessary
245# patch to fix that rule. :-)
246#
247if $have_freetype || $have_x || $have_xft || $have_win32  ; then : ; else
248  AC_MSG_ERROR([*** Didn't find any of FreeType, X11, or Win32.
249*** Must have at least one backend to build Pango.])
250fi
251
252#
253# Checks for GLib
254#
255GLIB_REQUIRED_VERSION=2.1.3
256
257AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
258  AC_MSG_ERROR([
259*** Glib $GLIB_REQUIRED_VERSION or better is required. The latest version of
260*** Glib is always available from ftp://ftp.gtk.org/.]),
261  gobject gmodule)
262
263GLIB_CFLAGS=`$PKG_CONFIG --cflags gthread-2.0`
264
265AC_SUBST(GLIB_LIBS)
266AC_SUBST(GLIB_CFLAGS)
267
268#
269# Checks for fribidi
270#
271#AC_ARG_WITH(fribidi, [ --with-fribidi     Use external fribidi library ],,with_fribidi=no)
272#
273FRIBIDI_LIBS=""
274FRIBIDI_CFLAGS=""
275FRIBIDI_PC=""
276have_fribidi=no
277#
278#if test "x$with_fribidi" = "xyes" ; then
279#   AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no)
280#   if test x$FRIBIDI_CONFIG = xno ; then
281#     AC_MSG_ERROR([*** fribidi-config not found])
282#   fi
283#
284#   if $FRIBIDI_CONFIG --cflags | grep lib/glib/include > /dev/null ; then
285#     AC_MSG_ERROR([*** fribidi appears to be compiled against GLib-1.2.x.
286#     *** You must compile fribidi with GLib-1.3.1 or better.])
287#   fi
288#
289#   FRIBIDI_CFLAGS="`$FRIBIDI_CONFIG --cflags`"
290#   CFLAGS="$CFLAGS $FRIBIDI_CFLAGS"
291#   FRIBIDI_LIBS="`$FRIBIDI_CONFIG --libs`"
292#   FRIBIDI_PC="fribidi,"       
293#
294#   AC_CHECK_LIB(fribidi, fribidi_get_mirror_char, :,
295#               AC_MSG_ERROR([*** libfribidi not found.]), $FRIBIDI_LIBS)
296#
297#   AC_DEFINE(HAVE_FRIBIDI)
298#   have_fribidi=yes
299#fi
300
301AC_SUBST(FRIBIDI_LIBS)
302AC_SUBST(FRIBIDI_CFLAGS)
303AC_SUBST(FRIBIDI_PC)
304AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes)
305
306#
307# Allow setting a default path for XftConfig
308#
309AC_ARG_WITH(xftconfig-dir, [  --with-xftconfig-dir=PATH   path to system XftConfig file for minixft ])
310
311if test "x$with_xftconfig_dir" != "x"; then
312   AC_DEFINE_UNQUOTED(MINI_XFTCONFIG_DIR, "$with_xftconfig_dir")
313fi
314
315#
316# The OpenType test programs aren't particularly portable
317#
318have_varargs=no
319pango_saved_cppflags=$CPPFLAGS
320CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
321AC_MSG_CHECKING(Whether to build OpenType test programs)
322AC_EGREP_CPP(pango_configure_test_yes, [
323#include <glib.h>
324
325#if defined(G_HAVE_ISO_VARARGS) || defined(G_HAVE_GNUC_VARARGS)
326pango_configure_test_yes
327#endif
328],have_varargs=yes)
329AC_MSG_RESULT($have_varargs)
330AM_CONDITIONAL(BUILD_OT_TESTS, test $have_varargs = yes)
331CPPFLAGS=$pango_saved_cppflags
332
333#
334# Allow building some or all modules included
335#
336AC_MSG_CHECKING(modules to link statically)
337
338AC_ARG_WITH(included_modules, [  --with-included-modules=MODULE1,MODULE2,...   build the given modules into Pango])
339
340arabic_modules="arabic-ft2,arabic-x,arabic-xft"
341basic_modules="basic-ft2,basic-win32,basic-x,basic-xft"
342hangul_modules="hangul-x,hangul-xft"
343hebrew_modules="hebrew-ft2,hebrew-x,hebrew-xft"
344indic_modules="bengali-x,devanagari-x,gurmukhi-x,gujarati-x,myanmar-x,indic-xft"
345tamil_modules="tamil-x"
346thai_modules="thai-x,thai-xft"
347
348all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$tamil_modules,$thai_modules"
349
350included_modules=""
351if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then
352
353   # If no modules specified, include all modules
354   if test "x$with_included_modules" = xyes ; then
355     included_modules="$all_modules"
356   else
357     included_modules="$with_included_modules"
358   fi
359fi
360
361AC_MSG_RESULT($included_modules)
362AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x)
363
364INCLUDED_X_MODULES=
365INCLUDED_XFT_MODULES=
366INCLUDED_FT2_MODULES=
367INCLUDED_WIN32_MODULES=
368IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
369for module in $included_modules; do
370  if echo $indic_modules | egrep "(^| )$module(\$| )" > /dev/null; then
371    dir=indic
372  else
373    dir=`echo $module | sed "s/-.*//"`
374  fi
375
376  if echo $module | egrep -- "-xft($|,)" > /dev/null; then
377    INCLUDED_XFT_MODULES="$INCLUDED_XFT_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
378  elif echo $module | egrep -- "-ft2($|,)" > /dev/null; then
379    INCLUDED_FT2_MODULES="$INCLUDED_FT2_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
380  elif echo $module | egrep -- "-x($|,)" > /dev/null; then
381    INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
382  elif echo $module | egrep -- "-win32($|,)" > /dev/null; then
383    INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la"
384  else
385    AC_MSG_ERROR([the specified module $module does not exist])
386  fi
387done
388IFS="$pango_save_ifs"
389
390AC_SUBST(INCLUDED_X_MODULES)
391AC_SUBST(INCLUDED_XFT_MODULES)
392AC_SUBST(INCLUDED_FT2_MODULES)
393AC_SUBST(INCLUDED_WIN32_MODULES)
394
395AM_CONDITIONAL(INCLUDE_ARABIC_FT2,echo $included_modules | egrep '(^|,)arabic-ft2($|,)' > /dev/null)
396AM_CONDITIONAL(INCLUDE_ARABIC_X,echo $included_modules | egrep '(^|,)arabic-x($|,)' > /dev/null)
397AM_CONDITIONAL(INCLUDE_ARABIC_XFT,echo $included_modules | egrep '(^|,)arabic-xft($|,)' > /dev/null)
398
399AM_CONDITIONAL(INCLUDE_BASIC_FT2,echo $included_modules | egrep '(^|,)basic-ft2($|,)' > /dev/null)
400AM_CONDITIONAL(INCLUDE_BASIC_WIN32,echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
401AM_CONDITIONAL(INCLUDE_BASIC_XFT,echo $included_modules | egrep '(^|,)basic-xft($|,)' > /dev/null)
402AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
403
404AM_CONDITIONAL(INCLUDE_HANGUL_X,echo $included_modules | egrep '(^|,)hangul-x($|,)' > /dev/null)
405AM_CONDITIONAL(INCLUDE_HANGUL_XFT,echo $included_modules | egrep '(^|,)hangul-xft($|,)' > /dev/null)
406
407AM_CONDITIONAL(INCLUDE_HEBREW_FT2,echo $included_modules | egrep '(^|,)hebrew-ft2($|,)' > /dev/null)
408AM_CONDITIONAL(INCLUDE_HEBREW_X,echo $included_modules | egrep '(^|,)hebrew-x($|,)' > /dev/null)
409AM_CONDITIONAL(INCLUDE_HEBREW_XFT,echo $included_modules | egrep '(^|,)hebrew-xft($|,)' > /dev/null)
410
411AM_CONDITIONAL(INCLUDE_BENGALI_X,echo $included_modules | egrep '(^|,)bengali-x($|,)' > /dev/null)
412AM_CONDITIONAL(INCLUDE_DEVANAGARI_X,echo $included_modules | egrep '(^|,)devanagari-x($|,)' > /dev/null)
413AM_CONDITIONAL(INCLUDE_GUJARATI_X,echo $included_modules | egrep '(^|,)gujarati-x($|,)' > /dev/null)
414AM_CONDITIONAL(INCLUDE_GURMUKHI_X,echo $included_modules | egrep '(^|,)gurmukhi-x($|,)' > /dev/null)
415AM_CONDITIONAL(INCLUDE_MYANMAR_X,echo $included_modules | egrep '(^|,)myanmar-x($|,)' > /dev/null)
416
417AM_CONDITIONAL(INCLUDE_TAMIL_X,echo $included_modules | egrep '(^|,)tamil-x($|,)' > /dev/null)
418
419AM_CONDITIONAL(INCLUDE_THAI_X,echo $included_modules | egrep '(^|,)thai-x($|,)' > /dev/null)
420AM_CONDITIONAL(INCLUDE_THAI_XFT,echo $included_modules | egrep '(^|,)thai-xft($|,)' > /dev/null)
421
422AM_CONDITIONAL(INCLUDE_INDIC_XFT,echo $included_modules | egrep '(^|,)indic-xft($|,)' > /dev/null)
423
424#
425# We use flockfile to implement pango_getline() - should be moved to GLib
426# strtok_r isn't present on some systems
427#
428AC_CHECK_FUNCS(flockfile strtok_r)
429
430#
431# Check for the Uniscribe header usp10.h for Win32
432#
433
434AC_ARG_WITH(usp10,
435[  --with-usp10=DIRECTORY  where to find the usp10.h header file for Win32
436                          (typically the Include directory in the
437                          Platform SDK)])
438
439USP10_H=no
440if test "${with_usp10+set}" = set && test "$with_usp10" != no; then
441  AC_MSG_CHECKING([for usp10.h])
442  if test -f "$with_usp10"/usp10.h; then
443    AC_MSG_RESULT(yes)
444    USP10_H="$with_usp10"/usp10.h
445    AC_DEFINE(HAVE_USP10_H)
446  else
447    if test -f "$with_usp10"/include/usp10.h; then
448      AC_MSG_RESULT(yes)
449      USP10_H="$with_usp10"/include/usp10.h
450      AC_DEFINE(HAVE_USP10_H)
451    else
452      AC_MSG_RESULT(no)
453    fi
454  fi
455fi
456AC_SUBST(USP10_H)
457AM_CONDITIONAL(HAVE_USP10_H, test "$USP10_H" != no)   
458
459#
460# Check for Qt - which we use for building the viewer example, if
461# present
462#
463
464AC_ARG_WITH(qt, [  --with-qt=DIR           location where Qt is installed],,with_qt=yes)
465
466if test "$CXX" != "" ; then
467  AC_MSG_CHECKING(For Qt location)
468 
469  if test "x$with_qt" = xyes ; then
470  # Search for Qt in a common location. The ls -r is an attempt to find the newest
471     if test "x$QTDIR" != x ; then
472       if test -x $QTDIR/bin/moc ; then : ; else
473         QTDIR=
474       fi
475     else
476       dirs=`cd /usr/lib && ls -d -r qt* 2>/dev/null`
477       for dir in $dirs ; do
478          case $dir in
479            qt2*|qt-2*|qt3*|qt-3*)
480              if test -x /usr/lib/$dir/bin/moc ; then
481                QTDIR=/usr/lib/$dir
482               break
483             fi
484            ;;
485          esac     
486       done
487     fi
488  else
489     if test "x$with_qt" != xno ; then
490        if test -x $with_qt/bin/moc ; then
491           QTDIR=$with_qt
492        fi
493     else
494        QTDIR=""
495     fi
496  fi
497
498  if test "x$QTDIR" = x ; then
499    AC_MSG_RESULT(none)
500  else
501    AC_MSG_RESULT($QTDIR)
502  fi
503else
504  QTDIR=""
505fi
506
507if test x"$QTDIR" != "x" ; then
508  AC_MSG_CHECKING(For working Qt)
509
510  pango_save_libs="$LIBS"
511  pango_save_cppflags="$CPPFLAGS"
512  LIBS="-L$QTDIR/lib -lqt $LIBS"
513  CPPFLAGS="-I $QTDIR/include"
514  AC_LANG_SAVE
515  AC_LANG_CPLUSPLUS
516  AC_TRY_LINK([#include <qapplication.h>],
517              [QApplication a ();],
518               [AC_MSG_RESULT(yes)],
519               [QTDIR=""; AC_MSG_RESULT(no)])
520  AC_LANG_RESTORE
521  LIBS="$pango_save_libs"
522  CPPFLAGS="$pango_save_cppflags"
523fi
524
525AM_CONDITIONAL(BUILD_QT_TEST, test "x$QTDIR" != x)
526AC_SUBST(QTDIR)
527 
528dnl **************************
529dnl *** Checks for gtk-doc ***
530dnl **************************
531
532AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    path to installed docs ])
533
534if test "x$with_html_dir" = "x" ; then
535  HTML_DIR='${datadir}/gtk-doc/html'
536else
537  HTML_DIR=$with_html_dir
538fi
539
540AC_SUBST(HTML_DIR)
541
542#
543# Check for sufficiently new gtk-doc
544#
545gtk_doc_min_version=0.10
546
547AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
548if $GTKDOC ; then
549    gtk_doc_version=`gtkdoc-mkdb --version`
550    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
551
552    IFS="${IFS=         }"; pango_save_IFS="$IFS"; IFS="."
553    set $gtk_doc_version
554    for min in $gtk_doc_min_version ; do
555        cur=$1; shift
556        if test -z $min ; then break; fi
557        if test -z $cur ; then GTKDOC=false; break; fi
558        if test $cur -gt $min ; then break ; fi
559        if test $cur -lt $min ; then GTKDOC=false; break ; fi
560    done
561    IFS="$pango_save_IFS"
562
563    if $GTKDOC ; then
564      AC_MSG_RESULT(yes)
565    else
566      AC_MSG_RESULT(no)
567    fi
568fi
569
570AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
571AC_SUBST(HAVE_GTK_DOC)
572
573AC_CHECK_PROG(DB2HTML, db2html, true, false)
574AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
575
576dnl Let people disable the gtk-doc stuff.
577AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no)
578
579if test x$enable_gtk_doc = xyes ; then
580  if test x$GTKDOC = xtrue ; then
581    enable_gtk_doc=yes
582  else
583    enable_gtk_doc=no
584  fi
585fi
586
587dnl NOTE: We need to use a separate automake conditional for this
588dnl       to make this work with the tarballs.
589AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
590
591dnl ********************************************************
592dnl * See whether we need to load our modules as .la files *
593dnl ********************************************************
594
595use_la_modules=false
596case $host in
597  *-aix*) use_la_modules=true
598esac
599
600if $use_la_modules ; then
601   AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly])
602fi
603
604dnl ******************************************************
605dnl * See whether to include shared library dependencies *
606dnl ******************************************************
607
608AC_ARG_ENABLE(explicit-deps,
609              [  --enable-explicit-deps=[yes/no/auto]    use explicit dependencies in .pc files [default=auto]],
610              enable_explicit_deps="$enableval",
611              enable_explicit_deps=auto)
612
613AC_MSG_CHECKING([Whether to write dependencies into .pc files])
614case $enable_explicit_deps in
615  auto)
616    deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh`
617    if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then
618      enable_explicit_deps=yes 
619    else
620      enable_explicit_deps=no 
621    fi
622  ;;
623  yes|no)
624  ;;
625  *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
626  ;;
627esac
628AC_MSG_RESULT($enable_explicit_deps)
629
630if test $enable_explicit_deps = yes ; then
631  PKGCONFIG_X_LIBS="$X_LIBS $X_EXTRA_LIBS"
632  PKGCONFIG_XFT_LIBS=$XFT_LIBS
633  PKGCONFIG_FREETYPE_LIBS=$XFT_LIBS
634else
635  PKGCONFIG_X_LIBS=
636  PKGCONFIG_XFT_LIBS=
637  PKGCONFIG_FREETYPE_LIBS=
638fi
639AC_SUBST(PKGCONFIG_X_LIBS)
640AC_SUBST(PKGCONFIG_XFT_LIBS)
641AC_SUBST(PKGCONFIG_FREETYPE_LIBS)
642AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
643
644AC_OUTPUT_COMMANDS([
645cat > pango/module-defs.h <<EOTEXT
646/* Autogenerated by configure. Do not edit */
647
648#include "modules.h"
649
650EOTEXT
651
652IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
653for module in $included_modules; do
654  module_c=`echo $module | sed s/-/_/`
655  cat >> pango/module-defs.h <<EOTEXT
656extern void         _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
657extern PangoEngine *_pango_${module_c}_script_engine_load (const char *id);
658extern void         _pango_${module_c}_script_engine_unload (PangoEngine *engine);
659
660EOTEXT
661done
662
663IFS="$pango_save_ifs"
664
665### X modules
666cat > pango/module-defs-x.c <<EOTEXT
667/* Autogenerated by configure. Do not edit */
668
669#include "module-defs.h"
670
671PangoIncludedModule _pango_included_x_modules[] = {
672EOTEXT
673
674IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
675for module in $included_modules; do
676  if echo $module | egrep -- "-x($|,)" > /dev/null; then 
677    module_c=`echo $module | sed s/-/_/`
678    cat >> pango/module-defs-x.c <<EOTEXT
679 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
680EOTEXT
681 fi
682done
683
684IFS="$pango_save_ifs"
685
686cat >> pango/module-defs-x.c <<EOTEXT
687 { NULL, NULL, NULL },
688};
689EOTEXT
690
691
692### XFT modules
693cat > pango/module-defs-xft.c <<EOTEXT
694/* Autogenerated by configure. Do not edit */
695
696#include "module-defs.h"
697
698PangoIncludedModule _pango_included_xft_modules[] = {
699EOTEXT
700
701IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
702for module in $included_modules; do
703  if echo $module | egrep -- "-xft($|,)" > /dev/null; then
704    module_c=`echo $module | sed s/-/_/`
705    cat >> pango/module-defs-xft.c <<EOTEXT
706 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
707EOTEXT
708  fi
709done
710
711IFS="$pango_save_ifs"
712
713cat >> pango/module-defs-xft.c <<EOTEXT
714 { NULL, NULL, NULL },
715};
716EOTEXT
717
718
719### FT2 modules
720cat > pango/module-defs-ft2.c <<EOTEXT
721/* Autogenerated by configure. Do not edit */
722
723#include "module-defs.h"
724
725PangoIncludedModule _pango_included_ft2_modules[] = {
726EOTEXT
727
728IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
729for module in $included_modules; do
730  if echo $module | egrep -- "-ft2($|,)" > /dev/null; then
731    module_c=`echo $module | sed s/-/_/`
732    cat >> pango/module-defs-ft2.c <<EOTEXT
733 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
734EOTEXT
735  fi
736done
737
738IFS="$pango_save_ifs"
739
740cat >> pango/module-defs-ft2.c <<EOTEXT
741 { NULL, NULL, NULL },
742};
743EOTEXT
744
745### Win32 modules
746cat > pango/module-defs-win32.c <<EOTEXT
747/* Autogenerated by configure. Do not edit */
748
749#include "module-defs.h"
750
751PangoIncludedModule _pango_included_win32_modules[] = {
752EOTEXT
753
754IFS="${IFS=     }"; pango_save_ifs="$IFS"; IFS=","
755for module in $included_modules; do
756  if echo $module | egrep -- "-win32($|,)" > /dev/null; then
757    module_c=`echo $module | sed s/-/_/`
758    cat >> pango/module-defs-win32.c <<EOTEXT
759 { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_load,_pango_${module_c}_script_engine_unload },
760EOTEXT
761  fi
762done
763
764IFS="$pango_save_ifs"
765
766cat >> pango/module-defs-win32.c <<EOTEXT
767 { NULL, NULL, NULL },
768};
769EOTEXT
770
771],[
772included_modules=$included_modules
773])
774
775AC_HEADER_DIRENT
776AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
777
778# Honor aclocal flags
779ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
780
781AC_OUTPUT([
782Makefile
783pango/Makefile
784pango/mini-fribidi/Makefile
785pango/opentype/Makefile
786pango/pango.rc
787pango/pangoft2.rc
788pango/pangowin32.rc
789modules/Makefile
790modules/arabic/Makefile
791modules/basic/Makefile
792modules/hangul/Makefile
793modules/indic/Makefile
794modules/tamil/Makefile
795modules/thai/Makefile
796modules/hebrew/Makefile
797examples/Makefile
798docs/Makefile
799docs/version.xml
800tools/Makefile
801tests/Makefile
802pango.spec
803pango.pc
804pangox.pc
805pangowin32.pc
806pangoft2.pc
807pangoxft.pc
808pango-uninstalled.pc
809pangox-uninstalled.pc
810pangowin32-uninstalled.pc
811pangoft2-uninstalled.pc
812pangoxft-uninstalled.pc
813pango-zip.sh
814],[case "$CONFIG_FILES" in
815*pango-config*)chmod +x pango-config;;
816esac])
817echo "configuration:
818        backends: `if $have_freetype ; then echo " FreeType"; fi \
819        ``if $have_x ; then echo " X"; fi \
820        ``if $have_xft ; then echo " Xft"; fi \
821        ``if $have_win32 ; then echo " Win32"; fi`"
Note: See TracBrowser for help on using the repository browser.