File: configure.ac

package info (click to toggle)
swfmill 0.3.6-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 10,168 kB
  • sloc: xml: 147,618; cpp: 15,148; sh: 4,832; ansic: 427; makefile: 386
file content (121 lines) | stat: -rwxr-xr-x 2,513 bytes parent folder | download
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
AC_PREREQ(2.54)

AC_INIT(swfmill, m4_esyscmd([ git describe | tr -d '\n' ]))
AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests])

AC_CONFIG_MACRO_DIR([autoconfig/m4])

LT_INIT


# Checks for programs.
AC_PROG_CXX
AC_PROG_SED
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG
AM_PROG_CC_C_O
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_PATH_PROG([MTASC], [mtasc])

if test "x${XSLTPROC}" == "x"; then
	AC_MSG_ERROR([Please install xsltproc before trying to build swfmill])
fi


# Checks for C++11 support.
AX_CXX_COMPILE_STDCXX(11, noext)


# Enable most reasonable warnings.
AX_CFLAGS_WARN_ALL
AX_CXXFLAGS_WARN_ALL


# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h])


# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T


# Set flags if we're on Windows or Mac OS X, since we have some specific
# hard-coded behaviour for those platforms.
echo $host_os | $GREP mingw > /dev/null && IS_WINDOWS=yes
echo $host_os | $GREP darwin > /dev/null && IS_OSX=yes
AM_CONDITIONAL(IS_WINDOWS, [ test $IS_WINDOWS ])
AM_CONDITIONAL(IS_OSX, [ test $IS_OSX ])


# Checks for libraries

AM_ICONV
AC_SUBST(ICONV_CONST)

if test $IS_OSX; then
	test $XML_CFLAGS || XML_CFLAGS=-I/usr/include/libxml2
	test $XML_LIBS || XML_LIBS=-lxml2
else
	PKG_CHECK_MODULES(XML, libxml-2.0)
fi
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)

if test $IS_OSX; then
	test $XSLT_CFLAGS || XSLT_CFLAGS=-I/usr/include/libxml2
	test $XSLT_LIBS || XSLT_LIBS="-lxslt -lxml2"
else
	PKG_CHECK_MODULES(XSLT, libxslt)
fi
AC_SUBST(XSLT_CFLAGS)
AC_SUBST(XSLT_LIBS)

if test $IS_OSX; then
	test $EXSLT_CFLAGS || EXSLT_CFLAGS=-I/usr/include/libxml2
	test $EXSLT_LIBS || EXSLT_LIBS="-lexslt -lxslt -lxml2"
else
	PKG_CHECK_MODULES(EXSLT, libexslt)
fi
AC_SUBST(EXSLT_CFLAGS)
AC_SUBST(EXSLT_LIBS)

PKG_CHECK_MODULES(FREETYPE, freetype2)
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)

PKG_CHECK_MODULES(PNG, libpng)
AC_SUBST(PNG_CFLAGS)
AC_SUBST(PNG_LIBS)

PKG_CHECK_MODULES(ZLIB, zlib)
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)


# Checks for library functions.
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor memset pow sqrt strcasecmp strdup strrchr])


AC_OUTPUT([
	Makefile
	src/Makefile
	test/Makefile
	test/compile-and-verify/Makefile
	test/transform-and-verify/Makefile
	test/xml-swf-round-trip/Makefile
	test/old/Makefile
	])