This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / lib / freetype / builds / unix / configure.ac
1 dnl This file is part of the FreeType project.
2 dnl
3 dnl Process this file with autoconf to produce a configure script.
4 dnl
5
6 AC_INIT
7 AC_CONFIG_SRCDIR([ftconfig.in])
8
9 dnl configuration file -- stay in 8.3 limit
10 AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
11
12 dnl Don't forget to update VERSION.DLL!
13 version_info='9:3:3'
14 AC_SUBST(version_info)
15 ft_version=`echo $version_info | tr : .`
16 AC_SUBST(ft_version)
17
18 dnl checks for system type
19 AC_CANONICAL_TARGET([])
20
21 dnl checks for programs
22 AC_PROG_CC
23 AC_PROG_CPP
24
25 dnl get Compiler flags right.
26 if test "x$CC" = xgcc; then
27   XX_CFLAGS="-Wall"
28   XX_ANSIFLAGS="-pedantic -ansi"
29 else
30   case "$host" in
31     *-dec-osf*)
32       CFLAGS=
33       XX_CFLAGS="-std1 -g3"
34       XX_ANSIFLAGS=
35       ;;
36     *)
37       XX_CFLAGS=
38       XX_ANSIFLAGS=
39       ;;
40   esac
41 fi
42 AC_SUBST(XX_CFLAGS)
43 AC_SUBST(XX_ANSIFLAGS)
44
45 AC_CHECK_PROG(RMF, rm, rm -f)
46 AC_CHECK_PROG(RMDIR, rmdir, rmdir)
47
48 dnl Since this file will be finally moved to another directory we make
49 dnl the path of the install script absolute.  This small code snippet has
50 dnl been taken from automake's `ylwrap' script.
51 AC_PROG_INSTALL
52 case "$INSTALL" in
53   /*)
54     ;;
55   */*)
56     INSTALL="`pwd`/$INSTALL" ;;
57 esac
58
59 dnl checks for header files
60 AC_HEADER_STDC
61 AC_CHECK_HEADERS(fcntl.h unistd.h)
62
63 dnl checks for typedefs, structures, and compiler characteristics
64 AC_C_CONST
65 AC_CHECK_SIZEOF(int)
66 AC_CHECK_SIZEOF(long)
67
68 dnl checks for library functions
69
70 dnl Here we check whether we can use our mmap file component.
71 AC_FUNC_MMAP
72 if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
73   FTSYS_SRC='$(BASE_)ftsystem.c'
74 else
75   FTSYS_SRC='$(BUILD)/ftsystem.c'
76
77   FT_MUNMAP_DECL
78   FT_MUNMAP_PARAM
79 fi
80 AC_SUBST(FTSYS_SRC)
81
82 AC_CHECK_FUNCS(memcpy memmove)
83
84
85 dnl Check for system zlib
86 AC_ARG_WITH(zlib,
87   [  --without-zlib          use internal zlib instead of system-wide])
88 if test x$with_zlib != xno && test -z "$LIBZ"; then
89   AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h, LIBZ='-lz')])
90 fi
91 if test x$with_zlib != xno && test -n "$LIBZ"; then
92   CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
93   LDFLAGS="$LDFLAGS $LIBZ"
94   SYSTEM_ZLIB=yes
95 fi
96 AC_SUBST(LIBZ)
97 AC_SUBST(CFLAGS)
98 AC_SUBST(LDFLAGS)
99 AC_SUBST(SYSTEM_ZLIB)
100
101
102
103 AC_PROG_LIBTOOL
104
105 dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
106 dnl and 'builds/unix/unix-cc.mk' that will be used by the build system
107 dnl
108 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config])
109
110 dnl re-generate the Jamfile to use libtool now
111 dnl
112 dnl AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
113
114 AC_OUTPUT
115
116 dnl end of configure.ac