-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure.ac
More file actions
126 lines (101 loc) · 2.93 KB
/
configure.ac
File metadata and controls
126 lines (101 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
AC_INIT([font-awesome], [1.5.0], [josh@creativemarket.com], [font-awesome], [https://www.creativemarket.com])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
AX_CHECK_ENABLE_DEBUG([no])
AC_PROG_CXX
AC_PROG_LIBTOOL
AX_COMPILER_VENDOR
LT_INIT([disable-static])
AC_HEADER_STDC
AC_CHECK_HEADERS([string])
AC_CHECK_HEADERS([iostream])
if test "x$ax_enable_debug" != "xyes"; then
AX_APPEND_COMPILE_FLAGS([-O3])
fi
AC_LANG_PUSH([C++])
AX_CXX_CPPFLAGS_STD_LANG(AM_CPPFLAGS)
AX_CXX_CXXFLAGS_STD_LANG(AM_CXXFLAGS)
AX_CXX_LDFLAGS_STD_LANG(AM_LDFLAGS)
AX_CXXFLAGS_WARN_ALL
AC_LANG_POP([C++])
AX_WARNINGS_SANITIZE
AC_CACHE_SAVE
AC_ARG_WITH(icu-config,
[AC_HELP_STRING([--with-icu-config=<FILEPATH>],
[Provide an alternative path to the icu-config tool])],
ICU_CONFIG=$withval,
ICU_CONFIG=""
)
AX_CHECK_ICU([4.2])
#m4_include(m4/icu.m4)
BOOST_REQUIRE([1.40])
BOOST_PROGRAM_OPTIONS
if test "x$ax_enable_debug" == "xyes"; then
BOOST_TEST
fi
# use pkg-config
PKG_PROG_PKG_CONFIG([0.2])
PKG_CHECK_MODULES([libpng], [libpng])
PKG_CHECK_MODULES([freetype2], [freetype2])
PKG_CHECK_MODULES([cairo], [cairo])
#PKG_CHECK_MODULES([icu_cu], [icu-cu])
PKG_CHECK_MODULES([harfbuzz], [harfbuzz])
PKG_CHECK_MODULES([harfbuzz_icu], [harfbuzz-icu])
AC_ARG_WITH(jpeg,
[AC_HELP_STRING([--with-jpeg=<DIR>],
[Provide an alternative path to the libJPEG library directory])],
libjpeg_libdir=$withval,
libjpeg_libdir=""
)
# Check for -ljpeg
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
jpeg_ok=yes, jpeg_ok=no
AC_MSG_ERROR([JPEG library (libjpeg) not found]))
if test "$jpeg_ok" = yes; then
AC_MSG_CHECKING([for jpeglib])
AC_TRY_CPP(
[#include <stdio.h>
#undef PACKAGE
#undef VERSION
#undef HAVE_STDLIB_H
#include <jpeglib.h>],
jpeg_ok=yes,
jpeg_ok=no)
AC_MSG_RESULT($jpeg_ok)
if test "$jpeg_ok" = yes; then
JPEG_LIBS="-ljpeg"
# should we check for progressive JPEG like GTK+ as well?
else
AC_MSG_ERROR([JPEG library (libjpeg) not found])
fi
fi
AC_SUBST([JPEG_LIBS])
# gcov support (for code coverage reports)
AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
AC_MSG_CHECKING([whether to build with gcov testing])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING([--enable-gcov],
[Whether to enable coverage testing (requires gcc and gcov)])],
[],
[enable_gcov=no])
AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
[
GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
GCOV_LDFLAGS="-lgcov"
]
)
AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
AM_CONDITIONAL([TESTS_ENABLED], [test "x$ax_enable_debug" = "xyes"])
AC_SUBST([GCOV_CFLAGS])
AC_SUBST([GCOV_LDFLAGS])
AC_MSG_RESULT([$enable_gcov])
AC_CONFIG_FILES([
Makefile
version.h
src/Makefile
])
if test "x$ax_enable_debug" = "xyes"; then
AC_CONFIG_FILES([tests/Makefile])
fi
AC_OUTPUT