aboutsummaryrefslogtreecommitdiffstats
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)
downloadefl-df1b3d30c4ca130fcecce67b2c0fcbbbcfa5a29c.tar.gz
efl-df1b3d30c4ca130fcecce67b2c0fcbbbcfa5a29c.tar.xz
efl-df1b3d30c4ca130fcecce67b2c0fcbbbcfa5a29c.zip
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 426e3fcf3..64a5ec760 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -138,12 +138,14 @@ requirements_pc_[]m4_defn([DOWN])=""
requirements_pc_deps_[]m4_defn([DOWN])=""
m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}"
+m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}"
m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}"
AC_SUBST([requirements_libs_]m4_defn([DOWN]))
AC_SUBST([requirements_cflags_]m4_defn([DOWN]))
AC_SUBST([requirements_pc_]m4_defn([DOWN]))
AC_SUBST(m4_defn([UP])[_LIBS])
+AC_SUBST(m4_defn([UP])[_LDFLAGS])
AC_SUBST(m4_defn([UP])[_CFLAGS])
AC_MSG_NOTICE([Start $1 checks])
@@ -159,8 +161,11 @@ AC_DEFUN([EFL_LIB_END],
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
-m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${requirements_libs_[]m4_defn([DOWN])}"
-m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${requirements_cflags_[]m4_defn([DOWN])}"
+m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_LDFLAGS}"
+m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_LIBS} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} "
+m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS} ${EFL_CFLAGS} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_efl}"
+requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_efl}"
+requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_efl}"
AC_MSG_NOTICE([Finished $1 checks])
m4_popdef([UP])
diff --git a/m4/efl_compiler.m4 b/m4/efl_compiler.m4
index 98dc0a1ba..6b98390e5 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]))])
dnl Macro that checks for a linker flag availability
dnl
dnl EFL_CHECK_LINKER_FLAG(EFL, FLAG[, ACTION-IF-FOUND[ ,ACTION-IF-NOT-FOUND]])
-dnl AC_SUBST : EFL_LIBS (EFL being replaced by its value)
+dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value)
AC_DEFUN([EFL_CHECK_LINKER_FLAG],
[
@@ -79,10 +79,9 @@ LDFLAGS="${LDFLAGS_save}"
AC_LANG_POP([C])
if test "x${have_flag}" = "xyes" ; then
- UPEFL[_LIBS]="${UPEFL[_LIBS]} [$2]"
+ UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]"
fi
-AC_ARG_VAR(UPEFL[_LIBS], [preprocessor flags for $2])
-AC_SUBST(UPEFL[_LIBS])
+AC_SUBST(UPEFL[_LDFLAGS])
m4_popdef([UP])
m4_popdef([UPEFL])