]> git.sesse.net Git - vlc/blobdiff - m4/vlc.m4
Options descriptions for TS muxer
[vlc] / m4 / vlc.m4
index f6b3093c3311a4cfb72f2294ea7a172027872069..82287bc53381063044b6af13e1eee8778fd81bca 100644 (file)
--- a/m4/vlc.m4
+++ b/m4/vlc.m4
@@ -1,4 +1,5 @@
 dnl  Macros needed for VLC
+dnl  $Id: vlc.m4,v 1.6 2003/07/17 15:49:37 sam Exp $
 
 dnl  Add plugins or builtins
 AC_DEFUN([AX_ADD_BUILTINS], [
@@ -30,35 +31,35 @@ dnl  Special cases: vlc, pics, plugins, save
 AC_DEFUN([AX_ADD_CPPFLAGS], [
   for element in [$1]; do
     eval "CPPFLAGS_${element}="'"$'"{CPPFLAGS_${element}} $2"'"'
-    am_plugins_with_cppflags="${am_plugins_with_cppflags} ${element}"
+    am_modules_with_cppflags="${am_modules_with_cppflags} ${element}"
   done
 ])
 
 AC_DEFUN([AX_ADD_CFLAGS], [
   for element in [$1]; do
     eval "CFLAGS_${element}="'"$'"{CFLAGS_${element}} $2"'"'
-    am_plugins_with_cflags="${am_plugins_with_cflags} ${element}"
+    am_modules_with_cflags="${am_modules_with_cflags} ${element}"
   done
 ])
 
 AC_DEFUN([AX_ADD_CXXFLAGS], [
   for element in [$1]; do
     eval "CXXFLAGS_${element}="'"$'"{CXXFLAGS_${element}} $2"'"'
-    am_plugins_with_cxxflags="${am_plugins_with_cxxflags} ${element}"
+    am_modules_with_cxxflags="${am_modules_with_cxxflags} ${element}"
   done
 ])
 
 AC_DEFUN([AX_ADD_OBJCFLAGS], [
   for element in [$1]; do
     eval "OBJCFLAGS_${element}="'"$'"{OBJCFLAGS_${element}} $2"'"'
-    am_plugins_with_objcflags="${am_plugins_with_objcflags} ${element}"
+    am_modules_with_objcflags="${am_modules_with_objcflags} ${element}"
   done
 ])
 
 AC_DEFUN([AX_ADD_LDFLAGS], [
   for element in [$1]; do
-    eval "LDFLAGS_${element}="'"$'"{LDFLAGS_${element}} $2"'"'
-    am_plugins_with_ldflags="${am_plugins_with_ldflags} ${element}"
+    eval "LDFLAGS_${element}="'"'"$2 "'$'"{LDFLAGS_${element}} "'"'
+    am_modules_with_ldflags="${am_modules_with_ldflags} ${element}"
   done
 ])
 
@@ -66,6 +67,8 @@ AC_DEFUN([AX_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}; do echo $x; done | sort | uniq`"
+
   rm -f vlc-config.in
   sed -ne '/#@1@#/q;p' < "${srcdir}/vlc-config.in.in" \
     | sed -e "s/@gprof@/${enable_gprof}/" \
@@ -82,28 +85,28 @@ AC_DEFUN([AX_OUTPUT_VLC_CONFIG_IN], [
     > vlc-config.in
 
   dnl  Switch/case loop
-  for x in `echo ${am_plugins_with_ldflags}`
+  for x in `echo ${am_all_modules}`
   do [
     echo "    ${x})" >> vlc-config.in
-    if test -n "`eval echo '$'CPPFLAGS_${x}`"; then
+    if test "`eval echo @'$'CPPFLAGS_${x}@`" != "@@"; then
       echo "      cppflags=\"\${cppflags} `eval echo '$'CPPFLAGS_${x}`\"" >> vlc-config.in
     fi
-    if test -n "`eval echo '$'CFLAGS_${x}`"; then
+    if test "`eval echo @'$'CFLAGS_${x}@`" != "@@"; then
       echo "      cflags=\"\${cflags} `eval echo '$'CFLAGS_${x}`\"" >> vlc-config.in
     fi
-    if test -n "`eval echo '$'CXXFLAGS_${x}`"; then
+    if test "`eval echo @'$'CXXFLAGS_${x}@`" != "@@"; then
       echo "      cxxflags=\"\${cxxflags} `eval echo '$'CXXFLAGS_${x}`\"" >> vlc-config.in
-      if test "${x}" != "plugins" -a "${x}" != "builtins"; then
+      if test "${x}" != "plugin" -a "${x}" != "builtin"; then
         echo "      linkage=\"c++\"" >> vlc-config.in
       fi
     fi
-    if test -n "`eval echo '$'OBJCFLAGS_${x}`"; then
+    if test "`eval echo @'$'OBJCFLAGS_${x}@`" != "@@"; then
       echo "      objcflags=\"\${objcflags} `eval echo '$'OBJCFLAGS_${x}`\"" >> vlc-config.in
-      if test "${x}" != "plugins" -a "${x}" != "builtins"; then
+      if test "${x}" != "plugin" -a "${x}" != "builtin"; then
         echo "      if test \"\${linkage}\" = \"c\"; then linkage=\"objc\"; fi" >> vlc-config.in
       fi
     fi
-    if test -n "`eval echo '$'LDFLAGS_${x}`"; then
+    if test "`eval echo @'$'LDFLAGS_${x}@`" != "@@"; then
       echo "      ldflags=\"\${ldflags} `eval echo '$'LDFLAGS_${x}`\"" >> vlc-config.in
     fi
     echo "    ;;" >> vlc-config.in