2000-07-08 02:22:20 +02:00
|
|
|
dnl This file is part of the FreeType project.
|
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_SRCDIR([ftconfig.in])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-31 12:56:42 +02:00
|
|
|
dnl configuration file -- stay in 8.3 limit
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
|
|
|
|
|
2002-09-10 17:17:32 +02:00
|
|
|
dnl Don't forget to update VERSION.DLL!
|
2002-12-26 21:51:04 +01:00
|
|
|
version_info='9:3:3'
|
2000-07-20 08:57:41 +02:00
|
|
|
AC_SUBST(version_info)
|
2001-03-20 08:52:52 +01:00
|
|
|
ft_version=`echo $version_info | tr : .`
|
|
|
|
AC_SUBST(ft_version)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
dnl checks for system type
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_CANONICAL_TARGET([])
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
dnl checks for programs
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
|
|
|
dnl get Compiler flags right.
|
|
|
|
if test "x$CC" = xgcc; then
|
|
|
|
XX_CFLAGS="-Wall"
|
|
|
|
XX_ANSIFLAGS="-pedantic -ansi"
|
|
|
|
else
|
|
|
|
case "$host" in
|
|
|
|
*-dec-osf*)
|
2000-08-01 20:44:18 +02:00
|
|
|
CFLAGS=
|
|
|
|
XX_CFLAGS="-std1 -g3"
|
2000-07-08 02:22:20 +02:00
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
XX_CFLAGS=
|
|
|
|
XX_ANSIFLAGS=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
AC_SUBST(XX_CFLAGS)
|
|
|
|
AC_SUBST(XX_ANSIFLAGS)
|
|
|
|
|
|
|
|
AC_CHECK_PROG(RMF, rm, rm -f)
|
|
|
|
AC_CHECK_PROG(RMDIR, rmdir, rmdir)
|
2000-07-31 12:56:42 +02:00
|
|
|
|
|
|
|
dnl Since this file will be finally moved to another directory we make
|
|
|
|
dnl the path of the install script absolute. This small code snippet has
|
|
|
|
dnl 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
|
|
|
|
/*)
|
|
|
|
;;
|
|
|
|
*/*)
|
|
|
|
INSTALL="`pwd`/$INSTALL" ;;
|
|
|
|
esac
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
dnl checks for header files
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(fcntl.h unistd.h)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
dnl checks for typedefs, structures, and compiler characteristics
|
2000-07-08 02:22:20 +02:00
|
|
|
AC_C_CONST
|
|
|
|
AC_CHECK_SIZEOF(int)
|
|
|
|
AC_CHECK_SIZEOF(long)
|
|
|
|
|
2000-07-31 12:56:42 +02:00
|
|
|
dnl checks for library functions
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
dnl Here we check whether we can use our mmap file component.
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
|
2000-07-20 08:57:41 +02:00
|
|
|
FTSYS_SRC='$(BASE_)ftsystem.c'
|
2000-07-08 02:22:20 +02:00
|
|
|
else
|
2000-07-20 08:57:41 +02:00
|
|
|
FTSYS_SRC='$(BUILD)/ftsystem.c'
|
2000-08-01 00:51:00 +02:00
|
|
|
|
|
|
|
FT_MUNMAP_DECL
|
|
|
|
FT_MUNMAP_PARAM
|
2000-07-08 02:22:20 +02:00
|
|
|
fi
|
2000-07-20 08:57:41 +02:00
|
|
|
AC_SUBST(FTSYS_SRC)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
AC_CHECK_FUNCS(memcpy memmove)
|
|
|
|
|
2002-12-16 22:51:24 +01:00
|
|
|
dnl Check for system zlib
|
|
|
|
AC_ARG_WITH(zlib,
|
|
|
|
[ --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"
|
2002-12-23 23:40:21 +01:00
|
|
|
LDFLAGS="$LDFLAGS $LIBZ"
|
2002-12-16 22:51:24 +01:00
|
|
|
SYSTEM_ZLIB=yes
|
|
|
|
fi
|
|
|
|
AC_SUBST(LIBZ)
|
|
|
|
AC_SUBST(CFLAGS)
|
2002-12-23 23:40:21 +01:00
|
|
|
AC_SUBST(LDFLAGS)
|
2002-12-16 22:51:24 +01:00
|
|
|
AC_SUBST(SYSTEM_ZLIB)
|
|
|
|
|
2001-06-07 19:36:17 +02:00
|
|
|
AC_PROG_LIBTOOL
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-10-31 21:42:18 +01:00
|
|
|
dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
|
2000-09-16 01:47:42 +02:00
|
|
|
dnl and 'builds/unix/unix-cc.mk' that will be used by the build system
|
2000-07-08 02:22:20 +02:00
|
|
|
dnl
|
2001-06-08 14:19:22 +02:00
|
|
|
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config])
|
2002-01-08 19:33:55 +01:00
|
|
|
|
|
|
|
dnl re-generate the Jamfile to use libtool now
|
|
|
|
dnl
|
2002-03-29 08:43:04 +01:00
|
|
|
dnl 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
|
|
|
|
2001-06-08 14:19:22 +02:00
|
|
|
dnl end of configure.ac
|