2003-11-09 09:37:14 +01:00
|
|
|
# This file is part of the FreeType project.
|
|
|
|
#
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_SRCDIR([ftconfig.in])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Don't forget to update docs/VERSION.DLL!
|
|
|
|
|
2004-08-11 07:25:37 +02:00
|
|
|
version_info='9:8:3'
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([version_info])
|
2001-03-20 08:52:52 +01:00
|
|
|
ft_version=`echo $version_info | tr : .`
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([ft_version])
|
|
|
|
|
|
|
|
|
|
|
|
# checks for system type
|
|
|
|
|
|
|
|
AC_CANONICAL_TARGET
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# checks for programs
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# get compiler flags right
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
if test "x$CC" = xgcc; then
|
2004-11-17 09:19:27 +01:00
|
|
|
XX_CFLAGS="-Wall -fno-strict-aliasing"
|
2000-07-08 02:22:20 +02:00
|
|
|
XX_ANSIFLAGS="-pedantic -ansi"
|
|
|
|
else
|
|
|
|
case "$host" in
|
2003-11-09 09:37:14 +01:00
|
|
|
*-dec-osf*)
|
|
|
|
CFLAGS=
|
|
|
|
XX_CFLAGS="-std1 -g3"
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
XX_CFLAGS=
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
2000-07-08 02:22:20 +02:00
|
|
|
esac
|
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([XX_CFLAGS])
|
|
|
|
AC_SUBST([XX_ANSIFLAGS])
|
|
|
|
|
|
|
|
|
|
|
|
# auxiliary programs
|
|
|
|
|
|
|
|
AC_CHECK_PROG([RMF], [rm], [rm -f])
|
|
|
|
AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-31 12:56:42 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# 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.
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_PROG_INSTALL
|
2000-07-31 12:56:42 +02:00
|
|
|
case "$INSTALL" in
|
2003-11-09 09:37:14 +01:00
|
|
|
/*)
|
|
|
|
;;
|
|
|
|
*/*)
|
|
|
|
INSTALL="`pwd`/$INSTALL" ;;
|
2000-07-31 12:56:42 +02:00
|
|
|
esac
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# checks for header files
|
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
AC_HEADER_STDC
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_HEADERS([fcntl.h unistd.h])
|
|
|
|
|
|
|
|
|
|
|
|
# checks for typedefs, structures, and compiler characteristics
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
AC_C_CONST
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_SIZEOF([int])
|
|
|
|
AC_CHECK_SIZEOF([long])
|
|
|
|
|
|
|
|
|
|
|
|
# checks for library functions
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# Here we check whether we can use our mmap file component.
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
|
2000-07-08 02:22:20 +02:00
|
|
|
else
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
|
2000-08-01 00:51:00 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_DECLS([munmap],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
[
|
|
|
|
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2000-08-01 00:51:00 +02:00
|
|
|
FT_MUNMAP_PARAM
|
2000-07-08 02:22:20 +02:00
|
|
|
fi
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_SUBST([FTSYS_SRC])
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS([memcpy memmove])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# 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]))
|
2002-12-16 22:51:24 +01:00
|
|
|
if test x$with_zlib != xno && test -z "$LIBZ"; then
|
2003-11-09 09:37:14 +01:00
|
|
|
AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
|
2002-12-16 22:51:24 +01:00
|
|
|
fi
|
|
|
|
if test x$with_zlib != xno && test -n "$LIBZ"; then
|
|
|
|
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
|
2002-12-23 23:40:21 +01:00
|
|
|
LDFLAGS="$LDFLAGS $LIBZ"
|
2002-12-16 22:51:24 +01:00
|
|
|
SYSTEM_ZLIB=yes
|
|
|
|
fi
|
2003-05-11 09:12:26 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# 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]))
|
2003-05-11 09:12:26 +02:00
|
|
|
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
|
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
AC_SUBST([LIBZ])
|
|
|
|
AC_SUBST([CFLAGS])
|
|
|
|
AC_SUBST([LDFLAGS])
|
|
|
|
AC_SUBST([SYSTEM_ZLIB])
|
|
|
|
|
2002-12-16 22:51:24 +01:00
|
|
|
|
2001-06-07 19:36:17 +02:00
|
|
|
AC_PROG_LIBTOOL
|
2004-02-08 23:45:48 +01:00
|
|
|
# urgh -- these are internal libtool variables...
|
|
|
|
AC_SUBST([enable_shared])
|
|
|
|
AC_SUBST([hardcode_libdir_flag_spec])
|
|
|
|
AC_SUBST([wl])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
#
|
2003-04-28 11:43:32 +02:00
|
|
|
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
|
|
|
|
unix-def.mk:unix-def.in
|
|
|
|
freetype-config
|
|
|
|
freetype2.pc:freetype2.in])
|
2002-01-08 19:33:55 +01:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# re-generate the Jamfile to use libtool now
|
|
|
|
#
|
|
|
|
# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
|
2002-01-08 19:33:55 +01:00
|
|
|
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_OUTPUT
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-11-09 09:37:14 +01:00
|
|
|
# end of configure.ac
|