summaryrefslogtreecommitdiff
path: root/m4/efl_check_funcs.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-04 11:51:42 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-04 11:51:42 +0000
commitc15e9c6575c3b5f39ded167dda5259de3de96151 (patch)
tree5115d7ae3620af24c2bc094cd062575af7adeda9 /m4/efl_check_funcs.m4
parenta5ac6a987caec5a7f7596a25d0a065b9cc94c50c (diff)
merge: and now Evas
I've tested make -j 3 install and it works nicely I've tested expedite with software and opengl xlib, and it works. Not tested other engines, so please report any problems (engines or other) on the ML. TODO: examples and tests, I'll add them later ISSUE: Eina_Unicode size check. It indirectly depends on eina_config.h, which is created at the end of the configure script. So its size is always 0. I don't know how that size is used, so I can't do a lot, for now. SVN revision: 78895
Diffstat (limited to 'm4/efl_check_funcs.m4')
-rw-r--r--m4/efl_check_funcs.m476
1 files changed, 74 insertions, 2 deletions
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4
index 23712bc..109ad06 100644
--- a/m4/efl_check_funcs.m4
+++ b/m4/efl_check_funcs.m4
@@ -53,11 +53,14 @@ LIBS="${LIBS} $2"
53AC_LINK_IFELSE( 53AC_LINK_IFELSE(
54 [AC_LANG_PROGRAM( 54 [AC_LANG_PROGRAM(
55 [[ 55 [[
56#define _GNU_SOURCE 56#ifndef _GNU_SOURCE
57# define _GNU_SOURCE
58#endif
59#include <stdlib>
57#include <dlfcn.h> 60#include <dlfcn.h>
58 ]], 61 ]],
59 [[ 62 [[
60int res = dladdr(0, 0); 63int res = dladdr(NULL, NULL);
61 ]])], 64 ]])],
62 [ 65 [
63 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" 66 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
@@ -171,6 +174,75 @@ m4_popdef([DOWNEFL])
171m4_popdef([UPEFL]) 174m4_popdef([UPEFL])
172]) 175])
173 176
177dnl _EFL_CHECK_FUNC_DLSYM_PRIV is for internal use
178dnl _EFL_CHECK_FUNC_DLSYM_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
179
180AC_DEFUN([_EFL_CHECK_FUNC_DLSYM_PRIV],
181[
182m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
183m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
184
185LIBS_save="${LIBS}"
186LIBS="${LIBS} $2"
187AC_LINK_IFELSE(
188 [AC_LANG_PROGRAM(
189 [[
190#ifndef _GNU_SOURCE
191# define _GNU_SOURCE
192#endif
193#include <stdlib.h>
194#include <dlfcn.h>
195 ]],
196 [[
197void *res = dlsym(NULL, NULL);
198 ]])],
199 [
200 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2"
201 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2"
202 _efl_have_fct="yes"
203 ],
204 [_efl_have_fct="no"])
205
206LIBS="${LIBS_save}"
207
208AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4])
209
210m4_popdef([DOWNEFL])
211m4_popdef([UPEFL])
212])
213
214dnl _EFL_CHECK_FUNC_DLSYM is for internal use
215dnl _EFL_CHECK_FUNC_DLSYM(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
216
217AC_DEFUN([_EFL_CHECK_FUNC_DLSYM],
218[
219m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
220m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
221
222case "$host_os" in
223 mingw*)
224 _efl_have_fct="yes"
225 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl"
226 ;;
227 *)
228 _efl_have_fct="no"
229
230dnl Check is dlsym is in libc
231 _EFL_CHECK_FUNC_DLSYM_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"])
232
233dnl Check is dlopen is in libdl
234 if test "x${_efl_have_fct}" = "xno" ; then
235 _EFL_CHECK_FUNC_DLSYM_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"])
236 fi
237 ;;
238esac
239
240AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3])
241
242m4_popdef([DOWNEFL])
243m4_popdef([UPEFL])
244])
245
174dnl _EFL_CHECK_FUNC_FNMATCH_PRIV is for internal use 246dnl _EFL_CHECK_FUNC_FNMATCH_PRIV is for internal use
175dnl _EFL_CHECK_FUNC_FNMATCH_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) 247dnl _EFL_CHECK_FUNC_FNMATCH_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
176 248