Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / ots / configure.ac
blob2a3180ef5e080658bdceda55ece1526877138db6
1 AC_INIT([OTS],
2         [4.0.1],
3         [https://github.com/khaledhosny/ots/issues],
4         [ots],
5         [https://github.com/khaledhosny/ots])
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS([config.h])
10 AM_INIT_AUTOMAKE([foreign subdir-objects])
11 AM_SILENT_RULES([yes])
13 AC_PROG_CC
14 AC_PROG_CXX
15 AC_PROG_RANLIB
16 PKG_PROG_PKG_CONFIG([0.20])
18 have_zlib=false
19 AX_CHECK_ZLIB(have_zlib=true, :)
20 if ! $have_zlib; then
21         AC_MSG_ERROR([zlib is required but not found])
24 have_freetype=false
25 PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, :)
26 if $have_freetype; then
27         AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
29 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
31 have_pthread=false
32 AX_PTHREAD([have_pthread=true])
33 if $have_pthread; then
34         GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"
35 else
36         GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"
38 AC_SUBST([GTEST_CPPFLAGS])
40 have_coretext=false
41 AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <ApplicationServices/ApplicationServices.h>])
42 if $have_coretext; then
43         CORETEXT_CFLAGS=
44         CORETEXT_LIBS="-framework ApplicationServices"
45         AC_DEFINE(HAVE_CORETEXT, 1, [Have Core Text framework])
47 AC_SUBST(CORETEXT_CFLAGS)
48 AC_SUBST(CORETEXT_LIBS)
49 AM_CONDITIONAL(HAVE_CORETEXT, $have_coretext)
51 AC_CONFIG_FILES([Makefile])
53 AC_OUTPUT