3 # Copyright (C) 2011 by Werner Lemberg.
5 # This file is part of the ttfautohint library, and may only be used,
6 # modified, and distributed under the terms given in `COPYING'. By
7 # continuing to use, modify, or distribute this file you indicate that you
8 # have read `COPYING' and understand and accept it fully.
10 # The file `COPYING' mentioned in the previous paragraph is distributed
11 # with the ttfautohint library.
13 AC_INIT([ttfautohint],
15 [freetype-devel@nongnu.org])
16 AM_INIT_AUTOMAKE([-Wall -Werror gnits])
18 AM_SILENT_RULES([yes])
25 AC_ARG_WITH(freetype-config,
26 [ --with-freetype-config=PROG Use FreeType configuration program PROG],
27 freetype_config=$withval,
30 if test "$freetype_config" = "yes"; then
31 AC_PATH_PROG(ft_config,
34 if test "$ft_config" = "no"; then
35 AC_MSG_ERROR([FreeType library is missing; see http://www.freetype.org/])
38 ft_config="$freetype_config"
41 FREETYPE_CPPFLAGS="`$ft_config --cflags`"
42 FREETYPE_LDFLAGS="`$ft_config --libtool`"
44 AC_SUBST(FREETYPE_CPPFLAGS)
45 AC_SUBST(FREETYPE_LDFLAGS)
48 AC_MSG_CHECKING([whether FreeType version is 2.4.5 or higher])
49 old_CPPFLAGS="$CPPFLAGS"
50 CPPFLAGS=$FREETYPE_CPPFLAGS
54 #include FT_FREETYPE_H
55 #if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2004005
56 #error Freetype version too low.
61 CPPFLAGS="$old_CPPFLAGS"],
62 [AC_MSG_ERROR([Need FreeType library version 2.4.5 or higher])])
65 AC_CONFIG_HEADERS([config.h])
66 AC_CONFIG_FILES([Makefile