]> git.sesse.net Git - vlc/blobdiff - m4/vlc.m4
Make sure that vlc.gettext.N_() returns the first argument.
[vlc] / m4 / vlc.m4
index e8944e13737901e61ff1b7fc6e5d6549f272d24e..46b10214e7e297a68e2aec6652b01a43a72553db 100644 (file)
--- a/m4/vlc.m4
+++ b/m4/vlc.m4
@@ -58,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
 
@@ -86,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" \
@@ -132,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
 
@@ -149,7 +159,7 @@ AC_DEFUN([VLC_LIBRARY_SUFFIX], [
     darwin*)
       LIBEXT=".dylib"
       ;;
-    *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
+    *mingw32* | *cygwin* | *wince* | *mingwce*)
       LIBEXT=".dll"
       ;;
     hpux*)