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

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