misc/libfreetype/builds/unix/configure.raw
author Medo <smaxein@googlemail.com>
Wed, 02 May 2012 23:53:45 +0200
changeset 7006 6af78154dc62
parent 5172 88f2e05288ba
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
# This file is part of the FreeType project.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
# Process this file with autoconf to produce a configure script.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
# David Turner, Robert Wilhelm, and Werner Lemberg.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
# This file is part of the FreeType project, and may only be used, modified,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
# and distributed under the terms of the FreeType project license,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
# indicate that you have read the license and understand and accept it
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
# fully.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
AC_CONFIG_SRCDIR([ftconfig.in])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
# Don't forget to update docs/VERSION.DLL!
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
version_info='12:2:6'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
AC_SUBST([version_info])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
ft_version=`echo $version_info | tr : .`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
AC_SUBST([ft_version])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
# checks for system type
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
AC_CANONICAL_HOST
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
# checks for programs
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
AC_PROG_CC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
AC_PROG_CPP
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
AC_SUBST(EXEEXT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
# checks for native programs to generate building tool
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
if test ${cross_compiling} = yes; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  AC_CHECK_PROG(CC_BUILD, ${build}-gcc, ${build}-gcc)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, gcc, gcc)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, cc, cc, , , /usr/ucb/cc)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  test -z "${CC_BUILD}" && AC_MSG_ERROR([cannot find native C compiler])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  AC_MSG_CHECKING([for suffix of native executables])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  rm -f a.* b.* a_out.exe conftest.*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  echo > conftest.c "int main() { return 0;}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  ${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  rm -f conftest.c
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  if test -x a.out -o -x b.out -o -x conftest; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
    EXEEXT_BUILD=""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  elif test -x a_out.exe -o -x conftest.exe; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
    EXEEXT_BUILD=".exe"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  elif test -x conftest.* ; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
    EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  rm -f a.* b.* a_out.exe conftest.*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  AC_MSG_RESULT($EXEEXT_BUILD)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
  CC_BUILD=${CC}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  EXEEXT_BUILD=${EXEEXT}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
AC_SUBST(CC_BUILD)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
AC_SUBST(EXEEXT_BUILD)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
# get compiler flags right
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
if test "x$GCC" = xyes; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  XX_CFLAGS="-Wall"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  XX_ANSIFLAGS="-pedantic -ansi"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
  case "$host" in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
  *-dec-osf*)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    CFLAGS=
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
    XX_CFLAGS="-std1 -g3"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
    XX_ANSIFLAGS=
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  *)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
    XX_CFLAGS=
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
    XX_ANSIFLAGS=
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
AC_SUBST([XX_CFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
AC_SUBST([XX_ANSIFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
# auxiliary programs
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
AC_CHECK_PROG([RMF], [rm], [rm -f])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
# Since this file will be finally moved to another directory we make
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
# the path of the install script absolute.  This small code snippet has
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
# been taken from automake's `ylwrap' script.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
AC_PROG_INSTALL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
case "$INSTALL" in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
/*)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
*/*)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  INSTALL="`pwd`/$INSTALL" ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
# checks for header files
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
AC_HEADER_STDC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
AC_CHECK_HEADERS([fcntl.h unistd.h])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
# checks for typedefs, structures, and compiler characteristics
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
AC_C_CONST
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
AC_CHECK_SIZEOF([int])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
AC_CHECK_SIZEOF([long])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
# check whether cpp computation of size of int and long in ftconfig.in works
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
AC_MSG_CHECKING([cpp computation of bit length in ftconfig.in works])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
orig_CPPFLAGS="${CPPFLAGS}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
ac_clean_files="ft2build.h ftoption.h ftstdlib.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
touch ft2build.h ftoption.h ftstdlib.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
cat > conftest.c <<\_ACEOF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
#include <limits.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
#define FT_CONFIG_OPTIONS_H "ftoption.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
#define FT_UINT_MAX  UINT_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
#define FT_ULONG_MAX ULONG_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
#include "ftconfig.in"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
_ACEOF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
echo >> conftest.c "#endif"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
echo >> conftest.c "#endif"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
eval `cat conftest.sh`
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
${RMF} conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
if test x != "x${ac_cpp_ft_sizeof_int}" \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
   -a x != x"${ac_cpp_ft_sizeof_long}"; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  unset ft_use_autoconf_sizeof_types
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  ft_use_autoconf_sizeof_types=yes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
AC_ARG_ENABLE(biarch-config,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
[  --enable-biarch-config  install biarch ftconfig.h to support multiple
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
                          architectures by single file], [], [])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
  :yes:yes:)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
    AC_MSG_RESULT([broken but use it])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    unset ft_use_autoconf_sizeof_types
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  ::no:)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
    AC_MSG_RESULT([works but ignore it])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
    ft_use_autoconf_sizeof_types=yes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  ::yes: | :::)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    AC_MSG_RESULT([yes])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
    unset ft_use_autoconf_sizeof_types
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
  *)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
    AC_MSG_RESULT([no])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
    ft_use_autoconf_sizeof_types=yes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
