summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/efl_check_funcs.m441
1 files changed, 37 insertions, 4 deletions
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4
index 8d8b388..e538db7 100644
--- a/m4/efl_check_funcs.m4
+++ b/m4/efl_check_funcs.m4
@@ -60,13 +60,21 @@ dnl _EFL_CHECK_FUNC_DLADDR is for internal use
60dnl _EFL_CHECK_FUNC_DLADDR(EFL, VARIABLE) 60dnl _EFL_CHECK_FUNC_DLADDR(EFL, VARIABLE)
61AC_DEFUN([_EFL_CHECK_FUNC_DLADDR], 61AC_DEFUN([_EFL_CHECK_FUNC_DLADDR],
62[ 62[
63dllibs=""
64case "$host_os" in
65 linux*)
66 dllibs="-ldl"
67 ;;
68 *)
69 ;;
70esac
63case "$host_os" in 71case "$host_os" in
64 mingw*) 72 mingw*)
65 $2="yes" 73 $2="yes"
66 EFL_ADD_LIBS([$1], [lib/evil/libdl.la]) 74 EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
67 ;; 75 ;;
68 *) 76 *)
69 EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ 77 EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
70#ifndef _GNU_SOURCE 78#ifndef _GNU_SOURCE
71# define _GNU_SOURCE 79# define _GNU_SOURCE
72#endif 80#endif
@@ -81,13 +89,21 @@ dnl _EFL_CHECK_FUNC_DLOPEN is for internal use
81dnl _EFL_CHECK_FUNC_DLOPEN(EFL, VARIABLE) 89dnl _EFL_CHECK_FUNC_DLOPEN(EFL, VARIABLE)
82AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN], 90AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN],
83[ 91[
92dllibs=""
93case "$host_os" in
94 linux*)
95 dllibs="-ldl"
96 ;;
97 *)
98 ;;
99esac
84case "$host_os" in 100case "$host_os" in
85 mingw*) 101 mingw*)
86 $2="yes" 102 $2="yes"
87 EFL_ADD_LIBS([$1], [lib/evil/libdl.la]) 103 EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
88 ;; 104 ;;
89 *) 105 *)
90 EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ 106 EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
91#include <dlfcn.h> 107#include <dlfcn.h>
92]], [[void *h = dlopen(0, 0);]]) 108]], [[void *h = dlopen(0, 0);]])
93 ;; 109 ;;
@@ -98,13 +114,21 @@ dnl _EFL_CHECK_FUNC_DLSYM is for internal use
98dnl _EFL_CHECK_FUNC_DLSYM(EFL, VARIABLE) 114dnl _EFL_CHECK_FUNC_DLSYM(EFL, VARIABLE)
99AC_DEFUN([_EFL_CHECK_FUNC_DLSYM], 115AC_DEFUN([_EFL_CHECK_FUNC_DLSYM],
100[ 116[
117dllibs=""
118case "$host_os" in
119 linux*)
120 dllibs="-ldl"
121 ;;
122 *)
123 ;;
124esac
101case "$host_os" in 125case "$host_os" in
102 mingw*) 126 mingw*)
103 $2="yes" 127 $2="yes"
104 EFL_ADD_LIBS([$1], [lib/evil/libdl.la]) 128 EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
105 ;; 129 ;;
106 *) 130 *)
107 EFL_FIND_LIB_FOR_CODE([$1], [-ldl], [$2], [[ 131 EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
108#ifndef _GNU_SOURCE 132#ifndef _GNU_SOURCE
109# define _GNU_SOURCE 133# define _GNU_SOURCE
110#endif 134#endif
@@ -215,7 +239,16 @@ fi
215dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use 239dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use
216dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, VARIABLE) 240dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, VARIABLE)
217AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN], 241AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN],
218[EFL_FIND_LIB_FOR_CODE([$1], [-lrt], [$2], [[ 242[
243shmlibs=""
244case "$host_os" in
245 linux*)
246 shmlibs="-lrt"
247 ;;
248 *)
249 ;;
250esac
251EFL_FIND_LIB_FOR_CODE([$1], [$shmlibs], [$2], [[
219#include <sys/mman.h> 252#include <sys/mman.h>
220#include <sys/stat.h> /* For mode constants */ 253#include <sys/stat.h> /* For mode constants */
221#include <fcntl.h> /* For O_* constants */ 254#include <fcntl.h> /* For O_* constants */