David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 5 | |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 6 | AC_INIT |
| 7 | AC_CONFIG_SRCDIR([ftconfig.in]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 8 | |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 9 | dnl configuration file -- stay in 8.3 limit |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 10 | AC_CONFIG_HEADER(ftconfig.h:ftconfig.in) |
| 11 | |
Werner Lemberg | 5da9dd7 | 2001-12-16 08:17:33 +0000 | [diff] [blame] | 12 | version_info='8:0:2' |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 13 | AC_SUBST(version_info) |
Werner Lemberg | 3de5b07 | 2001-03-20 07:52:52 +0000 | [diff] [blame] | 14 | ft_version=`echo $version_info | tr : .` |
| 15 | AC_SUBST(ft_version) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 16 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 17 | dnl checks for system type |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 18 | AC_CANONICAL_TARGET([]) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 19 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 20 | dnl checks for programs |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 21 | AC_PROG_CC |
| 22 | AC_PROG_CPP |
| 23 | |
| 24 | dnl get Compiler flags right. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 25 | if test "x$CC" = xgcc; then |
| 26 | XX_CFLAGS="-Wall" |
| 27 | XX_ANSIFLAGS="-pedantic -ansi" |
| 28 | else |
| 29 | case "$host" in |
| 30 | *-dec-osf*) |
Werner Lemberg | 07373c8 | 2000-08-01 18:44:18 +0000 | [diff] [blame] | 31 | CFLAGS= |
| 32 | XX_CFLAGS="-std1 -g3" |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 33 | XX_ANSIFLAGS= |
| 34 | ;; |
| 35 | *) |
| 36 | XX_CFLAGS= |
| 37 | XX_ANSIFLAGS= |
| 38 | ;; |
| 39 | esac |
| 40 | fi |
| 41 | AC_SUBST(XX_CFLAGS) |
| 42 | AC_SUBST(XX_ANSIFLAGS) |
| 43 | |
| 44 | AC_CHECK_PROG(RMF, rm, rm -f) |
| 45 | AC_CHECK_PROG(RMDIR, rmdir, rmdir) |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 46 | |
| 47 | dnl Since this file will be finally moved to another directory we make |
| 48 | dnl the path of the install script absolute. This small code snippet has |
| 49 | dnl been taken from automake's `ylwrap' script. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 50 | AC_PROG_INSTALL |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 51 | case "$INSTALL" in |
| 52 | /*) |
| 53 | ;; |
| 54 | */*) |
| 55 | INSTALL="`pwd`/$INSTALL" ;; |
| 56 | esac |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 57 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 58 | dnl checks for header files |
| 59 | AC_HEADER_STDC |
| 60 | AC_CHECK_HEADERS(fcntl.h unistd.h) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 61 | |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 62 | dnl checks for typedefs, structures, and compiler characteristics |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 63 | AC_C_CONST |
| 64 | AC_CHECK_SIZEOF(int) |
| 65 | AC_CHECK_SIZEOF(long) |
| 66 | |
Werner Lemberg | fd9777e | 2000-07-31 10:56:42 +0000 | [diff] [blame] | 67 | dnl checks for library functions |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 68 | |
| 69 | dnl Here we check whether we can use our mmap file component. |
| 70 | AC_FUNC_MMAP |
| 71 | if test "$ac_cv_func_mmap_fixed_mapped" != yes; then |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 72 | FTSYS_SRC='$(BASE_)ftsystem.c' |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 73 | else |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 74 | FTSYS_SRC='$(BUILD)/ftsystem.c' |
Werner Lemberg | b1dd353 | 2000-07-31 22:51:00 +0000 | [diff] [blame] | 75 | |
| 76 | FT_MUNMAP_DECL |
| 77 | FT_MUNMAP_PARAM |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 78 | fi |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 79 | AC_SUBST(FTSYS_SRC) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 80 | |
| 81 | AC_CHECK_FUNCS(memcpy memmove) |
| 82 | |
Werner Lemberg | c0c2abe | 2001-06-07 17:36:17 +0000 | [diff] [blame] | 83 | AC_PROG_LIBTOOL |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 84 | |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 85 | dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' |
David Turner | 426984e | 2000-09-15 23:47:42 +0000 | [diff] [blame] | 86 | dnl and 'builds/unix/unix-cc.mk' that will be used by the build system |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 87 | dnl |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 88 | AC_CONFIG_FILES([unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config]) |
| 89 | AC_OUTPUT |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 90 | |
Werner Lemberg | b3f3210 | 2001-06-08 12:19:22 +0000 | [diff] [blame] | 91 | dnl end of configure.ac |