summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-17 18:55:32 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-17 18:55:32 +0000
commit88f2d266085cdf75bab432d4cc08f481f1cf5c3c (patch)
tree37a4af74235a2c544c0462fac713bd652567b51e /m4
parentc757cba26f172dfa04c1d1fe75b68db373150214 (diff)
don't mix private and public libraries dependencies.
when I fixed eina's dependency on -lpthread I used all the libraries eina links to. But we should just do with -lpthread as it's a public dependency... that was in eina.pc.in and I missed. Now we have EFL_ADD_PUBLIC_LIBS() that will register for requirements_public_libs_name and use internally when eina is used. This should also fix the problem by Arvind with gcrypt. SVN revision: 82942
Diffstat (limited to 'm4')
-rw-r--r--m4/efl.m459
1 files changed, 57 insertions, 2 deletions
diff --git a/m4/efl.m4 b/m4/efl.m4
index 90e4cb7c39..c02138bc77 100644
--- a/m4/efl.m4
+++ b/m4/efl.m4
@@ -108,7 +108,7 @@ esac
108requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" 108requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}"
109requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}" 109requirements_cflags_[]m4_defn([DOWNEFL])="-I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} ${requirements_cflags_[][]m4_defn([DOWNEFL])}"
110requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}" 110requirements_internal_libs_[]m4_defn([DOWNEFL])="lib/${libdirname}/lib${libname}.la ${requirements_internal_libs_[][]m4_defn([DOWNEFL])}"
111requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}" 111requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_public_libs_[]m4_defn([DOWNOTHER])} ${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])}"
112m4_popdef([DOWNOTHER])dnl 112m4_popdef([DOWNOTHER])dnl
113m4_popdef([DOWNEFL])dnl 113m4_popdef([DOWNEFL])dnl
114]) 114])
@@ -208,6 +208,21 @@ requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2"
208m4_popdef([DOWN])dnl 208m4_popdef([DOWN])dnl
209]) 209])
210 210
211dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS)
212dnl Add libraries that the EFL library will depend on when used.
213dnl
214dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG,
215dnl this one is used when linking PKG to other libraries or applications.
216dnl
217dnl For instance if you use some other library in your header that user
218dnl inclues.
219AC_DEFUN([EFL_ADD_PUBLIC_LIBS],
220[dnl
221m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
222requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2"
223m4_popdef([DOWN])dnl
224])
225
211dnl EFL_ADD_CFLAGS(PKG, CFLAGS) 226dnl EFL_ADD_CFLAGS(PKG, CFLAGS)
212dnl Add CFLAGS that the EFL library will use 227dnl Add CFLAGS that the EFL library will use
213dnl See EFL_DEPEND_PKG() for pkg-config version. 228dnl See EFL_DEPEND_PKG() for pkg-config version.
@@ -220,6 +235,44 @@ m4_popdef([DOWN])dnl
220 235
221dnl EFL_LIB_START(PKG) 236dnl EFL_LIB_START(PKG)
222dnl start the setup of an EFL library, defines variables and prints a notice 237dnl start the setup of an EFL library, defines variables and prints a notice
238dnl
239dnl Exports (AC_SUBST)
240dnl PKG_CFLAGS: what to use for CFLAGS
241dnl
242dnl PKG_LDFLAGS: what to use for LDFLAGS
243dnl
244dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes
245dnl everything else.
246dnl
247dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this
248dnl package depend. Used in automake's _DEPENDENCIES.
249dnl
250dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using
251dnl this PKG (PKG_LIBS + libpkg.la)
252dnl
253dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la
254dnl
255dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg,
256dnl includes internal EFL (used in 'Requires.private' in pkg.pc)
257dnl
258dnl requirements_libs_pkg: external libraries this package needs when
259dnl linking (used in 'Libs.private' in pkg.pc)
260dnl
261dnl requirements_public_libs_pkg: external libraries other packages need
262dnl when using this (used in 'Libs' in pkg.pc)
263dnl
264dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS).
265dnl
266dnl Variables:
267dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this
268dnl pkg (used in EFL_EVAL_PKGS())
269dnl
270dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la
271dnl that this package depend.
272dnl
273dnl requirements_internal_deps_libs_pkg: external libraries that are public
274dnl dependencies (due internal libs).
275dnl
223AC_DEFUN([EFL_LIB_START], 276AC_DEFUN([EFL_LIB_START],
224[ 277[
225m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl 278m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
@@ -228,6 +281,7 @@ m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
228requirements_internal_libs_[]m4_defn([DOWN])="" 281requirements_internal_libs_[]m4_defn([DOWN])=""
229requirements_internal_deps_libs_[]m4_defn([DOWN])="" 282requirements_internal_deps_libs_[]m4_defn([DOWN])=""
230requirements_libs_[]m4_defn([DOWN])="" 283requirements_libs_[]m4_defn([DOWN])=""
284requirements_public_libs_[]m4_defn([DOWN])=""
231requirements_cflags_[]m4_defn([DOWN])="" 285requirements_cflags_[]m4_defn([DOWN])=""
232requirements_pc_[]m4_defn([DOWN])="" 286requirements_pc_[]m4_defn([DOWN])=""
233requirements_pc_deps_[]m4_defn([DOWN])="" 287requirements_pc_deps_[]m4_defn([DOWN])=""
@@ -240,6 +294,7 @@ m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}"
240m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" 294m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}"
241 295
242AC_SUBST([requirements_libs_]m4_defn([DOWN])) 296AC_SUBST([requirements_libs_]m4_defn([DOWN]))
297AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))
243AC_SUBST([requirements_cflags_]m4_defn([DOWN])) 298AC_SUBST([requirements_cflags_]m4_defn([DOWN]))
244AC_SUBST([requirements_pc_]m4_defn([DOWN])) 299AC_SUBST([requirements_pc_]m4_defn([DOWN]))
245AC_SUBST(m4_defn([UP])[_LIBS]) 300AC_SUBST(m4_defn([UP])[_LIBS])
@@ -271,7 +326,7 @@ case "m4_defn([DOWN])" in
271esac 326esac
272 327
273m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_COV_CFLAGS} ${EFL_LDFLAGS}" 328m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS} ${EFL_COV_CFLAGS} ${EFL_LDFLAGS}"
274m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} " 329m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${m4_defn([UP])_LDFLAGS} ${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_efl} "
275m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" 330m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}"
276USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" 331USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la"
277USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_internal_deps_libs_[]m4_defn([DOWN])}" 332USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la ${requirements_internal_deps_libs_[]m4_defn([DOWN])}"