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