-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
258 lines (202 loc) · 7.89 KB
/
configure.ac
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# get rid of that stupid cache mechanism
rm -f config.cache
ENS_VERSION([0], [0], [23], [1])
AC_INIT([egueb], [v_ver], [[email protected]])
AC_PREREQ([2.60])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
## Add parameters for aclocal (keep in sync with Makefile.am)
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
# compiler
AC_PROG_CC
AC_PROG_CXX
AM_INIT_AUTOMAKE([foreign 1.6 dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_PREREQ([2.2])
LT_INIT([win32-dll])
version_info="lt_cur:lt_rev:lt_age"
AC_SUBST([version_info])
AC_DEFINE_UNQUOTED([VERSION_MAJOR], [v_maj], [Major version])
AC_DEFINE_UNQUOTED([VERSION_MINOR], [v_min], [Minor version])
AC_DEFINE_UNQUOTED([VERSION_MICRO], [v_mic], [Micro version])
VMAJ=v_maj
AC_SUBST([VMAJ])
### Needed information
EINA_VERSION="1.0.99"
ENESIM_VERSION="0.0.18"
ENDER_VERSION="0.0.8"
AC_CANONICAL_HOST
egueb_dom_requirements="enesim >= ${ENESIM_VERSION} ender >= ${ENDER_VERSION} eina >= ${EINA_VERSION}"
egueb_dom_requirements_private=""
egueb_css_requirements="eina >= ${EINA_VERSION} ${egueb_dom_requirements}"
egueb_css_requirements_private=""
egueb_smil_requirements="${egueb_dom_requirements}"
egueb_svg_requirements="${egueb_dom_requirements}"
egueb_xlink_requirements="${egueb_dom_requirements}"
AC_SUBST([egueb_css_requirements])
AC_SUBST([egueb_css_requirements_private])
AC_SUBST([egueb_dom_requirements])
AC_SUBST([egueb_dom_requirements_private])
AC_SUBST([egueb_smil_requirements])
AC_SUBST([egueb_svg_requirements])
AC_SUBST([egueb_xlink_requirements])
### Additional options to configure
AC_ARG_ENABLE([egueb_dom],
[AS_HELP_STRING([--enable-egueb_dom], [enable Edom compilation.])],
[if test "x${enableval}" = "xyes"; then
want_egueb_dom="yes"
else
want_egueb_dom="no"
fi
],
[want_egueb_dom="yes"])
AM_CONDITIONAL([WANT_EGUEB_DOM], [test "x${want_egueb_dom}" = "xyes"])
AC_ARG_ENABLE([egueb_css],
[AS_HELP_STRING([--enable-egueb_css], [enable Ecss compilation.])],
[if test "x${enableval}" = "xyes"; then
want_egueb_css="yes"
else
want_egueb_css="no"
fi
],
[want_egueb_css="yes"])
AM_CONDITIONAL([WANT_EGUEB_CSS], [test "x${want_egueb_css}" = "xyes"])
AC_ARG_ENABLE([egueb_xlink],
[AS_HELP_STRING([--enable-egueb_xlink], [enable Exlink compilation.])],
[if test "x${enableval}" = "xyes"; then
want_egueb_xlink="yes"
else
want_egueb_xlink="no"
fi
],
[want_egueb_xlink="yes"])
AM_CONDITIONAL([WANT_EGUEB_XLINK], [test "x${want_egueb_xlink}" = "xyes"])
AC_ARG_ENABLE([egueb_smil],
[AS_HELP_STRING([--enable-egueb_smil], [enable Esmil compilation.])],
[if test "x${enableval}" = "xyes"; then
want_egueb_smil="yes"
else
want_egueb_smil="no"
fi
],
[want_egueb_smil="yes"])
AM_CONDITIONAL([WANT_EGUEB_SMIL], [test "x${want_egueb_smil}" = "xyes"])
AC_ARG_ENABLE([egueb_svg],
[AS_HELP_STRING([--enable-egueb_svg], [enable Esvg compilation.])],
[if test "x${enableval}" = "xyes"; then
want_egueb_svg="yes"
else
want_egueb_svg="no"
fi
],
[want_egueb_svg="yes"])
AM_CONDITIONAL([WANT_EGUEB_SVG], [test "x${want_egueb_svg}" = "xyes"])
### Checks for programs
# pkg-config
PKG_PROG_PKG_CONFIG
# Check whether pkg-config supports Requires.private
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
AC_MSG_ERROR([pkg-config >= 0.22 is required])
fi
ENESIM_MODULE_IMAGE_DIR=`${PKG_CONFIG} --variable=moduleimagedir enesim`
AC_SUBST([ENESIM_MODULE_IMAGE_DIR])
# flex (egueb_css dep)
if test "x${want_egueb_css}" = "xyes" ; then
AM_PROG_LEX
if test "x$ac_cv_prog_LEX" = "x"; then
AC_MSG_WARN([Cannot find flex, Ecss compilation disabled])
want_egueb_css="no"
fi
fi
# yacc (egueb_css dep)
if test "x${want_egueb_css}" = "xyes" ; then
AC_PROG_YACC
if test "x$ac_cv_prog_YACC" = "x"; then
AC_MSG_WARN([Cannot find bison, Ecss compilation disabled])
want_egueb_css="no"
fi
fi
# doxygen program for documentation building
ENS_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
### Checks for libraries
if test "x${want_egueb_dom}" = "xyes" ; then
PKG_CHECK_MODULES([EGUEB_DOM], [${egueb_dom_requirements} ${egueb_dom_requirements_private}], [want_egueb_dom="yes"], [want_egueb_dom="no"])
# Check the eina version
PKG_CHECK_EXISTS([eina >= 1.8], [AC_DEFINE([EINA_POST_1_8_0], [1], [Eina supports doctype child])])
fi
if test "x${want_egueb_css}" = "xyes" && test "x${want_egueb_dom}" = "xyes" ; then
PKG_CHECK_MODULES([EGUEB_CSS], [${egueb_css_requirements}], [want_egueb_css="yes"], [want_egueb_css="no"])
fi
if test "x${want_egueb_xlink}" = "xyes" && test "x${want_egueb_dom}" = "xyes" ; then
PKG_CHECK_MODULES([EGUEB_XLINK], [${egueb_xlink_requirements}], [want_egueb_xlink="yes"], [want_egueb_xlink="no"])
fi
if test "x${want_egueb_smil}" = "xyes" && test "x${want_egueb_dom}" = "xyes" ; then
PKG_CHECK_MODULES([EGUEB_SMIL], [${egueb_smil_requirements}], [want_egueb_smil="yes"], [want_egueb_smil="no"])
fi
if test "x${want_egueb_svg}" = "xyes" && test "x${want_egueb_css}" = "xyes" && test "x${want_egueb_dom}" = "xyes" && test "x${want_egueb_smil}" = "xyes" ; then
PKG_CHECK_MODULES([EGUEB_SVG], [${egueb_svg_requirements}], [want_egueb_svg="yes"], [want_egueb_svg="no"])
fi
# For Dom test
AM_CONDITIONAL(BUILD_EGUEB_DOM, [test "x${want_egueb_dom}" = "xyes"])
AM_CONDITIONAL(BUILD_EGUEB_CSS, [test "x${want_egueb_css}" = "xyes"])
AM_CONDITIONAL(BUILD_EGUEB_XLINK, [test "x${want_egueb_xlink}" = "xyes"])
AM_CONDITIONAL(BUILD_EGUEB_SMIL, [test "x${want_egueb_smil}" = "xyes"])
AM_CONDITIONAL(BUILD_EGUEB_SVG, [test "x${want_egueb_svg}" = "xyes"])
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
AM_PROG_CC_C_O
AC_C_BIGENDIAN
ENS_CHECK_COMPILER_FLAGS([EGUEB], [-Wall])
EGUEB_DOM_CFLAGS="${EGUEB_DOM_CFLAGS} ${EGUEB_CFLAGS}"
EGUEB_CSS_CFLAGS="${EGUEB_CSS_CFLAGS} ${EGUEB_CFLAGS}"
EGUEB_XLINK_CFLAGS="${EGUEB_XLINK_CFLAGS} ${EGUEB_CFLAGS}"
EGUEB_SMIL_CFLAGS="${EGUEB_SMIL_CFLAGS} ${EGUEB_CFLAGS}"
EGUEB_SVG_CFLAGS="${EGUEB_SVG_CFLAGS} ${EGUEB_CFLAGS}"
### Checks for linker characteristics
### Checks for library functions
# Check where the ender data should be installed
ENS_CHECK_ENDER([enable_ender="yes"], [enable_ender="no"])
# Unit tests, coverage and benchmarking
ENS_CHECK_COVERAGE(yes, [enable_coverage="yes"], [enable_coverage="no"])
ENS_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
## Make the debug preprocessor configurable
AC_CONFIG_FILES([
Makefile
common/doc/Doxyfile_common
doc/Doxyfile
])
AC_OUTPUT
#####################################################################
## Info
echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo
echo "Configuration Options Summary:"
echo
echo "DOM support.................................: ${want_egueb_dom}"
echo "CSS support.................................: ${want_egueb_css}"
echo "XLINK support...............................: ${want_egueb_xlink}"
echo "SMIL support................................: ${want_egueb_smil}"
echo "SVG support.................................: ${want_egueb_svg}"
echo
echo "Compilation.................................: make (or gmake)"
echo " CPPFLAGS..................................: $CPPFLAGS"
echo " CFLAGS....................................: $CFLAGS"
echo " LDFLAGS...................................: $LDFLAGS"
echo
echo "Installation................................: make install (as root if needed, with 'su' or 'sudo')"
echo " prefix....................................: $prefix"
echo
echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE,"
echo "and then afterwards as root (or the user who will install this), type"
echo "'make install'. Change users with 'su' or 'sudo' appropriately."
echo