1 | dnl Process this file with autoconf to create configure. |
---|
2 | AC_PREREQ(2.54) |
---|
3 | |
---|
4 | dnl ========================================================================== |
---|
5 | dnl Versioning |
---|
6 | dnl ========================================================================== |
---|
7 | |
---|
8 | dnl Making releases: |
---|
9 | dnl PANGO_MICRO_VERSION += 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. |
---|
15 | |
---|
16 | dnl |
---|
17 | dnl We do the version number components as m4 macros |
---|
18 | dnl so that we can base configure --help output off |
---|
19 | dnl of them. |
---|
20 | dnl |
---|
21 | |
---|
22 | dnl The triplet |
---|
23 | m4_define([pango_major_version], [1]) |
---|
24 | m4_define([pango_minor_version], [6]) |
---|
25 | m4_define([pango_micro_version], [0]) |
---|
26 | m4_define([pango_version], |
---|
27 | [pango_major_version.pango_minor_version.pango_micro_version]) |
---|
28 | dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2. |
---|
29 | m4_define([pango_api_version], [1.0]) |
---|
30 | dnl Number of releases since we've added interfaces |
---|
31 | m4_define([pango_interface_age], [0]) |
---|
32 | dnl Number of releases since we've broken binary compatibility. |
---|
33 | m4_define([pango_binary_age], |
---|
34 | [m4_eval(100 * pango_minor_version + pango_micro_version)]) |
---|
35 | dnl This is the last version with which we have compatibility with |
---|
36 | dnl with the modules for; it isn't the same as |
---|
37 | dnl PANGO_API_VERSION.'PANGO_MICRO_VERSION - PANGO_BINARY_AGE' since we have |
---|
38 | dnl engine only API |
---|
39 | m4_define([pango_module_version], [1.4.0]) |
---|
40 | |
---|
41 | |
---|
42 | AC_INIT(pango, [pango_version], |
---|
43 | [http://bugzilla.gnome.org/enter_bug.cgi?product=pango]) |
---|
44 | |
---|
45 | AC_CONFIG_SRCDIR([ChangeLog]) |
---|
46 | |
---|
47 | AM_INIT_AUTOMAKE |
---|
48 | AM_CONFIG_HEADER([config.h]) |
---|
49 | |
---|
50 | |
---|
51 | PANGO_MAJOR_VERSION=pango_major_version() |
---|
52 | PANGO_MINOR_VERSION=pango_minor_version() |
---|
53 | PANGO_MICRO_VERSION=pango_micro_version() |
---|
54 | PANGO_VERSION=pango_version() |
---|
55 | PANGO_API_VERSION=pango_api_version() |
---|
56 | PANGO_INTERFACE_AGE=pango_interface_age() |
---|
57 | PANGO_BINARY_AGE=pango_binary_age() |
---|
58 | PANGO_MODULE_VERSION=pango_module_version() |
---|
59 | |
---|
60 | AC_SUBST(PANGO_MAJOR_VERSION) |
---|
61 | AC_SUBST(PANGO_MINOR_VERSION) |
---|
62 | AC_SUBST(PANGO_VERSION) |
---|
63 | AC_SUBST(PANGO_API_VERSION) |
---|
64 | AC_SUBST(PANGO_MICRO_VERSION) |
---|
65 | AC_SUBST(PANGO_INTERFACE_AGE) |
---|
66 | AC_SUBST(PANGO_BINARY_AGE) |
---|
67 | AC_SUBST(PANGO_MODULE_VERSION) |
---|
68 | |
---|
69 | dnl libtool versioning |
---|
70 | m4_define([lt_current], [m4_eval(100 * pango_minor_version + pango_micro_version - pango_interface_age)]) |
---|
71 | m4_define([lt_revision], [pango_interface_age]) |
---|
72 | m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)]) |
---|
73 | LT_VERSION_INFO="lt_current():lt_revision():lt_age()" |
---|
74 | LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age) |
---|
75 | |
---|
76 | AC_SUBST(LT_VERSION_INFO) |
---|
77 | AC_SUBST(LT_CURRENT_MINUS_AGE) |
---|
78 | |
---|
79 | dnl ========================================================================== |
---|
80 | |
---|
81 | AC_MSG_CHECKING([for native Win32]) |
---|
82 | case "$host" in |
---|
83 | *-*-mingw*) |
---|
84 | pango_os_win32=yes |
---|
85 | ;; |
---|
86 | *) |
---|
87 | pango_os_win32=no |
---|
88 | ;; |
---|
89 | esac |
---|
90 | AC_MSG_RESULT([$pango_os_win32]) |
---|
91 | AM_CONDITIONAL(OS_WIN32, test "$pango_os_win32" = "yes") |
---|
92 | |
---|
93 | AC_PROG_CC |
---|
94 | |
---|
95 | dnl |
---|
96 | dnl Check for a working C++ compiler, but do not bail out, if none is found. |
---|
97 | dnl We use this for an automated test for C++ header correctness. |
---|
98 | dnl |
---|
99 | AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc) |
---|
100 | AC_LANG_SAVE |
---|
101 | AC_LANG_CPLUSPLUS |
---|
102 | AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=) |
---|
103 | AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "") |
---|
104 | AC_LANG_RESTORE |
---|
105 | |
---|
106 | AC_LIBTOOL_WIN32_DLL |
---|
107 | AM_DISABLE_STATIC |
---|
108 | |
---|
109 | if test "$pango_os_win32" = "yes"; then |
---|
110 | if test x$enable_static = xyes -o x$enable_static = x; then |
---|
111 | AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.]) |
---|
112 | enable_static=no |
---|
113 | fi |
---|
114 | if test x$enable_shared = xno; then |
---|
115 | AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.]) |
---|
116 | fi |
---|
117 | enable_shared=yes |
---|
118 | fi |
---|
119 | |
---|
120 | AM_PROG_LIBTOOL |
---|
121 | |
---|
122 | AC_MSG_CHECKING([for some Win32 platform]) |
---|
123 | case "$host" in |
---|
124 | *-*-mingw*|*-*-cygwin*) |
---|
125 | pango_platform_win32=yes |
---|
126 | ;; |
---|
127 | *) |
---|
128 | pango_platform_win32=no |
---|
129 | ;; |
---|
130 | esac |
---|
131 | AC_MSG_RESULT([$pango_platform_win32]) |
---|
132 | AM_CONDITIONAL(PLATFORM_WIN32, test "$pango_platform_win32" = "yes") |
---|
133 | |
---|
134 | if test "$pango_os_win32" = "yes"; then |
---|
135 | AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) |
---|
136 | fi |
---|
137 | AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) |
---|
138 | |
---|
139 | changequote(,)dnl |
---|
140 | if test "x$GCC" = "xyes"; then |
---|
141 | case " $CFLAGS " in |
---|
142 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
143 | *) CFLAGS="$CFLAGS -Wall" ;; |
---|
144 | esac |
---|
145 | fi |
---|
146 | changequote([,])dnl |
---|
147 | |
---|
148 | dnl declare --enable-* args and collect ac_help strings |
---|
149 | |
---|
150 | m4_define([debug_default], |
---|
151 | m4_if(m4_eval(pango_minor_version() % 2), [1], [yes], [minimum])) |
---|
152 | |
---|
153 | AC_ARG_ENABLE(debug, |
---|
154 | AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], |
---|
155 | [turn on debugging @<:@default=debug_default()@:>@]),, |
---|
156 | enable_debug=debug_default()) |
---|
157 | |
---|
158 | if test "x$enable_debug" = "xyes"; then |
---|
159 | PANGO_DEBUG_FLAGS="-DPANGO_ENABLE_DEBUG" |
---|
160 | else |
---|
161 | PANGO_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS" |
---|
162 | |
---|
163 | if test "x$enable_debug" = "xno"; then |
---|
164 | PANGO_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" |
---|
165 | fi |
---|
166 | fi |
---|
167 | |
---|
168 | AC_SUBST(PANGO_DEBUG_FLAGS) |
---|
169 | |
---|
170 | AC_ARG_ENABLE(rebuilds, |
---|
171 | [AC_HELP_STRING([--disable-rebuilds], |
---|
172 | [disable all source autogeneration rules])],, |
---|
173 | [enable_rebuilds=yes]) |
---|
174 | |
---|
175 | AM_CONDITIONAL(CROSS_COMPILING, [test $cross_compiling = yes]) |
---|
176 | |
---|
177 | # define a MAINT-like variable REBUILD which is set if Perl |
---|
178 | # is found, so autogenerated sources can be rebuilt |
---|
179 | |
---|
180 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
181 | |
---|
182 | REBUILD=\# |
---|
183 | if test "x$enable_rebuilds" = "xyes" && \ |
---|
184 | test -n "$PERL" && \ |
---|
185 | $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then |
---|
186 | REBUILD= |
---|
187 | fi |
---|
188 | AC_SUBST(REBUILD) |
---|
189 | |
---|
190 | AC_PATH_XTRA |
---|
191 | |
---|
192 | if test x$no_x = xyes ; then |
---|
193 | AC_MSG_WARN([X development libraries not found]) |
---|
194 | have_x=false |
---|
195 | else |
---|
196 | X_LIBS="$X_LIBS -lX11" |
---|
197 | have_x=true |
---|
198 | AC_DEFINE(HAVE_X, 1, [Have X libraries]) |
---|
199 | fi |
---|
200 | AM_CONDITIONAL(HAVE_X, $have_x) |
---|
201 | |
---|
202 | # |
---|
203 | # Check for fontconfig |
---|
204 | # |
---|
205 | have_fontconfig=false |
---|
206 | have_freetype=false |
---|
207 | have_xft=false |
---|
208 | |
---|
209 | PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 1.0.1, have_fontconfig=true, :) |
---|
210 | |
---|
211 | if $have_fontconfig ; then |
---|
212 | # |
---|
213 | # Checks for FreeType |
---|
214 | # |
---|
215 | FREETYPE_LIBS= |
---|
216 | FREETYPE_CFLAGS= |
---|
217 | AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) |
---|
218 | if test "x$FREETYPE_CONFIG" != "xno" ; then |
---|
219 | FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` |
---|
220 | FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` |
---|
221 | |
---|
222 | pango_save_ldflags=$LDFLAGS |
---|
223 | LDFLAGS="$LDFLAGS $FREETYPE_LIBS" |
---|
224 | AC_CHECK_LIB(freetype, FT_Get_Next_Char, have_freetype=true, :) |
---|
225 | LDFLAGS=$pango_save_ldflags |
---|
226 | fi |
---|
227 | |
---|
228 | FREETYPE_LIBS="$FONTCONFIG_LIBS $FREETYPE_LIBS" |
---|
229 | FREETYPE_CFLAGS="$FONTCONFIG_CFLAGS $FREETYPE_CFLAGS" |
---|
230 | |
---|
231 | AC_SUBST(FREETYPE_LIBS) |
---|
232 | AC_SUBST(FREETYPE_CFLAGS) |
---|
233 | |
---|
234 | # |
---|
235 | # Checks for Xft/XRender |
---|
236 | # |
---|
237 | if $have_x && $have_freetype ; then |
---|
238 | PKG_CHECK_MODULES(XFT, xft >= 2.0.0, have_xft=true, :) |
---|
239 | fi |
---|
240 | |
---|
241 | AC_SUBST(XFT_LIBS) |
---|
242 | AC_SUBST(XFT_CFLAGS) |
---|
243 | else |
---|
244 | AC_MSG_WARN([No fontconfig found, skipping tests for FreeType and Xft]) |
---|
245 | fi |
---|
246 | |
---|
247 | AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) |
---|
248 | AM_CONDITIONAL(HAVE_XFT, $have_xft) |
---|
249 | |
---|
250 | # |
---|
251 | # Checks for Win32 GDI |
---|
252 | # |
---|
253 | have_win32=false |
---|
254 | WIN32_LIBS="" |
---|
255 | WIN32_CFLAGS="" |
---|
256 | # The following doesn't work with autoconf-2.13, so we check $host instead |
---|
257 | # AC_CHECK_LIB(gdi32, GetTextMetricsA@8, have_win32=true, : ) |
---|
258 | case "$host" in |
---|
259 | *-*-mingw*|*-*-cygwin*) have_win32=true ;; |
---|
260 | esac |
---|
261 | |
---|
262 | |
---|
263 | if test $have_win32 = true; then |
---|
264 | WIN32_LIBS="-lgdi32" |
---|
265 | fi |
---|
266 | |
---|
267 | AC_SUBST(WIN32_LIBS) |
---|
268 | AM_CONDITIONAL(HAVE_WIN32, $have_win32) |
---|
269 | |
---|
270 | # |
---|
271 | # We must have some backend defined, in order for the pango-querymodules |
---|
272 | # rule in pango/Makefile.am to work correctly. If you are up to writing |
---|
273 | # a new Pango backend outside of Pango, you are up to sending the necessary |
---|
274 | # patch to fix that rule. :-) |
---|
275 | # |
---|
276 | if $have_freetype || $have_x || $have_xft || $have_win32 ; then : ; else |
---|
277 | AC_MSG_ERROR([*** Didn't find any of FreeType, X11, or Win32. |
---|
278 | *** Must have at least one backend to build Pango.]) |
---|
279 | fi |
---|
280 | |
---|
281 | # |
---|
282 | # Checks for GLib |
---|
283 | # |
---|
284 | GLIB_REQUIRED_VERSION=2.4.0 |
---|
285 | |
---|
286 | AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, |
---|
287 | AC_MSG_ERROR([ |
---|
288 | *** Glib $GLIB_REQUIRED_VERSION or better is required. The latest version of |
---|
289 | *** Glib is always available from ftp://ftp.gtk.org/.]), |
---|
290 | gobject gmodule) |
---|
291 | |
---|
292 | GLIB_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0 gthread-2.0` |
---|
293 | |
---|
294 | AC_SUBST(GLIB_LIBS) |
---|
295 | AC_SUBST(GLIB_CFLAGS) |
---|
296 | |
---|
297 | ################################################################ |
---|
298 | # Strip -export-dynamic from the link line |
---|
299 | ################################################################ |
---|
300 | |
---|
301 | # |
---|
302 | # pkg-config --libs gmodule includes the "export_dynamic" flag, |
---|
303 | # but this flag is only meaningful for executables. For libraries |
---|
304 | # the effect is undefined; what it causes on Linux is that the |
---|
305 | # export list from -export-symbols-regex is ignored and everything |
---|
306 | # is exported |
---|
307 | # |
---|
308 | export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` |
---|
309 | if test -n "$export_dynamic"; then |
---|
310 | GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"` |
---|
311 | fi |
---|
312 | |
---|
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 | dnl I would use AC_HELP_STRING here, but due to some bugs in m4_text_wrap, |
---|
338 | dnl it interprets the commas incorrectly ... |
---|
339 | dnl AC_HELP_STRING([--with-included-modules=MODULE1 MODULE2 ...], |
---|
340 | dnl [build the given modules into Pango]) |
---|
341 | AC_ARG_WITH(included_modules, |
---|
342 | [ --with-included-modules=MODULE1,MODULE2,... |
---|
343 | build the given modules into Pango]) |
---|
344 | |
---|
345 | arabic_modules="arabic-fc" |
---|
346 | basic_modules="basic-fc,basic-win32,basic-x" |
---|
347 | hangul_modules="hangul-fc" |
---|
348 | hebrew_modules="hebrew-fc" |
---|
349 | indic_modules="indic-fc" |
---|
350 | thai_modules="thai-fc" |
---|
351 | |
---|
352 | all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$thai_modules" |
---|
353 | |
---|
354 | included_modules="" |
---|
355 | if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then |
---|
356 | |
---|
357 | # If no modules specified, include all modules |
---|
358 | if test "x$with_included_modules" = xyes ; then |
---|
359 | included_modules="$all_modules" |
---|
360 | else |
---|
361 | included_modules="$with_included_modules" |
---|
362 | fi |
---|
363 | fi |
---|
364 | |
---|
365 | AC_MSG_RESULT($included_modules) |
---|
366 | AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x) |
---|
367 | |
---|
368 | INCLUDED_X_MODULES= |
---|
369 | INCLUDED_FC_MODULES= |
---|
370 | INCLUDED_WIN32_MODULES= |
---|
371 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
372 | for module in $included_modules; do |
---|
373 | if echo $indic_modules | egrep "(^| )$module(\$| )" > /dev/null; then |
---|
374 | dir=indic |
---|
375 | else |
---|
376 | dir=`echo $module | sed "s/-.*//"` |
---|
377 | fi |
---|
378 | |
---|
379 | if echo $module | egrep -- "-fc($|,)" > /dev/null; then |
---|
380 | INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" |
---|
381 | elif echo $module | egrep -- "-x($|,)" > /dev/null; then |
---|
382 | INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" |
---|
383 | elif echo $module | egrep -- "-win32($|,)" > /dev/null; then |
---|
384 | INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" |
---|
385 | else |
---|
386 | AC_MSG_ERROR([the specified module $module does not exist]) |
---|
387 | fi |
---|
388 | done |
---|
389 | IFS="$pango_save_ifs" |
---|
390 | |
---|
391 | AC_SUBST(INCLUDED_X_MODULES) |
---|
392 | AC_SUBST(INCLUDED_FC_MODULES) |
---|
393 | AC_SUBST(INCLUDED_WIN32_MODULES) |
---|
394 | |
---|
395 | AM_CONDITIONAL(INCLUDE_ARABIC_FC,echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null) |
---|
396 | |
---|
397 | AM_CONDITIONAL(INCLUDE_BASIC_FC,echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null) |
---|
398 | AM_CONDITIONAL(INCLUDE_BASIC_WIN32,echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) |
---|
399 | AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) |
---|
400 | |
---|
401 | AM_CONDITIONAL(INCLUDE_HANGUL_FC,echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) |
---|
402 | |
---|
403 | AM_CONDITIONAL(INCLUDE_HEBREW_FC,echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) |
---|
404 | |
---|
405 | AM_CONDITIONAL(INCLUDE_THAI_FC,echo $included_modules | egrep '(^|,)thai-fc($|,)' > /dev/null) |
---|
406 | |
---|
407 | AM_CONDITIONAL(INCLUDE_INDIC_FC,echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) |
---|
408 | |
---|
409 | # |
---|
410 | # We use flockfile to implement pango_getline() - should be moved to GLib |
---|
411 | # strtok_r isn't present on some systems |
---|
412 | # |
---|
413 | AC_CHECK_FUNCS(flockfile strtok_r) |
---|
414 | |
---|
415 | # |
---|
416 | # Check for the Uniscribe header usp10.h for Win32 |
---|
417 | # |
---|
418 | |
---|
419 | AC_ARG_WITH(usp10, |
---|
420 | [AC_HELP_STRING([--with-usp10=DIRECTORY], |
---|
421 | [where to find the usp10.h header file for Win32 |
---|
422 | (typically the Include directory in the |
---|
423 | Platform SDK)])]) |
---|
424 | |
---|
425 | USP10_H=no |
---|
426 | if test "${with_usp10+set}" = set && test "$with_usp10" != no; then |
---|
427 | AC_MSG_CHECKING([for usp10.h]) |
---|
428 | if test -f "$with_usp10"/usp10.h; then |
---|
429 | USP10_H="$with_usp10"/usp10.h |
---|
430 | elif test -f "$with_usp10"/include/usp10.h; then |
---|
431 | USP10_H="$with_usp10"/include/usp10.h |
---|
432 | fi |
---|
433 | if test "x$USP10_H" != "xno" ; then |
---|
434 | AC_MSG_RESULT(yes) |
---|
435 | AC_DEFINE(HAVE_USP10_H, 1, [Have the usp10.h header file for Win32]) |
---|
436 | else |
---|
437 | AC_MSG_RESULT(no) |
---|
438 | fi |
---|
439 | fi |
---|
440 | AC_SUBST(USP10_H) |
---|
441 | AM_CONDITIONAL(HAVE_USP10_H, test "$USP10_H" != no) |
---|
442 | |
---|
443 | dnl ************************** |
---|
444 | dnl *** Checks for gtk-doc *** |
---|
445 | dnl ************************** |
---|
446 | |
---|
447 | GTK_DOC_CHECK([1.0]) |
---|
448 | |
---|
449 | AC_ARG_ENABLE(man, |
---|
450 | [AC_HELP_STRING([--enable-man], |
---|
451 | [regenerate man pages from Docbook [default=no]])],enable_man=yes, |
---|
452 | enable_man=no) |
---|
453 | |
---|
454 | if test "x$enable_man" != xno ; then |
---|
455 | dnl |
---|
456 | dnl Check for xsltproc |
---|
457 | dnl |
---|
458 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
---|
459 | if test -z "$XSLTPROC"; then |
---|
460 | enable_man=no |
---|
461 | fi |
---|
462 | fi |
---|
463 | |
---|
464 | if test "x$enable_man" != xno ; then |
---|
465 | dnl check for DocBook DTD and stylesheets in the local catalog. |
---|
466 | JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], |
---|
467 | [DocBook XML DTD V4.1.2],,enable_man=no) |
---|
468 | JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], |
---|
469 | [DocBook XSL Stylesheets],,enable_man=no) |
---|
470 | fi |
---|
471 | |
---|
472 | AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno) |
---|
473 | |
---|
474 | dnl ******************************************************** |
---|
475 | dnl * See whether we need to load our modules as .la files * |
---|
476 | dnl ******************************************************** |
---|
477 | |
---|
478 | use_la_modules=false |
---|
479 | case $host in |
---|
480 | *-aix*) use_la_modules=true |
---|
481 | esac |
---|
482 | |
---|
483 | if $use_la_modules ; then |
---|
484 | AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly]) |
---|
485 | fi |
---|
486 | |
---|
487 | dnl ****************************************************** |
---|
488 | dnl * See whether to include shared library dependencies * |
---|
489 | dnl ****************************************************** |
---|
490 | |
---|
491 | AC_ARG_ENABLE(explicit-deps, |
---|
492 | [ --enable-explicit-deps=[yes/no/auto] use explicit dependencies in .pc files [default=auto]], |
---|
493 | enable_explicit_deps="$enableval", |
---|
494 | enable_explicit_deps=auto) |
---|
495 | |
---|
496 | AC_MSG_CHECKING([Whether to write dependencies into .pc files]) |
---|
497 | case $enable_explicit_deps in |
---|
498 | auto) |
---|
499 | deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh` |
---|
500 | if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then |
---|
501 | enable_explicit_deps=yes |
---|
502 | else |
---|
503 | enable_explicit_deps=no |
---|
504 | fi |
---|
505 | ;; |
---|
506 | yes|no) |
---|
507 | ;; |
---|
508 | *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto]) |
---|
509 | ;; |
---|
510 | esac |
---|
511 | AC_MSG_RESULT($enable_explicit_deps) |
---|
512 | |
---|
513 | if test $enable_explicit_deps = yes ; then |
---|
514 | PKGCONFIG_X_LIBS="$X_LIBS $X_EXTRA_LIBS" |
---|
515 | PKGCONFIG_XFT_LIBS=$XFT_LIBS |
---|
516 | PKGCONFIG_FREETYPE_LIBS=$FREETYPE_LIBS |
---|
517 | PKGCONFIG_MATH_LIBS=-lm |
---|
518 | else |
---|
519 | PKGCONFIG_X_LIBS= |
---|
520 | PKGCONFIG_XFT_LIBS= |
---|
521 | PKGCONFIG_FREETYPE_LIBS= |
---|
522 | PKGCONFIG_MATH_LIBS= |
---|
523 | fi |
---|
524 | AC_SUBST(PKGCONFIG_X_LIBS) |
---|
525 | AC_SUBST(PKGCONFIG_XFT_LIBS) |
---|
526 | AC_SUBST(PKGCONFIG_FREETYPE_LIBS) |
---|
527 | AC_SUBST(PKGCONFIG_MATH_LIBS) |
---|
528 | AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no) |
---|
529 | |
---|
530 | AC_CONFIG_COMMANDS([pango/module-defs.h], |
---|
531 | [ |
---|
532 | cat > pango/module-defs.h <<EOTEXT |
---|
533 | /* Autogenerated by configure. Do not edit */ |
---|
534 | |
---|
535 | #include "modules.h" |
---|
536 | |
---|
537 | EOTEXT |
---|
538 | |
---|
539 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
540 | for module in $included_modules; do |
---|
541 | module_c=`echo $module | sed s/-/_/` |
---|
542 | cat >> pango/module-defs.h <<EOTEXT |
---|
543 | extern void _pango_${module_c}_script_engine_list (PangoEngineInfo **engines, int *n_engines); |
---|
544 | extern PangoEngine *_pango_${module_c}_script_engine_init (GTypeModule *module); |
---|
545 | extern void _pango_${module_c}_script_engine_exit (void); |
---|
546 | extern void _pango_${module_c}_script_engine_create (const char *id); |
---|
547 | |
---|
548 | EOTEXT |
---|
549 | done |
---|
550 | |
---|
551 | IFS="$pango_save_ifs" |
---|
552 | ],[ |
---|
553 | included_modules=$included_modules |
---|
554 | ]) |
---|
555 | |
---|
556 | AC_CONFIG_COMMANDS([pango/module-defs-x.c], |
---|
557 | [ |
---|
558 | ### X modules |
---|
559 | cat > pango/module-defs-x.c <<EOTEXT |
---|
560 | /* Autogenerated by configure. Do not edit */ |
---|
561 | |
---|
562 | #include "module-defs.h" |
---|
563 | |
---|
564 | PangoIncludedModule _pango_included_x_modules@<:@@:>@ = { |
---|
565 | EOTEXT |
---|
566 | |
---|
567 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
568 | for module in $included_modules; do |
---|
569 | if echo $module | egrep -- "-x($|,)" > /dev/null; then |
---|
570 | module_c=`echo $module | sed s/-/_/` |
---|
571 | cat >> pango/module-defs-x.c <<EOTEXT |
---|
572 | { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create }, |
---|
573 | EOTEXT |
---|
574 | fi |
---|
575 | done |
---|
576 | |
---|
577 | IFS="$pango_save_ifs" |
---|
578 | |
---|
579 | cat >> pango/module-defs-x.c <<EOTEXT |
---|
580 | { NULL, NULL, NULL }, |
---|
581 | }; |
---|
582 | EOTEXT |
---|
583 | ]) |
---|
584 | |
---|
585 | AC_CONFIG_COMMANDS([pango/module-defs-fc.c], |
---|
586 | [ |
---|
587 | ### FC modules |
---|
588 | cat > pango/module-defs-fc.c <<EOTEXT |
---|
589 | /* Autogenerated by configure. Do not edit */ |
---|
590 | |
---|
591 | #include "module-defs.h" |
---|
592 | |
---|
593 | PangoIncludedModule _pango_included_fc_modules@<:@@:>@ = { |
---|
594 | EOTEXT |
---|
595 | |
---|
596 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
597 | for module in $included_modules; do |
---|
598 | if echo $module | egrep -- "-fc($|,)" > /dev/null; then |
---|
599 | module_c=`echo $module | sed s/-/_/` |
---|
600 | cat >> pango/module-defs-fc.c <<EOTEXT |
---|
601 | { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create }, |
---|
602 | EOTEXT |
---|
603 | fi |
---|
604 | done |
---|
605 | |
---|
606 | IFS="$pango_save_ifs" |
---|
607 | |
---|
608 | cat >> pango/module-defs-fc.c <<EOTEXT |
---|
609 | { NULL, NULL, NULL }, |
---|
610 | }; |
---|
611 | EOTEXT |
---|
612 | ]) |
---|
613 | |
---|
614 | AC_CONFIG_COMMANDS([pango/module-defs-win32.c], |
---|
615 | [ |
---|
616 | ### Win32 modules |
---|
617 | cat > pango/module-defs-win32.c <<EOTEXT |
---|
618 | /* Autogenerated by configure. Do not edit */ |
---|
619 | |
---|
620 | #include "module-defs.h" |
---|
621 | |
---|
622 | PangoIncludedModule _pango_included_win32_modules@<:@@:>@ = { |
---|
623 | EOTEXT |
---|
624 | |
---|
625 | IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," |
---|
626 | for module in $included_modules; do |
---|
627 | if echo $module | egrep -- "-win32($|,)" > /dev/null; then |
---|
628 | module_c=`echo $module | sed s/-/_/` |
---|
629 | cat >> pango/module-defs-win32.c <<EOTEXT |
---|
630 | { _pango_${module_c}_script_engine_list, _pango_${module_c}_script_engine_init, _pango_${module_c}_script_engine_exit, _pango_${module_c}_script_engine_create }, |
---|
631 | EOTEXT |
---|
632 | fi |
---|
633 | done |
---|
634 | |
---|
635 | IFS="$pango_save_ifs" |
---|
636 | |
---|
637 | cat >> pango/module-defs-win32.c <<EOTEXT |
---|
638 | { NULL, NULL, NULL }, |
---|
639 | }; |
---|
640 | EOTEXT |
---|
641 | ]) |
---|
642 | |
---|
643 | |
---|
644 | AC_HEADER_DIRENT |
---|
645 | AC_CHECK_HEADERS(unistd.h) |
---|
646 | |
---|
647 | # Honor aclocal flags |
---|
648 | ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
---|
649 | |
---|
650 | AC_CONFIG_FILES([ |
---|
651 | Makefile |
---|
652 | pango/Makefile |
---|
653 | pango/mini-fribidi/Makefile |
---|
654 | pango/opentype/Makefile |
---|
655 | pango/pango.rc |
---|
656 | pango/pangoft2.rc |
---|
657 | pango/pangowin32.rc |
---|
658 | modules/Makefile |
---|
659 | modules/arabic/Makefile |
---|
660 | modules/basic/Makefile |
---|
661 | modules/hangul/Makefile |
---|
662 | modules/indic/Makefile |
---|
663 | modules/thai/Makefile |
---|
664 | modules/hebrew/Makefile |
---|
665 | examples/Makefile |
---|
666 | docs/Makefile |
---|
667 | docs/version.xml |
---|
668 | tools/Makefile |
---|
669 | tests/Makefile |
---|
670 | pango.pc |
---|
671 | pangox.pc |
---|
672 | pangowin32.pc |
---|
673 | pangoft2.pc |
---|
674 | pangoxft.pc |
---|
675 | pango-uninstalled.pc |
---|
676 | pangox-uninstalled.pc |
---|
677 | pangowin32-uninstalled.pc |
---|
678 | pangoft2-uninstalled.pc |
---|
679 | pangoxft-uninstalled.pc |
---|
680 | pango-zip.sh |
---|
681 | ]) |
---|
682 | |
---|
683 | AC_CONFIG_FILES([tests/runtests.sh], |
---|
684 | [chmod +x tests/runtests.sh]) |
---|
685 | |
---|
686 | AC_OUTPUT |
---|
687 | |
---|
688 | backends="" |
---|
689 | if $have_freetype && $have_fontconfig ; then backends="$backends FreeType"; fi |
---|
690 | if $have_x ; then backends="$backends X"; fi |
---|
691 | if $have_xft ; then backends="$backends Xft"; fi |
---|
692 | if $have_win32 ; then backends="$backends Win32"; fi |
---|
693 | |
---|
694 | echo "configuration: |
---|
695 | backends:$backends" |
---|