Hash :
bbdee28f
Author :
Date :
2004-11-17T08:19:27
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
# This file is part of the FreeType project.
#
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
version_info='9:8:3'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
# checks for system type
AC_CANONICAL_TARGET
# checks for programs
AC_PROG_CC
AC_PROG_CPP
# get compiler flags right
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall -fno-strict-aliasing"
XX_ANSIFLAGS="-pedantic -ansi"
else
case "$host" in
*-dec-osf*)
CFLAGS=
XX_CFLAGS="-std1 -g3"
XX_ANSIFLAGS=
;;
*)
XX_CFLAGS=
XX_ANSIFLAGS=
;;
esac
fi
AC_SUBST([XX_CFLAGS])
AC_SUBST([XX_ANSIFLAGS])
# auxiliary programs
AC_CHECK_PROG([RMF], [rm], [rm -f])
AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
# Since this file will be finally moved to another directory we make
# the path of the install script absolute. This small code snippet has
# been taken from automake's `ylwrap' script.
AC_PROG_INSTALL
case "$INSTALL" in
/*)
;;
*/*)
INSTALL="`pwd`/$INSTALL" ;;
esac
# checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h unistd.h])
# checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
# checks for library functions
# Here we check whether we can use our mmap file component.
AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
else
FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
AC_CHECK_DECLS([munmap],
[],
[],
[
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/mman.h>
])
FT_MUNMAP_PARAM
fi
AC_SUBST([FTSYS_SRC])
AC_CHECK_FUNCS([memcpy memmove])
# Check for system zlib
AC_ARG_WITH([zlib],
dnl don't quote AS_HELP_STRING!
AS_HELP_STRING([--without-zlib],
[use internal zlib instead of system-wide]))
if test x$with_zlib != xno && test -z "$LIBZ"; then
AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
fi
if test x$with_zlib != xno && test -n "$LIBZ"; then
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
LDFLAGS="$LDFLAGS $LIBZ"
SYSTEM_ZLIB=yes
fi
# Whether to use Mac OS resource-based fonts or not
AC_ARG_WITH([old-mac-fonts],
dnl don't quote AS_HELP_STRING!
AS_HELP_STRING([--with-old-mac-fonts],
[allow Mac resource-based fonts to be used]))
if test x$with_old_mac_fonts = xyes; then
LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
-Xlinker -framework -Xlinker ApplicationServices"
else
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
fi
AC_SUBST([LIBZ])
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
AC_SUBST([SYSTEM_ZLIB])
AC_PROG_LIBTOOL
# urgh -- these are internal libtool variables...
AC_SUBST([enable_shared])
AC_SUBST([hardcode_libdir_flag_spec])
AC_SUBST([wl])
# configuration file -- stay in 8.3 limit
#
# since #undef doesn't survive in configuration header files we replace
# `/undef' with `#undef' after creating the output file
AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
[mv ftconfig.h ftconfig.tmp
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
rm ftconfig.tmp])
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
# and 'builds/unix/unix-cc.mk' that will be used by the build system
#
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
unix-def.mk:unix-def.in
freetype-config
freetype2.pc:freetype2.in])
# re-generate the Jamfile to use libtool now
#
# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
AC_OUTPUT
# end of configure.ac