summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2009-12-30 00:02:48 +0000
committerVincent Torri <vincent.torri@gmail.com>2009-12-30 00:02:48 +0000
commit7ccfc62c02ae3e7821d7ba96f9376580cefdab9a (patch)
treebad8ec24318ae6ae8213af75e2263757cf005f47 /legacy
parent8e455fa1e69003aea7cd2cdef568c882356f8d56 (diff)
* better m4 code
* use latest efl_pthread.m4 code and update configure.ac accordingly SVN revision: 44771
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eet/configure.ac2
-rw-r--r--legacy/eet/m4/efl_coverage.m48
-rw-r--r--legacy/eet/m4/efl_doxygen.m411
-rw-r--r--legacy/eet/m4/efl_pthread.m446
-rw-r--r--legacy/eet/m4/efl_tests.m46
5 files changed, 48 insertions, 25 deletions
diff --git a/legacy/eet/configure.ac b/legacy/eet/configure.ac
index 591954c8d4..99e93e1a14 100644
--- a/legacy/eet/configure.ac
+++ b/legacy/eet/configure.ac
@@ -274,7 +274,7 @@ AC_MSG_RESULT(${have_signature})
274 274
275# pthread library 275# pthread library
276 276
277EFL_CHECK_PTHREAD([have_pthread="yes"], [have_pthread="no"]) 277EFL_CHECK_PTHREAD(["no"], [have_pthread="yes"], [have_pthread="no"])
278 278
279 279
280### Checks for header files 280### Checks for header files
diff --git a/legacy/eet/m4/efl_coverage.m4 b/legacy/eet/m4/efl_coverage.m4
index baf00021ec..85d03215b3 100644
--- a/legacy/eet/m4/efl_coverage.m4
+++ b/legacy/eet/m4/efl_coverage.m4
@@ -31,7 +31,7 @@ AC_MSG_RESULT([$_efl_enable_coverage])
31 31
32dnl lcov check 32dnl lcov check
33 33
34if test ! "x$1" = "xyes" -a "x$_efl_enable_coverage" = "xyes" ; then 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.]) 35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests]) 36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no" 37 _efl_enable_coverage="no"
@@ -56,11 +56,7 @@ AC_SUBST(EFL_COVERAGE_LIBS)
56 56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes") 57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58 58
59if test "x${_efl_enable_coverage}" = "xyes" ; then 59AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
60 m4_default([$2], [:])
61else
62 m4_default([$3], [:])
63fi
64]) 60])
65 61
66dnl End of efl_coverage.m4 62dnl End of efl_coverage.m4
diff --git a/legacy/eet/m4/efl_doxygen.m4 b/legacy/eet/m4/efl_doxygen.m4
index d83ed68b8a..7324af3e42 100644
--- a/legacy/eet/m4/efl_doxygen.m4
+++ b/legacy/eet/m4/efl_doxygen.m4
@@ -73,6 +73,8 @@ dnl Check the given doxygen program.
73 AC_MSG_WARN([no doxygen detected. Documentation will not be built]) 73 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
74 fi 74 fi
75 ]) 75 ])
76else
77 efl_have_doxygen="no"
76fi 78fi
77 79
78dnl 80dnl
@@ -84,14 +86,9 @@ if ! test "x${efl_have_doxygen}" = "xyes" ; then
84 efl_enable_doc="no" 86 efl_enable_doc="no"
85fi 87fi
86 88
87AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes") 89AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes")
88
89if test "x${efl_enable_doc}" = "xyes" ; then
90 m4_default([$1], [:])
91else
92 m4_default([$2], [:])
93fi
94 90
91AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2])
95]) 92])
96 93
97dnl End of efl_doxygen.m4 94dnl End of efl_doxygen.m4
diff --git a/legacy/eet/m4/efl_pthread.m4 b/legacy/eet/m4/efl_pthread.m4
index 7bd341c709..384b7ae230 100644
--- a/legacy/eet/m4/efl_pthread.m4
+++ b/legacy/eet/m4/efl_pthread.m4
@@ -3,7 +3,7 @@ dnl That code is public domain and can be freely used or copied.
3 3
4dnl Macro that check if several ASM instruction sets are available or not. 4dnl Macro that check if several ASM instruction sets are available or not.
5 5
6dnl Usage: EFL_CHECK_EFL_CHECK_PTHREAD([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 6dnl Usage: EFL_CHECK_EFL_CHECK_PTHREAD(want_pthread_spin[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EFL_PTHREAD_FLAGS) 7dnl Call AC_SUBST(EFL_PTHREAD_FLAGS)
8dnl Define EFL_HAVE_PTHREAD 8dnl Define EFL_HAVE_PTHREAD
9 9
@@ -31,9 +31,18 @@ dnl check if the compiler supports pthreads
31_efl_have_pthread="no" 31_efl_have_pthread="no"
32 32
33if test "x${_efl_enable_pthread}" = "xyes" ; then 33if test "x${_efl_enable_pthread}" = "xyes" ; then
34 AC_CHECK_HEADER(pthread.h, 34
35 AC_COMPILE_IFELSE(
36 [AC_LANG_PROGRAM([[
37#include <pthread.h>
38 ]],
39 [[
40pthread_t id;
41id = pthread_self();
42 ]])],
35 [_efl_have_pthread="yes"], 43 [_efl_have_pthread="yes"],
36 [_efl_have_pthread="no"]) 44 [_efl_have_pthread="no"])
45
37fi 46fi
38 47
39AC_MSG_CHECKING([whether system support POSIX threads]) 48AC_MSG_CHECKING([whether system support POSIX threads])
@@ -63,9 +72,34 @@ if test "x${_efl_have_pthread}" = "xyes" ; then
63 AC_DEFINE(EFL_HAVE_PTHREAD, 1, [Define to mention that POSIX threads are supported]) 72 AC_DEFINE(EFL_HAVE_PTHREAD, 1, [Define to mention that POSIX threads are supported])
64fi 73fi
65 74
66if test "x${_efl_have_pthread}" = "xyes" ; then 75dnl check if the compiler supports pthreads spinlock
67 ifelse([$1], , :, [$1]) 76
68else 77_efl_have_pthread_spinlock="no"
69 ifelse([$2], , :, [$2]) 78
79if test "x${_efl_have_pthread}" = "xyes" && test "x$1" = "xyes" ; then
80
81 AC_COMPILE_IFELSE(
82 [AC_LANG_PROGRAM([[
83#include <pthread.h>
84 ]],
85 [[
86pthread_spinlock_t lock;
87int res;
88res = pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE);
89 ]])],
90 [_efl_have_pthread_spinlock="yes"],
91 [_efl_have_pthread_spinlock="no"])
92
93fi
94
95AC_MSG_CHECKING([whether to build POSIX threads spinlock code])
96AC_MSG_RESULT([${_efl_have_pthread_spinlock}])
97
98if test "x${_efl_have_pthread_spinlock}" = "xyes" ; then
99 AC_DEFINE(EFL_HAVE_PTHREAD_SPINLOCK, 1, [Define to mention that POSIX threads spinlocks are supported])
70fi 100fi
101
102AS_IF([test "x$_efl_have_pthread" = "xyes"], [$2], [$3])
103AS_IF([test "x$_efl_have_pthread_spinlock" = "xyes"], [$4], [$5])
104
71]) 105])
diff --git a/legacy/eet/m4/efl_tests.m4 b/legacy/eet/m4/efl_tests.m4
index 98d11bb7e8..3a4dfe246f 100644
--- a/legacy/eet/m4/efl_tests.m4
+++ b/legacy/eet/m4/efl_tests.m4
@@ -37,11 +37,7 @@ fi
37 37
38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") 38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
39 39
40if test "x${_efl_enable_tests}" = "xyes" ; then 40AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2])
41 m4_default([$1], [:])
42else
43 m4_default([$2], [:])
44fi
45]) 41])
46 42
47dnl End of efl_tests.m4 43dnl End of efl_tests.m4