aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/eina/m4/common/efl_attribute.m456
-rw-r--r--libraries/eina/m4/common/efl_benchmark.m433
-rw-r--r--libraries/eina/m4/common/efl_compiler_flag.m457
-rw-r--r--libraries/eina/m4/common/efl_coverage.m462
-rw-r--r--libraries/eina/m4/common/efl_cpu.m4341
-rw-r--r--libraries/eina/m4/common/efl_doxygen.m494
-rw-r--r--libraries/eina/m4/common/efl_examples.m463
-rw-r--r--libraries/eina/m4/common/efl_fnmatch.m431
-rw-r--r--libraries/eina/m4/common/efl_path_max.m436
-rw-r--r--libraries/eina/m4/common/efl_tests.m443
-rw-r--r--libraries/eina/m4/common/efl_threads.m4219
-rw-r--r--libraries/eina/m4/common/efl_voltron.m493
-rw-r--r--libraries/eina/m4/eina/eina_bench.m431
-rw-r--r--libraries/eina/m4/eina/eina_check.m448
14 files changed, 1207 insertions, 0 deletions
diff --git a/libraries/eina/m4/common/efl_attribute.m4 b/libraries/eina/m4/common/efl_attribute.m4
new file mode 100644
index 0000000..78bff15
--- /dev/null
+++ b/libraries/eina/m4/common/efl_attribute.m4
@@ -0,0 +1,56 @@
1dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macros for checking if the compiler supports some __attribute__ uses
5
6dnl Usage: EFL_ATTRIBUTE_UNUSED
7dnl call AC_DEFINE for __UNUSED__ if __attribute__((unused)) is available
8
9AC_DEFUN([EFL_ATTRIBUTE_UNUSED],
10[
11AC_MSG_CHECKING([for __attribute__ ((unused))])
12AC_COMPILE_IFELSE(
13 [AC_LANG_PROGRAM(
14 [[
15void foo(int x __attribute__ ((unused))) {}
16 ]],
17 [[
18 ]])],
19 [have_attribute_unused="yes"],
20 [have_attribute_unused="no"])
21AC_MSG_RESULT([${have_attribute_unused}])
22
23if test "x${have_attribute_unused}" = "xyes" ; then
24 AC_DEFINE([__UNUSED__], [__attribute__ ((unused))], [Macro declaring a function argument to be unused.])
25else
26 AC_DEFINE([__UNUSED__], [], [__attribute__ ((unused)) is not supported.])
27fi
28])
29
30dnl Usage: EFL_ATTRIBUTE_VECTOR
31dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available
32
33AC_DEFUN([EFL_ATTRIBUTE_VECTOR],
34[
35AC_MSG_CHECKING([for __attribute__ ((vector))])
36AC_COMPILE_IFELSE(
37 [AC_LANG_PROGRAM(
38 [[
39typedef int v4si __attribute__ ((vector_size (16)));
40 ]],
41 [[
42if (sizeof(v4si) == 16)
43 return 0;
44else
45 return -1;
46 ]])],
47 [have_attribute_vector="yes"],
48 [have_attribute_vector="no"])
49AC_MSG_RESULT([${have_attribute_vector}])
50
51if test "x${have_attribute_vector}" = "xyes" ; then
52 AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).])
53fi
54])
55
56dnl End of efl_attribute.m4
diff --git a/libraries/eina/m4/common/efl_benchmark.m4 b/libraries/eina/m4/common/efl_benchmark.m4
new file mode 100644
index 0000000..1d1e22e
--- /dev/null
+++ b/libraries/eina/m4/common/efl_benchmark.m4
@@ -0,0 +1,33 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if benchmark support is wanted.
5
6dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK
8
9AC_DEFUN([EFL_CHECK_BENCHMARK],
10[
11
12dnl configure option
13
14AC_ARG_ENABLE([benchmark],
15 [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_benchmark="yes"
19 else
20 _efl_enable_benchmark="no"
21 fi
22 ],
23 [_efl_enable_benchmark="no"])
24
25AC_MSG_CHECKING([whether benchmark are built])
26AC_MSG_RESULT([${_efl_enable_benchmark}])
27
28AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes")
29
30AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2])
31])
32
33dnl End of efl_benchmark.m4
diff --git a/libraries/eina/m4/common/efl_compiler_flag.m4 b/libraries/eina/m4/common/efl_compiler_flag.m4
new file mode 100644
index 0000000..25c285d
--- /dev/null
+++ b/libraries/eina/m4/common/efl_compiler_flag.m4
@@ -0,0 +1,57 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com>
3dnl That code is public domain and can be freely used or copied.
4
5dnl Macro that checks if a compiler flag is supported by the compiler.
6
7dnl Usage: EFL_COMPILER_FLAG(flag)
8dnl flag is added to CFLAGS if supported.
9
10AC_DEFUN([EFL_COMPILER_FLAG],
11[
12
13CFLAGS_save="${CFLAGS}"
14CFLAGS="${CFLAGS} $1"
15
16AC_LANG_PUSH([C])
17AC_MSG_CHECKING([whether the compiler supports $1])
18
19AC_COMPILE_IFELSE(
20 [AC_LANG_PROGRAM([[]])],
21 [have_flag="yes"],
22 [have_flag="no"])
23AC_MSG_RESULT([${have_flag}])
24
25if test "x${have_flag}" = "xno" ; then
26 CFLAGS="${CFLAGS_save}"
27fi
28AC_LANG_POP([C])
29
30])
31
32dnl Macro that checks if a linker flag is supported by the compiler.
33
34dnl Usage: EFL_LINKER_FLAG(flag)
35dnl flag is added to LDFLAGS if supported (will be passed to ld anyway).
36
37AC_DEFUN([EFL_LINKER_FLAG],
38[
39
40LDFLAGS_save="${LDFLAGS}"
41LDFLAGS="${LDFLAGS} $1"
42
43AC_LANG_PUSH([C])
44AC_MSG_CHECKING([whether the compiler supports $1])
45
46AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([[]])],
48 [have_flag="yes"],
49 [have_flag="no"])
50AC_MSG_RESULT([${have_flag}])
51
52if test "x${have_flag}" = "xno" ; then
53 LDFLAGS="${LDFLAGS_save}"
54fi
55AC_LANG_POP([C])
56
57])
diff --git a/libraries/eina/m4/common/efl_coverage.m4 b/libraries/eina/m4/common/efl_coverage.m4
new file mode 100644
index 0000000..85d0321
--- /dev/null
+++ b/libraries/eina/m4/common/efl_coverage.m4
@@ -0,0 +1,62 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if coverage support is wanted and, if yes, if
5dnl lcov is available.
6
7dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
9dnl the dependency is available.
10dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
11dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
12
13AC_DEFUN([EFL_CHECK_COVERAGE],
14[
15
16dnl configure option
17
18AC_ARG_ENABLE([coverage],
19 [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])],
20 [
21 if test "x${enableval}" = "xyes" ; then
22 _efl_enable_coverage="yes"
23 else
24 _efl_enable_coverage="no"
25 fi
26 ],
27 [_efl_enable_coverage="no"])
28
29AC_MSG_CHECKING([whether to use profiling instrumentation])
30AC_MSG_RESULT([$_efl_enable_coverage])
31
32dnl lcov check
33
34if test "x$_efl_enable_coverage" = "xyes" && test ! "x$1" = "xyes" ; then
35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no"
38fi
39
40if test "x$_efl_enable_coverage" = "xyes" ; then
41 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
42 if test "x$have_lcov" = "xyes" ; then
43 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
44 EFL_COVERAGE_LIBS="-lgcov"
45# remove any optimisation flag and force debug symbols
46 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
47 else
48 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
49 _efl_enable_coverage="no"
50 fi
51fi
52
53dnl Substitution
54AC_SUBST(EFL_COVERAGE_CFLAGS)
55AC_SUBST(EFL_COVERAGE_LIBS)
56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58
59AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
60])
61
62dnl End of efl_coverage.m4
diff --git a/libraries/eina/m4/common/efl_cpu.m4 b/libraries/eina/m4/common/efl_cpu.m4
new file mode 100644
index 0000000..8fa6cd7
--- /dev/null
+++ b/libraries/eina/m4/common/efl_cpu.m4
@@ -0,0 +1,341 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if several ASM instruction sets are available or not.
5
6dnl Usage: EFL_CHECK_CPU_MMX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Add -mmmx to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS)
8dnl Define EFL_HAVE_MMX
9
10AC_DEFUN([EFL_CHECK_CPU_MMX],
11[
12dnl configure option
13
14AC_ARG_ENABLE([cpu-mmx],
15 [AC_HELP_STRING([--disable-cpu-mmx], [disable mmx code @<:@default=enabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_cpu_mmx="yes"
19 else
20 _efl_enable_cpu_mmx="no"
21 fi
22 ],
23 [_efl_enable_cpu_mmx="yes"])
24
25AC_MSG_CHECKING([whether to build mmx code])
26AC_MSG_RESULT([${_efl_enable_cpu_mmx}])
27
28dnl check if the CPU is supporting MMX instruction sets
29
30_efl_build_cpu_mmx="no"
31if test "x${_efl_enable_cpu_mmx}" = "xyes" ; then
32 case $host_cpu in
33 i*86 | x86_64 | amd64)
34 _efl_build_cpu_mmx="yes"
35 ;;
36 esac
37fi
38
39AC_MSG_CHECKING([whether mmx instructions set is available])
40AC_MSG_RESULT([${_efl_build_cpu_mmx}])
41
42dnl check if the compiler supports -mmmx
43
44if test "x${_efl_build_cpu_mmx}" = "xyes" ; then
45 SAVE_CFLAGS=${CFLAGS}
46 CFLAGS="-mmmx"
47 AC_LANG_PUSH([C])
48
49 AC_COMPILE_IFELSE(
50 [AC_LANG_PROGRAM([[]],
51 [[]])],
52 [
53 have_linker_option="yes"
54 EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -mmmx"],
55 [have_linker_option="no"])
56
57 AC_LANG_POP([C])
58 CFLAGS=${SAVE_CFLAGS}
59
60 AC_MSG_CHECKING([whether mmx linker option is supported])
61 AC_MSG_RESULT([${have_linker_option}])
62fi
63
64AC_SUBST(EFL_SIMD_FLAGS)
65
66if test "x${_efl_build_cpu_mmx}" = "xyes" ; then
67 AC_DEFINE([EFL_HAVE_MMX], [1], [Define to mention that MMX is supported])
68fi
69
70AS_IF([test "x$_efl_build_cpu_mmx" = "xyes"], [$1], [$2])
71])
72
73dnl Usage: EFL_CHECK_CPU_SSE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
74dnl Add -msse to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS)
75dnl Define EFL_HAVE_SSE
76
77AC_DEFUN([EFL_CHECK_CPU_SSE],
78[
79dnl configure option
80
81AC_ARG_ENABLE([cpu-sse],
82 [AC_HELP_STRING([--disable-cpu-sse], [disable sse code @<:@default=enabled@:>@])],
83 [
84 if test "x${enableval}" = "xyes" ; then
85 _efl_enable_cpu_sse="yes"
86 else
87 _efl_enable_cpu_sse="no"
88 fi
89 ],
90 [_efl_enable_cpu_sse="yes"])
91
92AC_MSG_CHECKING([whether to build sse code])
93AC_MSG_RESULT([${_efl_enable_cpu_sse}])
94
95dnl check if the CPU is supporting SSE instruction sets
96
97_efl_build_cpu_sse="no"
98if test "x${_efl_enable_cpu_sse}" = "xyes" ; then
99 case $host_cpu in
100 i*86 | x86_64 | amd64)
101 _efl_build_cpu_sse="yes"
102 ;;
103 esac
104fi
105
106AC_MSG_CHECKING([whether sse instructions set is available])
107AC_MSG_RESULT([${_efl_build_cpu_sse}])
108
109dnl check if the compiler supports -msse
110
111if test "x${_efl_build_cpu_sse}" = "xyes" ; then
112 SAVE_CFLAGS=${CFLAGS}
113 CFLAGS="-msse"
114 AC_LANG_PUSH([C])
115
116 AC_COMPILE_IFELSE(
117 [AC_LANG_PROGRAM([[]],
118 [[]])
119 ],
120 [
121 have_linker_option="yes"
122 EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse"
123 ],
124 [have_linker_option="no"])
125
126 AC_LANG_POP([C])
127 CFLAGS=${SAVE_CFLAGS}
128
129 AC_MSG_CHECKING([whether sse linker option is supported])
130 AC_MSG_RESULT([${have_linker_option}])
131fi
132
133AC_SUBST(EFL_SIMD_FLAGS)
134
135if test "x${_efl_build_cpu_sse}" = "xyes" ; then
136 AC_DEFINE([EFL_HAVE_SSE], [1], [Define to mention that SSE is supported])
137fi
138
139AS_IF([test "x$_efl_build_cpu_sse" = "xyes"], [$1], [$2])
140])
141
142dnl Usage: EFL_CHECK_CPU_SSE2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
143dnl Add -msse2 to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS)
144dnl Define EFL_HAVE_SSE2
145
146AC_DEFUN([EFL_CHECK_CPU_SSE2],
147[
148
149dnl configure option
150
151AC_ARG_ENABLE([cpu-sse2],
152 [AC_HELP_STRING([--disable-cpu-sse2], [disable sse2 code @<:@default=enabled@:>@])],
153 [
154 if test "x${enableval}" = "xyes" ; then
155 _efl_enable_cpu_sse2="yes"
156 else
157 _efl_enable_cpu_sse2="no"
158 fi
159 ],
160 [_efl_enable_cpu_sse2="yes"])
161
162AC_MSG_CHECKING([whether to build sse2 code])
163AC_MSG_RESULT([${_efl_enable_cpu_sse2}])
164
165dnl check if the CPU is supporting SSE2 instruction sets
166
167_efl_build_cpu_sse2="no"
168if test "x${_efl_enable_cpu_sse2}" = "xyes" ; then
169 case $host_cpu in
170 i*86 | x86_64 | amd64)
171 _efl_build_cpu_sse2="yes"
172 ;;
173 esac
174fi
175
176AC_MSG_CHECKING([whether sse2 instructions set is available])
177AC_MSG_RESULT([${_efl_build_cpu_sse2}])
178
179dnl check if the compiler supports -msse2
180
181if test "x${_efl_build_cpu_sse2}" = "xyes" ; then
182 SAVE_CFLAGS=${CFLAGS}
183 CFLAGS="-msse2"
184 AC_LANG_PUSH([C])
185
186 AC_COMPILE_IFELSE(
187 [AC_LANG_PROGRAM([[]],
188 [[]])
189 ],
190 [
191 have_linker_option="yes"
192 EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} -msse2"
193 ],
194 [have_linker_option="no"])
195
196 AC_LANG_POP([C])
197 CFLAGS=${SAVE_CFLAGS}
198
199 AC_MSG_CHECKING([whether sse2 linker option is supported])
200 AC_MSG_RESULT([${have_linker_option}])
201fi
202
203AC_SUBST(EFL_SIMD_FLAGS)
204
205if test "x${_efl_build_cpu_sse2}" = "xyes" ; then
206 AC_DEFINE([EFL_HAVE_SSE2], [1], [Define to mention that SSE2 is supported])
207fi
208
209AS_IF([test "x$_efl_build_cpu_sse2" = "xyes"], [$1], [$2])
210])
211
212dnl Usage: EFL_CHECK_CPU_ALTIVEC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
213dnl Add -faltivec or -maltivec to EFL_SIMD_FLAGS if the compiler supports it and
214dnl call AC_SUBST(EFL_SIMD_FLAGS)
215dnl Define EFL_HAVE_ALTIVEC
216
217AC_DEFUN([EFL_CHECK_CPU_ALTIVEC],
218[
219
220dnl configure option
221
222AC_ARG_ENABLE([cpu-altivec],
223 [AC_HELP_STRING([--disable-cpu-altivec], [disable altivec code @<:@default=enabled@:>@])],
224 [
225 if test "x${enableval}" = "xyes" ; then
226 _efl_enable_cpu_altivec="yes"
227 else
228 _efl_enable_cpu_altivec="no"
229 fi
230 ],
231 [_efl_enable_cpu_altivec="yes"]
232)
233AC_MSG_CHECKING([whether to build altivec code])
234AC_MSG_RESULT([${_efl_enable_cpu_altivec}])
235
236dnl check if the CPU is supporting ALTIVEC instruction sets
237
238_efl_build_cpu_altivec="no"
239if test "x${_efl_enable_cpu_altivec}" = "xyes" ; then
240 case $host_cpu in
241 *power* | *ppc*)
242 _efl_build_cpu_altivec="yes"
243 ;;
244 esac
245fi
246
247AC_MSG_CHECKING([whether altivec instructions set is available])
248AC_MSG_RESULT([${_efl_build_cpu_altivec}])
249
250dnl check if the compiler supports -faltivec or -maltivec and
251dnl if altivec.h is available.
252
253_efl_have_faltivec="no"
254if test "x${_efl_build_cpu_altivec}" = "xyes" ; then
255 SAVE_CFLAGS=${CFLAGS}
256 CFLAGS="-faltivec"
257 AC_LANG_PUSH([C])
258
259 AC_COMPILE_IFELSE(
260 [AC_LANG_PROGRAM([[
261#include <altivec.h>
262 ]],
263 [[]])],
264 [_efl_have_faltivec="yes"
265 _efl_altivec_flag="-faltivec"],
266 [_efl_have_faltivec="no"])
267
268 if test "x${_efl_have_faltivec}" = "xno" ; then
269 CFLAGS="-maltivec"
270
271 AC_COMPILE_IFELSE(
272 [AC_LANG_PROGRAM([[
273#include <altivec.h>
274 ]],
275 [[]])],
276 [_efl_have_faltivec="yes"
277 _efl_altivec_flag="-maltivec"],
278 [_efl_have_faltivec="no"])
279 fi
280
281 AC_LANG_POP([C])
282 CFLAGS=${SAVE_CFLAGS}
283
284 AC_MSG_CHECKING([whether altivec linker option is supported])
285 AC_MSG_RESULT([${_efl_have_faltivec}])
286fi
287
288EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} ${_efl_altivec_flag}"
289AC_SUBST(EFL_SIMD_FLAGS)
290
291if test "x${_efl_have_faltivec}" = "xyes" ; then
292 AC_DEFINE([EFL_HAVE_ALTIVEC], [1], [Define to mention that ALTIVEC is supported])
293fi
294
295AS_IF([test "x$_efl_have_faltivec" = "xyes"], [$1], [$2])
296])
297
298dnl Usage: EFL_CHECK_CPU_NEON([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
299dnl Add -mneon to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS)
300dnl Define EFL_HAVE_NEON
301
302AC_DEFUN([EFL_CHECK_CPU_NEON],
303[
304dnl configure option
305
306AC_ARG_ENABLE([cpu-neon],
307 [AC_HELP_STRING([--disable-cpu-neon], [disable neon code @<:@default=enabled@:>@])],
308 [
309 if test "x${enableval}" = "xyes" ; then
310 _efl_enable_cpu_neon="yes"
311 else
312 _efl_enable_cpu_neon="no"
313 fi
314 ],
315 [_efl_enable_cpu_neon="yes"])
316
317AC_MSG_CHECKING([whether to build neon code])
318AC_MSG_RESULT([${_efl_enable_cpu_neon}])
319
320dnl check if the CPU is supporting NEON instruction sets
321
322_efl_build_cpu_neon="no"
323if test "x${_efl_enable_cpu_neon}" = "xyes" ; then
324 case $host_cpu in
325 armv7*)
326 _efl_build_cpu_neon="yes"
327 ;;
328 esac
329fi
330
331AC_MSG_CHECKING([whether neon instructions set is available])
332AC_MSG_RESULT([${_efl_build_cpu_neon}])
333
334if test "x${_efl_build_cpu_neon}" = "xyes" ; then
335 AC_DEFINE([EFL_HAVE_NEON], [1], [Define to mention that NEON is supported])
336fi
337
338AS_IF([test "x$_efl_build_cpu_neon" = "xyes"], [$1], [$2])
339])
340
341dnl End of efl_cpu.m4
diff --git a/libraries/eina/m4/common/efl_doxygen.m4 b/libraries/eina/m4/common/efl_doxygen.m4
new file mode 100644
index 0000000..7324af3
--- /dev/null
+++ b/libraries/eina/m4/common/efl_doxygen.m4
@@ -0,0 +1,94 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_ARG_ENABLE([doc],
18 [AC_HELP_STRING(
19 [--disable-doc],
20 [Disable documentation build @<:@default=enabled@:>@])],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_enable_doc="yes"
24 else
25 efl_enable_doc="no"
26 fi
27 ],
28 [efl_enable_doc="yes"])
29
30AC_MSG_CHECKING([whether to build documentation])
31AC_MSG_RESULT([${efl_enable_doc}])
32
33if test "x${efl_enable_doc}" = "xyes" ; then
34
35dnl Specify the file name, without path
36
37 efl_doxygen="doxygen"
38
39 AC_ARG_WITH([doxygen],
40 [AC_HELP_STRING(
41 [--with-doxygen=FILE],
42 [doxygen program to use @<:@default=doxygen@:>@])],
43
44dnl Check the given doxygen program.
45
46 [efl_doxygen=${withval}
47 AC_CHECK_PROG([efl_have_doxygen],
48 [${efl_doxygen}],
49 [yes],
50 [no])
51 if test "x${efl_have_doxygen}" = "xno" ; then
52 echo "WARNING:"
53 echo "The doxygen program you specified:"
54 echo "${efl_doxygen}"
55 echo "was not found. Please check the path and make sure "
56 echo "the program exists and is executable."
57 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
58 fi
59 ],
60 [AC_CHECK_PROG([efl_have_doxygen],
61 [${efl_doxygen}],
62 [yes],
63 [no])
64 if test "x${efl_have_doxygen}" = "xno" ; then
65 echo "WARNING:"
66 echo "The doxygen program was not found in your execute path."
67 echo "You may have doxygen installed somewhere not covered by your path."
68 echo ""
69 echo "If this is the case make sure you have the packages installed, AND"
70 echo "that the doxygen program is in your execute path (see your"
71 echo "shell manual page on setting the \$PATH environment variable), OR"
72 echo "alternatively, specify the program to use with --with-doxygen."
73 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
74 fi
75 ])
76else
77 efl_have_doxygen="no"
78fi
79
80dnl
81dnl Substitution
82dnl
83AC_SUBST([efl_doxygen])
84
85if ! test "x${efl_have_doxygen}" = "xyes" ; then
86 efl_enable_doc="no"
87fi
88
89AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes")
90
91AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2])
92])
93
94dnl End of efl_doxygen.m4
diff --git a/libraries/eina/m4/common/efl_examples.m4 b/libraries/eina/m4/common/efl_examples.m4
new file mode 100644
index 0000000..2a809ad
--- /dev/null
+++ b/libraries/eina/m4/common/efl_examples.m4
@@ -0,0 +1,63 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if building examples is wanted.
5
6dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
8
9AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
10[
11
12dnl configure option
13
14AC_ARG_ENABLE([build-examples],
15 [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_build_examples="yes"
19 else
20 _efl_enable_build_examples="no"
21 fi
22 ],
23 [_efl_enable_build_examples="no"])
24
25AC_MSG_CHECKING([whether examples are built])
26AC_MSG_RESULT([${_efl_enable_build_examples}])
27
28AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
29
30AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
31])
32
33
34dnl Macro that check if installing examples is wanted.
35
36dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
37dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
38
39AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
40[
41
42dnl configure option
43
44AC_ARG_ENABLE([install-examples],
45 [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
46 [
47 if test "x${enableval}" = "xyes" ; then
48 _efl_enable_install_examples="yes"
49 else
50 _efl_enable_install_examples="no"
51 fi
52 ],
53 [_efl_enable_install_examples="no"])
54
55AC_MSG_CHECKING([whether examples are installed])
56AC_MSG_RESULT([${_efl_enable_install_examples}])
57
58AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
59
60AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
61])
62
63dnl End of efl_examples.m4
diff --git a/libraries/eina/m4/common/efl_fnmatch.m4 b/libraries/eina/m4/common/efl_fnmatch.m4
new file mode 100644
index 0000000..a92ac6b
--- /dev/null
+++ b/libraries/eina/m4/common/efl_fnmatch.m4
@@ -0,0 +1,31 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if fnmatch functions are available or not.
5
6dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
8
9AC_DEFUN([EFL_CHECK_FNMATCH],
10[
11
12AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
13
14if test "x${_efl_have_fnmatch}" = "xyes" ; then
15 AC_SEARCH_LIBS([fnmatch],
16 [fnmatch evil iberty],
17 [_efl_have_fnmatch="yes"],
18 [_efl_have_fnmatch="no"])
19fi
20
21EFL_FNMATCH_LIBS=""
22
23if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
24 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
25fi
26
27AC_SUBST(EFL_FNMATCH_LIBS)
28
29AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])
30
31])
diff --git a/libraries/eina/m4/common/efl_path_max.m4 b/libraries/eina/m4/common/efl_path_max.m4
new file mode 100644
index 0000000..f57bfd2
--- /dev/null
+++ b/libraries/eina/m4/common/efl_path_max.m4
@@ -0,0 +1,36 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int i = PATH_MAX;
24 ]])],
25 [AC_MSG_RESULT([yes])],
26 [
27 AC_DEFINE_UNQUOTED([PATH_MAX],
28 [${default_max}],
29 [default value since PATH_MAX is not defined])
30 AC_MSG_RESULT([no: using ${default_max}])
31 ])
32
33AC_LANG_POP([C])
34
35])
36dnl end of efl_path_max.m4
diff --git a/libraries/eina/m4/common/efl_tests.m4 b/libraries/eina/m4/common/efl_tests.m4
new file mode 100644
index 0000000..3a4dfe2
--- /dev/null
+++ b/libraries/eina/m4/common/efl_tests.m4
@@ -0,0 +1,43 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available.
6
7dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Define the automake conditionnal EFL_ENABLE_TESTS
9
10AC_DEFUN([EFL_CHECK_TESTS],
11[
12
13dnl configure option
14
15AC_ARG_ENABLE([tests],
16 [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
17 [
18 if test "x${enableval}" = "xyes" ; then
19 _efl_enable_tests="yes"
20 else
21 _efl_enable_tests="no"
22 fi
23 ],
24 [_efl_enable_tests="no"])
25
26AC_MSG_CHECKING([whether tests are built])
27AC_MSG_RESULT([${_efl_enable_tests}])
28
29AC_REQUIRE([PKG_PROG_PKG_CONFIG])
30
31if test "x${_efl_enable_tests}" = "xyes" ; then
32 PKG_CHECK_MODULES([CHECK],
33 [check >= 0.9.5],
34 [dummy="yes"],
35 [_efl_enable_tests="no"])
36fi
37
38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
39
40AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2])
41])
42
43dnl End of efl_tests.m4
diff --git a/libraries/eina/m4/common/efl_threads.m4 b/libraries/eina/m4/common/efl_threads.m4
new file mode 100644
index 0000000..a761d51
--- /dev/null
+++ b/libraries/eina/m4/common/efl_threads.m4
@@ -0,0 +1,219 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl rwlock code added by Mike Blumenkrantz <mike at zentific dot com>
3dnl This code is public domain and can be freely used or copied.
4
5dnl Macro that check if POSIX or Win32 threads library is available or not.
6
7dnl Usage: EFL_CHECK_THREADS(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
8dnl Call AC_SUBST(EFL_PTHREAD_CFLAGS)
9dnl Call AC_SUBST(EFL_PTHREAD_LIBS)
10dnl Defines EFL_HAVE_POSIX_THREADS or EFL_HAVE_WIN32_THREADS, and EFL_HAVE_THREADS
11
12AC_DEFUN([EFL_CHECK_THREADS],
13[
14
15dnl configure option
16
17AC_ARG_ENABLE([posix-threads],
18 [AC_HELP_STRING([--disable-posix-threads], [enable POSIX threads code @<:@default=auto@:>@])],
19 [
20 if test "x${enableval}" = "xyes" ; then
21 _efl_enable_posix_threads="yes"
22 else
23 _efl_enable_posix_threads="no"
24 fi
25 ],
26 [_efl_enable_posix_threads="auto"])
27
28AC_MSG_CHECKING([whether to build POSIX threads code])
29AC_MSG_RESULT([${_efl_enable_posix_threads}])
30
31AC_ARG_ENABLE([win32-threads],
32 [AC_HELP_STRING([--disable-win32-threads], [enable Win32 threads code @<:@default=no@:>@])],
33 [
34 if test "x${enableval}" = "xyes" ; then
35 _efl_enable_win32_threads="yes"
36 else
37 _efl_enable_win32_threads="no"
38 fi
39 ],
40 [_efl_enable_win32_threads="no"])
41
42AC_MSG_CHECKING([whether to build Windows threads code])
43AC_MSG_RESULT([${_efl_enable_win32_threads}])
44
45dnl
46dnl * no + no
47dnl * yes + no : win32: error, other : pthread
48dnl * yes + yes : win32 : wthread, other : pthread
49dnl * no + yes : win32 : wthread, other : error
50
51if test "x${_efl_enable_posix_threads}" = "xyes" && test "x${_efl_enable_win32_threads}" = "xyes" ; then
52 case "$host_os" in
53 mingw*)
54 _efl_enable_posix_threads=no
55 ;;
56 *)
57 _efl_enable_win32_threads=no
58 ;;
59 esac
60fi
61
62if test "x${_efl_enable_win32_threads}" = "xyes" ; then
63 case "$host_os" in
64 mingw*)
65 ;;
66 *)
67 AC_MSG_ERROR([Win32 threads support requested but non Windows system found.])
68 ;;
69 esac
70fi
71
72if test "x${_efl_enable_posix_threads}" = "xyes" ; then
73 case "$host_os" in
74 mingw*)
75 AC_MSG_ERROR([POSIX threads support requested but Windows system found.])
76 ;;
77 *)
78 ;;
79 esac
80fi
81
82dnl check if the compiler supports POSIX threads
83
84case "$host_os" in
85 mingw*)
86 ;;
87 solaris*)
88 _efl_threads_cflags="-mt"
89 _efl_threads_libs="-mt"
90 ;;
91 *)
92 _efl_threads_cflags="-pthread"
93 _efl_threads_libs="-pthread"
94 ;;
95esac
96
97_efl_have_posix_threads="no"
98_efl_have_win32_threads="no"
99
100if test "x${_efl_enable_posix_threads}" = "xyes" || test "x${_efl_enable_posix_threads}" = "xauto" ; then
101
102 SAVE_CFLAGS=${CFLAGS}
103 CFLAGS="${CFLAGS} ${_efl_threads_cflags}"
104 SAVE_LIBS=${LIBS}
105 LIBS="${LIBS} ${_efl_threads_libs}"
106 AC_LINK_IFELSE(
107 [AC_LANG_PROGRAM([[
108#include <pthread.h>
109 ]],
110 [[
111pthread_t id;
112id = pthread_self();
113 ]])],
114 [_efl_have_posix_threads="yes"],
115 [_efl_have_posix_threads="no"])
116 CFLAGS=${SAVE_CFLAGS}
117 LIBS=${SAVE_LIBS}
118
119fi
120
121AC_MSG_CHECKING([whether system support POSIX threads])
122AC_MSG_RESULT([${_efl_have_posix_threads}])
123if test "$x{_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads}" = "xno"; then
124 AC_MSG_ERROR([POSIX threads support requested but not found.])
125fi
126
127EFL_PTHREAD_CFLAGS=""
128EFL_PTHREAD_LIBS=""
129if test "x${_efl_have_posix_threads}" = "xyes" ; then
130 EFL_PTHREAD_CFLAGS=${_efl_threads_cflags}
131 EFL_PTHREAD_LIBS=${_efl_threads_libs}
132fi
133
134AC_SUBST(EFL_PTHREAD_CFLAGS)
135AC_SUBST(EFL_PTHREAD_LIBS)
136
137_efl_enable_on_off_threads="no"
138AC_ARG_ENABLE([on-off-threads],
139 [AC_HELP_STRING([--enable-on-off-threads], [only turn this on if you know what you are doing, and don't complain if the world freeze])],
140 [_efl_enable_on_off_threads="${enableval}"])
141
142have_on_off_threads="no"
143if test "x${_efl_enable_on_off_threads}" = "xyes"; then
144 have_on_off_threads="yes"
145 AC_DEFINE([EFL_ON_OFF_THREADS], [1], [make it possible to disable all locks])
146fi
147AC_MSG_CHECKING([whether to turn on/off threads lock on demand])
148AC_MSG_RESULT([${_efl_enable_on_off_threads}])
149
150_efl_enable_debug_threads="no"
151AC_ARG_ENABLE([debug-threads],
152 [AC_HELP_STRING([--enable-debug-threads], [disable assert when you forgot to call eina_threads_init])],
153 [_efl_enable_debug_threads="${enableval}"])
154
155have_debug_threads="no"
156if test "x${_efl_have_posix_threads}" = "xyes" -a "x${_efl_enable_debug_threads}" = "xyes"; then
157 have_debug_threads="yes"
158 AC_DEFINE([EFL_DEBUG_THREADS], [1], [Assert when forgot to call eina_threads_init])
159fi
160
161if test "x${_efl_have_posix_threads}" = "xyes" ; then
162 AC_DEFINE([EFL_HAVE_POSIX_THREADS], [1], [Define to mention that POSIX threads are supported])
163fi
164
165if test "x${_efl_enable_win32_threads}" = "xyes" ; then
166 _efl_have_win32_threads="yes"
167 AC_DEFINE([EFL_HAVE_WIN32_THREADS], [1], [Define to mention that Win32 threads are supported])
168fi
169
170if test "x${_efl_have_posix_threads}" = "xyes" || test "x${_efl_have_win32_threads}" = "xyes" ; then
171 AC_DEFINE([EFL_HAVE_THREADS], [1], [Define to mention that POSIX or Win32 threads are supported])
172fi
173
174AS_IF([test "x$_efl_have_posix_threads" = "xyes" || test "x$_efl_have_win32_threads" = "xyes"], [$1], [$2])
175])
176
177dnl Usage: EFL_CHECK_SPINLOCK(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
178dnl Defines EFL_HAVE_POSIX_THREADS_SPINLOCK
179AC_DEFUN([EFL_CHECK_SPINLOCK],
180[
181
182dnl check if the compiler supports pthreads spinlock
183
184_efl_have_posix_threads_spinlock="no"
185
186if test "x${_efl_have_posix_threads}" = "xyes" ; then
187
188 SAVE_CFLAGS=${CFLAGS}
189 CFLAGS="${CFLAGS} ${EFL_PTHREAD_CFLAGS}"
190 SAVE_LIBS=${LIBS}
191 LIBS="${LIBS} ${EFL_PTHREAD_LIBS}"
192 AC_LINK_IFELSE(
193 [AC_LANG_PROGRAM([[
194#include <pthread.h>
195 ]],
196 [[
197pthread_spinlock_t lock;
198int res;
199res = pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE);
200 ]])],
201 [_efl_have_posix_threads_spinlock="yes"],
202 [_efl_have_posix_threads_spinlock="no"])
203 CFLAGS=${SAVE_CFLAGS}
204 LIBS=${SAVE_LIBS}
205
206fi
207
208AC_MSG_CHECKING([whether to build POSIX threads spinlock code])
209AC_MSG_RESULT([${_efl_have_posix_threads_spinlock}])
210if test "x${_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads_spinlock}" = "xno" ; then
211 AC_MSG_WARN([POSIX threads support requested but spinlocks are not supported])
212fi
213
214if test "x${_efl_have_posix_threads_spinlock}" = "xyes" ; then
215 AC_DEFINE([EFL_HAVE_POSIX_THREADS_SPINLOCK], [1], [Define to mention that POSIX threads spinlocks are supported])
216fi
217AS_IF([test "x$_efl_have_posix_threads_spinlock" = "xyes"], [$1], [$2])
218])
219
diff --git a/libraries/eina/m4/common/efl_voltron.m4 b/libraries/eina/m4/common/efl_voltron.m4
new file mode 100644
index 0000000..43b334e
--- /dev/null
+++ b/libraries/eina/m4/common/efl_voltron.m4
@@ -0,0 +1,93 @@
1dnl EFL_FORM_VOLTRON
2dnl Outputs ascii art of Voltron if terminal has enough columns
3dnl
4dnl ascii art was found at http://www.codeismylife.com/ascii_voltron/5239.html
5dnl and is the work of its original author.
6
7AC_DEFUN([EFL_FORM_VOLTRON],
8[
9AC_ARG_ENABLE([voltron],
10 [AC_HELP_STRING([--enable-voltron], [enable forming of voltron when all files combine @<:@default=no@:>@])],
11 [
12 if test "x${enableval}" = "xyes" ; then
13 have_voltron="yes"
14 else
15 have_voltron="no"
16 fi
17 ],
18 [have_voltron="no"]
19)
20
21 if test "x$have_voltron" = "xyes" -a "x$do_amalgamation" = "xyes" -o "x${have_on_off_threads}" = "xyes"; then
22 echo "//////////////////////////////////////////////////////////////////////////////////////////////////////////////////"
23 echo "/////////////////////////////////////////////////////////////////////////////////////{#///////////////////////////"
24 echo "/////////////////////////////////////////////////////////////////////////////////// EN3 xx&HWx////////////////////"
25 echo "////////////////////////////////////////////////#{//xd3:& \/{:x////////////////////#WJNd_ HHNp#///////////////////"
26 echo "///////////////////////////////////////////////\x WDMMM EDDzEQp&^x ^^_x #///////////&37z^xHHH7_///////////////////"
27 echo "////////////////////////////////////////////////xPMMMMM LMMMLQQzzQDzH\{xx\{////////{x&H9@^&d^ {//////////////////"
28 echo "///////////////////////////////////////////^JLE:PMMMQ9N^EDMMMMMMMLzJJ^ @&dx////////#dHdN^x{/{x {//////////////////"
29 echo "//////////////////////////////////////////#LMMM EEE7p@H@NE777QMMMMMMM3H3_x/////////^HH3W^pH@x x///////////////////"
30 echo "//////////////////////////////////////////#MMLN_^: {/:L&\{:@7EWWWzMMM3H3_x////{:x ^3dd3 HHNENd^{//////////////////"
31 echo "//////////////////////////////////////////#WW7N^//////7Q:////{xHE93H3^^_ #////{H3H3JDdxx&H3Wz3:///////////////////"
32 echo "//////////////////////////////////////////_E93 ///////{^#/#{{{{{{#x37dx77x////{Hp3pd _ xx_7H////////////////////"
33 echo "#/////////////////////////////////////////#&MHd{////////#x^ ^&__ xxzMJH9P ////{xx\#\:x\:d@_://///////////////////"
34 echo "3H #///////////////////////////////////////{pp^Jpx{///{ &&__^:{{:xxxx7MQNWpx///@x//{# xxx#///////////////////////#"
35 echo "3HN7Hx{//////////////////////////////////////\xd NQd#x \# &x{/x3pHHH&#&PP&@zNxx##:{////////////////////////////{ ^"
36 echo "HH{@37N_x{////////////////////////////////////x_//#zDxx x //# ^x#//#E9_P&p://////////////////////////////{\&:\\"
37 echo "H@/JMJ799H_:{/////////////////////////////////{\/// L7_xx^#/\LMMMMM3MLN@Mp7 dW{\////////////////////////////{ #^H"
38 echo "H^/PMMMD9773d^\{////////////////////////////////////dzWLp/{x7MMMMMEJMM7DMHD#^z&#//////////////////////////{x&\ dHH"
39 echo "H^{MMMMMMLEN33Hd_://////////////////////////////////#WNMLzzPPLMMMLHMML^NNNQW93JdE_ //////////////////////#_ :@H3HH"
40 echo "HdxWMMMMMMMMzWdHHpNH {/////////////////////////////{z99QEJDQJ7@EM3LMM37M9LHLMNL:^\{////////////////////{x_\_HHH&&x"
41 echo "HH_^zMMMMMMMML7dHH39zN_\//////////////////////////{WQLHEENpDPDLHQMMPHMDEzNMLWJ///////////////////////#_x d3Hd^dHx"
42 echo "/\@HH HLMMMMMMMM9 3HHHp9DJ&#////////////////////////xN_\LzPMMMLpPMMPdLMWLdMMNQ3/////////////////////{ ^x&dddd HHH "
43 echo "//{ HH@ 9MMMMMMLxdHHHHH3HpEQN /////////////////////:PL\/QMMMLE3LMMp#JMJJ9JMM&M //////////////////{#\ _ ^^&:x##HHHx"
44 echo "////:d3H_&PMMMMN&3HHHHHHHHHHWEJH\/////////////////{zMd//^EE {/xHEH&HMLHLHMMJpL#////////{#x _^^&WpHHHHH3HHNxHHxHHHx"
45 echo "/////#_HHH^WMMP3L9HHHHHHHHHHHHHWE7_{//////////////7Mz{///:7EWNEzPL3LMWQWDMM_zN/{\x ^& zLMDpHp973HHHHHH3HH7x3H dHHx"
46 echo "///////xHHH@_E&3D9N3H3HHHHHHHHHH3HW7dx///////////dMM ////#QJEEJJ9:Hp9dz^WdH_&d3p3HHHHdLQE3pNNHHHHHHHHH3HH9xHH &HHx"
47 echo "////////#@3H3^ HHN3WpHHHHHHHHHHHHHHH33d #/////// MM7//{x@pppH__ME_MME@xH3Hzz3H33HHHH@7pHH33HHHHHHHHHHH3HH9xHH__HHx"
48 echo "/////////{ HHHHHHHH333HHHHHHHHHHHHHHHHH33&x{///:Pz9HpWp@ :::{/pM^EMMML H3HELQ3H3HHHH_pHHHHHHHHHHHHHHHHHHp9\@d& HHx"
49 echo "///////////:dHHHHHHHH33HHHHHHHHHHHHHHHHHHHHd^\\H33d_x::##{/{x_PDxMMMME&HHHHH99H3HHHd&HHHHHHHHHHHHHHHHHH9Wx&^ x HHx"
50 echo "////////////{^HHHHHHHHHHHHHHHHHHHHHHHHHHH@&HN33@H77ppppppWW3&JMdHMMMMHHHHHHHHWHHHHH&3pWHHHHHHHHHH3HHHpz_ HHH3&xHHx"
51 echo "//////////////xHHHHHHHHHHHHHHHHHHHH3H3@d3p3@x:\{/# HN73& xx DL\DMMML_HHHHHHHHpHHHpH7JHHHHHHH3p33d&_@d\ 3HHH3&:3Hx"
52 echo "///////////////#&HHHHHHHHHHHHHHHHHHHH_H7^x\//#^ddH3^Nz@_&&&&_MN MMMMJ@H3HHHHH3p3H3pQQ3Hd@_^ xx ^@dH&\{x@HH3_\HHx"
53 echo "////////////////{ HHHHHHHHHHHHHHH@ x{{z\/#^33d {Nz3:LPx&&&&^WMxNMMMM3HHH3N3Hp79zWH _ xx _@dHHHHHHHHHHH^#{xd_{#@Hx"
54 echo "//////////////////\@HH3HHHHHH@^x#{: &&7_@ddH:7d@__&@Mp^&&&&xPz#LMMML&3HJMMzNH@^ ^&:@HHHHHHHHHHHHHHHHHHd&^{/////:Hx"
55 echo "/////////////{{{/{/{^dHHHd^x#{\ &HHH W ^@&Q9 _^ _d3QL ^ xWMW#dJMMz@HJMEx\x^HHHHHdx&HHHHHHHd&^ xx\#{//////////#Hx"
56 echo "/////////{x ^&:xEDW^ x#:## d^dH3HHHHxd_HHdMzHx# NMMM7x&dH_JLp7 {x\&@HHD@\:{#x ^HHHd&#x x\#{////////////////////{Hx"
57 echo "//////{#x^^&&\ _D9^x\{{:^NQP3HHHHHH pxHHd9MMdxx EMMM _^@@PD3PMMLEQH@3W& &^ x##\##{/////////////////////////////{@x"
58 echo "/////#:x^ @d:^^7N#{\ &HHWHH99HHHHHH:7 d&^LMM3^_dNpH_#^_3LEWMMMMMPddHpd:HHHH@ ^ x{#:////////////////////{x&////{x:"
59 echo "////:x ^x W:^^HWx3dHHHH333H39HHHH3@&&xxx@J7@#:_@&&d : ELp9MMMMMz&H333#dHHH3H\///{:3x##{/{##{/{#\\\##### W_{////^x/"
60 echo "//{ :x^ #E:^^&N\ELWHHH3dHHH3333HHH E\:xx__^_ d^EPML^dDPHDMMMMM7&H33N#&HHHHH /////{3//////////////////\3@{//////{//"
61 echo "/{ xx{x{7_ ^^N^xJNzN3Hp@HHHH39HH3H J: ^ NEQ__^zMMM9dLJ3LMMMML3@HHH9\ H3HHH&{/////^ ////////////////\3d{///////////"
62 echo "/x x///:9:^^p&x@3W3p3HHHpddd@H9HHH_Lx^ EMM7x&^MMMEEMWNMMMMMD@d3HH9 \HHHHHH //////7{//////////////#3H#/////////////"
63 echo "\_:#///@ ^d3^xHH33N3@x ^&dH&@HHH M_^^MML&x_3QJWQLdzMMMMMJ_HH3HNd#@HHHHHHx/////:W/////////////{x #///////////////"
64 echo "^&:///{p\^_W^x&HWH^x &_HHHHHHd HHH PNx9LQ7W_3N779d\WMMMMMW&HHH3WN{_HHHHHH3://///p ////////////////////////////////"
65 echo "@dx////Ep3Np^\@_:^dHHHd^Hd_ :\xHH3&EP^3d@d3Hp7zLMQ_{ JMLd@HHHHpE:&HHHHHHHH\/////@{////////////////////////////////"
66 echo "H@ :#//DLMM9_: :HHHHH@^x#/////#HHHd_NNNJPMMMMMMMMMMQ&{d_HHHHH3zx@HHHHHHHHH#&@@@@7@@dpdx{//////////////////////////"
67 echo "dJx #//_E_d&&^::_d_x#//\///////&HHH_HPMMMMMMMMMMLJ7Wp@_HHHHHHz_ HHHHHHHHHHx7QzJE97^x{/////////////////////////////"
68 echo "^z_ {/\{_9 ^{\#//////:///////xHHH3H&7MMMPJN3d__@HHHHHHH3HH73:HHHHHHHHHH ^ x#{@{///////////////////////////////"
69 echo "^dD \{ x#^7^x\/////////x///////#HH33HHHd3d37pHH3HHHHHHHHHHHp7#dHHHHHHHH&_EMMMMMMMPz7d #///////////////////////////"
70 echo "^^_73x ^ :xd^{/////////x////////_HHHHHH33NNWpp3HHHHHHHHHHHHE:^HHHHHH3H WMMMMMMMMDH7:\ JQ7d {//////////////////////"
71 echo "^^@JzE^\x^ :\x{////////_///\_WJHxHHHHHHHHHHH3HHHHHHHHHHHHH9&xHHHHHHd 9MMMMMMMMLJ J//xQ\7LMMQpx///////////////////"
72 echo " _3zLLLpx x{///////{_ zH9PP9H {{dHHHHHHHHHHHHHHHHHHHHHHHp9#dHHH3H@x^zMMMMMMMMMPJ d//93DMMMMMMMQH\////////////////"
73 echo " x^NE9dxx x://///////#dNP_\/{^H79@pHHHHHHHHHHHHHHHHHHH3H3zx_HHHHHH_&DMMMMMMMMMMDE :/ 7QMMMMMMMMMMMJ&#/////////////"
74 echo " @3pQMp^7N^x//////////// __7LMMMM JHHHHHHHHHHHHH3HHHHH3H9@ HHHHHHH&LMMMMMMMMMMMP7^#{EWMMMMMMMMMMMMMML7 {//////////"
75 echo "^^^&HLWd7d {///////////#3LMMMMMMMHpJpHHHHHHHHHHH3JQJ7NDWE\HHHH3H@ QMMMMMMMMMMMMLp&##LMMMMMMMMMMMMMMMMMMPd{////////"
76 echo "3WNNN7pH99Wd #/////////pHMMMMMMMMD N993HH3HHHHHHHH9LMMMLx@3HHHH_ JMMMMMMMMMMMMMMd@##MMMMMMMMMMMMMMMMMMMMMQ{///////"
77 echo "MMMMM3ELMMMMLE@&@_x////EWMMMMMMMMM3JJpEN3HHHHHHHH7DDMMMH HHHHd ^NMMMMMMMMMMMMMMM_d{#MMMMMMMMMMMMMMMMMMMMM@////////"
78 echo "MMMM7{DMMMMD3JMMMMDJ /#DzMMMMMMMMML^Qz7W9p3pWN7799zJE7d\x_HH@:_HMMMMMMMMMMMMMMMWx3{\MMMMMMMMMMMMMMMMMMMMD{////////"
79 echo "MMML:HMMMM9@MMMLdHJEH{ PLMMMMMMMMMME&pNp^^_^ x ^^__ \#x{&&LMMMMMMMMMMMMMMMJ:p{\MMMMMMMMMMMMMMMMMMMM_/////////"
80 echo "MMMW/7MMMM&LM3LdQz@JM33MMMMMMMMMMMMM&x _@dHHHHHHH@&_^ ^_ ^x:^LMMMMMMPQJ7Np333pW 3 xEDMMMMMMMMMMMMMMMMMJ//////////"
81 echo "MML\/EMMMP3_xNpJMM3^&WzMPMMMMMMMMMMML3x^^^^_&dH3W7EzPPpx\x\\xd333H&_&@pEQPLMMQPM7E9LHd@@3ELMMMMMMMMMMMM //////////"
82 echo "MM3//zMMMNW//QdMMM3 \#LQWMMMMMMMMDp@__&dd@@&__&&@dHpHd33 &x@33Hd@_^^^xMMMMMMM3pMx{HM x9/{\:@pNQMMMMMMMQ///////////"
83 echo "MMH::PMMMW7{/P_MMM7^{xM7^MMMMMMD@@W&&dH3Hx_x:7DzJ97Np &H^&x_dHd@&&@d3WMMMMMMME&M WMMN/7{/WHzMLEWWNELMMW///////////"
84 echo "_H_^^dNJzWH@/7HPMM@_/dD&@MMMLzp W@^7zE7pxHHN99EzQQ7_p9^H^_:&d&^ ^_&&MMMMMMMD M xMML#^x/{JMMMMMMMDW3Wx///////////"
85 echo "Hz^x::xx{/{x^p3dMQx /7N H3@^_@#dW#:_d@@HHHHHH3NPN&NLMQ H & NN799997WWzMMMMMMMLxM^&LMM^{&/#LMMMMMMMMMMLN^#/////////"
86 echo " x WpH@x\//////{@ { _^_@d^ ^__\dH MEH_d3HHHHHHN&3MMMMD H & H&&______ HMMMMMMMM P_3MMMN/&/#LMMMMMMMMMMMMML@////////"
87 echo "\{xH7x::\////////\7MM9@_^_@HHd d_ MMM9@7HHd@NWHp^WMMMDx3 & 3dHW7EzDLMLLDQzJE9NxHxxp33_/x{/NMMMMMMMMMMMMMMP#///////"
88 echo "# ^_ ^ ^x///////{9&MMJ^^^ ^_3xH_ MMM^73@_WQz93&@&@LLN_H __9WH&^ x:\#{\^&& {///{p//////////{x&WzLMMMMMMMMMH///////"
89 echo "^^ 3^^^#///////H_LMME&@dHH@ _x3@xPMz&&_7MMMMLDJHx\ 3pd #{/////////{x@HH&\//////7{////{#////////{x&WzMMMMML#//////"
90 echo ": :d^^^x/////// &PMMM&_dd@&^^ {^W7^p xxH@@&__37NNW7NH^:xxxx ^_&&@dHH&:////////p ////{^/////////////\&ELMM3//////"
91 echo "{\:xxxx#//////{Hp77p@ x#////////#&& xx::\\:xxxx ^_&&&&&@@@&&&&_____x//////////##/////&////////////////{^NQ#/////"
92 fi
93])
diff --git a/libraries/eina/m4/eina/eina_bench.m4 b/libraries/eina/m4/eina/eina_bench.m4
new file mode 100644
index 0000000..e586eff
--- /dev/null
+++ b/libraries/eina/m4/eina/eina_bench.m4
@@ -0,0 +1,31 @@
1dnl use: EINA_BENCH_MODULE(foo-bar, have_bench, pkg_file [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([EINA_BENCH_MODULE],
3[
4m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
5m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
6
7want_module="$2"
8have_module="no"
9
10AC_ARG_ENABLE([$1],
11 [AC_HELP_STRING([--disable-benchmark-$1], [disable benchmarking against ]DOWN[ @<:@default=yes@:>@])],
12 [
13 if test "x${enableval}" = "xyes" ; then
14 enable_module="yes"
15 else
16 enable_module="no"
17 fi
18 ],
19 [enable_module="yes"])
20
21if test "x${enable_module}" = "xyes" && test "x${want_module}" = "xyes"; then
22 PKG_CHECK_MODULES([]UP[], [$3], [have_module="yes"], [have_module="no"])
23fi
24
25AM_CONDITIONAL([EINA_HAVE_]UP[], [test "x${have_module}" = "xyes"])
26
27AS_IF([test "x$have_module" = "xyes"], [$4], [$5])
28
29m4_popdef([UP])
30m4_popdef([DOWN])
31])
diff --git a/libraries/eina/m4/eina/eina_check.m4 b/libraries/eina/m4/eina/eina_check.m4
new file mode 100644
index 0000000..f8a4f8c
--- /dev/null
+++ b/libraries/eina/m4/eina/eina_check.m4
@@ -0,0 +1,48 @@
1dnl use: EINA_CHECK_MODULE(foo-bar, have_dependency, description)
2AC_DEFUN([EINA_CHECK_MODULE],
3[
4m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
5m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
6
7AC_ARG_ENABLE([mempool-$1],
8 [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$2@:>@])],
9 [
10 if test "x${enableval}" = "xyes" ; then
11 enable_module="yes"
12 else
13 if test "x${enableval}" = "xstatic" ; then
14 enable_module="static"
15 else
16 enable_module="no"
17 fi
18 fi
19 ],
20 [enable_module=$2])
21
22have_module="no"
23if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
24 have_module="yes"
25fi
26
27AC_MSG_CHECKING([whether to enable $3 built])
28AC_MSG_RESULT([${have_module}])
29
30static_module="no"
31if test "x${enable_module}" = "xstatic" ; then
32 static_module="yes"
33 have_static_module="yes"
34 AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built])
35fi
36
37if ! test "x${enable_module}" = "xno" ; then
38 AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
39fi
40
41AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
42AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
43
44enable_[]DOWN=${enable_module}
45
46m4_popdef([UP])
47m4_popdef([DOWN])
48])