1 | dnl Process this file with autoconf to create configure. |
---|
2 | AC_PREREQ(2.53) |
---|
3 | AC_INIT(ChangeLog) |
---|
4 | |
---|
5 | dnl ========================================================================== |
---|
6 | dnl Versioning |
---|
7 | dnl ========================================================================== |
---|
8 | |
---|
9 | dnl Making releases: |
---|
10 | dnl PANGO_MICRO_VERSION += 1; |
---|
11 | dnl PANGO_INTERFACE_AGE += 1; |
---|
12 | dnl PANGO_BINARY_AGE += 1; |
---|
13 | dnl if any functions have been added, set PANGO_INTERFACE_AGE to 0. |
---|
14 | dnl if backwards compatibility has been broken, |
---|
15 | dnl set PANGO_BINARY_AGE _and_ PANGO_INTERFACE_AGE to 0. |
---|
16 | |
---|
17 | dnl The triplet |
---|
18 | PANGO_MAJOR_VERSION=1 |
---|
19 | PANGO_MINOR_VERSION=2 |
---|
20 | PANGO_MICRO_VERSION=1 |
---|
21 | PANGO_VERSION=$PANGO_MAJOR_VERSION.$PANGO_MINOR_VERSION.$PANGO_MICRO_VERSION |
---|
22 | |
---|
23 | dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2. |
---|
24 | PANGO_API_VERSION=1.0 |
---|
25 | |
---|
26 | dnl Number of releases since we've added interfaces |
---|
27 | PANGO_INTERFACE_AGE=1 |
---|
28 | |
---|
29 | dnl Number of releases since we've broken binary compatibility. |
---|
30 | # PANGO_BINARY_AGE=0 |
---|
31 | PANGO_BINARY_AGE=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION` |
---|
32 | |
---|
33 | dnl This is the last version with which we have compatibility with |
---|
34 | dnl with the modules for; it isn't the same as |
---|
35 | dnl PANGO_API_VERSION.'PANGO_MICRO_VERSION - PANGO_BINARY_AGE' since we have |
---|
36 | dnl engine only API |
---|
37 | PANGO_MODULE_VERSION=1.2.0 |
---|
38 | |
---|
39 | AC_SUBST(PANGO_MAJOR_VERSION) |
---|
40 | AC_SUBST(PANGO_MINOR_VERSION) |
---|
41 | AC_SUBST(PANGO_VERSION) |
---|
42 | AC_SUBST(PANGO_API_VERSION) |
---|
43 | AC_SUBST(PANGO_MICRO_VERSION) |
---|
44 | AC_SUBST(PANGO_INTERFACE_AGE) |
---|
45 | AC_SUBST(PANGO_BINARY_AGE) |
---|
46 | AC_SUBST(PANGO_MODULE_VERSION) |
---|
47 | |
---|
48 | dnl libtool versioning |
---|
49 | lt_current=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION - $PANGO_INTERFACE_AGE` |
---|
50 | lt_revision=$PANGO_INTERFACE_AGE |
---|
51 | lt_age=`expr $PANGO_BINARY_AGE - $PANGO_INTERFACE_AGE` |
---|
52 | LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age" |
---|
53 | LT_CURRENT_MINUS_AGE=`expr $lt_current - $lt_age` |
---|
54 | |
---|
55 | AC_SUBST(LT_VERSION_INFO) |
---|
56 | AC_SUBST(LT_CURRENT_MINUS_AGE) |
---|
57 | |
---|
58 | dnl ========================================================================== |
---|
59 | |
---|
60 | AM_INIT_AUTOMAKE(pango, $PANGO_VERSION) |
---|
61 | |
---|
62 | AM_CONFIG_HEADER(config.h) |
---|
63 | |
---|
64 | AC_PROG_CC |
---|
65 | |
---|
66 | dnl |
---|
67 | dnl Check for a working C++ compiler, but do not bail out, if none is found. |
---|
68 | dnl We use this for an automated test for C++ header correctness. |
---|
69 | dnl |
---|
70 | AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) |
---|
71 | AC_LANG_SAVE |
---|
72 | AC_LANG_CPLUSPLUS |
---|
73 | AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=) |
---|
74 | AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "") |
---|
75 | AC_LANG_RESTORE |
---|
76 | |
---|
77 | AC_LIBTOOL_WIN32_DLL |
---|
78 | AM_DISABLE_STATIC |
---|
79 | AM_PROG_LIBTOOL |
---|
80 | |
---|
81 | AC_MSG_CHECKING([for some Win32 platform]) |
---|
82 | case "$host" in |
---|
83 | *-*-mingw*|*-*-cygwin*) |
---|
84 | pango_platform_win32=yes |
---|
85 | ;; |
---|
86 | *) |
---|
87 | pango_platform_win32=no |
---|
88 | ;; |
---|
89 | esac |
---|
90 | AC_MSG_RESULT([$pango_platform_win32]) |
---|
91 | AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes") |
---|
92 | |
---|
93 | AC_MSG_CHECKING([for native Win32]) |
---|
94 | case "$host" in |
---|
95 | *-*-mingw*) |
---|
96 | pango_os_win32=yes |
---|
97 | ;; |
---|
98 | *) |
---|
99 | pango_os_win32=no |
---|
100 | ;; |
---|
101 | esac |
---|
102 | AC_MSG_RESULT([$pango_os_win32]) |
---|
103 | AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes") |
---|
104 | |
---|
105 | if test "$pango_os_win32" = "yes"; then |
---|
106 | AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) |
---|
107 | fi |
---|
108 | AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) |
---|
109 | |
---|
110 | changequote(,)dnl |
---|
111 | if test "x$GCC" = "xyes"; then |
---|
112 | case " $CFLAGS " in |
---|
113 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
114 | *) CFLAGS="$CFLAGS -Wall" ;; |
---|
115 | esac |
---|
116 | fi |
---|
117 | changequote([,])dnl |
---|
118 | |
---|
119 | AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) |
---|
120 | |
---|
121 | AM_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 | |
---|
126 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
127 | |
---|
128 | REBUILD=\# |
---|
129 | if test "x$enable_rebuilds" = "xyes" && \ |
---|
130 | test -n "$PERL" && \ |
---|
131 | $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then |
---|
132 | REBUILD= |
---|
133 | fi |
---|
134 | AC_SUBST(REBUILD) |
---|
135 | |
---|
136 | AC_PATH_XTRA |
---|
137 | |
---|
138 | if test x$no_x = xyes ; then |
---|
139 | AC_MSG_WARN([X development libraries not found]) |
---|
140 | have_x=false |
---|
141 | else |
---|
142 | X_LIBS="$X_LIBS -lX11" |
---|
143 | have_x=true |
---|
144 | fi |
---|
145 | AM_CONDITIONAL(HAVE_X, $have_x) |
---|
146 | |
---|
147 | # |
---|
148 | # Checks for FreeType |
---|
149 | # |
---|
150 | FREETYPE_LIBS= |
---|
151 | FREETYPE_CFLAGS= |
---|
152 | have_freetype=false |
---|
153 | AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) |
---|
154 | if 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 |
---|
181 | fi |
---|
182 | AC_SUBST(FREETYPE_LIBS) |
---|
183 | AC_SUBST(FREETYPE_CFLAGS) |
---|
184 | |
---|
185 | ## see which freetype we have, 2.0.3 vs. 2.0.4 |
---|
186 | pango_save_cppflags="$CPPFLAGS" |
---|
187 | CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" |
---|
188 | AC_CHECK_HEADER(freetype/internal/tterrors.h, AC_DEFINE(HAVE_FREETYPE_2_0_3)) |
---|
189 | CPPFLAGS="$pango_save_cppflags" |
---|
190 | |
---|
191 | ## Check to see whether we have FT_Get_First_Char(), new in 2.0.9 |
---|
192 | pango_save_libs=$LIBS |
---|
193 | LIBS="$LIBS $FREETYPE_LIBS" |
---|
194 | AC_CHECK_FUNCS(FT_Get_First_Char) |
---|
195 | LIBS=$pango_save_libs |
---|
196 | |
---|
197 | # |
---|
198 | # Check for fontconfig |
---|
199 | # |
---|
200 | have_fontconfig=false |
---|
201 | |
---|
202 | PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 1.0.1, have_fontconfig=true, :) |
---|
203 | |
---|
204 | AC_SUBST(FONTCONFIG_LIBS) |
---|
205 | AC_SUBST(FONTCONFIG_CFLAGS) |
---|
206 | |
---|
207 | AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype && $have_fontconfig) |
---|
208 | |
---|
209 | # |
---|
210 | # Checks for Xft/XRender |
---|
211 | # |
---|
212 | have_xft=false |
---|
213 | |
---|
214 | PKG_CHECK_MODULES(XFT, xft >= 2.0.0, have_xft=true, :) |
---|
215 | |
---|
216 | AC_SUBST(XFT_LIBS) |
---|
217 | AC_SUBST(XFT_CFLAGS) |
---|
218 | AM_CONDITIONAL(HAVE_XFT, $have_xft) |
---|
219 | |
---|
220 | # |
---|
221 | # Checks for Win32 GDI |
---|
222 | # |
---|
223 | have_win32=false |
---|
224 | WIN32_LIBS="" |
---|
225 | WIN32_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, : ) |
---|
228 | case "$host" in |
---|
229 | *-*-mingw*|*-*-cygwin*) have_win32=true ;; |
---|
230 | esac |
---|
231 | |
---|
232 | |
---|
233 | if test $have_win32 = true; then |
---|
234 | WIN32_LIBS="-lgdi32" |
---|
235 | fi |
---|
236 | |
---|
237 | AC_SUBST(WIN32_LIBS) |
---|
238 | AM_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 | # |
---|
246 | if $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.]) |
---|
249 | fi |
---|
250 | |
---|
251 | # |
---|
252 | # Checks for GLib |
---|
253 | # |
---|
254 | GLIB_REQUIRED_VERSION=2.1.3 |
---|
255 | |
---|
256 | AM_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 | |
---|
262 | GLIB_CFLAGS=`$PKG_CONFIG --cflags gthread-2.0` |
---|
263 | |
---|
264 | AC_SUBST(GLIB_LIBS) |
---|
265 | AC_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 | # |
---|
272 | FRIBIDI_LIBS="" |
---|
273 | FRIBIDI_CFLAGS="" |
---|
274 | FRIBIDI_PC="" |
---|
275 | have_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 | |
---|
300 | AC_SUBST(FRIBIDI_LIBS) |
---|
301 | AC_SUBST(FRIBIDI_CFLAGS) |
---|
302 | AC_SUBST(FRIBIDI_PC) |
---|
303 | AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes) |
---|
304 | |
---|
305 | # |
---|
306 | # Allow setting a default path for XftConfig |
---|
307 | # |
---|
308 | AC_ARG_WITH(xftconfig-dir, [ --with-xftconfig-dir=PATH path to system XftConfig file for minixft ]) |
---|
309 | |
---|
310 | if test "x$with_xftconfig_dir" != "x"; then |
---|
311 | AC_DEFINE_UNQUOTED(MINI_XFTCONFIG_DIR, "$with_xftconfig_dir") |
---|
312 | fi |
---|
313 | |
---|
314 | # |
---|
315 | # The OpenType test programs aren't particularly portable |
---|
316 | # |
---|
317 | have_varargs=no |
---|
318 | pango_saved_cppflags=$CPPFLAGS |
---|
319 | CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS" |
---|
320 | AC_MSG_CHECKING(Whether to build OpenType test programs) |
---|
321 | AC_EGREP_CPP(pango_configure_test_yes, [ |
---|
322 | #include <glib.h> |
---|
323 | |
---|
324 | #if defined(G_HAVE_ISO_VARARGS) || defined(G_HAVE_GNUC_VARARGS) |
---|
325 | pango_configure_test_yes |
---|
326 | #endif |
---|
327 | ],have_varargs=yes) |
---|
328 | AC_MSG_RESULT($have_varargs) |
---|
329 | AM_CONDITIONAL(BUILD_OT_TESTS, test $have_varargs = yes) |
---|
330 | CPPFLAGS=$pango_saved_cppflags |
---|
331 | |
---|
332 | # |
---|
333 | # Allow building some or all modules included |
---|
334 | # |
---|
335 | AC_MSG_CHECKING(modules to link statically) |
---|
336 | |
---|
337 | AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... build the given modules into Pango]) |
---|
338 | |
---|
339 | arabic_modules="arabic-ft2,arabic-x,arabic-xft" |
---|
340 | basic_modules="basic-ft2,basic-win32,basic-x,basic-xft" |
---|
341 | hangul_modules="hangul-x,hangul-xft" |
---|
342 | hebrew_modules="hebrew-ft2,hebrew-x,hebrew-xft" |
---|
343 | indic_modules="bengali-x,devanagari-x,gurmukhi-x,gujarati-x,myanmar-x,indic-xft" |
---|
344 | tamil_modules="tamil-x" |
---|
345 | thai_modules="thai-x,thai-xft" |
---|
346 | |
---|
347 | all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$tamil_modules,$thai_modules" |
---|
348 | |
---|
349 | included_modules="" |
---|
350 | if 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 |
---|
358 | fi |
---|
359 | |
---|
360 | AC_MSG_RESULT($included_modules) |
---|
361 | AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x) |
---|
362 | |
---|
363 | INCLUDED_X_MODULES= |
---|
364 | INCLUDED_XFT_MODULES= |
---|
365 | INCLUDED_FT2_MODULES= |
---|
366 | INCLUDED_WIN32_MODULES= |
---|
367 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
368 | for 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 |
---|
386 | done |
---|
387 | IFS="$pango_save_ifs" |
---|
388 | |
---|
389 | AC_SUBST(INCLUDED_X_MODULES) |
---|
390 | AC_SUBST(INCLUDED_XFT_MODULES) |
---|
391 | AC_SUBST(INCLUDED_FT2_MODULES) |
---|
392 | AC_SUBST(INCLUDED_WIN32_MODULES) |
---|
393 | |
---|
394 | AM_CONDITIONAL(INCLUDE_ARABIC_FT2,echo $included_modules | egrep '(^|,)arabic-ft2($|,)' > /dev/null) |
---|
395 | AM_CONDITIONAL(INCLUDE_ARABIC_X,echo $included_modules | egrep '(^|,)arabic-x($|,)' > /dev/null) |
---|
396 | AM_CONDITIONAL(INCLUDE_ARABIC_XFT,echo $included_modules | egrep '(^|,)arabic-xft($|,)' > /dev/null) |
---|
397 | |
---|
398 | AM_CONDITIONAL(INCLUDE_BASIC_FT2,echo $included_modules | egrep '(^|,)basic-ft2($|,)' > /dev/null) |
---|
399 | AM_CONDITIONAL(INCLUDE_BASIC_WIN32,echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) |
---|
400 | AM_CONDITIONAL(INCLUDE_BASIC_XFT,echo $included_modules | egrep '(^|,)basic-xft($|,)' > /dev/null) |
---|
401 | AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) |
---|
402 | |
---|
403 | AM_CONDITIONAL(INCLUDE_HANGUL_X,echo $included_modules | egrep '(^|,)hangul-x($|,)' > /dev/null) |
---|
404 | AM_CONDITIONAL(INCLUDE_HANGUL_XFT,echo $included_modules | egrep '(^|,)hangul-xft($|,)' > /dev/null) |
---|
405 | |
---|
406 | AM_CONDITIONAL(INCLUDE_HEBREW_FT2,echo $included_modules | egrep '(^|,)hebrew-ft2($|,)' > /dev/null) |
---|
407 | AM_CONDITIONAL(INCLUDE_HEBREW_X,echo $included_modules | egrep '(^|,)hebrew-x($|,)' > /dev/null) |
---|
408 | AM_CONDITIONAL(INCLUDE_HEBREW_XFT,echo $included_modules | egrep '(^|,)hebrew-xft($|,)' > /dev/null) |
---|
409 | |
---|
410 | AM_CONDITIONAL(INCLUDE_BENGALI_X,echo $included_modules | egrep '(^|,)bengali-x($|,)' > /dev/null) |
---|
411 | AM_CONDITIONAL(INCLUDE_DEVANAGARI_X,echo $included_modules | egrep '(^|,)devanagari-x($|,)' > /dev/null) |
---|
412 | AM_CONDITIONAL(INCLUDE_GUJARATI_X,echo $included_modules | egrep '(^|,)gujarati-x($|,)' > /dev/null) |
---|
413 | AM_CONDITIONAL(INCLUDE_GURMUKHI_X,echo $included_modules | egrep '(^|,)gurmukhi-x($|,)' > /dev/null) |
---|
414 | AM_CONDITIONAL(INCLUDE_MYANMAR_X,echo $included_modules | egrep '(^|,)myanmar-x($|,)' > /dev/null) |
---|
415 | |
---|
416 | AM_CONDITIONAL(INCLUDE_TAMIL_X,echo $included_modules | egrep '(^|,)tamil-x($|,)' > /dev/null) |
---|
417 | |
---|
418 | AM_CONDITIONAL(INCLUDE_THAI_X,echo $included_modules | egrep '(^|,)thai-x($|,)' > /dev/null) |
---|
419 | AM_CONDITIONAL(INCLUDE_THAI_XFT,echo $included_modules | egrep '(^|,)thai-xft($|,)' > /dev/null) |
---|
420 | |
---|
421 | AM_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 | # |
---|
427 | AC_CHECK_FUNCS(flockfile strtok_r) |
---|
428 | |
---|
429 | # |
---|
430 | # Check for the Uniscribe header usp10.h for Win32 |
---|
431 | # |
---|
432 | |
---|
433 | AC_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 | |
---|
438 | USP10_H=no |
---|
439 | if 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 |
---|
454 | fi |
---|
455 | AC_SUBST(USP10_H) |
---|
456 | AM_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 | |
---|
463 | AC_ARG_WITH(qt, [ --with-qt=DIR location where Qt is installed],,with_qt=yes) |
---|
464 | |
---|
465 | if 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 |
---|
502 | else |
---|
503 | QTDIR="" |
---|
504 | fi |
---|
505 | |
---|
506 | if 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" |
---|
522 | fi |
---|
523 | |
---|
524 | AM_CONDITIONAL(BUILD_QT_TEST, test "x$QTDIR" != x) |
---|
525 | AC_SUBST(QTDIR) |
---|
526 | |
---|
527 | dnl ************************** |
---|
528 | dnl *** Checks for gtk-doc *** |
---|
529 | dnl ************************** |
---|
530 | |
---|
531 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
532 | |
---|
533 | if test "x$with_html_dir" = "x" ; then |
---|
534 | HTML_DIR='${datadir}/gtk-doc/html' |
---|
535 | else |
---|
536 | HTML_DIR=$with_html_dir |
---|
537 | fi |
---|
538 | |
---|
539 | AC_SUBST(HTML_DIR) |
---|
540 | |
---|
541 | # |
---|
542 | # Check for sufficiently new gtk-doc |
---|
543 | # |
---|
544 | gtk_doc_min_version=0.10 |
---|
545 | |
---|
546 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
547 | if $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 |
---|
567 | fi |
---|
568 | |
---|
569 | AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) |
---|
570 | AC_SUBST(HAVE_GTK_DOC) |
---|
571 | |
---|
572 | AC_CHECK_PROG(DB2HTML, db2html, true, false) |
---|
573 | AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) |
---|
574 | |
---|
575 | dnl Let people disable the gtk-doc stuff. |
---|
576 | AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no) |
---|
577 | |
---|
578 | if 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 |
---|
584 | fi |
---|
585 | |
---|
586 | dnl NOTE: We need to use a separate automake conditional for this |
---|
587 | dnl to make this work with the tarballs. |
---|
588 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
589 | |
---|
590 | dnl ******************************************************** |
---|
591 | dnl * See whether we need to load our modules as .la files * |
---|
592 | dnl ******************************************************** |
---|
593 | |
---|
594 | use_la_modules=false |
---|
595 | case $host in |
---|
596 | *-aix*) use_la_modules=true |
---|
597 | esac |
---|
598 | |
---|
599 | if $use_la_modules ; then |
---|
600 | AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly]) |
---|
601 | fi |
---|
602 | |
---|
603 | dnl ****************************************************** |
---|
604 | dnl * See whether to include shared library dependencies * |
---|
605 | dnl ****************************************************** |
---|
606 | |
---|
607 | AC_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 | |
---|
612 | AC_MSG_CHECKING([Whether to write dependencies into .pc files]) |
---|
613 | case $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 | ;; |
---|
626 | esac |
---|
627 | AC_MSG_RESULT($enable_explicit_deps) |
---|
628 | |
---|
629 | if 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 |
---|
633 | else |
---|
634 | PKGCONFIG_X_LIBS= |
---|
635 | PKGCONFIG_XFT_LIBS= |
---|
636 | PKGCONFIG_FREETYPE_LIBS= |
---|
637 | fi |
---|
638 | AC_SUBST(PKGCONFIG_X_LIBS) |
---|
639 | AC_SUBST(PKGCONFIG_XFT_LIBS) |
---|
640 | AC_SUBST(PKGCONFIG_FREETYPE_LIBS) |
---|
641 | AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no) |
---|
642 | |
---|
643 | AC_OUTPUT_COMMANDS([ |
---|
644 | cat > pango/module-defs.h <<EOTEXT |
---|
645 | /* Autogenerated by configure. Do not edit */ |
---|
646 | |
---|
647 | #include "modules.h" |
---|
648 | |
---|
649 | EOTEXT |
---|
650 | |
---|
651 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
652 | for module in $included_modules; do |
---|
653 | module_c=`echo $module | sed s/-/_/` |
---|
654 | cat >> pango/module-defs.h <<EOTEXT |
---|
655 | extern void _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines); |
---|
656 | extern PangoEngine *_pango_${module_c}_script_engine_load (const char *id); |
---|
657 | extern void _pango_${module_c}_script_engine_unload (PangoEngine *engine); |
---|
658 | |
---|
659 | EOTEXT |
---|
660 | done |
---|
661 | |
---|
662 | IFS="$pango_save_ifs" |
---|
663 | |
---|
664 | ### X modules |
---|
665 | cat > pango/module-defs-x.c <<EOTEXT |
---|
666 | /* Autogenerated by configure. Do not edit */ |
---|
667 | |
---|
668 | #include "module-defs.h" |
---|
669 | |
---|
670 | PangoIncludedModule _pango_included_x_modules[] = { |
---|
671 | EOTEXT |
---|
672 | |
---|
673 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
674 | for 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 }, |
---|
679 | EOTEXT |
---|
680 | fi |
---|
681 | done |
---|
682 | |
---|
683 | IFS="$pango_save_ifs" |
---|
684 | |
---|
685 | cat >> pango/module-defs-x.c <<EOTEXT |
---|
686 | { NULL, NULL, NULL }, |
---|
687 | }; |
---|
688 | EOTEXT |
---|
689 | |
---|
690 | |
---|
691 | ### XFT modules |
---|
692 | cat > pango/module-defs-xft.c <<EOTEXT |
---|
693 | /* Autogenerated by configure. Do not edit */ |
---|
694 | |
---|
695 | #include "module-defs.h" |
---|
696 | |
---|
697 | PangoIncludedModule _pango_included_xft_modules[] = { |
---|
698 | EOTEXT |
---|
699 | |
---|
700 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
701 | for 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 }, |
---|
706 | EOTEXT |
---|
707 | fi |
---|
708 | done |
---|
709 | |
---|
710 | IFS="$pango_save_ifs" |
---|
711 | |
---|
712 | cat >> pango/module-defs-xft.c <<EOTEXT |
---|
713 | { NULL, NULL, NULL }, |
---|
714 | }; |
---|
715 | EOTEXT |
---|
716 | |
---|
717 | |
---|
718 | ### FT2 modules |
---|
719 | cat > pango/module-defs-ft2.c <<EOTEXT |
---|
720 | /* Autogenerated by configure. Do not edit */ |
---|
721 | |
---|
722 | #include "module-defs.h" |
---|
723 | |
---|
724 | PangoIncludedModule _pango_included_ft2_modules[] = { |
---|
725 | EOTEXT |
---|
726 | |
---|
727 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
728 | for 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 }, |
---|
733 | EOTEXT |
---|
734 | fi |
---|
735 | done |
---|
736 | |
---|
737 | IFS="$pango_save_ifs" |
---|
738 | |
---|
739 | cat >> pango/module-defs-ft2.c <<EOTEXT |
---|
740 | { NULL, NULL, NULL }, |
---|
741 | }; |
---|
742 | EOTEXT |
---|
743 | |
---|
744 | ### Win32 modules |
---|
745 | cat > pango/module-defs-win32.c <<EOTEXT |
---|
746 | /* Autogenerated by configure. Do not edit */ |
---|
747 | |
---|
748 | #include "module-defs.h" |
---|
749 | |
---|
750 | PangoIncludedModule _pango_included_win32_modules[] = { |
---|
751 | EOTEXT |
---|
752 | |
---|
753 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
754 | for 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 }, |
---|
759 | EOTEXT |
---|
760 | fi |
---|
761 | done |
---|
762 | |
---|
763 | IFS="$pango_save_ifs" |
---|
764 | |
---|
765 | cat >> pango/module-defs-win32.c <<EOTEXT |
---|
766 | { NULL, NULL, NULL }, |
---|
767 | }; |
---|
768 | EOTEXT |
---|
769 | |
---|
770 | ],[ |
---|
771 | included_modules=$included_modules |
---|
772 | ]) |
---|
773 | |
---|
774 | AC_HEADER_DIRENT |
---|
775 | AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) |
---|
776 | |
---|
777 | # Honor aclocal flags |
---|
778 | ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
---|
779 | |
---|
780 | AC_OUTPUT([ |
---|
781 | Makefile |
---|
782 | pango/Makefile |
---|
783 | pango/mini-fribidi/Makefile |
---|
784 | pango/opentype/Makefile |
---|
785 | pango/pango.rc |
---|
786 | pango/pangoft2.rc |
---|
787 | pango/pangowin32.rc |
---|
788 | modules/Makefile |
---|
789 | modules/arabic/Makefile |
---|
790 | modules/basic/Makefile |
---|
791 | modules/hangul/Makefile |
---|
792 | modules/indic/Makefile |
---|
793 | modules/tamil/Makefile |
---|
794 | modules/thai/Makefile |
---|
795 | modules/hebrew/Makefile |
---|
796 | examples/Makefile |
---|
797 | docs/Makefile |
---|
798 | docs/version.xml |
---|
799 | tools/Makefile |
---|
800 | tests/Makefile |
---|
801 | pango.spec |
---|
802 | pango.pc |
---|
803 | pangox.pc |
---|
804 | pangowin32.pc |
---|
805 | pangoft2.pc |
---|
806 | pangoxft.pc |
---|
807 | pango-uninstalled.pc |
---|
808 | pangox-uninstalled.pc |
---|
809 | pangowin32-uninstalled.pc |
---|
810 | pangoft2-uninstalled.pc |
---|
811 | pangoxft-uninstalled.pc |
---|
812 | pango-zip.sh |
---|
813 | ],[case "$CONFIG_FILES" in |
---|
814 | *pango-config*)chmod +x pango-config;; |
---|
815 | esac]) |
---|
816 | echo "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`" |
---|