X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=m4%2Fvlc.m4;h=1ae4ff5f88d7f4ded859465fb47bcd592b5bf798;hb=f4827eb2a47dc96e6d6ecceb56a41817a2457dfd;hp=2c7c1433a0e1769eeb6659458e11f160c57c0fb9;hpb=9a419e596f8901cb097684724788baa73745abfa;p=vlc diff --git a/m4/vlc.m4 b/m4/vlc.m4 index 2c7c1433a0..1ae4ff5f88 100644 --- a/m4/vlc.m4 +++ b/m4/vlc.m4 @@ -11,57 +11,60 @@ AC_DEFUN([VLC_ADD_BUILTINS], [ ]) AC_DEFUN([VLC_ADD_PLUGIN], [ - PLUGINS="${PLUGINS} $1" - AC_SUBST([LTLIB$1], ["lib$1_plugin.la"]) + m4_foreach_w([element], [$1], [ + [PLUGINS="${PLUGINS} ]element["] + AC_SUBST([LTLIB]element, [lib]element[_plugin.la]) + ]) ]) dnl Special cases: vlc, pics, plugins, save AC_DEFUN([VLC_ADD_CPPFLAGS], [ - for element in [$1]; do - eval "CPPFLAGS_${element}="'"$'"{CPPFLAGS_${element}} $2"'"' - am_modules_with_cppflags="${am_modules_with_cppflags} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "CPPFLAGS_]element[="'"$'"{CPPFLAGS_]element[} $2"'"'] + [am_modules_with_cppflags="${am_modules_with_cppflags} ]element["] + ]) ]) AC_DEFUN([VLC_ADD_CFLAGS], [ - for element in [$1]; do - eval "CFLAGS_${element}="'"$'"{CFLAGS_${element}} $2"'"' - am_modules_with_cflags="${am_modules_with_cflags} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "CFLAGS_]element[="'"$'"{CFLAGS_]element[} $2"'"'] + [am_modules_with_cflags="${am_modules_with_cflags} ]element["] + ]) ]) AC_DEFUN([VLC_ADD_CXXFLAGS], [ - for element in [$1]; do - eval "CXXFLAGS_${element}="'"$'"{CXXFLAGS_${element}} $2"'"' - am_modules_with_cxxflags="${am_modules_with_cxxflags} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "CXXFLAGS_]element[="'"$'"{CXXFLAGS_]element[} $2"'"'] + [am_modules_with_cxxflags="${am_modules_with_cxxflags} ]element["] + ]) ]) AC_DEFUN([VLC_ADD_OBJCFLAGS], [ - for element in [$1]; do - eval "OBJCFLAGS_${element}="'"$'"{OBJCFLAGS_${element}} $2"'"' - am_modules_with_objcflags="${am_modules_with_objcflags} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "OBJCFLAGS_]element[="'"$'"{OBJCFLAGS_]element[} $2"'"'] + [am_modules_with_objcflags="${am_modules_with_objcflags} ]element["] + ]) ]) AC_DEFUN([VLC_ADD_LDFLAGS], [ - for element in [$1]; do - eval "LDFLAGS_${element}="'"'"$2 "'$'"{LDFLAGS_${element}} "'"' - am_modules_with_ldflags="${am_modules_with_ldflags} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "LDFLAGS_]element[="'"$2 $'"{LDFLAGS_]element[}"'"'] + [am_modules_with_ldflags="${am_modules_with_ldflags} ]element["] + ]) ]) AC_DEFUN([VLC_ADD_LIBS], [ - for element in [$1]; do - eval "LIBS_${element}="'"'"$2 "'$'"{LIBS_${element}} "'"' - am_modules_with_libs="${am_modules_with_libs} ${element}" - done + m4_foreach_w([element], [$1], [ + [eval "LIBS_]element[="'"'"$2 "'$'"{LIBS_]element[}"'"'] + [am_modules_with_libs="${am_modules_with_libs} ]element["] + ]) ]) AC_DEFUN([VLC_SET_CFLAGS_WERROR], [ - for element in [$1]; do - eval "CFLAGS_WERROR_${element}="'"'"$2"'"' - done + m4_foreach_w([element], [$1], [ + [eval "CFLAGS_WERROR_]element[="'"'"$2"'"'] + [am_modules_with_werror="${am_modules_with_werror} ]element["] + ]) ]) dnl =========================================================================== @@ -92,7 +95,7 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [ AC_MSG_RESULT(configure: creating ./vlc-config.in) - am_all_modules="`for x in ${am_modules_with_cppflags} ${am_modules_with_cflags} ${am_modules_with_cxxflags} ${am_modules_with_objcflags} ${am_modules_with_ldflags} ${am_modules_with_libs}; do echo $x; done | sort | uniq`" + am_all_modules="`for x in ${am_modules_with_cppflags} ${am_modules_with_cflags} ${am_modules_with_cxxflags} ${am_modules_with_objcflags} ${am_modules_with_ldflags} ${am_modules_with_libs} ${am_modules_with_werror}; do echo $x; done | sort | uniq`" rm -f vlc-config.in sed -ne '/#@1@#/q;p' < "${srcdir}/vlc-config.in.in" \ @@ -100,7 +103,6 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [ -e "s/@cprof@/${enable_cprof}/" \ -e "s/@optim@/${enable_optimizations}/" \ -e "s/@debug@/${enable_debug}/" \ - -e "s/@release@/${enable_release}/" \ -e "s/@PLUGINS@/${PLUGINS}/" \ -e "s/@BUILTINS@/${BUILTINS}/" \ -e "s/@CFLAGS_TUNING@/${CFLAGS_TUNING}/" \ @@ -138,8 +140,8 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [ if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then echo " libs=\"\${libs} `eval echo '$'LIBS_${x}`\"" fi - if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then - echo " CFLAGS_WERROR=\"`eval echo '$'CFLAGS_WERROR_${x}`\"" + if test "`eval echo @'$'CFLAGS_WERROR_${x}@`" != "@@"; then + echo " cflags_werror=\"`eval echo '$'CFLAGS_WERROR_${x}`\"" fi echo " ;;" ] done >> vlc-config.in