CPPFLAGS="${orig_CPPFLAGS}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
# checks for library functions
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
# Here we check whether we can use our mmap file component.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
AC_FUNC_MMAP
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
  FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
  AC_CHECK_DECLS([munmap],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
    [],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
    [],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
    [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
#ifdef HAVE_UNISTD_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
#include <unistd.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
#include <sys/mman.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
    ])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
  FT_MUNMAP_PARAM
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
AC_SUBST([FTSYS_SRC])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
AC_CHECK_FUNCS([memcpy memmove])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
# check for system zlib
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
# don't quote AS_HELP_STRING!
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
AC_ARG_WITH([zlib],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  AS_HELP_STRING([--without-zlib],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
                 [use internal zlib instead of system-wide]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
if test x$with_zlib != xno && test -z "$LIBZ"; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
if test x$with_zlib != xno && test -n "$LIBZ"; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  LDFLAGS="$LDFLAGS $LIBZ"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  SYSTEM_ZLIB=yes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
# check for system libbz2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
# don't quote AS_HELP_STRING!
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
AC_ARG_WITH([bzip2],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  AS_HELP_STRING([--without-bzip2],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
                 [do not support bzip2 compressed fonts]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  LDFLAGS="$LDFLAGS $LIBBZ2"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
# Some options handling SDKs/archs in CFLAGS should be copied
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
# to LDFLAGS. Apple TechNote 2137 recommends to include these
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
# options in CFLAGS but not in LDFLAGS.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
save_config_args=$*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
set dummy ${CFLAGS}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
i=1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
while test $i -le $#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
do
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  c=$1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  case "${c}" in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  -isysroot|-arch) # options taking 1 argument
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
    a=$2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
    AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c} ${a}])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
    if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
    then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
      AC_MSG_RESULT([yes])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
    else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
      AC_MSG_RESULT([no, copy to LDFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
      LDFLAGS="${LDFLAGS} ${c} ${a}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
    fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
    shift 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  -m32|-m64|-march=*|-mcpu=*) # options taking no argument
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
    AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
    if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
    then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
      AC_MSG_RESULT([yes])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
    else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
      AC_MSG_RESULT([no, copy to LDFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
      LDFLAGS="${LDFLAGS} ${c}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
    fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  # *)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  #   AC_MSG_RESULT([${c} is not copied to LDFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  #   ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  shift 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
done
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
set ${save_config_args}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
# Whether to use Mac OS resource-based fonts.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
# don't quote AS_HELP_STRING!
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
AC_ARG_WITH([old-mac-fonts],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  AS_HELP_STRING([--with-old-mac-fonts],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
                 [allow Mac resource-based fonts to be used]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
if test x$with_old_mac_fonts = xyes; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  orig_LDFLAGS="${LDFLAGS}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
  AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
  FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
        short res = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
        UseResFile( res );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
     ftmac_c='ftmac.c'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
     AC_MSG_CHECKING([OS_INLINE macro is ANSI compatible])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
     orig_CFLAGS="$CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
     CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
     AC_COMPILE_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
       AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
         ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
         [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
           /* OSHostByteOrder() is typed as OS_INLINE */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
           int32_t  os_byte_order = OSHostByteOrder();
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
           if ( OSBigEndian != os_byte_order )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
             return 1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
         ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
       [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
        CFLAGS="$orig_CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
        CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
       ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
       [AC_MSG_RESULT([no, ANSI incompatible])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
        CFLAGS="$orig_CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
       ])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
     AC_MSG_CHECKING([type ResourceIndex])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
     orig_CFLAGS="$CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
     CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
     AC_COMPILE_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
       AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
# include <Resources.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
         ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
         [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
           ResourceIndex i = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
           return i;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
         ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
       [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
        CFLAGS="$orig_CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
        CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
       ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
       [AC_MSG_RESULT([no])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
        CFLAGS="$orig_CFLAGS"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
        CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
       ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
     FT2_EXTRA_LIBS=""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
     LDFLAGS="${orig_LDFLAGS}"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
     CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
  case x$host_os in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
  xdarwin*)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
    dnl AC_MSG_WARN([host system is MacOS but configured to build without Carbon])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
    CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
  *) ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
  esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
# Whether to use FileManager which is deprecated since Mac OS X 10.4.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
AC_ARG_WITH([fsspec],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
  AS_HELP_STRING([--with-fsspec],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
                 [use obsolete FSSpec API of MacOS, if available (default=yes)]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
if test x$with_fsspec = xno; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
  CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  AC_MSG_CHECKING([FSSpec-based FileManager])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
        FCBPBPtr          paramBlock;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
        short             vRefNum;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
        long              dirID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
        ConstStr255Param  fileName;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
        FSSpec*           spec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
        /* FSSpec functions: deprecated since Mac OS X 10.4 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
        PBGetFCBInfoSync( paramBlock );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
        FSMakeFSSpec( vRefNum, dirID, fileName, spec );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
     CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
     CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
# Whether to use FileManager in Carbon since MacOS 9.x.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
AC_ARG_WITH([fsref],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
  AS_HELP_STRING([--with-fsref],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
                 [use Carbon FSRef API of MacOS, if available (default=yes)]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
if test x$with_fsref = xno; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
  AC_MSG_WARN([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
*** WARNING
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
    FreeType2 built without FSRef API cannot load
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
    data-fork fonts on MacOS, except of XXX.dfont.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
    ])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
  CFLAGS="$CFLAGS -DHAVE_FSREF=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
  AC_MSG_CHECKING([FSRef-based FileManager])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
        short                vRefNum;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
        long                 dirID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
        ConstStr255Param     fileName;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
        Boolean*             isDirectory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
        UInt8*               path;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
        SInt16               desiredRefNum;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
        SInt16*              iterator;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
        SInt16*              actualRefNum;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
        HFSUniStr255*        outForkName;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
        FSVolumeRefNum       volume;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
        FSCatalogInfoBitmap  whichInfo;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
        FSCatalogInfo*       catalogInfo;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
        FSForkInfo*          forkInfo;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
        FSRef*               ref;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
#if HAVE_FSSPEC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
        FSSpec*              spec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
        /* FSRef functions: no need to check? */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
        FSGetForkCBInfo( desiredRefNum, volume, iterator,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
                         actualRefNum, forkInfo, ref,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
                         outForkName );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
        FSPathMakeRef( path, ref, isDirectory );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
#if HAVE_FSSPEC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
        FSpMakeFSRef ( spec, ref );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
        FSGetCatalogInfo( ref, whichInfo, catalogInfo,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
                          outForkName, spec, ref );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
     CFLAGS="$CFLAGS -DHAVE_FSREF=1"],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
     CFLAGS="$CFLAGS -DHAVE_FSREF=0"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
# Whether to use QuickDraw API in ToolBox which is deprecated since
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
# Mac OS X 10.4.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
AC_ARG_WITH([quickdraw-toolbox],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
  AS_HELP_STRING([--with-quickdraw-toolbox],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
                 [use MacOS QuickDraw in ToolBox, if available (default=yes)]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
if test x$with_quickdraw_toolbox = xno; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
  CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
  AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
# include <Fonts.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
        Str255     familyName;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
        SInt16     familyID   = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
        FMInput*   fmIn       = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
        FMOutput*  fmOut      = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
        GetFontName( familyID, familyName );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
        GetFNum( familyName, &familyID );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
        fmOut = FMSwapFont( fmIn );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
     CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
     CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
# Whether to use QuickDraw API in Carbon which is deprecated since
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
# Mac OS X 10.4.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
AC_ARG_WITH([quickdraw-carbon],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
  AS_HELP_STRING([--with-quickdraw-carbon],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
                 [use MacOS QuickDraw in Carbon, if available (default=yes)]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
if test x$with_quickdraw_carbon = xno; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
  CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   566
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
# include <Fonts.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
        FMFontFamilyIterator          famIter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
        FMFontFamily                  family;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
        Str255                        famNameStr;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
        FMFontFamilyInstanceIterator  instIter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
        FMFontStyle                   style;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
        FMFontSize                    size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
        FMFont                        font;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
        FSSpec*                       pathSpec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
        FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
                                    &famIter );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   589
        FMGetNextFontFamily( &famIter, &family );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
        FMGetFontFamilyName( family, famNameStr );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
        FMCreateFontFamilyInstanceIterator( family, &instIter );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
        FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
        FMDisposeFontFamilyInstanceIterator( &instIter );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
        FMDisposeFontFamilyIterator( &famIter );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
        FMGetFontContainer( font, pathSpec );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   598
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   599
     CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   600
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   601
     CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   602
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   603
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   604
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   605
# Whether to use AppleTypeService since Mac OS X.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   606
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   607
# don't quote AS_HELP_STRING!
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   608
AC_ARG_WITH([ats],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   609
  AS_HELP_STRING([--with-ats],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   610
                 [use AppleTypeService, if available (default=yes)]))
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   611
if test x$with_ats = xno; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   612
  CFLAGS="$CFLAGS -DHAVE_ATS=0"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   613
elif test x$with_old_mac_fonts = xyes -a x$with_ats != x ; then
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   614
  AC_MSG_CHECKING([AppleTypeService functions])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   615
  AC_LINK_IFELSE([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   616
    AC_LANG_PROGRAM([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   617
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   618
#if defined(__GNUC__) && defined(__APPLE_CC__)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   619
# include <CoreServices/CoreServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   620
# include <ApplicationServices/ApplicationServices.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   621
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   622
# include <ConditionalMacros.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   623
# include <Files.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   624
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   625
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   626
      ],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   627
      [
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   628
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   629
        FSSpec*  pathSpec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   630
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   631
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   632
        ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   633
#if HAVE_FSSPEC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   634
        ATSFontGetFileSpecification( 0, pathSpec );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   635
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   636
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   637
      ])],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   638
    [AC_MSG_RESULT([ok])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   639
     CFLAGS="$CFLAGS -DHAVE_ATS=1"],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   640
    [AC_MSG_RESULT([not found])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   641
     CFLAGS="$CFLAGS -DHAVE_ATS=0"])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   642
fi
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   643
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   644
case "$CFLAGS" in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   645
  *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   646
    AC_MSG_WARN([
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   647
*** WARNING
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   648
    FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   649
    thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   650
    ])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   651
    CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   652
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   653
  *)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   654
    ;;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   655
esac
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   656
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   657
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   658
AC_SUBST([ftmac_c])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   659
AC_SUBST([LIBZ])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   660
AC_SUBST([LIBBZ2])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   661
AC_SUBST([CFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   662
AC_SUBST([LDFLAGS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   663
AC_SUBST([FT2_EXTRA_LIBS])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   664
AC_SUBST([SYSTEM_ZLIB])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   665
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   666
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   667
LT_INIT(win32-dll)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   668
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   669
AC_SUBST([hardcode_libdir_flag_spec])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   670
AC_SUBST([wl])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   671
AC_SUBST([build_libtool_libs])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   672
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   673
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   674
# configuration file -- stay in 8.3 limit
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   675
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   676
# since #undef doesn't survive in configuration header files we replace
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   677
# `/undef' with `#undef' after creating the output file
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   678
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   679
AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   680
  [mv ftconfig.h ftconfig.tmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   681
   sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   682
   rm ftconfig.tmp])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   683
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   684
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   685
# and `builds/unix/unix-cc.mk' that will be used by the build system
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   686
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   687
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   688
                 unix-def.mk:unix-def.in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   689
                 freetype-config
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   690
                 freetype2.pc:freetype2.in])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   691
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   692
# re-generate the Jamfile to use libtool now
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   693
#
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   694
# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   695
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   696
AC_OUTPUT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   697
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   698
# end of configure.raw