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