]> git.sesse.net Git - vlc/blobdiff - m4/vlc.m4
live555: privatize b_error (and remove useless checks)
[vlc] / m4 / vlc.m4
index a6ff7d6ce7400578736d7fd6f56667ccf2105dda..46b10214e7e297a68e2aec6652b01a43a72553db 100644 (file)
--- a/m4/vlc.m4
+++ b/m4/vlc.m4
@@ -10,8 +10,9 @@ AC_DEFUN([VLC_ADD_BUILTINS], [
   BUILTINS="${BUILTINS} $1"
 ])
 
-AC_DEFUN([VLC_ADD_PLUGINS], [
+AC_DEFUN([VLC_ADD_PLUGIN], [
   PLUGINS="${PLUGINS} $1"
+  AC_SUBST([LTLIB$1], ["lib$1_plugin.la"])
 ])
 
 dnl  Special cases: vlc, pics, plugins, save
@@ -57,6 +58,13 @@ AC_DEFUN([VLC_ADD_LIBS], [
   done
 ])
 
+AC_DEFUN([VLC_SET_CFLAGS_WERROR], [
+  for element in [$1]; do
+    eval "CFLAGS_WERROR_${element}="'"'"$2"'"'
+    am_modules_with_werror="${am_modules_with_werror} ${element}"
+  done
+])
+
 dnl ===========================================================================
 dnl  Macros to save and restore default flags
 
@@ -85,7 +93,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" \
@@ -131,6 +139,9 @@ 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 @'$'CFLAGS_WERROR_${x}@`" != "@@"; then
+      echo "      cflags_werror=\"`eval echo '$'CFLAGS_WERROR_${x}`\""
+    fi
     echo "    ;;"
   ] done >> vlc-config.in
 
@@ -148,7 +159,7 @@ AC_DEFUN([VLC_LIBRARY_SUFFIX], [
     darwin*)
       LIBEXT=".dylib"
       ;;
-    *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
+    *mingw32* | *cygwin* | *wince* | *mingwce*)
       LIBEXT=".dll"
       ;;
     hpux*)