X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=m4%2Fwith_pkg.m4;h=39439b792ff8924620edf7722f380c68014dada9;hb=67cfc81471993023209c2bdb907295a0a451c5ff;hp=705cf0cf95e89e14e9648c40306f7a37cc63fa09;hpb=7c8d655cf36724558b31ab9296882df9f9582129;p=vlc diff --git a/m4/with_pkg.m4 b/m4/with_pkg.m4 index 705cf0cf95..39439b792f 100644 --- a/m4/with_pkg.m4 +++ b/m4/with_pkg.m4 @@ -79,26 +79,24 @@ dnl PKG_ENABLE_MODULES_VLC(VARIABLE-PREFIX, dnl VLC_MODULE_NAME dnl (if empty, same as VARIABLE-PREFIX) dnl PKG MODULES, dnl [DESCRIPTION], [DEFAULT], -dnl [EXTRA_CFLAGS], [EXTRA_LIBS]) +dnl [EXTRA_CFLAGS], [EXTRA_LIBS], [EXTRA_CPPFLAGS] AC_DEFUN([PKG_ENABLE_MODULES_VLC], [ -m4_pushdef([module_name], AS_TR_SH(m4_default(m4_tolower([$2]),m4_tolower([$1])))) +m4_pushdef([module_names], m4_default(m4_tolower([$2]),m4_tolower([$1]))) m4_pushdef([enable_arg], m4_tolower([$1])) PKG_WITH_MODULES([$1],[$3], - VLC_ADD_PLUGIN(module_name) - VLC_ADD_CFLAGS(module_name,[$$1_CFLAGS] [$6]) - VLC_ADD_LIBS(module_name,[$$1_LIBS] [$7]), + VLC_ADD_PLUGIN(module_names) + m4_ifval( m4_normalize([$8]), VLC_ADD_CPPFLAGS(module_names, [$8])) + VLC_ADD_CFLAGS(module_names,[$$1_CFLAGS] [$6]) + VLC_ADD_LIBS(module_names,[$$1_LIBS] [$7]), AS_IF([test x"$AS_TR_SH([enable_]enable_arg)" = "xyes"], [AC_MSG_ERROR(Library [$3] needed for [m4_tolower([$1])] was not found)], [AC_MSG_WARN(Library [$3] needed for [m4_tolower([$1])] was not found)] ), [$4],[$5]) -AM_CONDITIONAL([HAVE_][$1], - [test "$AS_TR_SH([with_]enable_arg)" = "yes"]) - -m4_popdef([module_name]) +m4_popdef([module_names]) m4_popdef([enable_arg]) ])