summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-31 00:46:14 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-31 00:46:14 +0000
commitdf1b3d30c4ca130fcecce67b2c0fcbbbcfa5a29c (patch)
treee26086071ac285910d3e162c39819f3a2c3affea /m4
parent51f8fe26fc4774e69be3547d49ae902c287c8b61 (diff)
efl: refactor CFLAGS, LIBS, LIBADD and LDADD usage.
- remove EFL_LIBS and EFL_CFLAGS, use per-lib values that inherit from EFL (general) - add NAME_LDFLAGS and EFL_LDFLAGS for linker flags. - LDADD (binaries) now use NAME_LDFLAGS instead of NAME_LIBS, as they link to libname.la and that will pull in the libtool dependencies SVN revision: 81915
Diffstat (limited to 'm4')
-rw-r--r--m4/efl.m49
-rw-r--r--m4/efl_compiler.m47
2 files changed, 10 insertions, 6 deletions
diff --git a/m4/efl.m4 b/m4/efl.m4
index 426e3fc..64a5ec7 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -138,12 +138,14 @@ requirements_pc_[]m4_defn([DOWN])=""
138requirements_pc_deps_[]m4_defn([DOWN])="" 138requirements_pc_deps_[]m4_defn([DOWN])=""
139 139
140m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" 140m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}"
141m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}"
141m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" 142m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}"
142 143
143AC_SUBST([requirements_libs_]m4_defn([DOWN])) 144AC_SUBST([requirements_libs_]m4_defn([DOWN]))
144AC_SUBST([requirements_cflags_]m4_defn([DOWN])) 145AC_SUBST([requirements_cflags_]m4_defn([DOWN]))
145AC_SUBST([requirements_pc_]m4_defn([DOWN])) 146AC_SUBST([requirements_pc_]m4_defn([DOWN]))
146AC_SUBST(m4_defn([UP])[_LIBS]) 147AC_SUBST(m4_defn([UP])[_LIBS])
148AC_SUBST(m4_defn([UP])[_LDFLAGS])
147AC_SUBST(m4_defn([UP])[_CFLAGS]) 149AC_SUBST(m4_defn([UP])[_CFLAGS])
148 150
149AC_MSG_NOTICE([Start $1 checks]) 151AC_MSG_NOTICE([Start $1 checks])
@@ -159,8 +161,11 @@ AC_DEFUN([EFL_LIB_END],
159m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl 161m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
160m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl 162m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
161 163
162m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${requirements_libs_[]m4_defn([DOWN])}" 164m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_LDFLAGS}"
163m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${requirements_cflags_[]m4_defn([DOWN])}" 165m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_LIBS} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} "
166m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${EFL_CFLAGS} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl}"
167requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}"
168requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}"
164 169
165AC_MSG_NOTICE([Finished $1 checks]) 170AC_MSG_NOTICE([Finished $1 checks])
166m4_popdef([UP]) 171m4_popdef([UP])
diff --git a/m4/efl_compiler.m4 b/m4/efl_compiler.m4
index 98dc0a1..6b98390 100644
--- a/m4/efl_compiler.m4
+++ b/m4/efl_compiler.m4
@@ -56,7 +56,7 @@ m4_foreach_w([flag], [$2], [EFL_CHECK_COMPILER_FLAG([$1], m4_defn([flag]))])
56dnl Macro that checks for a linker flag availability 56dnl Macro that checks for a linker flag availability
57dnl 57dnl
58dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]]) 58dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
59dnl AC_SUBST : EFL_LIBS (EFL being replaced by its value) 59dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value)
60 60
61AC_DEFUN([EFL_CHECK_LINKER_FLAG], 61AC_DEFUN([EFL_CHECK_LINKER_FLAG],
62[ 62[
@@ -79,10 +79,9 @@ LDFLAGS="${LDFLAGS_save}"
79AC_LANG_POP([C]) 79AC_LANG_POP([C])
80 80
81if test "x${have_flag}" = "xyes" ; then 81if test "x${have_flag}" = "xyes" ; then
82 UPEFL[_LIBS]="${UPEFL[_LIBS]} [$2]" 82 UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]"
83fi 83fi
84AC_ARG_VAR(UPEFL[_LIBS], [preprocessor flags for $2]) 84AC_SUBST(UPEFL[_LDFLAGS])
85AC_SUBST(UPEFL[_LIBS])
86 85
87m4_popdef([UP]) 86m4_popdef([UP])
88m4_popdef([UPEFL]) 87m4_popdef([UPEFL])