summaryrefslogtreecommitdiff
path: root/legacy/eina/m4/efl_pthread.m4
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-02-17 14:18:14 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-02-17 14:18:14 +0000
commit55cfc46ee28bc3d1c53304489d25245ddfe25bd7 (patch)
tree443b803eddce35d376a5822cd588e3b4e5885899 /legacy/eina/m4/efl_pthread.m4
parenta98287fc079f983c79fa81e7869a39c08dd8e486 (diff)
* eina/m4/efl_pthread.m4,
* eina/src/modules/mp/chained_pool/Makefile.am, * eina/src/modules/mp/chained_pool/eina_chained_mempool.c: Now chained mempool are thread safe. SVN revision: 39058
Diffstat (limited to '')
-rw-r--r--legacy/eina/m4/efl_pthread.m430
1 files changed, 24 insertions, 6 deletions
diff --git a/legacy/eina/m4/efl_pthread.m4 b/legacy/eina/m4/efl_pthread.m4
index 172acef9ab..b11ae84f62 100644
--- a/legacy/eina/m4/efl_pthread.m4
+++ b/legacy/eina/m4/efl_pthread.m4
@@ -13,7 +13,7 @@ AC_DEFUN([EFL_CHECK_PTHREAD],
13dnl configure option 13dnl configure option
14 14
15AC_ARG_ENABLE([pthread], 15AC_ARG_ENABLE([pthread],
16 [AC_HELP_STRING([--enable-pthread], [enable POSIX threads code @<:@default=no@:>@])], 16 [AC_HELP_STRING([--disable-pthread], [enable POSIX threads code @<:@default=no@:>@])],
17 [ 17 [
18 if test "x${enableval}" = "xyes" ; then 18 if test "x${enableval}" = "xyes" ; then
19 _efl_enable_pthread="yes" 19 _efl_enable_pthread="yes"
@@ -21,7 +21,7 @@ AC_ARG_ENABLE([pthread],
21 _efl_enable_pthread="no" 21 _efl_enable_pthread="no"
22 fi 22 fi
23 ], 23 ],
24 [_efl_enable_pthread="no"] 24 [_efl_enable_pthread="yes"]
25) 25)
26AC_MSG_CHECKING([whether to build POSIX threads code]) 26AC_MSG_CHECKING([whether to build POSIX threads code])
27AC_MSG_RESULT([${_efl_enable_pthread}]) 27AC_MSG_RESULT([${_efl_enable_pthread}])
@@ -42,18 +42,36 @@ if test "x${_efl_enable_pthread}" = "xyes" ; then
42 ]], 42 ]],
43 [[]]) 43 [[]])
44 ], 44 ],
45 [_efl_have_pthread="yes" 45 [
46 EFL_PTHREAD_FLAGS="-pthread"] 46 _efl_have_pthread="yes"
47 EFL_PTHREAD_CFLAGS="-pthread"
48 EFL_PTHREAD_LIBS="-pthread"
49 ]
47 ) 50 )
48 51
49 AC_LANG_POP([C]) 52 AC_LANG_POP([C])
50 CFLAGS=${SAVE_CFLAGS} 53 CFLAGS=${SAVE_CFLAGS}
51fi 54fi
52 55
53AC_MSG_CHECKING([whether POSIX threads are supported]) 56AC_MSG_CHECKING([whether compiler need -pthread POSIX for threads support])
54AC_MSG_RESULT([${_efl_have_pthread}]) 57AC_MSG_RESULT([${_efl_have_pthread}])
55 58
56AC_SUBST(EFL_PTHREAD_FLAGS) 59if test "x${_efl_have_pthread}" = "xno" -a "x${_efl_enable_pthread}" = "xyes" ; then
60 AC_CHECK_HEADER(pthread.h,
61 [
62 _efl_have_pthread="yes"
63 EFL_PTHREAD_LIBS="-lpthread"
64 ],
65 [
66 _efl_have_pthread="no"
67 ])
68
69 AC_MSG_CHECKING([whether system support POSIX threads])
70 AC_MSG_RESULT([${_efl_enable_pthread}])
71fi
72
73AC_SUBST(EFL_PTHREAD_CFLAGS)
74AC_SUBST(EFL_PTHREAD_LIBS)
57 75
58if test "x${_efl_have_pthread}" = "xyes" ; then 76if test "x${_efl_have_pthread}" = "xyes" ; then
59 AC_DEFINE(EFL_HAVE_PTHREAD, 1, [Define to mention that POSIX threads are supported]) 77 AC_DEFINE(EFL_HAVE_PTHREAD, 1, [Define to mention that POSIX threads are supported])