diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/m4/common/efl_attribute.m4 | 56 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_benchmark.m4 | 33 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_compiler_flag.m4 | 57 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_coverage.m4 | 62 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_cpu.m4 | 341 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_doxygen.m4 | 94 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_examples.m4 | 63 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_fnmatch.m4 | 31 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_path_max.m4 | 36 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_tests.m4 | 43 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_threads.m4 | 219 | ||||
-rw-r--r-- | libraries/eina/m4/common/efl_voltron.m4 | 93 | ||||
-rw-r--r-- | libraries/eina/m4/eina/eina_bench.m4 | 31 | ||||
-rw-r--r-- | libraries/eina/m4/eina/eina_check.m4 | 48 |
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 @@ | |||
1 | dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macros for checking if the compiler supports some __attribute__ uses | ||
5 | |||
6 | dnl Usage: EFL_ATTRIBUTE_UNUSED | ||
7 | dnl call AC_DEFINE for __UNUSED__ if __attribute__((unused)) is available | ||
8 | |||
9 | AC_DEFUN([EFL_ATTRIBUTE_UNUSED], | ||
10 | [ | ||
11 | AC_MSG_CHECKING([for __attribute__ ((unused))]) | ||
12 | AC_COMPILE_IFELSE( | ||
13 | [AC_LANG_PROGRAM( | ||
14 | [[ | ||
15 | void foo(int x __attribute__ ((unused))) {} | ||
16 | ]], | ||
17 | [[ | ||
18 | ]])], | ||
19 | [have_attribute_unused="yes"], | ||
20 | [have_attribute_unused="no"]) | ||
21 | AC_MSG_RESULT([${have_attribute_unused}]) | ||
22 | |||
23 | if test "x${have_attribute_unused}" = "xyes" ; then | ||
24 | AC_DEFINE([__UNUSED__], [__attribute__ ((unused))], [Macro declaring a function argument to be unused.]) | ||
25 | else | ||
26 | AC_DEFINE([__UNUSED__], [], [__attribute__ ((unused)) is not supported.]) | ||
27 | fi | ||
28 | ]) | ||
29 | |||
30 | dnl Usage: EFL_ATTRIBUTE_VECTOR | ||
31 | dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available | ||
32 | |||
33 | AC_DEFUN([EFL_ATTRIBUTE_VECTOR], | ||
34 | [ | ||
35 | AC_MSG_CHECKING([for __attribute__ ((vector))]) | ||
36 | AC_COMPILE_IFELSE( | ||
37 | [AC_LANG_PROGRAM( | ||
38 | [[ | ||
39 | typedef int v4si __attribute__ ((vector_size (16))); | ||
40 | ]], | ||
41 | [[ | ||
42 | if (sizeof(v4si) == 16) | ||
43 | return 0; | ||
44 | else | ||
45 | return -1; | ||
46 | ]])], | ||
47 | [have_attribute_vector="yes"], | ||
48 | [have_attribute_vector="no"]) | ||
49 | AC_MSG_RESULT([${have_attribute_vector}]) | ||
50 | |||
51 | if test "x${have_attribute_vector}" = "xyes" ; then | ||
52 | AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).]) | ||
53 | fi | ||
54 | ]) | ||
55 | |||
56 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if benchmark support is wanted. | ||
5 | |||
6 | dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK | ||
8 | |||
9 | AC_DEFUN([EFL_CHECK_BENCHMARK], | ||
10 | [ | ||
11 | |||
12 | dnl configure option | ||
13 | |||
14 | AC_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 | |||
25 | AC_MSG_CHECKING([whether benchmark are built]) | ||
26 | AC_MSG_RESULT([${_efl_enable_benchmark}]) | ||
27 | |||
28 | AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes") | ||
29 | |||
30 | AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2]) | ||
31 | ]) | ||
32 | |||
33 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com> | ||
3 | dnl That code is public domain and can be freely used or copied. | ||
4 | |||
5 | dnl Macro that checks if a compiler flag is supported by the compiler. | ||
6 | |||
7 | dnl Usage: EFL_COMPILER_FLAG(flag) | ||
8 | dnl flag is added to CFLAGS if supported. | ||
9 | |||
10 | AC_DEFUN([EFL_COMPILER_FLAG], | ||
11 | [ | ||
12 | |||
13 | CFLAGS_save="${CFLAGS}" | ||
14 | CFLAGS="${CFLAGS} $1" | ||
15 | |||
16 | AC_LANG_PUSH([C]) | ||
17 | AC_MSG_CHECKING([whether the compiler supports $1]) | ||
18 | |||
19 | AC_COMPILE_IFELSE( | ||
20 | [AC_LANG_PROGRAM([[]])], | ||
21 | [have_flag="yes"], | ||
22 | [have_flag="no"]) | ||
23 | AC_MSG_RESULT([${have_flag}]) | ||
24 | |||
25 | if test "x${have_flag}" = "xno" ; then | ||
26 | CFLAGS="${CFLAGS_save}" | ||
27 | fi | ||
28 | AC_LANG_POP([C]) | ||
29 | |||
30 | ]) | ||
31 | |||
32 | dnl Macro that checks if a linker flag is supported by the compiler. | ||
33 | |||
34 | dnl Usage: EFL_LINKER_FLAG(flag) | ||
35 | dnl flag is added to LDFLAGS if supported (will be passed to ld anyway). | ||
36 | |||
37 | AC_DEFUN([EFL_LINKER_FLAG], | ||
38 | [ | ||
39 | |||
40 | LDFLAGS_save="${LDFLAGS}" | ||
41 | LDFLAGS="${LDFLAGS} $1" | ||
42 | |||
43 | AC_LANG_PUSH([C]) | ||
44 | AC_MSG_CHECKING([whether the compiler supports $1]) | ||
45 | |||
46 | AC_LINK_IFELSE( | ||
47 | [AC_LANG_PROGRAM([[]])], | ||
48 | [have_flag="yes"], | ||
49 | [have_flag="no"]) | ||
50 | AC_MSG_RESULT([${have_flag}]) | ||
51 | |||
52 | if test "x${have_flag}" = "xno" ; then | ||
53 | LDFLAGS="${LDFLAGS_save}" | ||
54 | fi | ||
55 | AC_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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if coverage support is wanted and, if yes, if | ||
5 | dnl lcov is available. | ||
6 | |||
7 | dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
8 | dnl The parameter 'tests' is used if a dependency is needed. If set to "yes", | ||
9 | dnl the dependency is available. | ||
10 | dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables | ||
11 | dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE | ||
12 | |||
13 | AC_DEFUN([EFL_CHECK_COVERAGE], | ||
14 | [ | ||
15 | |||
16 | dnl configure option | ||
17 | |||
18 | AC_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 | |||
29 | AC_MSG_CHECKING([whether to use profiling instrumentation]) | ||
30 | AC_MSG_RESULT([$_efl_enable_coverage]) | ||
31 | |||
32 | dnl lcov check | ||
33 | |||
34 | if 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" | ||
38 | fi | ||
39 | |||
40 | if 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 | ||
51 | fi | ||
52 | |||
53 | dnl Substitution | ||
54 | AC_SUBST(EFL_COVERAGE_CFLAGS) | ||
55 | AC_SUBST(EFL_COVERAGE_LIBS) | ||
56 | |||
57 | AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes") | ||
58 | |||
59 | AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3]) | ||
60 | ]) | ||
61 | |||
62 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if several ASM instruction sets are available or not. | ||
5 | |||
6 | dnl Usage: EFL_CHECK_CPU_MMX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Add -mmmx to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS) | ||
8 | dnl Define EFL_HAVE_MMX | ||
9 | |||
10 | AC_DEFUN([EFL_CHECK_CPU_MMX], | ||
11 | [ | ||
12 | dnl configure option | ||
13 | |||
14 | AC_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 | |||
25 | AC_MSG_CHECKING([whether to build mmx code]) | ||
26 | AC_MSG_RESULT([${_efl_enable_cpu_mmx}]) | ||
27 | |||
28 | dnl check if the CPU is supporting MMX instruction sets | ||
29 | |||
30 | _efl_build_cpu_mmx="no" | ||
31 | if 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 | ||
37 | fi | ||
38 | |||
39 | AC_MSG_CHECKING([whether mmx instructions set is available]) | ||
40 | AC_MSG_RESULT([${_efl_build_cpu_mmx}]) | ||
41 | |||
42 | dnl check if the compiler supports -mmmx | ||
43 | |||
44 | if 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}]) | ||
62 | fi | ||
63 | |||
64 | AC_SUBST(EFL_SIMD_FLAGS) | ||
65 | |||
66 | if test "x${_efl_build_cpu_mmx}" = "xyes" ; then | ||
67 | AC_DEFINE([EFL_HAVE_MMX], [1], [Define to mention that MMX is supported]) | ||
68 | fi | ||
69 | |||
70 | AS_IF([test "x$_efl_build_cpu_mmx" = "xyes"], [$1], [$2]) | ||
71 | ]) | ||
72 | |||
73 | dnl Usage: EFL_CHECK_CPU_SSE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
74 | dnl Add -msse to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS) | ||
75 | dnl Define EFL_HAVE_SSE | ||
76 | |||
77 | AC_DEFUN([EFL_CHECK_CPU_SSE], | ||
78 | [ | ||
79 | dnl configure option | ||
80 | |||
81 | AC_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 | |||
92 | AC_MSG_CHECKING([whether to build sse code]) | ||
93 | AC_MSG_RESULT([${_efl_enable_cpu_sse}]) | ||
94 | |||
95 | dnl check if the CPU is supporting SSE instruction sets | ||
96 | |||
97 | _efl_build_cpu_sse="no" | ||
98 | if 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 | ||
104 | fi | ||
105 | |||
106 | AC_MSG_CHECKING([whether sse instructions set is available]) | ||
107 | AC_MSG_RESULT([${_efl_build_cpu_sse}]) | ||
108 | |||
109 | dnl check if the compiler supports -msse | ||
110 | |||
111 | if 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}]) | ||
131 | fi | ||
132 | |||
133 | AC_SUBST(EFL_SIMD_FLAGS) | ||
134 | |||
135 | if test "x${_efl_build_cpu_sse}" = "xyes" ; then | ||
136 | AC_DEFINE([EFL_HAVE_SSE], [1], [Define to mention that SSE is supported]) | ||
137 | fi | ||
138 | |||
139 | AS_IF([test "x$_efl_build_cpu_sse" = "xyes"], [$1], [$2]) | ||
140 | ]) | ||
141 | |||
142 | dnl Usage: EFL_CHECK_CPU_SSE2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
143 | dnl Add -msse2 to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS) | ||
144 | dnl Define EFL_HAVE_SSE2 | ||
145 | |||
146 | AC_DEFUN([EFL_CHECK_CPU_SSE2], | ||
147 | [ | ||
148 | |||
149 | dnl configure option | ||
150 | |||
151 | AC_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 | |||
162 | AC_MSG_CHECKING([whether to build sse2 code]) | ||
163 | AC_MSG_RESULT([${_efl_enable_cpu_sse2}]) | ||
164 | |||
165 | dnl check if the CPU is supporting SSE2 instruction sets | ||
166 | |||
167 | _efl_build_cpu_sse2="no" | ||
168 | if 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 | ||
174 | fi | ||
175 | |||
176 | AC_MSG_CHECKING([whether sse2 instructions set is available]) | ||
177 | AC_MSG_RESULT([${_efl_build_cpu_sse2}]) | ||
178 | |||
179 | dnl check if the compiler supports -msse2 | ||
180 | |||
181 | if 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}]) | ||
201 | fi | ||
202 | |||
203 | AC_SUBST(EFL_SIMD_FLAGS) | ||
204 | |||
205 | if test "x${_efl_build_cpu_sse2}" = "xyes" ; then | ||
206 | AC_DEFINE([EFL_HAVE_SSE2], [1], [Define to mention that SSE2 is supported]) | ||
207 | fi | ||
208 | |||
209 | AS_IF([test "x$_efl_build_cpu_sse2" = "xyes"], [$1], [$2]) | ||
210 | ]) | ||
211 | |||
212 | dnl Usage: EFL_CHECK_CPU_ALTIVEC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
213 | dnl Add -faltivec or -maltivec to EFL_SIMD_FLAGS if the compiler supports it and | ||
214 | dnl call AC_SUBST(EFL_SIMD_FLAGS) | ||
215 | dnl Define EFL_HAVE_ALTIVEC | ||
216 | |||
217 | AC_DEFUN([EFL_CHECK_CPU_ALTIVEC], | ||
218 | [ | ||
219 | |||
220 | dnl configure option | ||
221 | |||
222 | AC_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 | ) | ||
233 | AC_MSG_CHECKING([whether to build altivec code]) | ||
234 | AC_MSG_RESULT([${_efl_enable_cpu_altivec}]) | ||
235 | |||
236 | dnl check if the CPU is supporting ALTIVEC instruction sets | ||
237 | |||
238 | _efl_build_cpu_altivec="no" | ||
239 | if 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 | ||
245 | fi | ||
246 | |||
247 | AC_MSG_CHECKING([whether altivec instructions set is available]) | ||
248 | AC_MSG_RESULT([${_efl_build_cpu_altivec}]) | ||
249 | |||
250 | dnl check if the compiler supports -faltivec or -maltivec and | ||
251 | dnl if altivec.h is available. | ||
252 | |||
253 | _efl_have_faltivec="no" | ||
254 | if 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}]) | ||
286 | fi | ||
287 | |||
288 | EFL_SIMD_FLAGS="${EFL_SIMD_FLAGS} ${_efl_altivec_flag}" | ||
289 | AC_SUBST(EFL_SIMD_FLAGS) | ||
290 | |||
291 | if test "x${_efl_have_faltivec}" = "xyes" ; then | ||
292 | AC_DEFINE([EFL_HAVE_ALTIVEC], [1], [Define to mention that ALTIVEC is supported]) | ||
293 | fi | ||
294 | |||
295 | AS_IF([test "x$_efl_have_faltivec" = "xyes"], [$1], [$2]) | ||
296 | ]) | ||
297 | |||
298 | dnl Usage: EFL_CHECK_CPU_NEON([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
299 | dnl Add -mneon to EFL_SIMD_FLAGS if the compiler supports it and call AC_SUBST(EFL_SIMD_FLAGS) | ||
300 | dnl Define EFL_HAVE_NEON | ||
301 | |||
302 | AC_DEFUN([EFL_CHECK_CPU_NEON], | ||
303 | [ | ||
304 | dnl configure option | ||
305 | |||
306 | AC_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 | |||
317 | AC_MSG_CHECKING([whether to build neon code]) | ||
318 | AC_MSG_RESULT([${_efl_enable_cpu_neon}]) | ||
319 | |||
320 | dnl check if the CPU is supporting NEON instruction sets | ||
321 | |||
322 | _efl_build_cpu_neon="no" | ||
323 | if test "x${_efl_enable_cpu_neon}" = "xyes" ; then | ||
324 | case $host_cpu in | ||
325 | armv7*) | ||
326 | _efl_build_cpu_neon="yes" | ||
327 | ;; | ||
328 | esac | ||
329 | fi | ||
330 | |||
331 | AC_MSG_CHECKING([whether neon instructions set is available]) | ||
332 | AC_MSG_RESULT([${_efl_build_cpu_neon}]) | ||
333 | |||
334 | if test "x${_efl_build_cpu_neon}" = "xyes" ; then | ||
335 | AC_DEFINE([EFL_HAVE_NEON], [1], [Define to mention that NEON is supported]) | ||
336 | fi | ||
337 | |||
338 | AS_IF([test "x$_efl_build_cpu_neon" = "xyes"], [$1], [$2]) | ||
339 | ]) | ||
340 | |||
341 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if doxygen is available or not. | ||
5 | |||
6 | dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Test for the doxygen program | ||
8 | dnl Defines efl_doxygen | ||
9 | dnl Defines the automake conditionnal EFL_BUILD_DOC | ||
10 | dnl | ||
11 | AC_DEFUN([EFL_CHECK_DOXYGEN], | ||
12 | [ | ||
13 | |||
14 | dnl | ||
15 | dnl Disable the build of the documentation | ||
16 | dnl | ||
17 | AC_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 | |||
30 | AC_MSG_CHECKING([whether to build documentation]) | ||
31 | AC_MSG_RESULT([${efl_enable_doc}]) | ||
32 | |||
33 | if test "x${efl_enable_doc}" = "xyes" ; then | ||
34 | |||
35 | dnl 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 | |||
44 | dnl 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 | ]) | ||
76 | else | ||
77 | efl_have_doxygen="no" | ||
78 | fi | ||
79 | |||
80 | dnl | ||
81 | dnl Substitution | ||
82 | dnl | ||
83 | AC_SUBST([efl_doxygen]) | ||
84 | |||
85 | if ! test "x${efl_have_doxygen}" = "xyes" ; then | ||
86 | efl_enable_doc="no" | ||
87 | fi | ||
88 | |||
89 | AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes") | ||
90 | |||
91 | AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2]) | ||
92 | ]) | ||
93 | |||
94 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if building examples is wanted. | ||
5 | |||
6 | dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES | ||
8 | |||
9 | AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES], | ||
10 | [ | ||
11 | |||
12 | dnl configure option | ||
13 | |||
14 | AC_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 | |||
25 | AC_MSG_CHECKING([whether examples are built]) | ||
26 | AC_MSG_RESULT([${_efl_enable_build_examples}]) | ||
27 | |||
28 | AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes") | ||
29 | |||
30 | AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2]) | ||
31 | ]) | ||
32 | |||
33 | |||
34 | dnl Macro that check if installing examples is wanted. | ||
35 | |||
36 | dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
37 | dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES | ||
38 | |||
39 | AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES], | ||
40 | [ | ||
41 | |||
42 | dnl configure option | ||
43 | |||
44 | AC_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 | |||
55 | AC_MSG_CHECKING([whether examples are installed]) | ||
56 | AC_MSG_RESULT([${_efl_enable_install_examples}]) | ||
57 | |||
58 | AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes") | ||
59 | |||
60 | AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2]) | ||
61 | ]) | ||
62 | |||
63 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if fnmatch functions are available or not. | ||
5 | |||
6 | dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Call AC_SUBST(EFL_FNMATCH_LIBS) | ||
8 | |||
9 | AC_DEFUN([EFL_CHECK_FNMATCH], | ||
10 | [ | ||
11 | |||
12 | AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"]) | ||
13 | |||
14 | if 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"]) | ||
19 | fi | ||
20 | |||
21 | EFL_FNMATCH_LIBS="" | ||
22 | |||
23 | if (! 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} | ||
25 | fi | ||
26 | |||
27 | AC_SUBST(EFL_FNMATCH_LIBS) | ||
28 | |||
29 | AS_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 @@ | |||
1 | dnl Check for PATH_MAX in limits.h, and define a default value if not found | ||
2 | dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd | ||
3 | |||
4 | dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND]) | ||
5 | dnl | ||
6 | dnl If PATH_MAX is not defined in <limits.h>, defines it | ||
7 | dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback | ||
8 | dnl to using 4096 | ||
9 | |||
10 | AC_DEFUN([EFL_CHECK_PATH_MAX], | ||
11 | [ | ||
12 | |||
13 | default_max=m4_default([$1], "4096") | ||
14 | AC_LANG_PUSH([C]) | ||
15 | |||
16 | AC_MSG_CHECKING([for PATH_MAX in limits.h]) | ||
17 | AC_COMPILE_IFELSE( | ||
18 | [AC_LANG_PROGRAM( | ||
19 | [[ | ||
20 | #include <limits.h> | ||
21 | ]], | ||
22 | [[ | ||
23 | int 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 | |||
33 | AC_LANG_POP([C]) | ||
34 | |||
35 | ]) | ||
36 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if tests programs are wanted and if yes, if | ||
5 | dnl the Check library is available. | ||
6 | |||
7 | dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
8 | dnl Define the automake conditionnal EFL_ENABLE_TESTS | ||
9 | |||
10 | AC_DEFUN([EFL_CHECK_TESTS], | ||
11 | [ | ||
12 | |||
13 | dnl configure option | ||
14 | |||
15 | AC_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 | |||
26 | AC_MSG_CHECKING([whether tests are built]) | ||
27 | AC_MSG_RESULT([${_efl_enable_tests}]) | ||
28 | |||
29 | AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
30 | |||
31 | if 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"]) | ||
36 | fi | ||
37 | |||
38 | AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") | ||
39 | |||
40 | AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2]) | ||
41 | ]) | ||
42 | |||
43 | dnl 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 @@ | |||
1 | dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl rwlock code added by Mike Blumenkrantz <mike at zentific dot com> | ||
3 | dnl This code is public domain and can be freely used or copied. | ||
4 | |||
5 | dnl Macro that check if POSIX or Win32 threads library is available or not. | ||
6 | |||
7 | dnl Usage: EFL_CHECK_THREADS(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) | ||
8 | dnl Call AC_SUBST(EFL_PTHREAD_CFLAGS) | ||
9 | dnl Call AC_SUBST(EFL_PTHREAD_LIBS) | ||
10 | dnl Defines EFL_HAVE_POSIX_THREADS or EFL_HAVE_WIN32_THREADS, and EFL_HAVE_THREADS | ||
11 | |||
12 | AC_DEFUN([EFL_CHECK_THREADS], | ||
13 | [ | ||
14 | |||
15 | dnl configure option | ||
16 | |||
17 | AC_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 | |||
28 | AC_MSG_CHECKING([whether to build POSIX threads code]) | ||
29 | AC_MSG_RESULT([${_efl_enable_posix_threads}]) | ||
30 | |||
31 | AC_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 | |||
42 | AC_MSG_CHECKING([whether to build Windows threads code]) | ||
43 | AC_MSG_RESULT([${_efl_enable_win32_threads}]) | ||
44 | |||
45 | dnl | ||
46 | dnl * no + no | ||
47 | dnl * yes + no : win32: error, other : pthread | ||
48 | dnl * yes + yes : win32 : wthread, other : pthread | ||
49 | dnl * no + yes : win32 : wthread, other : error | ||
50 | |||
51 | if 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 | ||
60 | fi | ||
61 | |||
62 | if 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 | ||
70 | fi | ||
71 | |||
72 | if 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 | ||
80 | fi | ||
81 | |||
82 | dnl check if the compiler supports POSIX threads | ||
83 | |||
84 | case "$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 | ;; | ||
95 | esac | ||
96 | |||
97 | _efl_have_posix_threads="no" | ||
98 | _efl_have_win32_threads="no" | ||
99 | |||
100 | if 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 | [[ | ||
111 | pthread_t id; | ||
112 | id = pthread_self(); | ||
113 | ]])], | ||
114 | [_efl_have_posix_threads="yes"], | ||
115 | [_efl_have_posix_threads="no"]) | ||
116 | CFLAGS=${SAVE_CFLAGS} | ||
117 | LIBS=${SAVE_LIBS} | ||
118 | |||
119 | fi | ||
120 | |||
121 | AC_MSG_CHECKING([whether system support POSIX threads]) | ||
122 | AC_MSG_RESULT([${_efl_have_posix_threads}]) | ||
123 | if 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.]) | ||
125 | fi | ||
126 | |||
127 | EFL_PTHREAD_CFLAGS="" | ||
128 | EFL_PTHREAD_LIBS="" | ||
129 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
130 | EFL_PTHREAD_CFLAGS=${_efl_threads_cflags} | ||
131 | EFL_PTHREAD_LIBS=${_efl_threads_libs} | ||
132 | fi | ||
133 | |||
134 | AC_SUBST(EFL_PTHREAD_CFLAGS) | ||
135 | AC_SUBST(EFL_PTHREAD_LIBS) | ||
136 | |||
137 | _efl_enable_on_off_threads="no" | ||
138 | AC_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 | |||
142 | have_on_off_threads="no" | ||
143 | if 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]) | ||
146 | fi | ||
147 | AC_MSG_CHECKING([whether to turn on/off threads lock on demand]) | ||
148 | AC_MSG_RESULT([${_efl_enable_on_off_threads}]) | ||
149 | |||
150 | _efl_enable_debug_threads="no" | ||
151 | AC_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 | |||
155 | have_debug_threads="no" | ||
156 | if 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]) | ||
159 | fi | ||
160 | |||
161 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
162 | AC_DEFINE([EFL_HAVE_POSIX_THREADS], [1], [Define to mention that POSIX threads are supported]) | ||
163 | fi | ||
164 | |||
165 | if 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]) | ||
168 | fi | ||
169 | |||
170 | if 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]) | ||
172 | fi | ||
173 | |||
174 | AS_IF([test "x$_efl_have_posix_threads" = "xyes" || test "x$_efl_have_win32_threads" = "xyes"], [$1], [$2]) | ||
175 | ]) | ||
176 | |||
177 | dnl Usage: EFL_CHECK_SPINLOCK(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) | ||
178 | dnl Defines EFL_HAVE_POSIX_THREADS_SPINLOCK | ||
179 | AC_DEFUN([EFL_CHECK_SPINLOCK], | ||
180 | [ | ||
181 | |||
182 | dnl check if the compiler supports pthreads spinlock | ||
183 | |||
184 | _efl_have_posix_threads_spinlock="no" | ||
185 | |||
186 | if 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 | [[ | ||
197 | pthread_spinlock_t lock; | ||
198 | int res; | ||
199 | res = 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 | |||
206 | fi | ||
207 | |||
208 | AC_MSG_CHECKING([whether to build POSIX threads spinlock code]) | ||
209 | AC_MSG_RESULT([${_efl_have_posix_threads_spinlock}]) | ||
210 | if 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]) | ||
212 | fi | ||
213 | |||
214 | if 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]) | ||
216 | fi | ||
217 | AS_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 @@ | |||
1 | dnl EFL_FORM_VOLTRON | ||
2 | dnl Outputs ascii art of Voltron if terminal has enough columns | ||
3 | dnl | ||
4 | dnl ascii art was found at http://www.codeismylife.com/ascii_voltron/5239.html | ||
5 | dnl and is the work of its original author. | ||
6 | |||
7 | AC_DEFUN([EFL_FORM_VOLTRON], | ||
8 | [ | ||
9 | AC_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 @@ | |||
1 | dnl use: EINA_BENCH_MODULE(foo-bar, have_bench, pkg_file [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
2 | AC_DEFUN([EINA_BENCH_MODULE], | ||
3 | [ | ||
4 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
5 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
6 | |||
7 | want_module="$2" | ||
8 | have_module="no" | ||
9 | |||
10 | AC_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 | |||
21 | if test "x${enable_module}" = "xyes" && test "x${want_module}" = "xyes"; then | ||
22 | PKG_CHECK_MODULES([]UP[], [$3], [have_module="yes"], [have_module="no"]) | ||
23 | fi | ||
24 | |||
25 | AM_CONDITIONAL([EINA_HAVE_]UP[], [test "x${have_module}" = "xyes"]) | ||
26 | |||
27 | AS_IF([test "x$have_module" = "xyes"], [$4], [$5]) | ||
28 | |||
29 | m4_popdef([UP]) | ||
30 | m4_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 @@ | |||
1 | dnl use: EINA_CHECK_MODULE(foo-bar, have_dependency, description) | ||
2 | AC_DEFUN([EINA_CHECK_MODULE], | ||
3 | [ | ||
4 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
5 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
6 | |||
7 | AC_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 | |||
22 | have_module="no" | ||
23 | if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then | ||
24 | have_module="yes" | ||
25 | fi | ||
26 | |||
27 | AC_MSG_CHECKING([whether to enable $3 built]) | ||
28 | AC_MSG_RESULT([${have_module}]) | ||
29 | |||
30 | static_module="no" | ||
31 | if 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]) | ||
35 | fi | ||
36 | |||
37 | if ! test "x${enable_module}" = "xno" ; then | ||
38 | AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built]) | ||
39 | fi | ||
40 | |||
41 | AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"]) | ||
42 | AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"]) | ||
43 | |||
44 | enable_[]DOWN=${enable_module} | ||
45 | |||
46 | m4_popdef([UP]) | ||
47 | m4_popdef([DOWN]) | ||
48 | ]) | ||