Bug 34266 - configs silently ignored if libxml2 doesn't support SAX1 interface
[platform/upstream/fontconfig.git] / configure.ac
1 dnl 
2 dnl  fontconfig/configure.in
3 dnl 
4 dnl  Copyright © 2003 Keith Packard
5 dnl 
6 dnl  Permission to use, copy, modify, distribute, and sell this software and its
7 dnl  documentation for any purpose is hereby granted without fee, provided that
8 dnl  the above copyright notice appear in all copies and that both that
9 dnl  copyright notice and this permission notice appear in supporting
10 dnl  documentation, and that the name of the author(s) not be used in
11 dnl  advertising or publicity pertaining to distribution of the software without
12 dnl  specific, written prior permission.  The authors make no
13 dnl  representations about the suitability of this software for any purpose.  It
14 dnl  is provided "as is" without express or implied warranty.
15 dnl 
16 dnl  THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 dnl  EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 dnl  PERFORMANCE OF THIS SOFTWARE.
23 dnl
24 dnl Process this file with autoconf to create configure.
25
26 AC_INIT(fonts.dtd)
27
28 dnl ==========================================================================
29 dnl                               Versioning              
30 dnl ==========================================================================
31
32 dnl This is the package version number, not the shared library
33 dnl version.  This same version number must appear in fontconfig/fontconfig.h
34 dnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
35 dnl not possible to extract the version number here from fontconfig.h
36 AM_INIT_AUTOMAKE(fontconfig, 2.9.92)
37 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
38
39 dnl libtool versioning
40
41 dnl bump revision when fixing bugs
42 dnl bump current and age, reset revision to zero when adding APIs
43 dnl bump current, leave age, reset revision to zero when changing/removing APIS
44 LIBT_CURRENT=7
45 LIBT_REVISION=1
46 AC_SUBST(LIBT_CURRENT)
47 AC_SUBST(LIBT_REVISION)
48 LIBT_AGE=6
49
50 LIBT_VERSION_INFO="$LIBT_CURRENT:$LIBT_REVISION:$LIBT_AGE"
51 AC_SUBST(LIBT_VERSION_INFO)
52
53 LIBT_CURRENT_MINUS_AGE=`expr $LIBT_CURRENT - $LIBT_AGE`
54 AC_SUBST(LIBT_CURRENT_MINUS_AGE)
55
56 dnl ==========================================================================
57
58 AC_CONFIG_HEADERS(config.h)
59
60 AC_PROG_CC
61 AC_PROG_INSTALL
62 AC_PROG_LN_S
63 AC_LIBTOOL_WIN32_DLL
64 AM_PROG_LIBTOOL
65 AC_PROG_MAKE_SET
66 PKG_PROG_PKG_CONFIG
67
68 AC_MSG_CHECKING([for RM macro])
69 _predefined_rm=`make -p -f /dev/null 2>/dev/null|grep '^RM ='|sed -e 's/^RM = //'`
70 if test "x$_predefined_rm" = "x"; then
71         AC_MSG_RESULT([no predefined RM])
72         AC_CHECK_PROG(RM, rm, [rm -f])
73 else
74         AC_MSG_RESULT($_predefined_rm)
75 fi
76
77 dnl ==========================================================================
78
79 case "$host" in
80   *-*-mingw*)
81     os_win32=yes
82     ;;
83   *)
84     os_win32=no
85 esac
86 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
87
88 if test "$os_win32" = "yes"; then
89   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
90 fi
91 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
92
93 WARN_CFLAGS=""
94 if test "x$GCC" = "xyes"; then
95         WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
96         -Wmissing-prototypes -Wmissing-declarations \
97         -Wnested-externs -fno-strict-aliasing"
98         AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
99         [Can use #warning in C files])
100 fi
101 AC_SUBST(WARN_CFLAGS)
102
103
104 dnl ==========================================================================
105
106 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
107 AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes")
108
109 dnl ==========================================================================
110
111 AC_ARG_WITH(arch,
112         [AC_HELP_STRING([--with-arch=ARCH],
113                         [Force architecture to ARCH])],
114         arch="$withval", arch=auto)
115
116 if test "x$arch" != xauto; then
117         AC_DEFINE_UNQUOTED([FC_ARCHITECTURE], "$arch", [Architecture prefix to use for cache file names])
118 fi
119
120
121 dnl ==========================================================================
122
123 # Checks for header files.
124 AC_HEADER_DIRENT
125 AC_HEADER_STDC
126 AC_CHECK_HEADERS([fcntl.h regex.h stdlib.h string.h unistd.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
127
128 # Checks for typedefs, structures, and compiler characteristics.
129 AC_C_CONST
130 AC_C_INLINE
131 AC_TYPE_PID_T
132
133 # Checks for library functions.
134 AC_FUNC_VPRINTF
135 AC_FUNC_MMAP
136 AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree posix_fadvise fstatvfs fstatfs])
137
138 #
139 if test "x$ac_cv_func_fstatvfs" = "xyes"; then
140         AC_CHECK_MEMBERS([struct statvfs.f_basetype, struct statvfs.f_fstypename],,,
141                 [#include <sys/statvfs.h>])
142 fi
143 if test "x$ac_cv_func_fstatfs" = "xyes"; then
144         AC_CHECK_MEMBERS([struct statfs.f_flags, struct statfs.f_fstypename],,, [
145 #ifdef HAVE_SYS_VFS_H
146 #include <sys/vfs.h>
147 #endif
148 #ifdef HAVE_SYS_STATFS_H
149 #include <sys/statfs.h>
150 #endif
151 #ifdef HAVE_SYS_PARAM_H
152 #include <sys/param.h>
153 #endif
154 #ifdef HAVE_SYS_MOUNT_H
155 #include <sys/mount.h>
156 #endif])
157 fi
158 AC_CHECK_MEMBERS([struct dirent.d_type],,,
159         [#include <dirent.h>])
160 #
161 # regex
162 #
163 if test "x$ac_cv_func_regcomp" = "xyes" -a "x$ac_cv_func_regerror" = "xyes" -a "x$ac_cv_func_regexec" = "xyes" -a "x$ac_cv_func_regfree"; then
164         AC_DEFINE(USE_REGEX,,[Use regex])
165 fi
166
167 #
168 # Checks for iconv
169 #
170 AC_ARG_ENABLE(iconv,
171         [AC_HELP_STRING([--enable-iconv],
172                         [Use iconv to support non-Unicode SFNT name])],
173         ,enable_iconv=no)
174 AC_ARG_WITH(libiconv,
175         [AC_HELP_STRING([--with-libiconv=DIR],
176                         [Use libiconv in DIR])],
177         [if test "x$withval" = "xyes"; then
178                 libiconv_prefix=$prefix
179          else
180                 libiconv_prefix=$withval
181          fi],
182         [libiconv_prefix=auto])
183 AC_ARG_WITH(libiconv-includes,
184         [AC_HELP_STRING([--with-libiconv-includes=DIR],
185                         [Use libiconv includes in DIR])],
186         [libiconv_includes=$withval],
187         [libiconv_includes=auto])
188 AC_ARG_WITH(libiconv-lib,
189         [AC_HELP_STRING([--with-libiconv-lib=DIR],
190                         [Use libiconv library in DIR])],
191         [libiconv_lib=$withval],
192         [libiconv_lib=auto])
193
194 # if no libiconv,libiconv-includes,libiconv-lib are specified,
195 # libc's iconv has a priority.
196 if test "$libiconv_includes" != "auto" -a -r ${libiconv_includes}/iconv.h; then
197         libiconv_cflags="-I${libiconv_includes}"
198 elif test "$libiconv_prefix" != "auto" -a -r ${libiconv_prefix}/include/iconv.h; then
199         libiconv_cflags="-I${libiconv_prefix}/include"
200 else
201         libiconv_cflags=""
202 fi
203 libiconv_libs=""
204 if test "x$libiconv_cflags" != "x"; then
205         if test "$libiconv_lib" != "auto" -a -d ${libiconv_lib}; then
206                 libiconv_libs="-L${libiconv_lib} -liconv"
207         elif test "$libiconv_prefix" != "auto" -a -d ${libiconv_prefix}/lib; then
208                 libiconv_libs="-L${libiconv_prefix}/lib -liconv"
209         else
210                 libiconv_libs="-liconv"
211         fi
212 fi
213
214 use_iconv=0
215 if test "x$enable_iconv" != "xno"; then
216         AC_MSG_CHECKING([for a usable iconv])
217         if test "x$libiconv_cflags" != "x" -o "x$libiconv_libs" != "x"; then
218                 iconvsaved_CFLAGS="$CFLAGS"
219                 iconvsaved_LIBS="$LIBS"
220                 CFLAGS="$CFLAGS $libiconv_cflags"
221                 LIBS="$LIBS $libiconv_libs"
222
223                 AC_TRY_LINK([#include <iconv.h>],
224                         [iconv_open ("from", "to");],
225                         [iconv_type="libiconv"
226                          use_iconv=1],
227                         [use_iconv=0])
228
229                 CFLAGS="$iconvsaved_CFLAGS"
230                 LIBS="$iconvsaved_LIBS"
231                 ICONV_CFLAGS="$libiconv_cflags"
232                 ICONV_LIBS="$libiconv_libs"
233         fi
234         if test "x$use_iconv" = "x0"; then
235                 AC_TRY_LINK([#include <iconv.h>],
236                         [iconv_open ("from", "to");],
237                         [iconv_type="libc"
238                          use_iconv=1],
239                         [iconv_type="not found"
240                          use_iconv=0])
241         fi
242
243         AC_MSG_RESULT([$iconv_type])
244         AC_SUBST(ICONV_CFLAGS)
245         AC_SUBST(ICONV_LIBS)
246 fi
247 AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.])
248 #
249 # Checks for FreeType
250 #
251 PKG_CHECK_MODULES(FREETYPE, freetype2)
252
253 AC_SUBST(FREETYPE_LIBS)
254 AC_SUBST(FREETYPE_CFLAGS)
255
256 fontconfig_save_libs="$LIBS"
257 fontconfig_save_cflags="$CFLAGS"
258 LIBS="$LIBS $FREETYPE_LIBS"
259 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
260 AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format FT_Select_Size)
261 AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
262                 HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
263                 HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
264 [#include <ft2build.h>
265 #include FT_FREETYPE_H])
266 AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
267                    [FT_Bitmap_Size structure includes y_ppem field])
268 CFLAGS="$fontconfig_save_cflags"
269 LIBS="$fontconfig_save_libs"
270
271 #
272 # Check expat configuration
273 #
274 AC_ARG_WITH(expat,
275         [AC_HELP_STRING([--with-expat=DIR],
276                         [Use Expat in DIR])],
277         [expat_prefix=$withval],
278         [expat_prefix=auto])
279 AC_ARG_WITH(expat-includes,
280         [AC_HELP_STRING([--with-expat-includes=DIR],
281                         [Use Expat includes in DIR])],
282         [expat_includes=$withval],
283         [expat_includes=auto])
284 AC_ARG_WITH(expat-lib,
285         [AC_HELP_STRING([--with-expat-lib=DIR])],
286         [expat_lib=$withval],
287         [expat_lib=auto])
288
289 if test "$enable_libxml2" != "yes"; then
290         use_pkgconfig_for_expat=yes
291         if test "$expat_prefix" = "auto" -a "$expat_includes" = "auto" -a "$expat_lib" = "auto"; then
292                 PKG_CHECK_MODULES(EXPAT, expat,,use_pkgconfig_for_expat=no)
293         else
294                 use_pkgconfig_for_expat=no
295         fi
296         if test "x$use_pkgconfig_for_expat" = "xno"; then
297                 if test "$expat_includes" != "auto" -a -r ${expat_includes}/expat.h; then
298                         EXPAT_CFLAGS="-I${expat_includes}"
299                 elif test "$expat_prefix" != "auto" -a -r ${expat_prefix}/include/expat.h; then
300                         EXPAT_CFLAGS="-I${expat_prefix}/include"
301                 else
302                         EXPAT_CFLAGS=""
303                 fi
304                 if test "$expat_lib" != "auto"; then
305                         EXPAT_LIBS="-L${expat_lib} -lexpat"
306                 elif test "$expat_prefix" != "auto"; then
307                         EXPAT_LIBS="-L${expat_prefix}/lib -lexpat"
308                 else
309                         EXPAT_LIBS="-lexpat"
310                 fi
311         fi
312
313         expatsaved_CPPFLAGS="$CPPFLAGS"
314         expatsaved_LIBS="$LIBS"
315         CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
316         LIBS="$LIBS $EXPAT_LIBS"
317
318         AC_CHECK_HEADER(expat.h)
319         if test "$ac_cv_header_expat_h" = "no"; then
320                 AC_CHECK_HEADER(xmlparse.h)
321                 if test "$ac_cv_header_xmlparse_h" = "yes"; then
322                         HAVE_XMLPARSE_H=1
323                         AC_SUBST(HAVE_XMLPARSE_H)
324                         AC_DEFINE_UNQUOTED(HAVE_XMLPARSE_H,$HAVE_XMLPARSE_H,
325                                 [Use xmlparse.h instead of expat.h])
326                 else
327                         AC_MSG_ERROR([
328 *** expat is required. or try to use --enable-libxml2])
329                 fi
330         fi
331         AC_CHECK_FUNCS(XML_SetDoctypeDeclHandler)
332         if test "$ac_cv_func_XML_SetDoctypeDeclHandler" = "no"; then
333                 AC_MSG_ERROR([
334 *** expat is required. or try to use --enable-libxml2])
335         fi
336         CPPFLAGS="$expatsaved_CPPFLAGS"
337         LIBS="$expatsaved_LIBS"
338
339         AC_SUBST(EXPAT_CFLAGS)
340         AC_SUBST(EXPAT_LIBS)
341 fi
342
343 #
344 # Check libxml2 configuration
345 #
346 AC_ARG_ENABLE(libxml2,
347         [AC_HELP_STRING([--enable-libxml2],
348                         [Use libxml2 instead of Expat])])
349
350 if test "$enable_libxml2" = "yes"; then
351     PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6])
352     AC_DEFINE_UNQUOTED(ENABLE_LIBXML2,1,[Use libxml2 instead of Expat])
353
354     AC_SUBST(LIBXML2_CFLAGS)
355     AC_SUBST(LIBXML2_LIBS)
356
357     fc_saved_CFLAGS="$CFLAGS"
358     CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
359     AC_MSG_CHECKING([SAX1 support in libxml2])
360     AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
361         #include <libxml/xmlversion.h>
362         #if !defined(LIBXML_SAX1_ENABLED)
363         #  include "error: No SAX1 support in libxml2"
364         #endif
365         ]])], [AC_MSG_RESULT([found])], [AC_MSG_ERROR([
366 *** SAX1 support in libxml2 is required. enable it or use expat instead.])])
367     CFLAGS="$fc_saved_CFLAGS"
368 fi
369
370 #
371 # Set default font directory
372 #
373
374 AC_ARG_WITH(default-fonts,
375         [AC_HELP_STRING([--with-default-fonts=DIR],
376                         [Use fonts from DIR when config is busted])],
377         default_fonts="$withval", default_fonts=yes)
378
379 case "$default_fonts" in
380 yes)
381         if test "$os_win32" = "yes"; then
382                 FC_DEFAULT_FONTS="WINDOWSFONTDIR"
383                 AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "WINDOWSFONTDIR", 
384                                    [Windows font directory])
385         else
386                 FC_DEFAULT_FONTS="/usr/share/fonts"
387                 AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts", 
388                                    [System font directory])
389         fi
390         ;;
391 *)
392         FC_DEFAULT_FONTS="$default_fonts"
393         AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts",
394                            [System font directory])
395         ;;
396 esac
397
398 AC_SUBST(FC_DEFAULT_FONTS)
399
400 #
401 # Add more fonts if available.  By default, add only the directories
402 # with outline fonts; those with bitmaps can be added as desired in
403 # local.conf or ~/.fonts.conf
404 #
405 AC_ARG_WITH(add-fonts,
406         [AC_HELP_STRING([--with-add-fonts=DIR1,DIR2,...],
407                         [Find additional fonts in DIR1,DIR2,... ])],
408         add_fonts="$withval", add_fonts=yes)
409
410 case "$add_fonts" in
411 yes)
412         FC_ADD_FONTS=""
413         for dir in /usr/X11R6/lib/X11 /usr/X11/lib/X11 /usr/lib/X11; do
414                 case x"$FC_ADD_FONTS" in
415                 x)
416                         sub="$dir/fonts"
417                         if test -d "$sub"; then
418                                 case x$FC_ADD_FONTS in
419                                 x)
420                                         FC_ADD_FONTS="$sub"
421                                         ;;
422                                 *)
423                                         FC_ADD_FONTS="$FC_ADD_FONTS,$sub"
424                                         ;;
425                                 esac
426                         fi
427                         ;;
428                 esac
429         done
430         AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
431         ;;
432 no)
433         FC_ADD_FONTS=""
434         ;;
435 *)
436         FC_ADD_FONTS="$add_fonts"
437         AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
438         ;;
439 esac
440
441 AC_SUBST(FC_ADD_FONTS)
442
443 FC_FONTPATH=""
444
445 case "$FC_ADD_FONTS" in
446 "")
447         ;;
448 *)
449         FC_FONTPATH=`echo $FC_ADD_FONTS | 
450                         sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
451         ;;
452 esac
453
454 AC_SUBST(FC_FONTPATH)
455
456 #
457 # Set default cache directory path
458 #
459 AC_ARG_WITH(cache-dir,
460         [AC_HELP_STRING([--with-cache-dir=DIR],
461                         [Use DIR to store cache files [default=LOCALSTATEDIR/cache/fontconfig]])],
462         fc_cachedir="$withval", fc_cachedir=yes)
463
464 case $fc_cachedir in
465 no|yes)
466         if test "$os_win32" = "yes"; then
467                 fc_cachedir="WINDOWSTEMPDIR_FONTCONFIG_CACHE"
468         else
469                 fc_cachedir='${localstatedir}/cache/${PACKAGE}'
470         fi
471         ;;
472 *)
473         ;;
474 esac
475 AC_SUBST(fc_cachedir)
476 FC_CACHEDIR=${fc_cachedir}
477 AC_SUBST(FC_CACHEDIR)
478
479 FC_FONTDATE=`LC_ALL=C date`
480
481 AC_SUBST(FC_FONTDATE)
482
483 #
484 # Set configuration paths
485 #
486
487 AC_ARG_WITH(templatedir,
488         [AC_HELP_STRING([--with-templatedir=DIR],
489                         [Use DIR to store the configuration template files [default=DATADIR/fontconfig/conf.avail]])],
490         [templatedir="$withval"],
491         [templatedir=yes])
492 AC_ARG_WITH(baseconfigdir,
493         [AC_HELP_STRING([--with-baseconfigdir=DIR],
494                         [Use DIR to store the base configuration files [default=SYSCONFDIR/fonts]])],
495         [baseconfigdir="$withval"],
496         [baseconfigdir=yes])
497 AC_ARG_WITH(configdir,
498         [AC_HELP_STRING([--with-configdir=DIR],
499                         [Use DIR to store active configuration files [default=BASECONFIGDIR/conf.d]])],
500         [configdir="$withval"],
501         [configdir=yes])
502 AC_ARG_WITH(xmldir,
503         [AC_HELP_STRING([--with-xmldir=DIR],
504                         [Use DIR to store XML schema files [default=DATADIR/xml/fontconfig]])],
505         [xmldir="$withval"],
506         [xmldir=yes])
507
508 case "$templatedir" in
509 no|yes)
510         templatedir='${datadir}'/fontconfig/conf.avail
511         ;;
512 *)
513         ;;
514 esac
515 case "$baseconfigdir" in
516 no|yes)
517         baseconfigdir='${sysconfdir}'/fonts
518         ;;
519 *)
520         ;;
521 esac
522 case "$configdir" in
523 no|yes)
524         configdir='${baseconfigdir}'/conf.d
525         ;;
526 *)
527         ;;
528 esac
529 case "$xmldir" in
530 no|yes)
531         xmldir='${datadir}'/xml/fontconfig
532         ;;
533 *)
534         ;;
535 esac
536
537 TEMPLATEDIR=${templatedir}
538 BASECONFIGDIR=${baseconfigdir}
539 CONFIGDIR=${configdir}
540 XMLDIR=${xmldir}
541 AC_SUBST(templatedir)
542 AC_SUBST(TEMPLATEDIR)
543 AC_SUBST(baseconfigdir)
544 AC_SUBST(BASECONFIGDIR)
545 AC_SUBST(configdir)
546 AC_SUBST(CONFIGDIR)
547 AC_SUBST(xmldir)
548 AC_SUBST(XMLDIR)
549
550 #
551 # Let people not build/install docs if they don't have docbook
552 #
553
554 AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
555
556 AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
557
558 default_docs="yes"
559 #
560 # Check if docs exist or can be created
561 #
562 if test x$HASDOCBOOK = xno; then
563         if test -f $srcdir/doc/fonts-conf.5; then
564                 :
565         else
566                 default_docs="no"
567         fi
568 fi
569
570 AC_ARG_ENABLE(docs,
571         [AC_HELP_STRING([--disable-docs],
572                         [Don't build and install documentation])],
573         ,
574         enable_docs=$default_docs)
575
576 AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
577
578 if test "x$enable_docs" = xyes; then
579         DOCSRC="doc"
580         tmp=funcs.$$
581         cat $srcdir/doc/*.fncs | awk '
582         /^@TITLE@/      { if (!done) { printf ("%s\n", $2); done = 1; } }
583         /^@FUNC@/       { if (!done) { printf ("%s\n", $2); done = 1; } }
584         /^@@/           { done = 0; }' > $tmp
585         DOCMAN3=`cat $tmp | awk '{ printf ("%s.3 ", $1); }'`
586         echo DOCMAN3 $DOCMAN3
587         rm -f $tmp
588 else
589         DOCSRC=""
590         DOCMAN3=""
591 fi
592
593 AC_SUBST(DOCSRC)
594 AC_SUBST(DOCMAN3)
595
596
597 dnl Figure out what cache format suffix to use for this architecture
598 AC_C_BIGENDIAN
599 AC_CHECK_SIZEOF([void *])
600 AC_CHECK_ALIGNOF([double])
601
602 dnl include the header file for workaround of miscalculating size on autoconf
603 dnl particularly for fat binaries
604 AH_BOTTOM([#include "config-fixups.h"])
605
606 AC_OUTPUT([
607 Makefile
608 fontconfig/Makefile
609 fc-lang/Makefile
610 fc-glyphname/Makefile
611 fc-case/Makefile
612 src/Makefile
613 conf.d/Makefile
614 fc-cache/Makefile
615 fc-cat/Makefile
616 fc-list/Makefile
617 fc-match/Makefile
618 fc-pattern/Makefile
619 fc-query/Makefile
620 fc-scan/Makefile
621 doc/Makefile
622 doc/version.sgml
623 test/Makefile
624 fontconfig.spec
625 fontconfig.pc
626 fontconfig-zip
627 ])