]> git.sesse.net Git - vlc/blobdiff - m4/vlc.m4
Converted oss to vlc_clone().
[vlc] / m4 / vlc.m4
index c4c738fce538facf25e2aab505b4bd2d6785a9a6..e82a47c6a9467a3807269cd4dc73e1b1ef8b2cd7 100644 (file)
--- a/m4/vlc.m4
+++ b/m4/vlc.m4
@@ -6,10 +6,6 @@ dnl  Macros to add plugins or builtins and handle their flags
 m4_pattern_allow([^PKG_CONFIG(_LIBDIR)?$])
 
 
-AC_DEFUN([VLC_ADD_BUILTINS], [
-  BUILTINS="${BUILTINS} $1"
-])
-
 AC_DEFUN([VLC_ADD_PLUGIN], [
   m4_foreach_w([element], [$1], [
     [PLUGINS="${PLUGINS} ]element["]
@@ -48,25 +44,18 @@ AC_DEFUN([VLC_ADD_OBJCFLAGS], [
 
 AC_DEFUN([VLC_ADD_LDFLAGS], [
   m4_foreach_w([element], [$1], [
-    [eval "LDFLAGS_]element[="'"$'"{LDFLAGS_]element[} $2"'"']
+    [eval "LDFLAGS_]element[="'"$2 $'"{LDFLAGS_]element[}"'"']
     [am_modules_with_ldflags="${am_modules_with_ldflags} ]element["]
   ])
 ])
 
 AC_DEFUN([VLC_ADD_LIBS], [
   m4_foreach_w([element], [$1], [
-    [eval "LIBS_]element[="'"$'"{LIBS_]element[} $2"'"']
+    [eval "LIBS_]element[="'"'"$2 "'$'"{LIBS_]element[}"'"']
     [am_modules_with_libs="${am_modules_with_libs} ]element["]
   ])
 ])
 
-AC_DEFUN([VLC_SET_CFLAGS_WERROR], [
-  m4_foreach_w([element], [$1], [
-    [eval "CFLAGS_WERROR_]element[="'"'"$2"'"']
-    [am_modules_with_werror="${am_modules_with_werror} ]element["]
-  ])
-])
-
 dnl ===========================================================================
 dnl  Macros to save and restore default flags
 
@@ -95,22 +84,15 @@ 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} ${am_modules_with_werror}; 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}; 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}/" \
-          -e "s/@cprof@/${enable_cprof}/" \
+    | sed \
           -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}/" \
-          -e "s/@CFLAGS_OPTIM_SIZE@/${CFLAGS_OPTIM_SIZE}/" \
-          -e "s/@CFLAGS_OPTIM_SPEED@/${CFLAGS_OPTIM_SPEED}/" \
-          -e "s/@CFLAGS_OPTIM_NODEBUG@/${CFLAGS_OPTIM_NODEBUG}/" \
-          -e "s/@CFLAGS_NOOPTIM@/${CFLAGS_NOOPTIM}/" \
     > vlc-config.in
 
   dnl  Switch/case loop
@@ -125,15 +107,9 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [
     fi
     if test "`eval echo @'$'CXXFLAGS_${x}@`" != "@@"; then
       echo "      cxxflags=\"\${cxxflags} `eval echo '$'CXXFLAGS_${x}`\""
-      if test "${x}" != "plugin" -a "${x}" != "builtin"; then
-        echo "      linkage=\"c++\""
-      fi
     fi
     if test "`eval echo @'$'OBJCFLAGS_${x}@`" != "@@"; then
       echo "      objcflags=\"\${objcflags} `eval echo '$'OBJCFLAGS_${x}`\""
-      if test "${x}" != "plugin" -a "${x}" != "builtin"; then
-        echo "      if test \"\${linkage}\" = \"c\"; then linkage=\"objc\"; fi"
-      fi
     fi
     if test "`eval echo @'$'LDFLAGS_${x}@`" != "@@"; then
       echo "      ldflags=\"\${ldflags} `eval echo '$'LDFLAGS_${x}`\""
@@ -141,9 +117,6 @@ 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
 
@@ -161,7 +134,7 @@ AC_DEFUN([VLC_LIBRARY_SUFFIX], [
     darwin*)
       LIBEXT=".dylib"
       ;;
-    *mingw32* | *cygwin* | *wince* | *mingwce*)
+    *mingw32* | *cygwin* | *wince* | *mingwce* | *os2*)
       LIBEXT=".dll"
       ;;
     hpux*)