summaryrefslogtreecommitdiff
path: root/m4/efl_compiler.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-16 10:57:48 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-16 10:57:48 +0000
commit785f2a6b3a70454ecfe94addc6480ebf20c44c13 (patch)
tree17a195d2c1f022cd480fd0e0b95be5035ad915e2 /m4/efl_compiler.m4
parentdfc0331373c3f98df7cb996abc588c7dcf44af0a (diff)
merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do SVN revision: 76710
Diffstat (limited to 'm4/efl_compiler.m4')
-rw-r--r--m4/efl_compiler.m449
1 files changed, 49 insertions, 0 deletions
diff --git a/m4/efl_compiler.m4 b/m4/efl_compiler.m4
index 5f17be499d..be6a753e07 100644
--- a/m4/efl_compiler.m4
+++ b/m4/efl_compiler.m4
@@ -54,3 +54,52 @@ AC_DEFUN([EFL_CHECK_COMPILER_FLAGS],
54[ 54[
55m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))]) 55m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))])
56]) 56])
57
58
59dnl Macro that checks for a linker flag availability
60dnl
61dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
62dnl AC_SUBST : EFL_LIBS (EFL being replaced by its value)
63dnl AM_CONDITIONAL : EFL_HAVE_FLAG (FLAG being replaced by its value)
64
65AC_DEFUN([EFL_CHECK_LINKER_FLAG],
66[
67m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))
68m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))
69
70LDFLAGS_save="${LDFLAGS}"
71LDFLAGS="${LDFLAGS} $2"
72
73AC_LANG_PUSH([C])
74AC_MSG_CHECKING([whether the linker supports $2])
75
76AC_LINK_IFELSE(
77 [AC_LANG_PROGRAM([[]])],
78 [have_flag="yes"],
79 [have_flag="no"])
80AC_MSG_RESULT([${have_flag}])
81
82LDFLAGS="${LDFLAGS_save}"
83AC_LANG_POP([C])
84
85if test "x${have_flag}" = "xyes" ; then
86 UPEFL[_LIBS]="${UPEFL[_LIBS]} [$2]"
87fi
88AC_ARG_VAR(UPEFL[_LIBS], [preprocessor flags for $2])
89AC_SUBST(UPEFL[_LIBS])
90
91AM_CONDITIONAL([EFL_HAVE]UP, [test "x${have_flag}" = "xyes"])
92
93m4_popdef([UP])
94m4_popdef([UPEFL])
95])
96
97dnl Macro that iterates over a sequence of white separated flags
98dnl and that call EFL_CHECK_LINKER_FLAG() for each of these flags
99dnl
100dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
101
102AC_DEFUN([EFL_CHECK_LINKER_FLAGS],
103[
104m4_foreach_w([flag], [$2], [EFL_CHECK_LINKER_FLAG([$1], m4_defn([flag]))])
105])